From 7c2e42dfcff623f2151230c3814e4365f666b67d Mon Sep 17 00:00:00 2001 From: Mrbysco Date: Sat, 2 Mar 2024 21:23:08 +0100 Subject: [PATCH 1/2] Port to 1.18 --- build.gradle | 9 +- gradle.properties | 8 +- gradle/wrapper/gradle-wrapper.jar | Bin 59203 -> 59821 bytes gradle/wrapper/gradle-wrapper.properties | 2 +- gradlew | 286 +++++++++++------- gradlew.bat | 43 +-- src/generated/resources/.cache/cache | 281 ++++++++--------- .../advancements/craft_coal_generator.json | 4 +- .../advancements/craft_coffee_machine.json | 4 +- .../advancements/craft_crusher.json | 4 +- .../advancements/craft_double_crusher.json | 4 +- .../advancements/craft_empowerer.json | 4 +- .../advancements/craft_energyface.json | 4 +- .../advancements/craft_item_interface.json | 4 +- .../advancements/craft_laser_relay.json | 4 +- .../craft_laser_relay_advanced.json | 4 +- .../craft_laser_relay_extreme.json | 4 +- .../advancements/craft_laser_relay_item.json | 4 +- .../advancements/craft_leaf_generator.json | 4 +- .../advancements/craft_liquiface.json | 4 +- .../advancements/craft_phantom_face.json | 4 +- .../advancements/craft_reconstructor.json | 4 +- .../advancements/pickup_coffee.json | 4 +- .../blocks/atomic_reconstructor.json | 3 +- .../loot_tables/blocks/battery_box.json | 3 +- .../loot_tables/blocks/bio_reactor.json | 3 +- .../blocks/black_quartz_block.json | 3 +- .../blocks/black_quartz_brick_block.json | 3 +- .../blocks/black_quartz_brick_slab.json | 3 +- .../blocks/black_quartz_brick_stair.json | 3 +- .../blocks/black_quartz_brick_wall.json | 3 +- .../loot_tables/blocks/black_quartz_ore.json | 3 +- .../blocks/black_quartz_pillar_block.json | 3 +- .../blocks/black_quartz_pillar_slab.json | 3 +- .../blocks/black_quartz_pillar_stair.json | 3 +- .../blocks/black_quartz_pillar_wall.json | 3 +- .../loot_tables/blocks/black_quartz_slab.json | 3 +- .../blocks/black_quartz_stair.json | 3 +- .../loot_tables/blocks/black_quartz_wall.json | 3 +- .../loot_tables/blocks/breaker.json | 3 +- .../loot_tables/blocks/canola.json | 2 + .../loot_tables/blocks/canola_press.json | 3 +- .../blocks/chiseled_black_quartz_block.json | 3 +- .../blocks/chiseled_black_quartz_slab.json | 3 +- .../blocks/chiseled_black_quartz_stair.json | 3 +- .../blocks/chiseled_black_quartz_wall.json | 3 +- .../loot_tables/blocks/coal_generator.json | 3 +- .../loot_tables/blocks/coffee.json | 2 + .../loot_tables/blocks/coffee_machine.json | 3 +- .../loot_tables/blocks/crusher.json | 3 +- .../loot_tables/blocks/crusher_double.json | 3 +- .../blocks/diamatine_crystal_block.json | 3 +- .../blocks/diamatine_crystal_cluster.json | 3 +- .../loot_tables/blocks/display_stand.json | 3 +- .../loot_tables/blocks/dropper.json | 3 +- .../blocks/emeradic_crystal_block.json | 3 +- .../blocks/emeradic_crystal_cluster.json | 3 +- .../empowered_diamatine_crystal_block.json | 3 +- .../empowered_emeradic_crystal_block.json | 3 +- .../blocks/empowered_enori_crystal_block.json | 3 +- .../blocks/empowered_palis_crystal_block.json | 3 +- .../empowered_restonia_crystal_block.json | 3 +- .../blocks/empowered_void_crystal_block.json | 3 +- .../loot_tables/blocks/empowerer.json | 3 +- .../loot_tables/blocks/ender_casing.json | 3 +- .../loot_tables/blocks/energizer.json | 3 +- .../loot_tables/blocks/enervator.json | 3 +- .../blocks/enori_crystal_block.json | 3 +- .../blocks/enori_crystal_cluster.json | 3 +- .../blocks/ethetic_green_block.json | 3 +- .../blocks/ethetic_green_slab.json | 3 +- .../blocks/ethetic_green_stairs.json | 3 +- .../blocks/ethetic_green_wall.json | 3 +- .../blocks/ethetic_white_block.json | 3 +- .../blocks/ethetic_white_slab.json | 3 +- .../blocks/ethetic_white_stairs.json | 3 +- .../blocks/ethetic_white_wall.json | 3 +- .../loot_tables/blocks/farmer.json | 3 +- .../loot_tables/blocks/feeder.json | 3 +- .../loot_tables/blocks/fermenting_barrel.json | 3 +- .../loot_tables/blocks/firework_box.json | 3 +- .../loot_tables/blocks/flax.json | 2 + .../loot_tables/blocks/fluid_collector.json | 3 +- .../loot_tables/blocks/fluid_placer.json | 3 +- .../loot_tables/blocks/greenhouse_glass.json | 3 +- .../loot_tables/blocks/heat_collector.json | 3 +- .../blocks/hopping_item_interface.json | 3 +- .../loot_tables/blocks/iron_casing.json | 3 +- .../loot_tables/blocks/item_interface.json | 3 +- .../loot_tables/blocks/lamp_black.json | 3 +- .../loot_tables/blocks/lamp_blue.json | 3 +- .../loot_tables/blocks/lamp_brown.json | 3 +- .../loot_tables/blocks/lamp_controller.json | 3 +- .../loot_tables/blocks/lamp_cyan.json | 3 +- .../loot_tables/blocks/lamp_gray.json | 3 +- .../loot_tables/blocks/lamp_green.json | 3 +- .../loot_tables/blocks/lamp_light_blue.json | 3 +- .../loot_tables/blocks/lamp_light_gray.json | 3 +- .../loot_tables/blocks/lamp_lime.json | 3 +- .../loot_tables/blocks/lamp_magenta.json | 3 +- .../loot_tables/blocks/lamp_orange.json | 3 +- .../loot_tables/blocks/lamp_pink.json | 3 +- .../loot_tables/blocks/lamp_purple.json | 3 +- .../loot_tables/blocks/lamp_red.json | 3 +- .../loot_tables/blocks/lamp_white.json | 3 +- .../loot_tables/blocks/lamp_yellow.json | 3 +- .../loot_tables/blocks/laser_relay.json | 3 +- .../blocks/laser_relay_advanced.json | 3 +- .../blocks/laser_relay_extreme.json | 3 +- .../blocks/laser_relay_fluids.json | 3 +- .../loot_tables/blocks/laser_relay_item.json | 3 +- .../blocks/laser_relay_item_advanced.json | 3 +- .../blocks/lava_factory_casing.json | 3 +- .../blocks/lava_factory_controller.json | 3 +- .../loot_tables/blocks/leaf_generator.json | 3 +- .../blocks/long_range_breaker.json | 3 +- .../loot_tables/blocks/oil_generator.json | 3 +- .../blocks/palis_crystal_block.json | 3 +- .../blocks/palis_crystal_cluster.json | 3 +- .../loot_tables/blocks/phantom_booster.json | 3 +- .../loot_tables/blocks/phantom_breaker.json | 3 +- .../blocks/phantom_energyface.json | 3 +- .../loot_tables/blocks/phantom_itemface.json | 3 +- .../loot_tables/blocks/phantom_liquiface.json | 3 +- .../loot_tables/blocks/phantom_placer.json | 3 +- .../blocks/phantom_redstoneface.json | 3 +- .../loot_tables/blocks/placer.json | 3 +- .../loot_tables/blocks/player_interface.json | 3 +- .../loot_tables/blocks/powered_furnace.json | 3 +- .../loot_tables/blocks/ranged_collector.json | 3 +- .../blocks/restonia_crystal_block.json | 3 +- .../blocks/restonia_crystal_cluster.json | 3 +- .../loot_tables/blocks/rice.json | 2 + .../loot_tables/blocks/shock_suppressor.json | 3 +- .../blocks/smooth_black_quartz_block.json | 3 +- .../blocks/smooth_black_quartz_slab.json | 3 +- .../blocks/smooth_black_quartz_stair.json | 3 +- .../blocks/smooth_black_quartz_wall.json | 3 +- .../loot_tables/blocks/tiny_torch.json | 3 +- .../loot_tables/blocks/vertical_digger.json | 3 +- .../blocks/void_crystal_block.json | 3 +- .../blocks/void_crystal_cluster.json | 3 +- .../loot_tables/blocks/wood_casing.json | 3 +- .../loot_tables/blocks/xp_solidifier.json | 3 +- .../recipes/lens_of_the_killer.json | 5 +- .../tags/blocks/mineable/aio.json | 9 + .../tags/blocks/mineable/drill.json | 7 + .../minecraft/tags/blocks/mineable/axe.json | 6 + .../tags/blocks/mineable/pickaxe.json | 92 ++++++ .../tags/blocks/needs_stone_tool.json | 29 ++ .../api/ActuallyAdditionsAPI.java | 31 +- .../actuallyadditions/api/ActuallyTags.java | 43 ++- .../api/booklet/IBookletChapter.java | 2 +- .../api/booklet/IBookletPage.java | 4 +- .../api/booklet/internal/GuiBookletBase.java | 12 +- .../api/farmer/IFarmerBehavior.java | 18 +- .../api/internal/IAtomicReconstructor.java | 2 +- .../api/internal/IEnergyTile.java | 6 +- .../api/internal/IFarmer.java | 6 +- .../api/internal/IMethodHandler.java | 16 +- .../api/laser/IConnectionPair.java | 8 +- .../laser/ILaserRelayConnectionHandler.java | 24 +- .../actuallyadditions/api/lens/Lens.java | 6 +- .../api/lens/LensConversion.java | 4 +- .../api/misc/IDisplayStandItem.java | 8 +- .../api/recipe/CoffeeIngredient.java | 14 +- .../api/recipe/WeightedOre.java | 13 +- .../api/tile/IPhantomTile.java | 2 +- .../data/ActuallyAdditionsData.java | 2 +- .../data/AdvancementGenerator.java | 120 ++++---- .../data/BlockRecipeGenerator.java | 45 +-- .../data/BlockStateGenerator.java | 88 +++--- .../data/BlockTagsGenerator.java | 137 ++++++++- .../data/ColorChangeGenerator.java | 48 +-- .../data/CrushingRecipeGenerator.java | 18 +- .../data/EmpoweringRecipeGenerator.java | 41 +-- .../data/FuelRecipeGenerator.java | 41 ++- .../data/ItemModelGenerator.java | 10 +- .../data/ItemRecipeGenerator.java | 67 ++-- .../data/ItemTagsGenerator.java | 4 +- .../data/LaserRecipeGenerator.java | 47 +-- .../data/LootTableGenerator.java | 53 ++-- .../data/MiningLensGenerator.java | 38 +-- .../data/MiscMachineRecipeGenerator.java | 32 +- .../data/SoundsGenerator.java | 2 +- .../actuallyadditions/mod/AASounds.java | 6 +- .../mod/ActuallyAdditions.java | 42 +-- .../mod/ActuallyAdditionsClient.java | 159 ++++++---- .../mod/ClientRegistryHandler.java | 6 +- .../mod/blocks/AABlockItem.java | 27 +- .../mod/blocks/ActuallyBlock.java | 12 +- .../mod/blocks/ActuallyBlocks.java | 126 +++++--- .../mod/blocks/BlockAtomicReconstructor.java | 111 ++++--- .../mod/blocks/BlockBatteryBox.java | 59 ++-- .../mod/blocks/BlockBioReactor.java | 38 ++- .../mod/blocks/BlockBreaker.java | 44 +-- .../mod/blocks/BlockCanolaPress.java | 61 ++-- .../mod/blocks/BlockCoalGenerator.java | 61 ++-- .../mod/blocks/BlockCoffeeMachine.java | 55 ++-- .../mod/blocks/BlockColoredLamp.java | 54 ++-- .../mod/blocks/BlockCrusher.java | 89 +++--- .../mod/blocks/BlockCrystal.java | 4 +- .../mod/blocks/BlockDisplayStand.java | 149 ++++----- .../mod/blocks/BlockDropper.java | 40 +-- .../mod/blocks/BlockEnergizer.java | 51 ++-- .../mod/blocks/BlockFarmer.java | 54 ++-- .../mod/blocks/BlockFeeder.java | 47 +-- .../mod/blocks/BlockFermentingBarrel.java | 77 ++--- .../mod/blocks/BlockFireworkBox.java | 48 +-- .../mod/blocks/BlockFluidCollector.java | 75 +++-- .../mod/blocks/BlockGeneric.java | 2 +- .../mod/blocks/BlockGreenhouseGlass.java | 44 +-- .../mod/blocks/BlockHeatCollector.java | 36 ++- .../mod/blocks/BlockItemInterface.java | 36 ++- .../mod/blocks/BlockItemInterfaceHopping.java | 34 ++- .../mod/blocks/BlockLampController.java | 40 +-- .../mod/blocks/BlockLaserRelay.java | 134 ++++---- .../blocks/BlockLavaFactoryController.java | 62 ++-- .../mod/blocks/BlockLeafGenerator.java | 47 +-- .../mod/blocks/BlockLongRangeBreaker.java | 59 ++-- .../mod/blocks/BlockOilGenerator.java | 70 ++--- .../mod/blocks/BlockPhantom.java | 123 +++++--- .../mod/blocks/BlockPhantomBooster.java | 36 ++- .../mod/blocks/BlockPlayerInterface.java | 68 +++-- .../mod/blocks/BlockPoweredFurnace.java | 78 ++--- .../mod/blocks/BlockRangedCollector.java | 49 +-- .../mod/blocks/BlockShockSuppressor.java | 46 +-- .../mod/blocks/BlockTinyTorch.java | 20 +- .../mod/blocks/BlockVerticalDigger.java | 71 +++-- .../mod/blocks/BlockWildPlant.java | 8 +- .../mod/blocks/BlockXPSolidifier.java | 47 +-- .../mod/blocks/CrystalClusterBlock.java | 31 +- .../mod/blocks/IActuallyBlock.java | 2 +- .../mod/blocks/IHudDisplay.java | 12 +- .../blocks/{Shapes.java => VoxelShapes.java} | 161 +++++----- .../mod/blocks/base/AACrops.java | 10 +- .../mod/blocks/base/BlockBase.java | 6 +- .../mod/blocks/base/BlockBushBase.java | 6 +- .../mod/blocks/base/BlockContainerBase.java | 114 ++++--- .../mod/blocks/base/BlockFluidFlowing.java | 3 - .../mod/blocks/base/BlockPlant.java | 44 +-- .../mod/blocks/base/DirectionalBlock.java | 24 +- .../blocks/base/FullyDirectionalBlock.java | 22 +- .../mod/blocks/base/ItemBlockBase.java | 6 +- .../metalists/TheColoredLampColors.java | 4 +- .../mod/blocks/metalists/TheMiscBlocks.java | 6 +- .../mod/blocks/package-info.java | 3 +- .../blocks/render/ReconstructorRenderer.java | 32 +- .../mod/blocks/render/RenderBatteryBox.java | 30 +- .../mod/blocks/render/RenderDisplayStand.java | 25 +- .../mod/blocks/render/RenderEmpowerer.java | 33 +- .../mod/blocks/render/RenderLaserRelay.java | 45 ++- .../mod/blocks/render/RenderTypes.java | 23 +- .../mod/config/CommonConfig.java | 4 +- .../mod/config/ConfigValues.java | 2 +- .../conditions/BoolConfigCondition.java | 2 +- .../mod/crafting/ActuallyRecipes.java | 46 +-- .../mod/crafting/ColorChangeRecipe.java | 54 ++-- .../mod/crafting/CrushingRecipe.java | 66 ++-- .../mod/crafting/EmpowererRecipe.java | 62 ++-- .../mod/crafting/FermentingRecipe.java | 54 ++-- .../mod/crafting/InitCrafting.java | 8 +- .../mod/crafting/LaserRecipe.java | 56 ++-- .../mod/crafting/LiquidFuelRecipe.java | 49 ++- .../mod/crafting/MiningLensRecipe.java | 67 ++-- .../mod/crafting/PressingRecipe.java | 52 ++-- .../mod/crafting/RecipeKeepDataShaped.java | 32 +- .../mod/crafting/SingleItem.java | 10 +- .../mod/crafting/SolidFuelRecipe.java | 38 +-- .../mod/crafting/TargetNBTIngredient.java | 30 +- .../mod/crafting/WrappedRecipe.java | 20 +- .../mod/data/PlayerData.java | 38 +-- .../actuallyadditions/mod/data/WorldData.java | 57 ++-- .../mod/entity/EntityWorm.java | 52 ++-- .../mod/entity/RenderWorm.java | 33 +- .../mod/event/ClientEvents.java | 67 ++-- .../mod/event/CommonEvents.java | 30 +- .../actuallyadditions/mod/fluids/FluidAA.java | 28 +- .../mod/fluids/InitFluids.java | 4 +- .../mod/inventory/ActuallyContainers.java | 58 ++-- .../mod/inventory/ContainerBioReactor.java | 22 +- .../mod/inventory/ContainerBreaker.java | 22 +- .../mod/inventory/ContainerCanolaPress.java | 22 +- .../mod/inventory/ContainerCoalGenerator.java | 24 +- .../mod/inventory/ContainerCoffeeMachine.java | 24 +- .../ContainerDirectionalBreaker.java | 22 +- .../mod/inventory/ContainerDrill.java | 34 +-- .../mod/inventory/ContainerDropper.java | 26 +- .../mod/inventory/ContainerEnergizer.java | 34 +-- .../mod/inventory/ContainerEnervator.java | 28 +- .../mod/inventory/ContainerFarmer.java | 22 +- .../mod/inventory/ContainerFeeder.java | 22 +- .../inventory/ContainerFermentingBarrel.java | 22 +- .../mod/inventory/ContainerFilter.java | 36 +-- .../mod/inventory/ContainerFireworkBox.java | 20 +- .../inventory/ContainerFluidCollector.java | 22 +- .../mod/inventory/ContainerFurnaceDouble.java | 28 +- .../ContainerLaserRelayItemWhitelist.java | 30 +- .../mod/inventory/ContainerMiner.java | 22 +- .../mod/inventory/ContainerOilGenerator.java | 22 +- .../mod/inventory/ContainerPhantomPlacer.java | 22 +- .../inventory/ContainerRangedCollector.java | 30 +- .../mod/inventory/ContainerXPSolidifier.java | 22 +- .../mod/inventory/CrusherContainer.java | 22 +- .../mod/inventory/GuiHandler.java | 8 +- .../mod/inventory/SackContainer.java | 46 +-- .../mod/inventory/gui/AAScreen.java | 19 +- .../mod/inventory/gui/Buttons.java | 28 +- .../mod/inventory/gui/CrusherScreen.java | 46 +-- .../mod/inventory/gui/EnergyDisplay.java | 33 +- .../mod/inventory/gui/FilterSettingsGui.java | 69 ++--- .../mod/inventory/gui/FluidDisplay.java | 41 +-- .../mod/inventory/gui/GuiBioReactor.java | 22 +- .../mod/inventory/gui/GuiBreaker.java | 24 +- .../mod/inventory/gui/GuiCanolaPress.java | 20 +- .../mod/inventory/gui/GuiCoalGenerator.java | 22 +- .../mod/inventory/gui/GuiCoffeeMachine.java | 41 ++- .../inventory/gui/GuiDirectionalBreaker.java | 20 +- .../mod/inventory/gui/GuiDrill.java | 22 +- .../mod/inventory/gui/GuiDropper.java | 20 +- .../mod/inventory/gui/GuiEnergizer.java | 20 +- .../mod/inventory/gui/GuiEnervator.java | 20 +- .../mod/inventory/gui/GuiFarmer.java | 20 +- .../mod/inventory/gui/GuiFeeder.java | 23 +- .../inventory/gui/GuiFermentingBarrel.java | 20 +- .../mod/inventory/gui/GuiFilter.java | 22 +- .../mod/inventory/gui/GuiFireworkBox.java | 20 +- .../mod/inventory/gui/GuiFluidCollector.java | 20 +- .../mod/inventory/gui/GuiFurnaceDouble.java | 49 ++- .../gui/GuiLaserRelayItemWhitelist.java | 30 +- .../mod/inventory/gui/GuiMiner.java | 21 +- .../mod/inventory/gui/GuiOilGenerator.java | 23 +- .../mod/inventory/gui/GuiPhantomPlacer.java | 24 +- .../mod/inventory/gui/GuiRangedCollector.java | 24 +- .../mod/inventory/gui/GuiXPSolidifier.java | 21 +- .../mod/inventory/gui/SackGui.java | 28 +- .../mod/inventory/gui/TexturedButton.java | 28 +- .../mod/inventory/slot/SlotDeletion.java | 2 +- .../mod/inventory/slot/SlotFilter.java | 18 +- .../mod/inventory/slot/SlotImmovable.java | 12 +- .../slot/SlotItemHandlerUnconditioned.java | 10 +- .../mod/inventory/slot/SlotOutput.java | 2 +- .../mod/items/ActuallyItems.java | 26 +- .../mod/items/AllInOneTool.java | 38 ++- .../mod/items/CanolaSeed.java | 18 +- .../mod/items/DrillItem.java | 149 +++++---- .../mod/items/ItemAxeAA.java | 21 +- .../mod/items/ItemBattery.java | 38 +-- .../mod/items/ItemBooklet.java | 64 ++-- .../mod/items/ItemCoffee.java | 28 +- .../mod/items/ItemCrafterOnAStick.java | 32 +- .../mod/items/ItemCrystal.java | 2 +- .../mod/items/ItemDrillUpgrade.java | 26 +- .../mod/items/ItemEngineerGoggles.java | 29 +- .../mod/items/ItemFertilizer.java | 14 +- .../mod/items/ItemFillingWand.java | 92 +++--- .../mod/items/ItemFilter.java | 32 +- .../mod/items/ItemGeneric.java | 2 - .../mod/items/ItemGrowthRing.java | 38 +-- .../mod/items/ItemLaserWrench.java | 58 ++-- .../mod/items/ItemLeafBlower.java | 50 +-- .../mod/items/ItemMagnetRing.java | 28 +- .../mod/items/ItemPhantomConnector.java | 74 ++--- .../mod/items/ItemPickaxeAA.java | 24 +- .../mod/items/ItemPlayerProbe.java | 68 ++--- .../mod/items/ItemResonantRice.java | 18 +- .../mod/items/ItemShovelAA.java | 23 +- .../mod/items/ItemSolidifiedExperience.java | 24 +- .../mod/items/ItemTeleportStaff.java | 42 +-- .../mod/items/ItemWaterBowl.java | 98 +++--- .../mod/items/ItemWaterRemovalRing.java | 32 +- .../mod/items/ItemWingsOfTheBats.java | 66 ++-- .../actuallyadditions/mod/items/Sack.java | 44 +-- .../actuallyadditions/mod/items/Worm.java | 28 +- .../mod/items/base/ActuallyItem.java | 2 +- .../mod/items/base/ItemArmorAA.java | 12 +- .../mod/items/base/ItemBase.java | 4 +- .../mod/items/base/ItemEnergy.java | 45 ++- .../mod/items/base/ItemFoodSeed.java | 14 +- .../mod/items/base/ItemHoeAA.java | 17 +- .../mod/items/base/ItemSeed.java | 12 +- .../mod/items/base/ItemSwordAA.java | 17 +- .../mod/items/base/ItemToolAA.java | 21 +- .../mod/items/lens/LensColor.java | 20 +- .../mod/items/lens/LensDeath.java | 12 +- .../mod/items/lens/LensDetonation.java | 12 +- .../mod/items/lens/LensDisenchanting.java | 32 +- .../mod/items/lens/LensKiller.java | 8 +- .../mod/items/lens/LensMining.java | 26 +- .../mod/items/metalists/Crystals.java | 4 +- .../mod/items/metalists/TheDusts.java | 2 +- .../mod/items/metalists/TheFoods.java | 6 +- .../mod/items/metalists/TheJams.java | 2 +- .../mod/items/metalists/ThePotionRings.java | 36 +-- .../mod/items/misc/YummyItem.java | 56 ++-- .../mod/jei/EmpowererRecipeCategory.java | 194 ++++++------ .../mod/jei/FermentingCategory.java | 168 +++++----- .../mod/jei/JEIActuallyAdditionsPlugin.java | 32 +- .../mod/jei/LaserRecipeCategory.java | 166 +++++----- .../mod/material/ArmorMaterials.java | 24 +- .../mod/material/ToolMaterials.java | 77 ++--- .../mod/misc/BannerHelper.java | 2 +- .../mod/misc/DamageSources.java | 12 +- .../mod/misc/DispenserHandlerFertilize.java | 16 +- .../mod/misc/apiimpl/ConnectionPair.java | 8 +- .../apiimpl/LaserRelayConnectionHandler.java | 42 +-- .../mod/misc/apiimpl/MethodHandler.java | 72 ++--- .../apiimpl/farmer/CactusFarmerBehavior.java | 33 +- .../apiimpl/farmer/DefaultFarmerBehavior.java | 92 +++--- .../farmer/MelonPumpkinFarmerBehavior.java | 33 +- .../farmer/NetherWartFarmerBehavior.java | 37 ++- .../apiimpl/farmer/ReedFarmerBehavior.java | 33 +- .../mod/misc/special/RenderSpecial.java | 33 +- .../mod/misc/special/SpecialRenderInit.java | 10 +- .../mod/network/IDataHandler.java | 6 +- .../mod/network/PacketClientToServer.java | 17 +- .../mod/network/PacketHandler.java | 84 ++--- .../mod/network/PacketHandlerHelper.java | 34 +-- .../mod/network/PacketServerToClient.java | 16 +- .../mod/network/gui/IButtonReactor.java | 4 +- .../mod/network/gui/INumberReactor.java | 4 +- .../mod/network/gui/IStringReactor.java | 4 +- .../mod/ore/InitOreDict.java | 8 +- .../mod/particle/ActuallyParticles.java | 4 +- .../mod/particle/BeamParticleData.java | 14 +- .../mod/particle/BeamParticleType.java | 2 +- .../mod/particle/LaserItemParticleData.java | 20 +- .../mod/particle/LaserItemParticleType.java | 2 +- .../mod/particle/ParticleBeam.java | 30 +- .../mod/particle/ParticleLaserItem.java | 71 +++-- .../mod/proxy/ClientProxy.java | 6 +- .../mod/recipe/CrusherRecipeRegistry.java | 2 +- .../actuallyadditions/mod/sack/SackData.java | 18 +- .../mod/sack/SackManager.java | 33 +- .../mod/tile/CustomEnergyStorage.java | 6 +- .../mod/tile/FilterSettings.java | 14 +- .../mod/tile/ISharingEnergyProvider.java | 6 +- .../mod/tile/ISharingFluidHandler.java | 2 +- .../tile/TileEntityAtomicReconstructor.java | 74 ++--- .../mod/tile/TileEntityBase.java | 144 +++++---- .../mod/tile/TileEntityBatteryBox.java | 60 ++-- .../mod/tile/TileEntityBioReactor.java | 128 ++++---- .../mod/tile/TileEntityBreaker.java | 85 +++--- .../mod/tile/TileEntityCanolaPress.java | 89 +++--- .../mod/tile/TileEntityCoalGenerator.java | 104 +++---- .../mod/tile/TileEntityCoffeeMachine.java | 82 ++--- .../mod/tile/TileEntityCrusher.java | 141 ++++----- .../mod/tile/TileEntityCrusherDouble.java | 19 +- .../mod/tile/TileEntityDisplayStand.java | 55 ++-- .../mod/tile/TileEntityDropper.java | 64 ++-- .../mod/tile/TileEntityEmpowerer.java | 82 ++--- .../mod/tile/TileEntityEnergizer.java | 70 +++-- .../mod/tile/TileEntityEnervator.java | 71 +++-- .../mod/tile/TileEntityFarmer.java | 96 +++--- .../mod/tile/TileEntityFeeder.java | 106 ++++--- .../mod/tile/TileEntityFermentingBarrel.java | 117 +++---- .../mod/tile/TileEntityFireworkBox.java | 115 ++++--- .../mod/tile/TileEntityFluidCollector.java | 112 +++---- .../mod/tile/TileEntityFluidPlacer.java | 20 +- .../mod/tile/TileEntityHeatCollector.java | 73 +++-- .../mod/tile/TileEntityInventoryBase.java | 32 +- .../mod/tile/TileEntityItemInterface.java | 54 ++-- .../tile/TileEntityItemInterfaceHopping.java | 120 ++++---- .../mod/tile/TileEntityLaserRelay.java | 59 ++-- .../mod/tile/TileEntityLaserRelayEnergy.java | 68 +++-- .../TileEntityLaserRelayEnergyAdvanced.java | 20 +- .../TileEntityLaserRelayEnergyExtreme.java | 20 +- .../mod/tile/TileEntityLaserRelayFluids.java | 71 +++-- .../mod/tile/TileEntityLaserRelayItem.java | 60 ++-- .../TileEntityLaserRelayItemAdvanced.java | 67 ++-- .../tile/TileEntityLavaFactoryController.java | 54 ++-- .../mod/tile/TileEntityLeafGenerator.java | 72 +++-- .../mod/tile/TileEntityLongRangeBreaker.java | 78 ++--- .../mod/tile/TileEntityOilGenerator.java | 104 ++++--- .../mod/tile/TileEntityPhantomBooster.java | 20 +- .../mod/tile/TileEntityPhantomBreaker.java | 20 +- .../mod/tile/TileEntityPhantomEnergyface.java | 27 +- .../mod/tile/TileEntityPhantomItemface.java | 25 +- .../mod/tile/TileEntityPhantomLiquiface.java | 25 +- .../mod/tile/TileEntityPhantomPlacer.java | 105 ++++--- .../tile/TileEntityPhantomRedstoneface.java | 36 ++- .../mod/tile/TileEntityPhantomface.java | 70 ++--- .../mod/tile/TileEntityPlacer.java | 31 +- .../mod/tile/TileEntityPlayerInterface.java | 68 +++-- .../mod/tile/TileEntityPoweredFurnace.java | 137 +++++---- .../mod/tile/TileEntityRangedCollector.java | 74 +++-- .../mod/tile/TileEntityShockSuppressor.java | 36 ++- .../mod/tile/TileEntityVerticalDigger.java | 120 ++++---- .../mod/tile/TileEntityXPSolidifier.java | 114 +++---- .../mod/update/UpdateChecker.java | 17 +- .../actuallyadditions/mod/util/AssetUtil.java | 118 ++++---- .../mod/util/ItemStackHandlerAA.java | 4 +- .../actuallyadditions/mod/util/ItemUtil.java | 16 +- .../actuallyadditions/mod/util/Lang.java | 3 - .../mod/util/NetHandlerSpaghettiServer.java | 163 ++++++---- .../mod/util/ResourceReloader.java | 19 +- .../actuallyadditions/mod/util/StackUtil.java | 4 +- .../mod/util/StringUtil.java | 10 +- .../mod/util/VanillaPacketDispatcher.java | 28 +- .../actuallyadditions/mod/util/WorldUtil.java | 176 +++++------ .../registration/AABlockReg.java | 26 +- src/main/resources/META-INF/mods.toml | 6 +- 502 files changed, 8409 insertions(+), 7068 deletions(-) create mode 100644 src/generated/resources/data/actuallyadditions/tags/blocks/mineable/aio.json create mode 100644 src/generated/resources/data/actuallyadditions/tags/blocks/mineable/drill.json create mode 100644 src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json create mode 100644 src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json create mode 100644 src/generated/resources/data/minecraft/tags/blocks/needs_stone_tool.json rename src/main/java/de/ellpeck/actuallyadditions/mod/blocks/{Shapes.java => VoxelShapes.java} (92%) diff --git a/build.gradle b/build.gradle index 9d08ae2dd..3a98c5c27 100644 --- a/build.gradle +++ b/build.gradle @@ -17,7 +17,8 @@ apply plugin: 'org.parchmentmc.librarian.forgegradle' apply plugin: 'java' apply plugin: 'idea' apply plugin: 'maven-publish' - +apply from: 'https://raw.githubusercontent.com/SizableShrimp/Forge-Class-Remapper/main/classremapper.gradle' +apply from: 'https://raw.githubusercontent.com/SizableShrimp/ForgeUpdatesRemapper/main/remapper.gradle' version = "$mod_version" group = "de.ellpeck.actuallyadditions" archivesBaseName = "ActuallyAdditions-$game_version" @@ -26,7 +27,7 @@ if (System.getenv('BUILD_NUMBER') != null) { version += "." + System.getenv('BUILD_NUMBER') } -java.toolchain.languageVersion = JavaLanguageVersion.of(8) +java.toolchain.languageVersion = JavaLanguageVersion.of(17) minecraft { mappings channel: 'parchment', version: "${parchment_version}-${game_version}" @@ -88,8 +89,8 @@ dependencies { compileOnly fg.deobf("mezz.jei:jei-${jei_version}:api") runtimeOnly fg.deobf("mezz.jei:jei-${jei_version}") - runtimeOnly fg.deobf("curse.maven:TOP-245211:3319255") - runtimeOnly fg.deobf("curse.maven:MEK-268560:3590099") + runtimeOnly fg.deobf("curse.maven:the-one-probe-245211:3965688") + runtimeOnly fg.deobf("curse.maven:mekanism-268560:3875976") } // not sure if this is still needed diff --git a/gradle.properties b/gradle.properties index 09d348238..92fe44a8c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,11 +6,11 @@ org.gradle.daemon=false mod_version=1.1.52 # Forge -game_version=1.16.5 -forge_version=36.2.34 +game_version=1.18.2 +forge_version=40.2.17 # Parchment (Mappings) -parchment_version=2021.10.17 +parchment_version=2022.11.06 # Other mods -jei_version=1.16.5:7.7.1.153 +jei_version=1.18.2:9.7.1.255 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index e708b1c023ec8b20f512888fe07c5bd3ff77bb8f..41d9927a4d4fb3f96a785543079b8df6723c946b 100644 GIT binary patch delta 20926 zcmY(p19zBh*tDC*wr$(CZQHhW$3|n@W@Fn%V>fmhHTa(WuDw3|hwGe~>zEmy1FKsG zYYc=z@M+Z>Uk4n- zf>LPE!P?mA5#!>@QlN|1%u#eAY%z9sYzTix2)?dl^qr+FV;S+1iF%X=EN6X@efcip zx4L{6MHen@KT&~3ddxw!vGK3 zDR6IzmfS(C#hBd@wn!OgvMoF}phsEk&F5-Dcwt7G2xG&Dm&xutI)E-Va!-qKz~+w0 z-=AFd+H(~(Q$3%N5nez;ZIxbBM31j>5Nyo-YkiExY1M<@u<0e*nz!!R z;{N$-qP&QO{9nWv^INxb>J`g-yYMA$eDo8qb{Bw9^fZ9m+S(Rz2Zph#(1yUfaZB?I z#eOI?a)(CpDeqla5F^C|B-C7T7CC2S%N!%mR&iZ=7m$e>8JAYv-&Am?exYu9F)s@^ z9C)0W-|mW~Vu~>&H5kvxytGG67Zv0pEg}b-m(ggB8~^+aXZ&XbbIGOp!bkEM{Np3q z@-SX2K#W$Hez?IRlyxVVm5t}P- zltiFvZ&=0@Q}LqUpz=6(h07TA`ZYSz8rFm{Z{-~Qw!}yL8*=dtF@T_H90~mu8Kw1t z)le9013)H|!YcV=K?2_d9ifA*Q*M@vBRhpdibeK-gIY}{cl&GETL*)(oq?%BoP{H$ zn4O~f$L0bBm?qk}Rxw_2yYt*IM#^$v;IJSd(9j_NsR~GbNZnQu7zjwxm0I8$)sVjq#M(yl^fk=Y`b_$ZVpEG;yCH|Z~I1>MTYdpi8P>+NQC zE_BSsn_WD^EqD%(G{YUlEBLDQx{o%zvDKPVnupGJe#6t<@AjO#$J70?_*f7K>5NMO zCdGnVcF-Cu*i*B@rqUDnlJ*oFjO4O5fDMd!aWYNYr?1Q%bXxmhTs+GlOuiIos<7s9?Rq}Re!?8dR-lV6wuAMP@lIdDi#5Rjy`J^G=>=w^ zv-=qd_E^Jjec?ZYvRRjl)ZU`Tp|r;fQ0+e;vL#MSm0`uzNi*svh0g|21$yHVsskBt}fvlw5cR}CPTD)g#ZN9hWkzJiL`q# zI0YW?x=^LciAbCH`Blg1^v-&f2K#)4q@^MJV*02DZqX0X-h=qdoEF$}M~SpY3pzsk zjSrpF@05PZM}QhiFzr&-AQw3u5F}%7#F0rPla{VYb0~aE6$(UFm010IA@ar_IZzG_ zmSKga>0=esGyeC;)gc^j&8@M-tPu*a1l=rx;Tmi~=p^ccq;fJgp;+R4&O}&r_s$&9 z^bPU<-gBa}(hLnM2uLMmN+AjrFscLNt+$#cIIg?f@`S%7dnhgg4cg3YC<6`i+c=5< zitavH+cN}B)VnF)fufnbw1PgBBDLI48@83c%)KbAY+(VFXHdA10mkp#-u?N!HIIgE zrq9#*^6RCKN~bwo<}~Lv$NxUyCExF+^ECgl!0qOj(f6zy6Y3)EmkP})un2gc37z-z zpMADl2Uab7drwFZd7rtwr)2~x^xrR;u?I)Um^>$E$nl#uiaq5T@=h_rpMy=9wp*hw zR>EfZS|j?648RT6R_RlASXJrQJBLSNx|T%-@NbDV+~Y6KVAyLEXPp)y<~KAN9Y7H3 z4#5ey|6qDp(DP5oG^Ec4+%yoq&kzKa4jxBeKo{vzW>pvI9~W|Zwue`HMALHOduIe6{6Gf40 zRLkq<1&{5L2TP>S)b`5l8fWRB@9H;NJ~g6L7`uNCYJ7xGu0_WX!y8n*E2h?~d*n_o z)z>t38Qk&FyCXF?)d^L7v`d>XW|HN4diuv0MOM&r!&)RoHO(3d+e<4FVv zIM&Bs#*1A9dU$XEB1POPbt`fUTx0WxVE6s~u2vq?k(r4?$1xH5+uPlhot8Sk^|j|+ z<;Ds;`#is=0ADlpL^-E`>NyK^HV zP%0cOvzyynZW>O0)U7pjV9f+WW()Oo72Vyvbx3?y7jT}yua~En>kC*bNI$B*D~i5EwtR-PR+E)dDo{=}GMv@e~Jo=F#|ab_Ui3^ZPl zj*_7V>L+e+;<6-J%cYu#^H`HFBM|ri(7NtrF)>n@v@7e;v8E^M29ngLY!|gePuwOG zH*%$9l(}SYGEttK>CHo%CWvCpwjjgD$JHD0se~WB%CNYsoB~d+yy!&Rc9{W5DrEVb zZd0N2!7hwb&I9?aS<*SoJw=J8UF4|K5VV#+Xw!!bMHv##=j0jsKab-5a&%4%MY0v~98iJ4 z?9Uk;!%6D*%aJ|&F3JYXfQwRDzgSW1)S76ku1d|-3>O8xmwvAA7v|M?Ll*{=i? zE;5}7yed-bGu@ZphkjV-lUM-@21k*vbhtwF*$oft>|eZq*pbw04y;i1y-J|`(fC_i zZM!(?)nquXW1|jB@TV^=GRiqmmSU!4hsfD;*pQO#2ScFjQN`PqymvOi@+(fD=+Q0o zR>40M7~Fea4o%(Vq{_JCsjE3+$cW_o#h|gh6DtWf{Ag}nPtw3TywPd`Yh6aED)@D8iZ(Puv5=hi;?ev&|m|%CuVP&vGeS0h=NykRI=q**z z60h@d-2M?JyAOdc!8kg^9b(Y-B8@eecwnFb#5-k!2!)+u(bhkE{&&!vQ8#(JX?oh{ zzr*y3>wpKlprHoa58Qsle}7*bD*MHcxL#*L`>vKYBw)eRgp~m#c6{u3&Z~rxA%sg0 zH7*x3#}>yIR81IYW`e^Hp-&&rFF@mkD_rJEj=OC)RC9~n#e;34 zB8ucD9wIh6e_MT%XxqoAnBp>-7#J;V4uUKF1F9xN$N?m?DQo=jTXR0tNbg=X1LV}H!7!x&-6z@D#<}1l}M|wUee!@W4|eZ zE-ri-P+EYIjgckuXi|^{T(G=<|0AU}Br-NL2O@LyVX)sgW+vn%8R_(#qh9G~!wT$a z|M-?u@I8YuP1|w0#g02jiy+lkdeWC$ssO?dePpkPKNP*Mal{SO^alvrKVtC8(4Tp! z^HN%W6Es(Je!}?y`44yS()^H{GX8Y$Re~TmzzVf=s4A$#6f$!lz#&Od2M*d76UN$IZSD83`o#6EFYrYGq z{S)+_qW9B<5~~hu2a1KJ4;(jyF;r3>ZZUwS1mbs5lw&(KhH()Es}?izw`cI+?7x)-??%CsoK9;>6{ zzD`I6_vk=3VvfF?&3lZ1Viq^ZH+hPn_4;fiYt!uKd1|(1((AufUDb0`UD=E!O50*b z+jL#1#(%21l14=h#ZU}qc26Gu8W%vJlk_7$DMjjU{XOsu4lkrXgroX+Jb;2=cmnOy zZ}2+e3eiM8vhW^t((WV}dfHrPZM4^KxfvZnZ&BZUnQ3P3csN1g>KdGqnC#6XbsaSz z*PkQs)Fs>C$cuog9;bo_?3afb`wO>5utUCcq8Q=3zchtyFid@+Y8R@bt`y)_i9u~s za?+Y_TV;S-IJ!x8+SZl3bwREuYknK$o^u8R#cQEdI8HHJvhm?HNX__AH*T%dzL!_@ zpHpP(_PfPZA2ebp#O%Rj(BgpBx%x;%TwFVa?qwB?QEFLm2sCh3nF8(yxJu``PUoAf z{nHJW)+YnmOUaQor!cx{MX@&(%`UnE``zAgYq`}Aa|{Bt4SzM$CY^LNHt==%bbaT= zN=>HRUh|=>gG+JjruW0Dbr-68sLoZnp0xS{hNBr(W`OhSL*=>=nV z%U^=k{5w&f0}8CB8z6$9kiCcUC|VKDx^VTkY*?OLr)R$Pa z6MvHJfG9W~OSq#INO3)~@{Vx0({U|0^q_8N8vhYAHp4*O#9pKM&7(jC{RY>qFE<}t zfu22LjW2-ov>`XY3>WoHV*NtuYr#E^!yA75XT%X}VR}IdMS98?^vRc zHqgt)Dl^B}DyimTyvhuOf_%c7^Uw+{P+Z}BNa+RpFFtUIU%>#@x4X##o0nWfAdIuC z|I@({>IAWLfv+r7;#r8OA}}kE{O$7mWgnUDwj2H^&H{Vez@i% zNFs=^7Y}f8X8zYI=ybGM90@A;UT z6C>>adZvv`Y~6kJ&C~KscaL!#&fOs5>4taDk%iFRlz;y&T#T5L=Mv{pG9n^dKd@pi zT*hobD$qPd~1Ek_On}pk<}}&>&s@i^<)ORpblTmmY6x zj3X*t)A;3|ng^*KBA1lkK7iN@or3~C$H0A2C%rjjxIO^-ICww)MD=qaXyBjPQ*Pmm z6zZ#+w=+0rn{|8f?gzvtg>SDkI}n~fFp-p7mnhwR7!fVEsdUy*RMP0okS1^J7a7I^ zdInUGLO#ob2+ZNbfXj>~7m%E4OJk;~aknUFj%U^;G>T{7kF^ZnbS=9xKAef-iB!5e zU?||ouINGYLiQK{^pPZ&h)?{gt8fF$vC>r)L2((6jmznLN;xB3p)lz`(x$+${-w)l+WLX>e+#z{KXU3b(zFfTXJ`+)hr%Lc z>75w!kfN^GcUXS6XcgW-G zV%Oqm(gF#-Xi|9=?IC0m7;=ANVN~&bkl5B_#2d%aT|x@QL-&eg$ryqPEGidR#oUxe z&=Ey1-`mym-jqY`H>(%-u4dwZH$nFH$3L@l-+qs~@QH%=3l<=Dqofe?>P-;yszrwz zuHFgw`8E4Kw6f%#;PYC}86jA&_o708Avp|_<~?f9N}^j}kNn`YhPuocZI38ppXz9h zv*BQk#*E8kgUY>bk77)(9^%Wy!C%^&Q9SgX#YC>RdrJ&ZCzU%*3=i*|7~LL&K|Xc* zG|-z-K8)?t@ox37J4cM$!Ow@wURUn|{N3AesE>}qVsxa5Hz*B%Xr$^_W>s21lBN8R zlu(tqexHn%^B_5f&v_$}&UIMo(_4Fx?BUVO_5O%fFjy)5K<%|PWL|nss!TdrD0Y7G z;E}d3h^hJ&wXb%cj@I+A2Gq^#%FYI^o#_19anGx?#7^s9QoVpcoiXLLc2XJZk1`x* zntj3u*)wKvvGQl&52G3$VF!!@>FwWnaRh9&grC|gKP9t2eck&VC64(Oo;HS)!Umcf zZ4fvRb>4+ntoa?z$;cvBJBG6eovpf`q;nPDOg}I((RkI*noA7YBd8mIO*0)~1-acS zJH5upSDst~BOXl?(?ffPLw=?U<>rzc6q2 z_(4(OQXpGkOvrHr!W&-KJf%HZ8&wIdobcrc=aljc3g6JHPo?`4y!kbmp9QHBJ&Eh5 z+-8#X5xK$p`P4;O6M-cV7nm+STSQ`W1=>IzmM3vjBdxYMkNx>yW$}&5^aa+bkNW(~ z_8D=R5YoWH{XQTp2ro{1?BMK}>1xG#_^XItH&DN3Dcypu1|FmFtwdhQ#+;JlFkQ3y!`Qwj8xE0mJ3SN-m9^8h3z%jI9+LNm zG{Ds&C=l#|sisMR~!`4W58e~;umktsyI?nBU)%g+QH2S)e{3v zk0>#g1h3#F#O(`qLjC?&o;1%^gfOO_&^>RilU3cXHu=*S;dHPC+gEbX{YvPg2#a1I zFA1+_yz}ky#qJLf2`$`-eMk=`a(sX%vcyuRw1_Fevqj+s#uU)Jc19TOXW){0XGfsq zt~lc>Y2DEw^p81#|MBZsrMYxvpHjPF%q^d^BQNZqm2eIL5*?A+$x$Wabj)P>_9hQr zK&J&V+ncN@>=nrk<+<03g!U6bbv+3eDZEZECcCIczhr>H0*(&|VD*j*XS@HXIs(|I zy&SoofwPMi)|pEO4vk#*`Z4(H4}`o$2LTRVakG>M^#C{u-0=NO1}9uaX{R;p); zBTsTmb4(heR}K~0x;um=Z-vTYd1JX6!o(a;=Yhf$mI&tGO!GU?_ppfBn#}PsKOuy; zt+Sepg#f>076B9R3?>D7qr8+zgYg8s&o)YS7PV?RE%9(lT8T7L(CkV`wW{ZLD1EdR zXAP7V4i>2y3&|Ltn99Wwe;Iw^$52w+dLQbtx$xTf6yD~-#pd7?2zFc!rI#_K5g+Vs zO5D+8AVRW1|G=O1EnbmUSx=Ma}A}!vHnKiXFGgl7I zR=-Q_%9F*Z*Z|#Ajbi5tqD`TM)=I_%!lr&c2X5v; zm5hm4rdvWYPMF#VoTW0S3t<_GFbeD~Z-D{)5>EH5_1(9A*hiq88G9G24Np{!<8^pl z131z!r1DKYwN+&CK&Os4LJQ_TP7}|k-G;sC{G$;>AP_5HFbh>WC}tkGd|@moaS~sb z9j)t~HZ|VLJev!?&OoTh1t!bpR=zLZd}^4F(R{Ub5}?u&msH8IFD`2@{h-NAT ztxBm$<+|0is|`&>pVOyjTUTsPjm&YA^UFM$;mkuV7^h(>dTbuNz-gOVe!x60BpY7e z5whoQ_c=0GO++o+*!Xbtva1)8hQtiXoEz9V4E`cX6fjK6xo*adj0Ztni zQ;SK4&p|sG6}&TN+{u+m z5>syBaPtGB{S3A|kNKyD%6&+AhNczIj6Vanq2CIqf{-|%&9J~d-8jK4a=k2OIp$u> zXX&{2ayS~o3if*1-L6Q=lKMmXfl-8#%=@6>rRk;-63C{4l0U5bAo(+Us!s>RogF&4 z6)F~`0<00mcQGulo-Wk80tv}|D%1*nxJIyFU>tpia@5y!u&Ev|Z=kwfuxx771>{=N zu4Uvz*isl?kl8VIF(4}sa4ZO$0&MjY*C$THU~bIy#8P_ia; zH!2nx@xYVHKjY1iS6*BWa6yrJS+8Eg{8v{ zdRV!#Ce3Sd82*H3(;c6R`kLP%mUJv?gg^k4vi}WR28vfyN8-akUR^YR4(xA3SjCa@0>)7$=qcSHH+g>oFJjdLNv38uK$2%<0e>v}vKQV% z4`*eelNE|cO`3$VnEWS)?z%Kn<3o?Y8opNMpj@SP7OR~~ZhJe9TTpfRkdQ2h?R5)H zSxq}*=pCK2)cMij#l+GZKj&RD?l7HBeG%PS(d1DelPWq`FCe3_tf8{V4_;5|zLYMk z`h>I%MjyIj))r3!_y-~73ZZ6A<~Zs}x-Q#V>M)H>y3hu=RZO^8!LNPJ?6`XIreVz{iv z8>Rx^_Nh6T@)k0+oXNkP%oA;TDn8Y-pO%S5YD3zo81A9A98fF;BKcu0Ym?$yHYl&P zDkoxGb(U(n3UAz=s=g2!@rP|6XW}g*X%(X|{KE%bkHG&|9j3r;;HH$Cp{0a#jzf?u zXX$CAsBkd?T0Z{hS_I#HS1i-!LF}mu5S!(gTeBjV)!1 zR%;tNpnnTDbrXHp>HZ2f#mF}4h%S!(6SnJhTGXtQ61XIKR+ISrwDe5bnN3E0d^_&- zx&6G^dwKD5n*Tfh&KOL7^`4HG;%QyC5#c};p#7><%Rq~GIi6Aam9J$aDy zrt3``%xTvLm`=wY)^09rrtC5=#7EsC5`xbdpCr= zgx`Gu$b!g2P-3q?<0$;s68&eA)_Im4^naax(LVOnJHUaV(oYcmPAb>SmMMR#ImA z)QPrY^>dV^-|?e@LTtrWoyv0K3OCC$+S<}Z;hJF#$7qvk-loYcF@N%-M!q{QS8<-W zT!>wam=}8*l92<<_1K}aJ?ZY7Kmsm+w^3BCj|o$d?5sNUX?~r0ZUa*R&NvUXJbN}5 zY{D?sb^7-VM$LnjvucYqrEmbGIzfA^jbk~wO$AxU0LSl`kj`wJok{v_o1FzG*fIx) zt@b~{8TkiZ#|5T9^A2PT!+v-cma|x6kdiPzbQZSFxF&?NmF{-}{Uoh=**-hq2}4g4 zezq3pIKrVf2tG&cjci5Jps*GdGJogGCs?yjB2W8@k5q8l%d{U0+ZV<}_X^ubdte9K zm*58bUwV`MFY>qFMTIz-sSbIe`(y2)L9>^sZ>ih`d<4Z!fd#p*HxCiXz9xkbv8^lJ zslf=T-MM{;4*Gnk4mR9XhKvJub`bq0pZyXc%**vS*~3?1LNOf{L=+;4M_#Cb4f{y1 zB_ULIR1m2mJ@P zu=yjU154*;9#-;FO15gEJetQtiii&n8!>6E8K#o^Q#vAK&Yu+N)`Gx!=bD5=cL#pu zxxAA*H!cU`^qkb>uS#NBIi~tlWxN)SRTn$0!cO}NhAlFyCn}?`oa2wMKUb<7b`6N+ zx?WW>b*-=!PGIQ{s(3m$G|Qe=_9w=QaU|mpZQ%9ssdoR$KD$+w+E0W3WXlE6RaOY_ zVI}A3K`x~yxwINovxx)2DrPJU3RtVOUDc>=eIYSBnPOIRRR;g*td*MH%;fH|&pNZy zn|}H!!>q-RX1|1Tg7|vZ0?Vy%tP#eC8Io^y4jtpa2(_IabJ?*ZO_gzoqN*`kkOw|4 zJf+GZp)QWpsWTQ9D@uD>sCycI_IZv+()VCR^-m6|UYBE5@YcW^zL#!v7~C4E^C@HI z#sEQICG%962}QYr-gLP`Znq7=TabN+bU_ZHHnrei9}k(4nBZXZe6G#dW-|0>(0h!yt?&oJMdJ@<;9A6!j8=uSWl z?1maA?8r(dd?|^~DVNua;V+lh%i&-b@QdL=7w}6Zu`Zy1n(mGtH*^GP>D3?C&N`92 z5X~Uy-)Q!k$e>Iskz+a?7(pVoWl9xQmvUb(xOrzeQ2zt!?axbRq z_vQ|J_)EOzO2T2=P2`?)0{ZNM6Fyw3MsIkMY+J?rA=K=K2~zndIX{7-)fdqRqR72< zS-WrWbPs@mXn3NQlD>eoXq4#rR6H6+KZ~rcF9urE(uD)XLgkXcaQJZei_JS7$)um^ zdULmD6is{aFkeuwkOCPochCdW%=)C^5<-AUjA0O!0!0-SF*zrngGb_EAN;~M@!N}) zisz?90473h;@5d2i{Xhn-}bZE5xBS7}0f_?fGYq*# zrCLC$;CD=56T-jIANc4pBQnb*CSn*bCc?R5^89fkF8TSZiDuILFa{rJ!-t^BjO9=y zDdiUA0bC@n;HxWy)r>-uj>HUg(8;BGi*juc*sDBOQX^((C2GMcE=a3ubt8WA+wq^r zX-G=Zwml$F(o;U{UCChF()zHAepZpxsI>3{F%pSS2UD?eBlUd= zhHv;mhXv$@MiAet%X=-oft}VZu($t-AOB~GSi8SJ9smjgf&=*E-j0>=ng+0yLU-sj;$Q{I-IHgZ)( z3d?M6o~HqGex8;u^Ls@7AoRu?!uUQomZ<2K7T(m$JOmItb9mCmBIBf?Dt})S=s0mX z2AOp?Pj5R<*lRNq=rqrV7`?XBsW`)d+eg|uX(&250DQ)Z*pPfD+y z!~8}hbzLmO#gjfJ|A=2#Iv({ach#E4L+|_d!(s`yF>ICpCog_o!zR_^M0_3I!uW2Mn_H3`2v;#+HK;tCRa5;QE@8k>?EPTsG@If-hoAwz9Cb_W%wD9dB z_YVfyh0TS+Wh!c)rSyxMJerg-&61N1(e!KlMjjXz7YHqdxWf<_G#WI>WJ<@w^aP5C z^B)9R9TAtT{HEBq-hOHuSe_|>$>BHlFBuE@CA_pkET)iFcj1=SRxz^>S63+BqErTv z5**_XasQl?ev$85bu5~(6N0uFId-m4jgDIE2>WItlKFS!{CrYyN7ClOpN$GSsbeg( zLdgX@5$Od2l23AYDdnifmkZh`FwgiUSK*?HkgW3ikcF10b1U+kctu2jz+2-CZ~TKH z?Kj4z)7d7K^&(jp^7TX4;t2;vh|{uAg!BUr9?>8{HSS&QPb{*nrjq>pjBak0?KFJU zz2OxcmaOvt{B18U6VTo=j_<+^DV{)_+`YO*capOLuS$JPy|OaxGxB&9l9( z?bk2AU)Fu!olcglGLXSvf`IpJj^Dh%3;nm-O(&O9|JT5S9+;wNb#I$T_y^AXc=kbq$;gh~ae-#Sg16yBG7r}~@1sXK`|lFF zLUDz6XaUnwhfX=yg}Xre#6G2vQ~DRc!0U9NDdd!vgpy)brfSx<{=7 z!@p_FY1xLNZFqmHtW!MOU}!wGj3DqPHHk5vA-?-_`{>jV2l~7@ z)CpVpvcz`9GGt)nm`fff%nL&9T?>Oy@)Em^f2ZP>cl+2UFVY>xl75w1PFxS5R*|Rw z=hRE)+tDW5y)UNW`H_RyX!>^Y=+Zl}(!IA}kM0wJbm1R+pGt*clPyy}fXcQ(CEjU~h6L{LLq+G8mbGAci=6)=-7Mi($5_GLqhMbBajXSX zW?=tQ`}HY+|P%M7u`Szoia z*7G;{mqMLhJA2(m+bUbUh|$6KzbH*1_6E_g3N z7@z84#6(=J$~!Ryg7xldr>MmmH0Mn&BVRUWmUBiHYs#@MnT)n)XQCsG@Xp?OvJocl zRf#0-;Dwz2`Ln%o&r!M#@ExVw=-G+Ei@B|j=Bh>^II#jl7o)i6bK zk+6E^SDUnH36V7TEl7AFJ$37F&%BHt8L-k^)8=3UDkH)vW7nY5V((+eI>atOU)?a9 zz4FQk&y`4Isp~6C$CTL!%V*d8xT(xfwo*A4vFR^WsT4SzJ`lYMP)(!a?jf`rH?!eH z__TlvwtLfOB|4CVbDunP9&)t}jsn{< z*tjO^J|-5BkSJhK#NC?r=Wg7;qnf95rjW08eVmkeySC{E+d>9n_I^ir%~(utm*UZU zLUk6b5rw8`Zg;JBv1x@meo~zTe#Ib+WknwQFf6T4v^MK5U{e*8Y5w;`C$DX_%<{to zDn*$i6HjTQ+7E((IIqi%zDja$oU*PcztV>4=(qnpjkiK0WKeSB)mWhMJSLc9+hLM2 zDG5ptHvT+9Oc!`;3)>N5Wob=~^tA4>OCmU{q)`j zoW~(%kbs$0J^umZHis_`qoQO3w8&A5+n7!pRFCEgkbq>KTL>RlrZHg}&sw5rY>r4( zhT|+rX&}8_`sOf&n?X*aF9zB?MBf*`Xg)G!?$e&UKsM8~ALG78pGz%G+q-sb`K$WM zyjadV(C~D ze5Zdnfg&_~=T^PJJp#;%%W}}+kkMEyw!g>xxyw{<-&VdJf0@$Db+fZoXwqZQJLSS! z(RsWk)je$_r^6Pj*{o6x-pYI!gg6@1{*1FXU<}n9%6ng98~FFp2Tt423of?|uJ)U| zXQVaD?ck7+@codNZK^i(AG82$elEPoODrxKe`^oJ{kwd zf!B_~#5<8tqLcBTq;6P>xWMXu!~GGY(4Z3T2f7f$>^j01mMaW_%fq1+_PLcIO9AXfCLI^RXPCM)G%xc6CPx{~SEmYQjOMXHlf!DCP zgQZEwmJB&ubf6DI0d<>)v?B6~jv40f}3LRQy za^~uqx#ZzsmE-J$@@NJ>wtSd{A}(Pee8GIL?4KH|-s~`j>sG4e;SFkg)t3!AqRn0N zR#5ArJ3w`~Es4(r8#nlLVq7)WS}$;t1*o=xdqrODP8C;n&5w|Ybg#EAY7a^PJWh16 zAp!T;n44fCXDq~iJjiv@BCV_(NTHBrmT(cM%6yD#q0`;wG7E8Ht?Go}T`QhdCxbWM z^q~KK-BqhlOq)u*CJq2#1x;0;imd(m**bDG4ZLTIn+JC{szC)@ZmKX z+Ap{dsGN|z|3!iGOALihjYnny_{8^^v3{;g9H0FmGYI(|V#xlQ@j({~Fc|d*gPlV} z!}OA&D~vWVdlPz0PuljeoGI>^_2l&?VaKq)#8^zje=(RM=m%Qe-M&GD8lex&PZ`9r zLb&4Z&gBjQ`$DiKLNbp_*k!E0ss{ngSnrX1R0}{RCBBXaAy8-HPrnPWQFU*G@P+ri zvkyq$(C22FsZvrqL{SVI(7GyTl0hz~`7}DUvLktpAN~@V6#8CyHG=%s!!H>{O;dff z{vZl9GD#e3!2K{1G`ahaeU^LiVbl$hF|z7kxfY>M>2%;cRZlx~@H>}IUp|yE@E7T_ z>1US;a{0k$82Jl$^-uwv@l^s=R;PzoG~9z}Pz4?Cp`UR~M0OokRyyqXZN4+k0X)T@TbtdJV<_~>rLHm+$0+2r(ZrnzHjtg3b$@Pddv1s|Cvy6)K+ zSoP@VHZpjXMRs!^MWpeJWzOjlZoB&~#CS;?;dYo6b-nk$9ZvyUehd4Zuz%BG()eJ} zwJ`*v?)Al5I|;|Ks@p5%0gRz1zAU0mJ7ybZzX~+3Cjri76C+u{a8>U;!riO#S zc$}=b(+8p&=rB<74^e$=a|AhwYAOz7JncWv;B-V>)D+?0oZT*){4m-ql$!GR(Pn5I zGo=fB)aiukrfnj&oyM13t&7CXO6SMoch~FY2tA~72JC@Takx`-AveCt^sT`h*BFm? zE*T|KcZk}{2r4RV`lC~QlYUCf78Fp+J;_x6x;C8lQ82Z#MtjZ_l~kg81WL(2r-4nl z@yT(5993JF+z-p^qgK6OX-cNsaKfAE4--c{*W4RbePk$bR1R{7pX7;~D`a&Dm{brYw7#BjbP7P7}~)t-9OC_D7Bv80)b`k;waw$3OIVTw9C`N$Hf zV_S)&(Om0}<%DE-=&tAY{^~Wt?J}A&A8algd_Y{+nhVN-`Bc zrfkf1W}wb&HKI#()d(|BTGUeiI3e7ebzaYDnH<3CVI){5tRN%?srXJzn#kXj-=uK~ za`7CM^2S+F4{HN@x}WwanlIG;%kt|cokOJ}S>4T^tNB;fgzw{2`6SNs*VDBkss^Tr zSObm|#2v%2F@&pQs$NS|GkQmk2nL$r#?{iwRi}!;g!Vv6 z0c(Ic;_>NEto|SVTPR5vwgZ$pTD=pNhEOW7%6jDjYd9HuZ?7ZrrZfCaF$(eHGLYUx zNAmKQql{R`Vt=2B0k6Iu+sZG?_oxe}qQqh*kZZ$t?9IfZ_0|1-k^VyWs0Z0d8K?OI z_Pl(2(xbp^eO*r>o3fLal!n&Bz-(9T>pK9Z)hY?;+O)Q|G)o-;$JSbqq3F??=6YDZ zYB=S2xla5-&fN4bg=*(Y#>C0k8Pz#wTok*MG!??5q5%%DJ-6Cm#Q|vq$ag z!6_zVgqzm{!4HeLHenta(AOWw1$7K8?UaeLd}qEFB`>C<2$`KIAUj~~fN)k19_4IB_!C7J))-9CDG4vU+VjCb!3Epa(DcO& z7P|Va9G6+ccUbs%Y_N)dHp-KM0ti1?9k2XI2q3VKJdG5P7MNcJqB!Ja@P6nONcyqU zuAGs?6I#Y6p!AA9uG_e8fAazg<4*A*{vnvQD|fI8ghx|SXN&5EaX}SY$4uc+y$l#q zHYj36S#P8Hk(H%82D`ptvWdzYBr~aG2s;T?G52aWCFC_UhYbK9yCV2{t^NipNf@KZK%w{c)5Nd#?QQ}}5qw|J@ zQCY*FCDzbGqS>05lJTx`dRiwH3sqZ=>nkN!udV8B6o$gk!hDysCpFG_r*e(h0_wNJv z3w(v!AaSon@-Dm|FE{}AEn(bV?20QAvRCFB2*f}2!gqCP08H0Mq&K85nn{Ki0p}X; zOplgjDg(SqE+9Y;;xUxg;{h0C-rCtKx-DnN7hy{3Hp$c^U9+XYS-mdNIMe(kd`W?E zI24(|N20yon=+SlSK}gjtMG4v8p&G9=2vX)&woB|-WiC&-zY%l8#Q`BkR@2_DzY7g z0C-jeiejRrzOKSD#w&+1W7+NEOA!e9G<6rriKUQcjGF;Y1}~YCsrdh@;yS~c*tRGP zMS2fl=pa>!bO=aC=_p7MsUlL8W`a_bP$ET&fuUGvA|0eCT_H#jf&!sP6+#VosRAOM z$IbKJ_ni4LYp=7;p6@%~`7z&~eHNRv&@U>B^fZR(LWOki@8dYzE86^qKPi+)Fq z!vc*s?9_5nQ&P~2o&H9bah!$;N6qJTg21?no>Wa2;idC(Pvt9L^wfakGBSgP%s&! zQl>njcn1fc-log>DQQ->*s|J5HJII^sY#K8q~t&0K0eIf^x&HwkAiP?K1)ZR2YTS6 zZ_)|jo0nD^P_<#l99qUw4k#;3gs%_zYQ=YD&I#JS;}=;rNN1#EWO(Pb3$JhL!;ann zA*2>7>vGP%=P*d}gZ)8`PZ-LCVUO*Q1SJmxAw&eh)g){hDTx>x%zFX_*9l*I?m1oB}B)|Y>4%jn>GZ*s~v%I)Jw8jJKpMUjqO z6-26@wM~H_vY67L@6%>yaeGs+qiSy>+z7JPz4(*x3Jx3QkfdIDI6c-XC!rH5zV!1^j&8AElZQM z>n3c!RIcIK1GxsL*AEkpKW#aZvZf!Vid&JXN8n)wNFQi{qw0~al*(rr$UJZU=Xt8C z`SV|{s0qeaRW{j22nM5WUa1%s)!av$pA(rP-PXKl;*T=Ry*SM!7!s3QV^>_lC(Y=g zTYcl^>k|^w@}H#@VJD;ENl#rnNyUXW=Y`M@OcJ|!RM>LS=V|nevZEu9?6yZ{nJ`LV zX)XU^7t;Uv4J(G{ zO_F<(F9wOJJ6>+S@BTK+4x1ZZUyxNj;vq3>jC2i6=p7LQ?4LSstz1DHx?hU4*i}E~ z>kdh^FEQxiW}YxeUz}z$nGndMlH=>#fgE`3TyPl6Ix!QqN$r+Z)?0^J2a83vizn9x zNqee4C2Wp$(?zv~3%3}?F0->ZWW`uc*i-X7E^0)er<$_aQwdIr1~%)RwRA$hgV_9Tk6OsZXOtY+tWi>~=X2Lgia6 zc*`s=&w5vequlxtoWpnvO35B?r?rOEf)tygh@XvQLNWro1fl*NKHj>ZvwQW)1#pN` zg?2*?ihX0CEH__lZbmR?F@~jxiZfUr36U~OT8g5k4KEI{%u?(M(0TISRkSGVa;8F0 z9~iFG8Ju7%T$pcd7bVxB8LYTbEM=5Jr5#PafzZQ|Se&^9HBWD(mfQ-u^u!Gk{CumM z6ny#0^-4t>Q=I!f?Zl4e!5ivvw3cyqEYFSqM9nI0nhn{1OAfJ)RMVuRlwP%u@xBVm0e|q zSePOtWQtAP5}LouK#-$6J)h6w%CFwb9IU}nh~b}1IFIGEe~3s`T)?~!-|o9Ib@DF6 z<~>01oyGZCBB*9(j_e-}#GK!~Qp(AMXVYfW7LyQ*X!f4SpM-*qreFIku8{K`l4u%b zOtM!=#K_3QZxg;`j6DiL22oTd?nzp3_O*OODS^@j4qq-vV7Kho+U)(f*Y( zx>aLRtA-uuspKS++Oq`OCetR5z4(t~38fJNHpxjUcb!rnBVh{*Xt_}F@{Nu7^Tqzk z-_He%-Q<+3xoB5-t0A*X<>m%Mu0hcxy3Q`bPU*C2K%v-C`ija2;;ZzSCNanY|7ssX zZ)vOYa&xyHxP3)lK^+;0QkCVSA+&9acCTwlUbF_MZ5%sr3Y)``2x*EXq08suOM z;d7ZpGMK-duQ|IE0Bs~Ydnr_S0*`%wK}*F$)uPmc9+gD$iw~sk{ZXOUCdrwpRU<#O zusF{^LLx#e(5u^XBc+5s&rx(3R#vfgP*+J}*$t^vRPyv{V_uy9{Unt$Q ziU!Rbr?nmP<)rAZ7p~befB}!ASs2}zp)$+r#W8{E@k(VIPmmwe&PH^YtHm>wZ*D5` z4(r)7zUIQy&E43&&xv=5R%zyH{nfgwkwrDf6528h3i@np6<^r@p}^P|6KLHI7f|Q> zL=wu``gC-Ug4c0gOY`=!sGuXwjGK}Z^~_f$N7|Wy9i(piOTg#lz}7uadqpYTp0Tu& zJ3wB1f%qp|LnWkX2V3RI%F6Q}#jy*I8)C;6u+LZ8H@_X;y}e%+)-~j|SCS!twUbr6 zOj%H0O*OdB&AZLbrLR4@9w)zbmiUzCc$-lk`YS&$U z8S0c3=}(}?9w3(B%!v;PlD55v!(zaTC{G$O{uI#E&F*%BE(Oi<3-74%chzeq^Bf9W zWwc)UEha1PkY^5rH}6`o<$9-xxWQ8;2XHlsO4^={4NYaw3hb|a`kH&w4%l}PwZu+D zc{!N7)isNpXstDNJf65GE2Wjg{mUm7R+VNWk)@$M7|xGUHSTr7c0($}VD$NAPF5nr zlKS#IV@EGur)m8~b#?$(N^a9eD#L18WkLJyxx+ccF!$7CBB%<)ij{D?tC z%SyShF!tAB6hEM{XB?>I?hR4gw=kUWD$e0#3GLOuw8$7fPeD2TxXXq~+u*7Vje9`B zeX^O_hmiRu_Y*|kKwLpp@VDv(qg`8rjNUC>V|+4vdH#BfuUmef}fm`Fo#u7(Hn>U?K_FE zliW#qg1oBFvxzjqhuNKu`tuB-AJ@}$+N18XFJX9h%-hF&;U^w zocp>JhqA0O{>!}I;1os*mwP~el?$#K%$nZDW2(R@s%qS5(ynLec$J;bswJF&hwCyT zJ(n|PkF!JPcb>#=8Gm7Y<@&x5b4Qof-^MTGg{D%wgOrC2&0GB$peoMO3}(B5i>Qi! z|5iE8Gg$q{?VhG8IgHoRNIfmguC`w|tcxS1<~f9645hY!_Zn~Lv2K(}^Gy7lfIm;M z;D1B-23;mFYE&JF38ZA{oh_D8<=2Y|I#*J)W4Fb_UIO&VVe&vK>@8Ch=lDQGaqzW@;$ z)*Us^O-w@FF@UL>HD)ZUPPM3rh`qLM%+fFrtiwrjxnno`r{wms`7=Ltsp-;?izTAq zwTAcAx84bvLvJ`xujLbNx z4Pkv*!(WgucVbiE$q0I#6xxS#&`6LrdK89cWL4UF|MDDFE~C7P`L6f5e&mR(aR?)L zF*-=}WfJUwSyE+%1IwV(6^j~dMY=xy={AlP9?6XPcDmj-BVyeD^OYeX5%@=S z`pgU8Vg4$50FLMW4aY~c05f4?_*sx2d@;@hx{N{rE6G!e3w$~b-5AzW6sWhMSr)AWQ=ig|ItwLhcHfu znC)-j%9s%MAAk4%5L)X07AgbgH;6ECocs5eV8u8DIB+16>h|>D(zqD+A73GVB*HuW z7P5kzGfd#EQ?ou%cOq5i%0r~`JecVInUWW-e3v+A_U#PV>%j`rf0F>@e1B7#Ktdq+ z^qV=b8VF8*vjUWYK;=m_z%2-z4v+_#rkKFGNhq)pavGimS0>GXS7G2x3O8swr41-Y z5Mgg9BT+a!1qIS0i4+4~37CvMg+ibwUKZ$jLWCH+9&k7DH>3a=)Yh~)aQoRQ)CA4vnLuy`3M6F{M`SX%z||QE0G&$=wF)Ugg=}`B z%3~G^q~`xiznO&r`9=SRhWX4ymHZqO$SwIzvkcED i_W%EDg1>@4`_NK(#)z|gdCiK zZ19IgEQKVM;e!GLTY~`u6G=uzBTBA>r3SXu@HH_0ZQF6ePkvLCrcP-MXyt&CtBl8 zI2ywicWO8wRUWX&l9}W4lH)UT<0<%j(l1233wevM!-_fz|76_{OY^OCEQ4HeWgke1 zT=Z%Lhs{aMYNDJmsQ@3uVM*Y)O^T#8jLXRke9ss&QIC4~HiDqf%shkQ-0hBOsPn=0 zZM61To*2R1#}373ZXnptZ#LlLo(7x*JKzIHgRU}7zaxVv4mMKS44eyjh3GzH1TPcH zcy2H|*oOV|1Xok`jc4kZ-H@W`x-X#kBrF?T7;D9l>eZomayDXD3;#t(mdd2qwu<%z z+ge!1by=vGTFac&-%I3qNF?;KCr-x1P2?aL(vE{6#3E#O7Kj+O9|Oj5w0slB zbuj6u#UaYwoFmw_xK!j?o;{e|^l*l0YC+yEh}A9HPkz7nH`va*zd8DxZ@rE^6={FB zo29_AS6??>E~EhsDGZl-a6uXN<+^7zDnwncQHW zb1)(1r6-UOYP{gOjS7Xupa%#>P@{LUtq|pP+e2s|7Z>hnQ{C}55dNmD6fTrgRXG^X zMk5xB=dj#ng|0fU58$`k?J0y!{X65O=!xVK^wGemq-*T6}j8e{fyp6ivF=H0-3An--i1iZCR(wQrLTZX3(3!uc(ls|1|1^41alD1Y_n zk1%twmda_ZU7|eob(Fz1w~fsXV_^&z%|2Z{MmTnH32O#rZ>%)RP0vZRnGg(N<7FKW z%{{Hshli~sFZB&Dh5{yM8d$b9RBtiS=vI@8vDe%WkKLj4xs|pre4MG$_!>p<->kt9c za2G9Dpo9uDtTUpD#M4qLmdt(yIA?l6zMl95RAPZB*OJ6817Je9vhmh_OYKEQ3pg$e#kd= zS+58w2qL+ResowRR8(d<6Ql=(*kcX(V_?Zmm4#gVE=Cn5%0fEA#86m&00Ilw7SaL{ z+!N*e+0~n7uOq~w#>tk6yt!Dck5+8&UoVZA*j)~*)Me(Usnb0DPzo0hh1_lEHG-q= z`i>qi+USBOv6$*Z7gLZ~Ma;-ax)zQ%V^&)TgdrZL#ewL47*EPmumbs89H-{!ZhWi=h3Z7o-u%0pHduII({b zG0gWv?1NYPyGQhN=A8C0#V8juG=mbBf%kcZtXMV%b?5D>h)xDn+?jH};DCYzcL8CYeu^_}io=b91O0!EWBA4zKPe`HBNz&>|3V}A= z9~Q;P<&L`^i@c`xu%mL$DRapF@3<3lzNbiR%Eph?ZgZZazDRFAO2;=VD6RG+HT*-s z`XMaZyjcGpvYyH1xa0E>2Uu!(A4+K%krgojA2s2ci#MP%9KULUo;LA^zeR75pCz>w)M+ru?^=p$*4e31>5gM(vVyDpX z*7-K|mD?lPdG$(thCB{Y)!G5WjOl3cCT(^(aW$%}(jpy7y!?SlOvA!^S>)?eUAqvi z%I*y@Dp2f%f2yM@sJ37Sq5Pf~84|}2h?5?eb(%tEglv#kZeYcNNr}&@=bXytQky&0p;2y_R+cmkfUgKtJ?w<^QsY z7+*G#G&XnFVt05f8BxMt3GnB&{QfW7M1ZqIPld%Jg3*UQ>PNlqm^qMP&1k(I-?aVG z8JlXtCWuC;pfj>{mE^!wi!Gl@qKBM+zJfmEuoO{@6{(V+h|hJE*8f#dOkvx46+ePd zDKbxnYJ#U)oq$P$!;<8|{^zWURzDi*j31j5%@i&A=P%x1=go!#Zv=Q%nZXS{TW+1$ z@A-G!7x5Dh&yRk7euU3Alo0YmoEKgYxSZJa9**XlNjcWTH%thSpOWK3N&IPcTLk8N2nF8xf1Y0#tQ6`oojv4&F#dD zhO46h>Aw*r#qa_5INPk%b2?dVqNKj*Il^O|8Mffa`|9#-vHdwzD_HTG`>my?2Wa@q zP$7yLSRRKAC{&YyHqL%3utXyGtOuyhZtCXWkos0;6pyVP*fIkTT-Y*|wtj}Hu;(RY z{u&6Q))W@Uii8l2lZ>B(p64%|hdCFCB`QjhL{^Kcv@e5T_q zTP*jOG~#*Be9NZSe2wNEBkgYk$#+k}0LYFBQDzPU?p~uQ4MmCNHPBC+gzRzjP`??8PzSe%iSN z*{C3SdApv+Ht|>Y3l&m*g5V(su0jT0Z0(#?&9YH7RbOjH&~xTqb0Vg)Ji#TF#?F!YZA zYeDMn`+_q8@~m(+Izgyi#($|nT1F)Eo#IHO%cz( zs`w)iVPzu;o72xRg6kfRz78weFPK$8IGTn~mgv=UsF}4-aLUut~Qf|fN`QB>0 z!p7zw#Sa3(kbkp1Z9g!C4EoXyIxD`DvH@?A8W zKhaT)t>k}>E)Qmz^CspyN_=EJDv4h=LLXo$ydRcbE0v+aqT7=C&ryQMeTj)}-*$1S zb%K|>v3aR$Nng3%>XW~*;Q^vxflz0CIxuw{R!4nK?v~twaw=2iKU{ge=IDN0q5%zB zHA<~DO7EAeRGUY;3Lt}6q49i(988g{z1}T*$7RtUowzTBdcP>ngozZ3Og)M0e!set z5XT&VuHM|YHBi0+StfJF^yShq1l%%_{{7yr8n&Pm!lx3!ZipHHV@lgdzNa^uQ&63_ z`a12N10{uB69h+S@3a&IC{0vg*aGhGLowAqe}#WtVQvWcQ=+vb-ID?c78cnH0ME>o z0a~bv(7%g6)lB|on64UY4*Wt+lc!_!?bJSv)&7S&7=QjY#cgOG^=f@ElwwU1f@Va5 zHbH*M8zdB$i3B}xhBRZjr632IZrx}f@*&bzk7orie>l-rie3DPi}1XzU@YDRwFKmy5##?##FD26Ru#MD}NfK z5tuAq$9=H!Tkb~_T!>jyy^be_j;rrZmM_hN;a1wVHPTGP$ZVDs3h>)NBFEWxpM9d| z0yexwY2)CpoE|{b>G1-`xh8rVb+_S`3&P{`U+n0->HU{!*s{b zh0ps#6^qc4Vdotq#sXVQ{1U!0Q6P2Jv;upQRENURxu0Xq3x|&?Z@F#yw5IFmRkG$v z)O4w|jNG(&A#isVUSfk7sqE~AWeZ^^lSj6<9gJ!^gX|sQ_}OLB9rCm|6IM_4loGz! z;VXJ1o^%@XoVxOx``v`ic^Hcc&s z?)j5`Vbp5nK=nQ-x2mktC8NCJ0!{-yTeeg|Lsb!fdCoysq)iULdCGe3C-=+#b?4VSwxn}fKF}Z$udG5?r zVczA{U!wZJ6{Pi^!d`pdVaqiz$1$^b<63%Nw(@Jk+grk3W7zuIL+LFp>YgyQmo-1D zEIYg{J)K`^1XDM?>?yyDf@%KS%?SIl(qfqjQwf)0HBhas>TkHKqM}8UpX#0(U1`(( zkvW?bMl<_nl~;V6WO-F#_extCTd=IrEf3Dc@pox~;@HL(WO8C7pX%)>vuJ6w?yl-* zVY9K|o9msu=ynP3)}Vn3S8lU;i(&urM|x4Qan@i*^KoJ6M6K+s^=Iw!a45BCME&~) zg;#IX4p7u)vC%Uu`1)pVNRpo^{wlK(@%)3||2vHrj{dgvnjpEQ5QoZl8@>Q`Tyger zW*>|tJ{uekfQzu4d0T?a4ZR~y);H||zVnAiS9Li2H66W?%`@nCkXL0?_8ImWc4BUkbgv91o3du*oNcHF-6M1; z&|5JV4d*9Q$VBI+sy)RhJcF>zG&Y=cdD4lCQ;%^B`8sVJ51o7@-zcg_24|21-nxWg z=JXW+J&nK#A|nJXS47Q9A@yw`3&G>q=9O&^BHC;WT04y1AbmU^ti~CQVqABvaVY!^ z?}5Q9KilKbIq^3(umZp5hng5{##*BUAoOASe>Psul2||iY<`&F>(#R~ACY$iiC3b2Pl(ez*Bx=D~eCf`HRyn$-~KYm5K zer-XOrJvi5E^HrNE2)j~DZkSqmf2L4kNc>{+_;(W>t7He1+HD# zT22wmE#9rL=1*#cjhhXY#_n`2xIrL{{+6U-GCkflEj4UkI6W}ks%6BjTZ9lmtw)3E ziI4m7`pF$a+{boU{LL#&S&?=EFu{Gs7jE__Oo=N{epkUUqmG49#zHP)4*C5j2qrDi zEXy!31Pty*<59nWzIgQvkCgixv6VIQ!POhyCz|&sShkU*($QFGPCb+K?*k;Lh&Rl4 zjWufiEolliWh2@}9Oy@P707bS1c5pNSSXqQfPL&t9-lQK59(OQA3LjO#18Rktw6u#SzF46}%g2(@1pM584UD!=%P}TC+>vgp19n z{qghOzYsjhUm%?Zb4aL!(&k1+zE{MN*TWxQR@^l2Hf~^m@g}30leXq*C%AR_Sb&Vk zVkg6^z2}gl3W5247Zc9|*jK^AlgtVU+ZKGp$me6P;S3A=xusy8ax#Y*Wt8Kp1j6+& z3=Lgux9$m&+pew%T6L1vPxj%RG_#)lbj92>L#KIAyj19F!CNZZOr9{tC4BrqIL z`%dX?k3$SEw1Py4A&eIdq3Jycxy+@G6E2r4RA03gR}VXNv9`H@Wh3;fzTEF7apq6%wN$6)i--FS z+IMlqv+}31_B;aXi^f`Q7vtc*B~7->Ur!}HM)BnUVxaQ)bL;a?TAj3y9#T2uee^J5ohGslCH8ejViE@UFsnirgXB&W$+j%+hjvE26+6*S zTMl$sfpw)N6M1<|b0W0SQ6c;?!G$ z@rn0bBsGYhxMECJx=($!IwxK(I>>d$@c#Q%nKhi!^%fWIm!j)>S~+aHZ-P$2{^o03 z(2eaYQLj>-8pLt=0?Qzl_9sBVhbRQ}A#;3u7t*{%M~puxpDMZ&TdFMohAWOJG&qa- zAv(x(M~BG5FENOsXu};?PW##tw!7B`;mSXCk#x*Wbh__>J)?Y_x={F=?r{(2pTjnh zolI#ARMSY3@9*?MVyFv&jJ98zrFM!XzcZZbM1Y}usOAs;BAGukn1{!T17A8ozY+Tf zCa`$xiMs{tWrYC;c$0&E9Ll_b%HUm@>m@0*^ z60ey`T-+j$OJ0gs3RKtH17i$mM(Vbrsk*OmY9Ix5SOsI(>OA=@kBZ%bMA$H9jMP(y zh%Y!ou3F_4Dw37AIp<0FkRrfNX7n)ywaO@`%19+4e0x+8M@0`^O`-)ut2n|Ys{-@C za%*GCyHLZ zab?Ca^+`6^c)}m_j>6f5tnz0)mYAqhFaF5l+KeQ4Z+V1iB4KZ=hGE z4W@qHd)fW4XW_w4Uusu1GiRdq%ZRQ;Gi3%96y4cAk_s^8)|`73GqgFR8K_;)`)NqAn&=vRs!_HE z9ZQrjY+sd(i;=F?#9MYU=X1-`V)c*iAuazFs=Xmu878=4`No zU4!wq8cv02z%=zfZeOZpJ5s4w>#k5f&pF9{DUp5N3x*X(lMk3m*Jk+DRc2TXYM=Kq zhF=oB89Luc_+F$G#MPrYK0mE!zeQk-8&J4nE3|n@abjRSe234l=auM*P&4GSI_0bO zoMW9G^C>g~;uPc1p0SV7Bsn@aj&FEK0JyJin7YzGQ@6)3tH70Vpl2)_v(Qqwp)wOCi#~RbxRWQ-9ywE z+e%G&805L5f9UJE(;fC80D7>weaPl=kLxL6ztg&H>js>0)EIf_|8i?`51~A}F6nGO-+pEgkto<8m%#+ zVVlW=-<_M<$od-d43QS+zNwqhSeoFTnDML_L-RH!?R2NcX-}U{>*BN{S~U_WiLw0| zk<77*VKj!XD_C~kPPil@7|2z;l6>RmmG{&n4F8I6UR4uK+tkiqG5GM?mul-)lscnSGV$uT1_C&R11T% zC!>?g9H#C!mT=S8qUk7|d`vZgsB7{1!U~fs>bRM4{`L#{9AjF!y7GU>$p}2J&^&e+ z2b#&Syo`W0$QQ#C^WWF6QTk-?1!Yle>ug;+SEha1kU>#V7JIZGBq2~GxmQTpBu#9W zSM-72%J#KVJ(sE8`PvetYj&dZBY%Z|_BhUK)=CLn5+*F`WIi z^W!kq3%$O(gW% z;5#w!eLtAQS6UKXa0;K;#D}^ zvZ3Ix!CO4`Of%#ZA9^B_vaCFZa~n%LC42qdcw?TSX_d1qLw-8)(W4E0(Lx@pWlGGO z-@aO&N_o>{{Z4vI(<}@Nw{h8AwTaBna5oE3lKt2>Px|2pm z&2TpT&MW3^J1iS`T-w~6O(VsDP_|i;-Pt6uSC_T^9X?mtHjVF+g4nifxy1+iqgFGf zySG7%tEJA(RJrM;BA6h20tso-aCrrkXYlwy1D)crNPZWVC2PapW1E&-V_hcpR|XA` zs4OaLF7JUhPDAi!ihwOrJgg?W>FFSZx16+& zGYPv)v|<rG(Di#UwtddEW7$_&tNxB8o;j{3T9k2vX+s zz_QqW@P2HsPxZcgzxQw8 z@&-!!7Hn?Z%N3-Qtkp!I>n}Q_w-sR-y_2+=5(&z~f6JF){ zOhao=c3S zKvsfi<5XcnF$s#qsOI4<;#GJ6|YsusW7{nIZiTM6d$T`L`+pHi$& zMSr#KbV-%6I1yESl*Znoty2UP0h*C-8p6!+PD8Bg!+YM_eJ~h7rpGH zZ$zDsM^ki$l^~JmyZU~0)%fl#rg%|e*phm>M~ZFsu3J|QI9CIBtSgIgf!iCS24RnP z(m$dJpM~j=Rd1lx;)P-@DgITC2E+r6uiZcL?=S9kR1u_m5(f4*Da1Bdc?u!$ck zfPuj$j<~@f&cp@Y=w3Da-_gB#c$g8C3V4`Nlp6f-M=(GoZQs&1cnG;>h+#={9#2LX zrW4F_DCZQbB zGrh?Rf=+j9`xLGjY9NrUUC|gL8|2ngaB5LOpk5IO28#A8WBuNlJv-O4K6&>j>@Hcz{b9%rAM7?2>~1;ic05`yG1-)WOocz*wJEFv z)+OK^y%vVlNN8~I!y_8%IjPLSq*!VzUf_VhdzfsEYNptTKM?#5<2f2Q2xt$`Gms|^ zl7CM(;d(|1Qc_iXO7ajIuNyVQgO*wFe@wIomvqPa%W>fRxLDU0(Vp(|Q|OKe`(+PI z=W1}V2#u*vB*}#cvF-@W1`?y_<=KHusRC$TKzM_AmiaDo=Kl@;WLMgQM|5Bhnm!FB z6~*UUZ8!z{Cp^qo>~|FrGEN~_UiHS*1;#(6grp95K`z|EPvx?f^#`ctO3V~t8zkw5 zqb6;{Vf%k5jEj;bQ=41CcZ|4dpM}4O|94cfhLA+=3jqd(``=D0xl~jL5M}WHQRFM9 zN2>>yg))pI6GJJ%#H?`ZpdI$B;d9KP`iso5eNMb+en^h#LuG`mNls4|kzHYSYCZRb z=Vm=~TL=I?Ae0BlAf1mav=x=9$8Lqo=y;=C^f?lQWk&IWRi0jZ=?pn-gG`!zhjv{j zZM2yPwD`;5VYZw%^VYC{-r4GAQuG=pP>=0(Gk>{ZsfKrZRKKsri{6%d8&arW%|hpG ztNx$A16FHOhU%vii1oJ6lr_jij+~)Zp(&w;c+2yxcz@N+Yp#}tFFov)yd2;1s`WYS z{%E$Jj`4R_tj@?^`fs+QE-8f}j+)*iR+Xz@>+yo<7SBY8zdf`YK1Z6?{ubBHh zFmY>E5tgnuII4UM4#bWRmTM{f8dUJr!=z#)J{Ilf5`tJ=0ZCAH2;gTzcvb}*up0z; zZeLIovm2^@?yMFIYc|aSdSkz~AzMjFC>;*cB31O+Oh_#TgcpV|{#R)utyK^l{ zb465cBpZkBjiWzlp>~S_gv2AZG@^cX4MZ=^vFOC>H5sGXLxCI|ON#Iz*NopkDA_)d z?Hatmqalapt0QkbJ-X?>;>IivQqY*(IlHu`7|~(==4h~lH*fg8o1=zsUi|MvB7q%w zKsXg+fPpbGfPwu;M&%_;j+Q_IsG7P>yyzoCnC+0Hf6$poL6|0^kmEp5&?7Eg$lWK! zOrh;|v%nfO*J8HR*6P~+7l94Vf@&+st!XzlboJ70?SIyGZDV)&ZTS0_D*QX`%^W8O zeSiJ?8v1vq>t)Mz_Fm{T&*wD!U&jp&D#QM77#pTjIkg|txC`=$WljWHK;;6)_-XTx zR2S*PbE1QMew>mYvk8rv3sZ3Sc7keIP6?;CTR#Z*no2Uuot+cPZhZ@l3Y=vE z({1#LO3w9BOS(E#y|E_rQo9)zyqpsT2;lC~4Dm{M4Jq>{OLa)5C+^&0W|3}bW2-H^ z+!J;tf0jJtfYqm-c8K`H0IN{#nvxgd@9v`7#3iJL#Cs1%9U_NeKWdL+@$!jFG_;X& zV;Ag_%4A;c(kk^JJ`~T_tDKugHX*tN`uIxBtP*VB3>KQ9&Otk+cMh?;4E5Mh=f3_* z37q$#ct#i{(*u5F_}~ty@tiiAwp&Cc*LJpBs7H!_k|@ziau-~kfdmg%>OP+%+*C`8 z1Tz9;C(^NP-*N6%ZW`KkaK-TlRn!Wp!<`@Qks4j?j{H3{KBb`gksEl`nCueJZxnyw z!%6mDe(AJ1!vW$HSYk8_A%YUFAw+|P?tU%n57gLt^9B3^nav2v%g(7*feSVVU3V3- zO!j2?LieZ3pRHUDK$nw&*h6bAV#{V5hn+*GliYMGqC9jgHhwyuh6>q^&a$0eqSvWy z8LT_(K6aZY&U^~)o}c`eby3q|bA}~5Wz9^L;-qzamWDvu{I?Pg8O(c%^w$EF-NN=~~S5pa%#NLgwE$~`97?YYaH9Kq@7C{4rgo!gL7Hf&(zV4NW zkJ3f5cBFNH^(3Jct$>B*Tm|8zUgAoMuVY)0JUZdC^J3jbZwokiXb1VU!AR0EU6vY4 z*+)f1FQb+6VfEZLcW1WEx=by<;}m^O&G^J6sitOyNv?a#Yn^nP?_gSA9!Nv=}wk$LF&n{hSA@;phy)TRM2d34U|Gfy1o$hQ;(Vu2c`4;NXm zlhZ-%s<%a-gSD=UcFU5%@8&0j2p+hqLcIHv5}PVdMmfK-0ds@j+Ru)3MF^Ww7Mob5 zDMK3P&>Gt+kR9U?$`)Hc|5}Xar*jz3qR_L{OiJk2fwh$-4W@G%zu;Z7Q0FCc=w|5P z5cD08=rGo{qTH;JZaXw{^cf0jO(y)piPz+iOu-F8x8x3EU53fg~qnR-}(=Gvc7I3+)QbLEZb3;~feu7cUEY{sXKijeF zVJ${UB*{dA4eePwD6=aya5HS)1WefN+TvX+vMOv`N2cTsSL=HF4MgF#)_(6+As4zm zcaR{RWjVp3BeCh=#Ej(4X^33FHG?%DB0xpTZc^#uy#zRlN#ZDK)wyEw2tXm@(_K0&iKy}VnnKX{*bjEciAk_C5}b1fiyNZ8|B7$9=s*(YmmRmlH&eRBB(h-dLgdf?2|8 zSW~BfI$u6O%l!)vFgO+S4WHTFbCh*0p9z1H%)KeX z&Sd0O8poeuz#M>&N`@b}hGoNzqq<_I)!d928kFotHpgmR4Jl~~-3Q(u4e?vi_mRx+ z8`h)kc{Z>Ob4oAuB52LD+ox->i}g;s-iUJJoqo?i`ob(iQ(=(yc%aFV4>Yz>1MYT}o;=?_^ z&&jc6(${hA8g)2)hXn*|rczoyhIYlsO*>WFj10D-UZ#=$*g|jY!onI|KJSYPy=EMg zGz-ISU-^O`*w%zVzwTvzJWFmNh|nw}>0}l_3JxoUfRjp6-bB0XKfY$Au+v6i$b|`H zY|;1jZXc8#GA7=Xr5Hw6WNB5#fIr1*H(9b;-ajyR=1*20R0Rws5*BlxEc7}RYcvhP zvz=mTpGOeRJ_vhJpQf36TgwhS$So}|QD8g6l`#>lcJU@z-^rmbKMcH8PH*l8c>$vx zqCm)V=*URppX7OQW+u0g>flsW1(F4PuC%u;?!#!*Abz@Zrq#Fb2o5KZ`span{@)NV z|0*AgQ4E*$ZXlN>7Z_54D=sg2yZc`HD>Z*cDO#f2R4MXTzWJD>rW5Z!^)bue?x^K= zvu^%jK;1)A5?}PlNk%j5#06TVbypNYN=HP$d@lYUB1X4CLfC3v`nOYTJfZT3hXWjj zM135o;qp6p-rr+PHXpxc>Tj!g|0MyT`$Xk}OK+2YQ2m($i=OYs< z$CNPS7Y`eKe@v3|_&M*uHLzYmP2t{zf7gu@hIe6ur062@qs?)TA*siTWv}kfcDS| zK!xGzszMroZI{%4A`Z3*hf*Nc;oKkcFWY$1*iB}c^6|jU zQdi>3<@az`aW{H69D(yCCW=LqUz%-mD%O4>wUAXLFXC8sjq0vxeArF*YTG`$>JRfi z0S~!cxa;tj-h1OLSd;JT3|BwVVev_f-5fF{+j}40xql&2;IPuOhul?!R z2q<*?(n@AiipP`;uz!PKFHpywDHvN*q7hEN2F4XRYRARdEwa&Wip!2hqSr6YKb&1` zT6Q|3CSagOD^O+XCYM?p%IA^9bKUQK05N(N+<_(BJ8^;*o25ic+sMh#$f&RqZQY@1 z_odtGgcUP!yCuRk1a-R;^ZTM4D2{t9_pHCiAvK;Ox61Ena^8?=EwLB0Kc{U-KvSU^ zC1VPin}a!7h+SE-2br!8C32kHSJP^(qOSS?R6z~(Fq_dbuGUPcXo>NnkKmm#8H}S^M1BcyM>F6z z&@SMGd0GpCPu)>t;77|6Dn21l% z)N~H{ut=4%J}_w+7@b$7658md^p#QN#Wr?M}L$7NS`QK8@8_BQJOBaq@TewO z?03~w`8teD{qv;U*gs(jp_d?E%x z42@*cqPz)^fd>PUndY!fa!|bdBYP3lJPtp9Ak@w?>M9!bSF}3-D;$5%tC`sc-~^0{ z>*?0(OT^q@%pHmz&hYmRhA)1eXS-3o!fK}{azeHG$3EMtm&_aBZBOHEi#<|K8`jS! z_5swyyLh2*+|#QSe-yHq2U0)T6T(hVyxzsXSiR;})jlq+2rtrRloPiZI!DgrJmUUm6Jq}duH5rMu}ZTv@XhSK4jKa{r-Z0rlk zUfnm8`od)#0c5Og1Rwnnlupg_YVxU#8nOPASm3E5n-p+`f~`ADgY z(9F20)1a>gm&VoRHQ!j&F|4(|1+f%0u-q%6yN-5`IJb^WFmo_F4-!i2N*p0OE9;vh z>69t7q{*{_WNYagYoRs&d_`JlE6hh;qC4mFN(LU)(p$s`1xi#)x@Fo=D%)|D3FNr@=0)wt1~Jb~*5k7iL?_cW{Kfb2riV?uj3ZQ`H~(5Sx8 z@(6oNNOz^LoFt>_EV2FpLSd1X@N)v|;K!yi zapFuxUD-7`0szua~YNc!z-yv zFzwt;DKM=6l%M2|#hV`3E5O*44SK*BHmVVndOoQ|yIr9nhc;?i2RGvr>>4YBJ^4)^t`YeDcRN1!0f(9h3hKAQa)1tlaSJ-Y z-1%L59nw)>QmF5Ps{dRC>dfqRJbCY#JKzKAIhNSO$P2FTlg08&9Mp{Ov>my91{))D ziy8byQ?nw`BsypnS$XEtwD2pDic;AFavxs6zUm zp}koQ#NGDgOl`dbol|sgidy|`9qE~v|5lRSL?1m6-4jfVcm$%o;6{A8X1wV1eezhu zR3e2p30kcy*<+_XZlN$FuV~Wgh|%m?!!L3TACuazm_sYox5G?{mOyCjA52|QU`*1O zrNVGH0~=ySZ8HVN^(6RyRW>kHN2sP`ms%(S0)6bkF{@(U5wwzRoJ92-yHqZuyrEru z;VF2DVpwEI%>PAY(Jr&pyh4*fS=aPke>4e5fusj zQII@ma!pLDA^mwD#E`ezsD$f7cf}gN1HJeU6{`!ZYdQan!^@Y|Hb%&dLB@C0D%MZn zlcQ(R02vqRadm&P5T5kMKcvd;3CwRc|H{Vkdg8eG6gBXM!xA)G2y!OBcXD_KE7KEz zl1Gja`!9RxBjHqV|F4VdfQD=9!s7}e7@ZgsW%NOmga{*QB)S;A_eAeC-i(q6qTldz z(IO!sAxe}GEj*%)-bFAvd4dS>Pv(E`{m*~yy6f(}&$sv8_pE!?I%}PMK3D{HCA84V zE~fWJ7x&+*m=;_#>~nSL4|EZsJP6?v7KYVS!)Z9IypZl~r`9_J2^yhMNXNOzJA1{Za_ z6>v8PZWDpafs`YR3~qGyZ@u(?)M6Xo9lYV4v7u1iZKc?gVUeR_f-&rU*B`);qEMDP zH+UiRc&CYqb2}gRg>l~7`HE+_Kd&gcjZ?Ng>XGI3>m{X%X=q4xb|pVVMNZC9J1i23 zTQLho*(@&ip$;5pCv)<8yaisjG6of7NsQ+lP{t_*D@x(R*AIky?|b=-Yi_G-=y0#h zk>p1H;W>@1(lKuU$TT!61mZ!cl`eLdWjm0J(}kI|hlaLGJ+b_EN6*y}cP3SA3lgHcytA6-jzbi^OxnBiY=YEPESFY`k16Q!W1B zZ}WQh!84d^ab7XXuEZFr-jOt$nyj^dG0pcx`{dq9_6MO(sSo1%X~{A!a|REvvWuxn zl9=n|Uw5*FUwDhH@)}omh&#FPnUy#c=XA-~?LZ4}Key{L7gZ9SS~3}ltp8lCcP=pY zT9z`I0P5Xj$q@|=+EpQHfCgj9YmHvc9-KZpFs~ZERq>QQ99Q?Mw1DdPJ)e2z3U}m9 zT2e3hqJ?@BJHcaX4oV56GRH_Hc2PscfRS9T#M*nQ!r7!)S8K4}Y^Rz$HdHjakw)#P z(t(1~Qty#AhWC^@Z4Te^hi8C|0<84zJ*cUAjnZ3JYMypFN2B_yt@dFtdqGZ!rh$U- zk3pW=idJL#-vvx)^V)FyFM1U#rUux%#CL@!e(JnGeduO8G%ggEGFBp+&dFn$L3?&H zAQNMbj=+V1R=i{;YWY9zhxlf$xT23&;p zkMTv|^-9_sZFD7f~qVUUOLk>bckM-SEc7)Z1#ViqwaGd9(-Aj~n9S7;{uf*STcG4d1 zh|-Hu$%xy3N!2&2azpoAuW`cSfiH38Wy=QYZ$w5IybfDizwh<#O@95n*E-qpZewrq z^N_OBenePTui;XC3Q{OUqWU%@WcOuQxsXb&+s#_zCn<#&@VVCM_x(a#USLWa?jawh z)VsY{zFF7{HZuM7j6pyDQK1zBtgm`^szFWv z7h@*$Vs$gy>oF-ic}e^9jwg4K{%r=*(gs(gD#q7Wy2~V;Gac}XZWYcoqiBQ8rd^ZA z)vY1ZS>02@W`h#Uqw;b`!9VqtOT!-|%<9X=eg zFLhk3mu+$`t6z$ef7&p}ASkOGWrsJ8U~QwHW3;SB_fTd0rrfe%iIvv;Rxmrrze9s0 zrB`6$qTk}>`=s5~^^?TKA{w%i4!sOZ$S@8DW3jrX@qbdXF$Uf4WXopWMfJ@FO`7fJ zS|K)CIiHm}fkpH`^D8ZVbKrM!qQB_m#4dLO?z;9#G|Z^6L3Oit5if><9=t_0H{j-G z5E{<0KHYlJ_1Jqt#>0+iMz5l8pFCByW}En@PjT-W%Tv6YlY$FEeNG{pQ%9}S3XNN= z(eXZ~RM*+bI{52sHoo#UupkddmEXkG;y8QWYS}c7+a7RtTAg)0{d&>E6D=CHn;is$Y~$wiQpzLV-d%8ck;ZSq>MaRF+9Ld3~Jt|3hk*Jsbp;r#yyRj zF#kbknt!cNP<}QnfOxj(+n+n-{wbK@E9y`jN3|ZTe{cKBWCNOfVmQlS0j+NF}!> zv7G^D$KZ_B`jPGl@+B{4?W!_wN}a3Rb)fk$acEKyHIUIF-ER0(*h1x_bkPV*)|teIdxCk3OTRWw?p;qE8j7z^w3cf0D)ghm{A)QdJrY30o zajOp7bxUaVPOIyKZB#sn=dHajw7~P^tGz?ccX>tb^Mik$7MgJV$YCnDDKa==&nsr% z@y)5R4+BqZ*icaOIj^k4E9ZVpzGG@#3|fT#7IXei!$E%j@AO&*44W#3)5hN0RKBrw zx$=e#vvR4Seglugurm_{K7C!+zgAhc*4W`IEwO54A`U?RgL^+npZCRKhsH zTe3Xs+vb2WRfkgKmLo=AW1>;y!EC$=j)XO4V;r3ik9nj&d8A1j&VeTyBj_Q~?bnp9 z+0au=+KQ#8Pqvrc8{b`RR27HU`5_o85Z+V^hwJyscoFJ>BR#b|k^$_CQbovY`R11> z1m{y9AJ_FSebqAlB{7GL4twf|U8Z6envXF?iI{2AI(it$7#b01X&}tS5MA`rM zowK)qw0lJHWL6bOcKu7F0Ila_fDJz|V@?;)@(0)E41rXCP-$KcX!i%hgRg)C3v}Rz zc^IG@L{Qnl{dpY#@*6mq3I`{`SbyaL#w@^qGz`(?89_^MKmz+%qS_xxO+>86&{6-L zWKlROiqOde`hJ!G1RfE^?$4?~Pb^U^OJMjl8lb@<40s<;H036FODHZ~?mK1@#e1dqL7-fvm zbFLWt@LU!YT}A>VB}7ofvNUk=f+#L7D*_uYiP3sr(-VTzfzB&1K(T^o;;P~xnuKcp zolHn2p%Vcz;l+XBb}+e15cI$!frVazhyYs#{yQM!co;x70Pf+PfQdoSVpSd#nScuZ w|E&DqkiEp6nWHb}B;da$<=?F+{O4J~(cC2_GD0yC1R_ni)(HQ!%J47kKb!F!p8x;= diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 05679dc3c..41dfb8790 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.1.1-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index cccdd3d51..1b6c78733 100755 --- a/gradlew +++ b/gradlew @@ -1,78 +1,129 @@ -#!/usr/bin/env sh +#!/bin/sh + +# +# Copyright © 2015-2021 the original authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# ############################################################################## -## -## Gradle start up script for UN*X -## +# +# Gradle start up script for POSIX generated by Gradle. +# +# Important for running: +# +# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is +# noncompliant, but you have some other compliant shell such as ksh or +# bash, then to run this script, type that shell name before the whole +# command line, like: +# +# ksh Gradle +# +# Busybox and similar reduced shells will NOT work, because this script +# requires all of these POSIX shell features: +# * functions; +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». +# +# Important for patching: +# +# (2) This script targets any POSIX shell, so it avoids extensions provided +# by Bash, Ksh, etc; in particular arrays are avoided. +# +# The "traditional" practice of packing multiple parameters into a +# space-separated string is a well documented source of bugs and security +# problems, so this is (mostly) avoided, by progressively accumulating +# options in "$@", and eventually passing that to Java. +# +# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS, +# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly; +# see the in-line comments for details. +# +# There are tweaks for specific operating systems such as AIX, CygWin, +# Darwin, MinGW, and NonStop. +# +# (3) This script is generated from the Groovy template +# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# within the Gradle project. +# +# You can find Gradle at https://github.com/gradle/gradle/. +# ############################################################################## # Attempt to set APP_HOME + # Resolve links: $0 may be a link -PRG="$0" -# Need this for relative symlinks. -while [ -h "$PRG" ] ; do - ls=`ls -ld "$PRG"` - link=`expr "$ls" : '.*-> \(.*\)$'` - if expr "$link" : '/.*' > /dev/null; then - PRG="$link" - else - PRG=`dirname "$PRG"`"/$link" - fi +app_path=$0 + +# Need this for daisy-chained symlinks. +while + APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path + [ -h "$app_path" ] +do + ls=$( ls -ld "$app_path" ) + link=${ls#*' -> '} + case $link in #( + /*) app_path=$link ;; #( + *) app_path=$APP_HOME$link ;; + esac done -SAVED="`pwd`" -cd "`dirname \"$PRG\"`/" >/dev/null -APP_HOME="`pwd -P`" -cd "$SAVED" >/dev/null + +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit APP_NAME="Gradle" -APP_BASE_NAME=`basename "$0"` +APP_BASE_NAME=${0##*/} # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -DEFAULT_JVM_OPTS="" +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' # Use the maximum available, or set MAX_FD != -1 to use that value. -MAX_FD="maximum" +MAX_FD=maximum warn () { echo "$*" -} +} >&2 die () { echo echo "$*" echo exit 1 -} +} >&2 # OS specific support (must be 'true' or 'false'). cygwin=false msys=false darwin=false nonstop=false -case "`uname`" in - CYGWIN* ) - cygwin=true - ;; - Darwin* ) - darwin=true - ;; - MINGW* ) - msys=true - ;; - NONSTOP* ) - nonstop=true - ;; +case "$( uname )" in #( + CYGWIN* ) cygwin=true ;; #( + Darwin* ) darwin=true ;; #( + MSYS* | MINGW* ) msys=true ;; #( + NONSTOP* ) nonstop=true ;; esac CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then # IBM's JDK on AIX uses strange locations for the executables - JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACMD=$JAVA_HOME/jre/sh/java else - JAVACMD="$JAVA_HOME/bin/java" + JAVACMD=$JAVA_HOME/bin/java fi if [ ! -x "$JAVACMD" ] ; then die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME @@ -81,7 +132,7 @@ Please set the JAVA_HOME variable in your environment to match the location of your Java installation." fi else - JAVACMD="java" + JAVACMD=java which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. Please set the JAVA_HOME variable in your environment to match the @@ -89,84 +140,95 @@ location of your Java installation." fi # Increase the maximum file descriptors if we can. -if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then - MAX_FD_LIMIT=`ulimit -H -n` - if [ $? -eq 0 ] ; then - if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then - MAX_FD="$MAX_FD_LIMIT" - fi - ulimit -n $MAX_FD - if [ $? -ne 0 ] ; then - warn "Could not set maximum file descriptor limit: $MAX_FD" - fi - else - warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" - fi -fi - -# For Darwin, add options to specify how the application appears in the dock -if $darwin; then - GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" -fi - -# For Cygwin, switch paths to Windows format before running java -if $cygwin ; then - APP_HOME=`cygpath --path --mixed "$APP_HOME"` - CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` - JAVACMD=`cygpath --unix "$JAVACMD"` - - # We build the pattern for arguments to be converted via cygpath - ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` - SEP="" - for dir in $ROOTDIRSRAW ; do - ROOTDIRS="$ROOTDIRS$SEP$dir" - SEP="|" - done - OURCYGPATTERN="(^($ROOTDIRS))" - # Add a user-defined pattern to the cygpath arguments - if [ "$GRADLE_CYGPATTERN" != "" ] ; then - OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" - fi - # Now convert the arguments - kludge to limit ourselves to /bin/sh - i=0 - for arg in "$@" ; do - CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` - CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option - - if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition - eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` - else - eval `echo args$i`="\"$arg\"" - fi - i=$((i+1)) - done - case $i in - (0) set -- ;; - (1) set -- "$args0" ;; - (2) set -- "$args0" "$args1" ;; - (3) set -- "$args0" "$args1" "$args2" ;; - (4) set -- "$args0" "$args1" "$args2" "$args3" ;; - (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; - (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; - (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; - (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; - (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; +if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then + case $MAX_FD in #( + max*) + MAX_FD=$( ulimit -H -n ) || + warn "Could not query maximum file descriptor limit" + esac + case $MAX_FD in #( + '' | soft) :;; #( + *) + ulimit -n "$MAX_FD" || + warn "Could not set maximum file descriptor limit to $MAX_FD" esac fi -# Escape application args -save () { - for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done - echo " " -} -APP_ARGS=$(save "$@") +# Collect all arguments for the java command, stacking in reverse order: +# * args from the command line +# * the main class name +# * -classpath +# * -D...appname settings +# * --module-path (only if needed) +# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables. -# Collect all arguments for the java command, following the shell quoting and substitution rules -eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" +# For Cygwin or MSYS, switch paths to Windows format before running java +if "$cygwin" || "$msys" ; then + APP_HOME=$( cygpath --path --mixed "$APP_HOME" ) + CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" ) -# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong -if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then - cd "$(dirname "$0")" + JAVACMD=$( cygpath --unix "$JAVACMD" ) + + # Now convert the arguments - kludge to limit ourselves to /bin/sh + for arg do + if + case $arg in #( + -*) false ;; # don't mess with options #( + /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath + [ -e "$t" ] ;; #( + *) false ;; + esac + then + arg=$( cygpath --path --ignore --mixed "$arg" ) + fi + # Roll the args list around exactly as many times as the number of + # args, so each arg winds up back in the position where it started, but + # possibly modified. + # + # NB: a `for` loop captures its iteration list before it begins, so + # changing the positional parameters here affects neither the number of + # iterations, nor the values presented in `arg`. + shift # remove old arg + set -- "$@" "$arg" # push replacement arg + done fi +# Collect all arguments for the java command; +# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of +# shell script including quotes and variable substitutions, so put them in +# double quotes to make sure that they get re-expanded; and +# * put everything else in single quotes, so that it's not re-expanded. + +set -- \ + "-Dorg.gradle.appname=$APP_BASE_NAME" \ + -classpath "$CLASSPATH" \ + org.gradle.wrapper.GradleWrapperMain \ + "$@" + +# Use "xargs" to parse quoted args. +# +# With -n1 it outputs one arg per line, with the quotes and backslashes removed. +# +# In Bash we could simply go: +# +# readarray ARGS < <( xargs -n1 <<<"$var" ) && +# set -- "${ARGS[@]}" "$@" +# +# but POSIX shell has neither arrays nor command substitution, so instead we +# post-process each arg (as a line of input to sed) to backslash-escape any +# character that might be a shell metacharacter, then use eval to reverse +# that process (while maintaining the separation between arguments), and wrap +# the whole thing up as a single "set" statement. +# +# This will of course break if any of these variables contains a newline or +# an unmatched quote. +# + +eval "set -- $( + printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" | + xargs -n1 | + sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' | + tr '\n' ' ' + )" '"$@"' + exec "$JAVACMD" "$@" diff --git a/gradlew.bat b/gradlew.bat index e95643d6a..ac1b06f93 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -1,3 +1,19 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @@ -13,15 +29,18 @@ if "%DIRNAME%" == "" set DIRNAME=. set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. -set DEFAULT_JVM_OPTS= +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto init +if "%ERRORLEVEL%" == "0" goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -35,7 +54,7 @@ goto fail set JAVA_HOME=%JAVA_HOME:"=% set JAVA_EXE=%JAVA_HOME%/bin/java.exe -if exist "%JAVA_EXE%" goto init +if exist "%JAVA_EXE%" goto execute echo. echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% @@ -45,28 +64,14 @@ echo location of your Java installation. goto fail -:init -@rem Get command-line arguments, handling Windows variants - -if not "%OS%" == "Windows_NT" goto win9xME_args - -:win9xME_args -@rem Slurp the command line arguments. -set CMD_LINE_ARGS= -set _SKIP=2 - -:win9xME_args_slurp -if "x%~1" == "x" goto execute - -set CMD_LINE_ARGS=%* - :execute @rem Setup the command line set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + @rem Execute Gradle -"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* :end @rem End local scope for the variables with windows NT shell diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index f4508cc6a..6851543b7 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -454,145 +454,145 @@ f657eabc7321de0b05cf92d9ebdd6f5215a685b5 assets/actuallyadditions/models/item/wo 09674f706bebd8f2631450f1c07f1376b2c3ba01 assets/actuallyadditions/models/item/worm.json 0b1ab8963077c90a5104b516eab36e56c8a07057 assets/actuallyadditions/models/item/xp_solidifier.json ecf1cc8efe1f425334e8e07a6c747641c714c92c assets/actuallyadditions/sounds.json -56048fd14b61c03380903460ec55fabc2df3eaac data/actuallyadditions/advancements/craft_coal_generator.json -58d03f96a5c20611e22d8cec90c972d7218064e8 data/actuallyadditions/advancements/craft_coffee_machine.json -681bfd8939b4a7843700fe00382f703e80070a38 data/actuallyadditions/advancements/craft_crusher.json -3dfef9d6252198582a16fcc85a1abca2f6bad2e3 data/actuallyadditions/advancements/craft_double_crusher.json -04bc0214d706d2011d6450803e406579f2e132f4 data/actuallyadditions/advancements/craft_empowerer.json -889c1be4720a7da3887cd378e3f98d446af25ae3 data/actuallyadditions/advancements/craft_energyface.json -45a78c57fcbbced57321c420e1d0dc050a1b2ff5 data/actuallyadditions/advancements/craft_item_interface.json -ef2c3abb1f2dcb31baa00fa6e70d8d8846440266 data/actuallyadditions/advancements/craft_laser_relay.json -8f81eeffa15e291e4a7cae6f7464746cd0bc834b data/actuallyadditions/advancements/craft_laser_relay_advanced.json -fc1c59cc804274b36d757c59529269bb14841f4a data/actuallyadditions/advancements/craft_laser_relay_extreme.json -aff73cb2465d85abf92d94b5843167166c9b2820 data/actuallyadditions/advancements/craft_laser_relay_item.json -69532a7bd1b199dacb08f4541fc0c27633b391da data/actuallyadditions/advancements/craft_leaf_generator.json -56c4431e4d61926e07073f5265086e67312c0023 data/actuallyadditions/advancements/craft_liquiface.json -f1e0c56dab5fd3516e9d1da7c16831bf4bd3364e data/actuallyadditions/advancements/craft_phantom_face.json -ef621cca24fa11382b856a70fa6f432f081007d7 data/actuallyadditions/advancements/craft_reconstructor.json +78a1e3bec8bf9830c1ca098af7e2a9213426f75b data/actuallyadditions/advancements/craft_coal_generator.json +2c8657e98263866b87520fe3de4aaa900cee1758 data/actuallyadditions/advancements/craft_coffee_machine.json +8746592eda56b4027e896c20fe1a6d0dbcb24bc9 data/actuallyadditions/advancements/craft_crusher.json +0c699699a50df43acac86490b3d238c04984c6bb data/actuallyadditions/advancements/craft_double_crusher.json +367027f64ba66fd1757c3391c3cd27336ff954c5 data/actuallyadditions/advancements/craft_empowerer.json +0f1e0ac963635b25299c99ebcbe66823985f0f1b data/actuallyadditions/advancements/craft_energyface.json +c5ed52b759d2a4d61b12d07b57c859c9c0ce8e3a data/actuallyadditions/advancements/craft_item_interface.json +8fcb90f479e353a6b251c62cb323a151a12182c0 data/actuallyadditions/advancements/craft_laser_relay.json +8010e063762d9ad376ef6efd02bc9c6bd30004b9 data/actuallyadditions/advancements/craft_laser_relay_advanced.json +1f9f9b227ebea65d04b3c448bb06c875cfcc746a data/actuallyadditions/advancements/craft_laser_relay_extreme.json +5fef10815f29597800e9015e95af190ca8501bf7 data/actuallyadditions/advancements/craft_laser_relay_item.json +c72fcdc4c2b6dc7f757b41b61f6e5063c7dcf49a data/actuallyadditions/advancements/craft_leaf_generator.json +d8a218723094bc01575a7e0b197f1676347bce57 data/actuallyadditions/advancements/craft_liquiface.json +9d1f0abf32f1200920ba83933511f01cfc7ac203 data/actuallyadditions/advancements/craft_phantom_face.json +d476883cb50537b8058c08df2d8b2ee42cd66c7a data/actuallyadditions/advancements/craft_reconstructor.json d09f28dfb125fc0d58f4e23287d19877db73c0b7 data/actuallyadditions/advancements/make_first_crystal.json -58c901fc6a544f800e641b2ab9f1f4b25d6dce53 data/actuallyadditions/advancements/pickup_coffee.json +4d77ce02dec4e2092a6e9e739e85dc0768928a4a data/actuallyadditions/advancements/pickup_coffee.json 1326c214451f5fef68e330a37bfa0433de723f4c data/actuallyadditions/advancements/root.json -b679296118ae905d4a15b6bc658cfa7b8048e57f data/actuallyadditions/loot_tables/blocks/atomic_reconstructor.json -de3c64d6a363f8e27078d7f7df1a67e4931fd81c data/actuallyadditions/loot_tables/blocks/battery_box.json -fb968dc63f2d0a467eff504f3f6ff386080e2433 data/actuallyadditions/loot_tables/blocks/bio_reactor.json -a1b62291e361451916e45a97bb499ecb1b6eb595 data/actuallyadditions/loot_tables/blocks/black_quartz_block.json -88d06540d7db61a5f12d4ae728b298978c175528 data/actuallyadditions/loot_tables/blocks/black_quartz_brick_block.json -758ea9d573bad6eb5a9baa480e6ac7cdb3086801 data/actuallyadditions/loot_tables/blocks/black_quartz_brick_slab.json -25999ba6adebccd8f8c9aaeac4d569b561c10ff6 data/actuallyadditions/loot_tables/blocks/black_quartz_brick_stair.json -83eae2a8058606f8fd7ad48b4f18b2dd4cf25f91 data/actuallyadditions/loot_tables/blocks/black_quartz_brick_wall.json -de831ee9fb899a2698a15aa792798e8bc8cec6cd data/actuallyadditions/loot_tables/blocks/black_quartz_ore.json -284190bea6fa9fefeeb5aa942830fbd8999a4446 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_block.json -9fa02c71612918d38900fb401c15975cb43a7443 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_slab.json -7a5c8a64366e6302647efa0f6ce033f24e74af89 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_stair.json -b12f24fa635a72ea41c5cab68015b47b01e85846 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_wall.json -1fe5db6af5243d718867a3aed2915f60a074420f data/actuallyadditions/loot_tables/blocks/black_quartz_slab.json -59363fb1bf29cc3eaeda51267d7a3d3451659b85 data/actuallyadditions/loot_tables/blocks/black_quartz_stair.json -9ff4e9ed368bc6c84c8a4a6faf7557eb23856fe0 data/actuallyadditions/loot_tables/blocks/black_quartz_wall.json -8cd0a700e62111e5a4351788072bf816731ab493 data/actuallyadditions/loot_tables/blocks/breaker.json -91fae25a55c4f58e5871c6008c5c13f89cb62198 data/actuallyadditions/loot_tables/blocks/canola.json -f3df22f203e8c00ee7ee004bb9b4edfd522f069a data/actuallyadditions/loot_tables/blocks/canola_press.json -55e8641b836aab36848edf7d0eab33e647571fc8 data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_block.json -7b10afffb30390977f1729356e0b4959ccb4cf1c data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_slab.json -6df5538ba7cf057d19728f8e615862a84b9d4bb1 data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_stair.json -092e8773d46f16d80d0c489c4a2d2f8bd5a78799 data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_wall.json -bf7743c27757cf5b0dbab9b3e15d1d5ca1ece818 data/actuallyadditions/loot_tables/blocks/coal_generator.json -01ed45d18335029de7725ae4490077c9280eedd1 data/actuallyadditions/loot_tables/blocks/coffee.json -3285202e3f840d091b8d85dc2c721199fcc96240 data/actuallyadditions/loot_tables/blocks/coffee_machine.json -317d0377327250f2fe15ff549a1ffa1b7bdade14 data/actuallyadditions/loot_tables/blocks/crusher.json -b087c6f44cf0236f52471ec54c026ee30ba0d273 data/actuallyadditions/loot_tables/blocks/crusher_double.json -6336ca572b8d81f6e06b43bb925b48bb915b6574 data/actuallyadditions/loot_tables/blocks/diamatine_crystal_block.json -b9ed4007fec7a382a02b08b231f072df6aa40049 data/actuallyadditions/loot_tables/blocks/diamatine_crystal_cluster.json -7476dbc0cbb3c1a8ce5a3c1562f73fcfb4adcd10 data/actuallyadditions/loot_tables/blocks/display_stand.json -162331b9fbc67309820a20377575336e63ed3e74 data/actuallyadditions/loot_tables/blocks/dropper.json -3b93e666ae7c49a182e771063901b27da8dcfb3f data/actuallyadditions/loot_tables/blocks/emeradic_crystal_block.json -9fec34737374133601990074c4156334ab3841ad data/actuallyadditions/loot_tables/blocks/emeradic_crystal_cluster.json -aeb229c0c9a5d5f4682430ed4ec78c123e7e871b data/actuallyadditions/loot_tables/blocks/empowered_diamatine_crystal_block.json -04f1075d01a9467a6ad00373b73b94869af7a799 data/actuallyadditions/loot_tables/blocks/empowered_emeradic_crystal_block.json -00e52dcccbf05f4d332b650ce9374691983b32f1 data/actuallyadditions/loot_tables/blocks/empowered_enori_crystal_block.json -4c9d1217bab479d6b28c2c2b6a12b8dea9625ca7 data/actuallyadditions/loot_tables/blocks/empowered_palis_crystal_block.json -000a65e96a8f3d79f37671a42e00c5700c46cc79 data/actuallyadditions/loot_tables/blocks/empowered_restonia_crystal_block.json -3b23c1416f7227cdd3c05033cd097e4e95048a12 data/actuallyadditions/loot_tables/blocks/empowered_void_crystal_block.json -e0ae0923455cc2eedfdfc826d8c408b23373997c data/actuallyadditions/loot_tables/blocks/empowerer.json -8b9f76383b14f0d814126a3279fcf4d4b84867e3 data/actuallyadditions/loot_tables/blocks/ender_casing.json -872ba64002408040096e08a340b956b35c261f57 data/actuallyadditions/loot_tables/blocks/energizer.json -ce52e2261acccd8092f6033eaa24cb7eb0ace776 data/actuallyadditions/loot_tables/blocks/enervator.json -0310ab57594d1bbbdfc20043a4bbf6a522207e74 data/actuallyadditions/loot_tables/blocks/enori_crystal_block.json -58de0ea0cc68ec93bf488557e880b9e5f839a338 data/actuallyadditions/loot_tables/blocks/enori_crystal_cluster.json -24ad472bcaa4536e32865de339ec932f55399de6 data/actuallyadditions/loot_tables/blocks/ethetic_green_block.json -5e2a9930efaa4c815a2874405876878b96478efb data/actuallyadditions/loot_tables/blocks/ethetic_green_slab.json -978541de7caae92254b402d85a6fa28be92a2446 data/actuallyadditions/loot_tables/blocks/ethetic_green_stairs.json -6cd9d8105bebca9bb7bd054fa54e60aa7f7229a8 data/actuallyadditions/loot_tables/blocks/ethetic_green_wall.json -5d20584eddc3887ee6bda8cbb9312ae549dc5307 data/actuallyadditions/loot_tables/blocks/ethetic_white_block.json -bf9c3a7ae7a9f3a6450403292cbcecd922f6aa3b data/actuallyadditions/loot_tables/blocks/ethetic_white_slab.json -35c33041660cc162e8283a94ac0be3208a7958ea data/actuallyadditions/loot_tables/blocks/ethetic_white_stairs.json -d98534f21c56b8d11f722c8c3c9d0acbeb323554 data/actuallyadditions/loot_tables/blocks/ethetic_white_wall.json -de23e0f60c9ea67e554f6e21425c29a45c205378 data/actuallyadditions/loot_tables/blocks/farmer.json -0b617808ed4788bbe97fe81efc37290e19ab257d data/actuallyadditions/loot_tables/blocks/feeder.json -91a2dd39bb797fb3270367ab77524733fc8aab47 data/actuallyadditions/loot_tables/blocks/fermenting_barrel.json -0bcee59a3bdf86cbb604b65a6c9013d21d16c13c data/actuallyadditions/loot_tables/blocks/firework_box.json -537ecc108b85896c89bbb50583c15b602bc5d3a9 data/actuallyadditions/loot_tables/blocks/flax.json -2c276ba10bd5655d38bb52e5670ba046cf5783b9 data/actuallyadditions/loot_tables/blocks/fluid_collector.json -0d1f81f93d2bbb37b6ce9a645a1a4ee34bdd0c41 data/actuallyadditions/loot_tables/blocks/fluid_placer.json -a6e2a7783e597f97780fd144706e66b5fdb7d9e0 data/actuallyadditions/loot_tables/blocks/greenhouse_glass.json -299f001df502fa1aa34384370d06cc698a51c39e data/actuallyadditions/loot_tables/blocks/heat_collector.json -e116e77ea6f45d0d4b93cde1084c75086413315e data/actuallyadditions/loot_tables/blocks/hopping_item_interface.json -12c27a8021c6b61cf4304bca94edd2aa5d1ff658 data/actuallyadditions/loot_tables/blocks/iron_casing.json -a5d03812083bf4091fdc87b5cca597d8d585c59a data/actuallyadditions/loot_tables/blocks/item_interface.json -d4daeb47a3b5382cf636d64564741f10f4ecf8a2 data/actuallyadditions/loot_tables/blocks/lamp_black.json -c2dd60733559f76897ad6c03844fe988dcab421c data/actuallyadditions/loot_tables/blocks/lamp_blue.json -012d9cec7b02bef10fd80dd620d28b6f1a83a2ca data/actuallyadditions/loot_tables/blocks/lamp_brown.json -f77f61f3ddc8c7802e8d914ec03eb422faff4505 data/actuallyadditions/loot_tables/blocks/lamp_controller.json -329deb1561247fa9151b819642f9ad47e0dd3e04 data/actuallyadditions/loot_tables/blocks/lamp_cyan.json -d08755883b87abce91cca2566ee731246277cef5 data/actuallyadditions/loot_tables/blocks/lamp_gray.json -0e31ac904f2b973f0233025b33ff4c1db82ef298 data/actuallyadditions/loot_tables/blocks/lamp_green.json -0f2923754794ffadd5cacbe28431b0ca2c0c72b9 data/actuallyadditions/loot_tables/blocks/lamp_light_blue.json -d0e7e5aa858caa5044f72c1e46c627f63491ff92 data/actuallyadditions/loot_tables/blocks/lamp_light_gray.json -db0e768bed8364ef7ef2d3a48fa61c05432e3481 data/actuallyadditions/loot_tables/blocks/lamp_lime.json -88162fb4d9dc914d044dbb5d61566683817feac3 data/actuallyadditions/loot_tables/blocks/lamp_magenta.json -39e11ae9abdbadf8acbc106b6cd2717cddf72989 data/actuallyadditions/loot_tables/blocks/lamp_orange.json -27a2b2515786a16cc6486a871007eb425b643301 data/actuallyadditions/loot_tables/blocks/lamp_pink.json -30cb4e72f47203629d58c0e94e00bcb0af59a2b0 data/actuallyadditions/loot_tables/blocks/lamp_purple.json -67644d8e96d1ae860485da3167bcba6405c5e95e data/actuallyadditions/loot_tables/blocks/lamp_red.json -8045cc7dcbf30fef588f759b5e59d26ddc43f93a data/actuallyadditions/loot_tables/blocks/lamp_white.json -569ac4635188b06901e4a4cf103061c4a39e1a15 data/actuallyadditions/loot_tables/blocks/lamp_yellow.json -c779aee00da69c0a0b77d10666744717786a42c9 data/actuallyadditions/loot_tables/blocks/laser_relay.json -a75b6c99f51263dc08a3989b0db7ebb6429d19f0 data/actuallyadditions/loot_tables/blocks/laser_relay_advanced.json -d97afdaa98f4202a2fc767599a4e5e34ffbefa71 data/actuallyadditions/loot_tables/blocks/laser_relay_extreme.json -3d3b5214b393427238da936b2090f9db08503994 data/actuallyadditions/loot_tables/blocks/laser_relay_fluids.json -7ed6dd90358646ca2e7c13801e0679182e30bf9f data/actuallyadditions/loot_tables/blocks/laser_relay_item.json -4f0c866450d6ce434ee5fba6ad0141b2e5f73b2e data/actuallyadditions/loot_tables/blocks/laser_relay_item_advanced.json -427c0ab203d6e946069912f0f8d5d744d9fe6a54 data/actuallyadditions/loot_tables/blocks/lava_factory_casing.json -a26c16e8bf499948ef947d5e7e2e6691e0c7e1a8 data/actuallyadditions/loot_tables/blocks/lava_factory_controller.json -d2cfb9e1d68cfabcf21f2847cf66760b514bb510 data/actuallyadditions/loot_tables/blocks/leaf_generator.json -644aab55582d80b4b1fb9857b1b136b3f50bbe79 data/actuallyadditions/loot_tables/blocks/long_range_breaker.json -0317d1a12de12767cac13a5a2c9d173198b7e600 data/actuallyadditions/loot_tables/blocks/oil_generator.json -8a49a3773ea9ac5f56b68373671fbf535a33ae0b data/actuallyadditions/loot_tables/blocks/palis_crystal_block.json -101ae500268810b6ec90bfcbbecc6ddfdd843e74 data/actuallyadditions/loot_tables/blocks/palis_crystal_cluster.json -84e7d1632faf9762a0112e3d7ba7e83f49a8707a data/actuallyadditions/loot_tables/blocks/phantom_booster.json -388205fa694060ef81e9fd04bcc773a611bde10b data/actuallyadditions/loot_tables/blocks/phantom_breaker.json -fe259af8c76c75cdd9a2a47d2334528e08e98021 data/actuallyadditions/loot_tables/blocks/phantom_energyface.json -81723ca7bdf062c206faa947a4ca839c18e14a0b data/actuallyadditions/loot_tables/blocks/phantom_itemface.json -2c59c6d9eb85fb3ec3218262404d2a2cf1efcadb data/actuallyadditions/loot_tables/blocks/phantom_liquiface.json -d6c0f113ea7c3cc0e8c3a11860792966d516211b data/actuallyadditions/loot_tables/blocks/phantom_placer.json -a365f2f0d80e070d281a7b839c961d36f115abeb data/actuallyadditions/loot_tables/blocks/phantom_redstoneface.json -13f0d4587dac4822a26fd063a22f6f46c83e9af6 data/actuallyadditions/loot_tables/blocks/placer.json -6d9a73f94513ed92c1697d25c5d89145b016ab5d data/actuallyadditions/loot_tables/blocks/player_interface.json -bb5b9781aa9c64a1330eff6d7bb3e6c2c7f3a645 data/actuallyadditions/loot_tables/blocks/powered_furnace.json -a92f9584164335ecbcf769bc668289d76cea5d6c data/actuallyadditions/loot_tables/blocks/ranged_collector.json -d497fdb4936e1f3fdaa556da79e39f6fcbb405ed data/actuallyadditions/loot_tables/blocks/restonia_crystal_block.json -7d025b370ad83e847619627002ca835901faf235 data/actuallyadditions/loot_tables/blocks/restonia_crystal_cluster.json -bd374b67213a7ac097fa7586cfa3ec00474816b9 data/actuallyadditions/loot_tables/blocks/rice.json -4f42c1d3f01d17c22ab71bd3c33b3161fbe90de7 data/actuallyadditions/loot_tables/blocks/shock_suppressor.json -7b6d8282ee5863485614a8aa4d3cde7c712a034b data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_block.json -f44b900f61f7210d15533c2e757395c3d767e21b data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_slab.json -7b7cc361433b751446f6c01da60798458d978c07 data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_stair.json -31300f6a16f9d76ad7af7892e76fd31fdacaea39 data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_wall.json -4b6d8000f56553da02fef8f780ae6eec4dd3e4a0 data/actuallyadditions/loot_tables/blocks/tiny_torch.json -2b5543d91fe161b3b5c9cc9f657262791cb8957c data/actuallyadditions/loot_tables/blocks/vertical_digger.json -24602858f30273d46f0dd2082779e9544d7a87a6 data/actuallyadditions/loot_tables/blocks/void_crystal_block.json -45cb53d2b6f2a05bd3a44b1acfc0482d11094222 data/actuallyadditions/loot_tables/blocks/void_crystal_cluster.json -069aca316e282ab12ad8ddbcfa3c389f1a13d673 data/actuallyadditions/loot_tables/blocks/wood_casing.json -218c99fd547620a1e6ee186d427dca486212eae0 data/actuallyadditions/loot_tables/blocks/xp_solidifier.json +7c476ba0444784e06a50633e488f20deac84b989 data/actuallyadditions/loot_tables/blocks/atomic_reconstructor.json +bb5d55da383e21ce9cd6c05703ae9b16ff59b085 data/actuallyadditions/loot_tables/blocks/battery_box.json +3c4661088ed15818d8c4b4c63f74175a8b7f5b91 data/actuallyadditions/loot_tables/blocks/bio_reactor.json +67c5066a4cc1de2775574bb70707b179489511a7 data/actuallyadditions/loot_tables/blocks/black_quartz_block.json +74a0519c8b958bbcf26ede292849a8e5435f381f data/actuallyadditions/loot_tables/blocks/black_quartz_brick_block.json +d91bbca6576c922b016299fa88c7a89c9c1fbdc0 data/actuallyadditions/loot_tables/blocks/black_quartz_brick_slab.json +0d91d745894803c2a0ee7fae8242fff85b63bfbb data/actuallyadditions/loot_tables/blocks/black_quartz_brick_stair.json +6e60f0b3ba9672668a9bb017f39ded02774d64f0 data/actuallyadditions/loot_tables/blocks/black_quartz_brick_wall.json +51eb09f165b4e7f9221823ff1a7b1398042dd5fc data/actuallyadditions/loot_tables/blocks/black_quartz_ore.json +ad79549ec1bb16cb81b1c17efd3cc24d901c0d66 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_block.json +e3e0187a5a3c56469f4719450673fa6f8ed013e5 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_slab.json +ccb53f7ab56df2dc28c290dd996e3c317346d146 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_stair.json +8e2fe41c346ca3cba6d98bdd41a00feafaf2fad7 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_wall.json +e6e88f9aa1a0ee0171b96ab327e4faf58ab93fbb data/actuallyadditions/loot_tables/blocks/black_quartz_slab.json +41bbe28a14e07beccfa18914bf2e95410265ebf5 data/actuallyadditions/loot_tables/blocks/black_quartz_stair.json +d4b51e2228f12cfd5aa51d4e72b83307656f8607 data/actuallyadditions/loot_tables/blocks/black_quartz_wall.json +57031055419efa50a97d1653c3227afe9cf8ceed data/actuallyadditions/loot_tables/blocks/breaker.json +83319db556d5b892ff8ab33bce62c8282d1bbf08 data/actuallyadditions/loot_tables/blocks/canola.json +6d7c7d717df570c9b661db11a861483b4fa253e8 data/actuallyadditions/loot_tables/blocks/canola_press.json +195eab69b32f2e36f815c66e0f2e88b653fedb0f data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_block.json +6b640079b13b9f20bd883df17f763d086e64d11d data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_slab.json +2acba6eb2a214292df2d0db3fa46701ca7c9508a data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_stair.json +b1998a958433d4e5f9ff2a5aa49b4d7cea198393 data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_wall.json +6eb4516ae49ddc777468da4adffb2fd3b562a9cc data/actuallyadditions/loot_tables/blocks/coal_generator.json +3c5adae363db644f6e24c9bab93f8b98e58debeb data/actuallyadditions/loot_tables/blocks/coffee.json +3a5fb14238fded1a5bd33163328d02f334a4a5fc data/actuallyadditions/loot_tables/blocks/coffee_machine.json +56f4a5c8420dc8b69782204a2e7af552e37cd5ab data/actuallyadditions/loot_tables/blocks/crusher.json +17d4d4e009c822f4dc4617ff1a8d51fcf9933429 data/actuallyadditions/loot_tables/blocks/crusher_double.json +4c6d8c53c2ac6ee0a08a4c9e7f0f0a046bf19e18 data/actuallyadditions/loot_tables/blocks/diamatine_crystal_block.json +83ae77fd9d3cd2c7c38d3a9f30ef555b4507ac52 data/actuallyadditions/loot_tables/blocks/diamatine_crystal_cluster.json +c69a0c113a49beda5c4a7721d4a7af5b9d2c452c data/actuallyadditions/loot_tables/blocks/display_stand.json +e5a3c083bef3c3819599d6c71ddce4a3d0f257b4 data/actuallyadditions/loot_tables/blocks/dropper.json +3bb4d9f95ddd88b7e4a004fa8f4727a0e613efde data/actuallyadditions/loot_tables/blocks/emeradic_crystal_block.json +eec807466d0e33b52685a8d9bc776317a013303b data/actuallyadditions/loot_tables/blocks/emeradic_crystal_cluster.json +ebae1c4d56e3b5dd5d213ccae4a1ac8237780aa6 data/actuallyadditions/loot_tables/blocks/empowered_diamatine_crystal_block.json +a2d6ac504f0a09bca011f704ca2f25be6ebb0962 data/actuallyadditions/loot_tables/blocks/empowered_emeradic_crystal_block.json +a7162ee24237ef45f265c5c473da53cede9ff4c8 data/actuallyadditions/loot_tables/blocks/empowered_enori_crystal_block.json +cab369964320a3b66f90a835919e669cb0a5ec9a data/actuallyadditions/loot_tables/blocks/empowered_palis_crystal_block.json +fcd1cbd35d0bbc06e3e71303476857cae5e40c68 data/actuallyadditions/loot_tables/blocks/empowered_restonia_crystal_block.json +b7b4cd0a896af8a6df7233427040c094afc7889e data/actuallyadditions/loot_tables/blocks/empowered_void_crystal_block.json +95fcc7dcb49d7a35ff73d6978e97394034a5a219 data/actuallyadditions/loot_tables/blocks/empowerer.json +9e52c96a713a82d3589cd52b7d43544d1d927d3e data/actuallyadditions/loot_tables/blocks/ender_casing.json +e83a71b615f0e1b1972a819395296e13c7be56be data/actuallyadditions/loot_tables/blocks/energizer.json +be35fcd78bcb7eb299625c3a62456c34184ec21f data/actuallyadditions/loot_tables/blocks/enervator.json +6ce6b9e6ae9ee02906cd9410d53bf9b975c628b2 data/actuallyadditions/loot_tables/blocks/enori_crystal_block.json +0c8c4e819bced6cdc1a887d6b00a07b76452fe36 data/actuallyadditions/loot_tables/blocks/enori_crystal_cluster.json +e9ad8228fa30d5f8d56088d57c445073fa9d380b data/actuallyadditions/loot_tables/blocks/ethetic_green_block.json +9ef0bf1effdb5f3732fbd27617f50fb1672b3ee3 data/actuallyadditions/loot_tables/blocks/ethetic_green_slab.json +23656b1068400b349adf5ed3fb62265beae1b4ec data/actuallyadditions/loot_tables/blocks/ethetic_green_stairs.json +dcf88d90a7c0aaed3745222140dd7762285e4a99 data/actuallyadditions/loot_tables/blocks/ethetic_green_wall.json +3817a07ac3d8e6b7295185b5b30e945c836bd86e data/actuallyadditions/loot_tables/blocks/ethetic_white_block.json +6560b21185ffa6fdc540136cf8e223bc6883202b data/actuallyadditions/loot_tables/blocks/ethetic_white_slab.json +cc80737398b55d3244a76b461fcbe71520a1584a data/actuallyadditions/loot_tables/blocks/ethetic_white_stairs.json +49605a5bbb985781710584647b3e8c7e4b5a5813 data/actuallyadditions/loot_tables/blocks/ethetic_white_wall.json +f4cc5421009f16223f505379189260b4b6204ec2 data/actuallyadditions/loot_tables/blocks/farmer.json +08959a6e9cdac1b59d8015db38d36fb24a04bc7f data/actuallyadditions/loot_tables/blocks/feeder.json +650409e01fc826b133e41e1041c8d1d521b9fd40 data/actuallyadditions/loot_tables/blocks/fermenting_barrel.json +c91f4678917231a691a00716f8cc76f7c0511627 data/actuallyadditions/loot_tables/blocks/firework_box.json +096fc3f758f0b02557bce73588c5f143e908544d data/actuallyadditions/loot_tables/blocks/flax.json +88fa30109d1ae55999ded8ff6559cc624d9c98fb data/actuallyadditions/loot_tables/blocks/fluid_collector.json +cf193f4e8ff7cd8ad3a1a1b1101bcf5445814ecb data/actuallyadditions/loot_tables/blocks/fluid_placer.json +390934605a8630a35993bfa30e47cc3aca2ad595 data/actuallyadditions/loot_tables/blocks/greenhouse_glass.json +dc57d4928bf987ce6a3ca4f10201bbd9dfeccb60 data/actuallyadditions/loot_tables/blocks/heat_collector.json +6d711189bf7dc33281d08f8a90c8383233e3217c data/actuallyadditions/loot_tables/blocks/hopping_item_interface.json +733e0d4226ae2775e8c619e8bba71f1515906b31 data/actuallyadditions/loot_tables/blocks/iron_casing.json +251b67acc2885871d7f9f3e90bb58653028221e1 data/actuallyadditions/loot_tables/blocks/item_interface.json +616213a5f05126c426b9c086fbd80b7c417a0676 data/actuallyadditions/loot_tables/blocks/lamp_black.json +0882989c2d2fa73d9b7eb1134b3bdd39931f7461 data/actuallyadditions/loot_tables/blocks/lamp_blue.json +695c0d10ab6b8dee27e21154a84e24e758560da5 data/actuallyadditions/loot_tables/blocks/lamp_brown.json +1462d92d68a90eb29c71c0925ba13cbd7ceb3aec data/actuallyadditions/loot_tables/blocks/lamp_controller.json +b057482b4f89b58b92271b88977e6238a3ebe2f9 data/actuallyadditions/loot_tables/blocks/lamp_cyan.json +cffcbd28f1980e562962ea005f8c58b1e5ad9fd0 data/actuallyadditions/loot_tables/blocks/lamp_gray.json +41be9d52cfee4ef7b84253bddab902f51924ffa7 data/actuallyadditions/loot_tables/blocks/lamp_green.json +7a971b3c9384a24ba199b5fad794a7a381dc6fa9 data/actuallyadditions/loot_tables/blocks/lamp_light_blue.json +3638cb431eccbadb84af54a04643324780da45e9 data/actuallyadditions/loot_tables/blocks/lamp_light_gray.json +4bc4f90b90b378a1e5bd4ac3af7452f11733cae5 data/actuallyadditions/loot_tables/blocks/lamp_lime.json +9a1301e0d404659ce76e178d198a61e79dbf48a8 data/actuallyadditions/loot_tables/blocks/lamp_magenta.json +6321365d03d3d9e89e00ce956206d919fb34fe70 data/actuallyadditions/loot_tables/blocks/lamp_orange.json +363ca3423176fd84e4ed0e2f754755340064119a data/actuallyadditions/loot_tables/blocks/lamp_pink.json +bd78ccea95b84d4274e1a1837c5a93982624742b data/actuallyadditions/loot_tables/blocks/lamp_purple.json +7793353acbcdcf245efa93e6d3d11be22a79a384 data/actuallyadditions/loot_tables/blocks/lamp_red.json +b3e7ddf1c7b1d464a265b4aa352e0b79126723f9 data/actuallyadditions/loot_tables/blocks/lamp_white.json +d30f652cdb2150ca9d0f47166dc00609f37f5581 data/actuallyadditions/loot_tables/blocks/lamp_yellow.json +2998b41fd240776f6b2f751cbbf21d1ca3c95820 data/actuallyadditions/loot_tables/blocks/laser_relay.json +dd5dc8470140a9b0f776b8058aa242e037ee0b04 data/actuallyadditions/loot_tables/blocks/laser_relay_advanced.json +3f2a6f0a5fb52bd916de8cd3a343526b21c9e6bc data/actuallyadditions/loot_tables/blocks/laser_relay_extreme.json +500635b445c60a503f8a920c672fb11fa890019a data/actuallyadditions/loot_tables/blocks/laser_relay_fluids.json +d1a32f911e62430f4fbd464775f6381d213d2d04 data/actuallyadditions/loot_tables/blocks/laser_relay_item.json +ddd6ee3c8820d67e5acc1e67acceb8ff99a9351a data/actuallyadditions/loot_tables/blocks/laser_relay_item_advanced.json +951f738b1ef07b6a626a3c5c39c5cb1c412f2edd data/actuallyadditions/loot_tables/blocks/lava_factory_casing.json +f3cf4d36f16e08e030c25de5cdfa93976d156a22 data/actuallyadditions/loot_tables/blocks/lava_factory_controller.json +ff91dda525da8b68aba564bfe88555d6c676d595 data/actuallyadditions/loot_tables/blocks/leaf_generator.json +1e745ced069d8181f0ea3d1b132bbb84db8efbac data/actuallyadditions/loot_tables/blocks/long_range_breaker.json +a339b6b2a9caa625029385e9604870f5a4f378ea data/actuallyadditions/loot_tables/blocks/oil_generator.json +47ab98d1402e17a205ec8865f6f7f0d704d9e7a1 data/actuallyadditions/loot_tables/blocks/palis_crystal_block.json +a1b2464021b0a0aa0401ace533dda2d92edacfc9 data/actuallyadditions/loot_tables/blocks/palis_crystal_cluster.json +72c97009f21477806dde65eff46eb1758ce224ee data/actuallyadditions/loot_tables/blocks/phantom_booster.json +1425c19c5cacf71294ddbb2c12383bb141fcc2f5 data/actuallyadditions/loot_tables/blocks/phantom_breaker.json +de00666ae75aa71f352d5b9d3c7c4ea9f62874c6 data/actuallyadditions/loot_tables/blocks/phantom_energyface.json +36746cc3164805ab46d34892c8206eee0212edb5 data/actuallyadditions/loot_tables/blocks/phantom_itemface.json +0eb15c4cdfdccb5207577be061b773852d715d93 data/actuallyadditions/loot_tables/blocks/phantom_liquiface.json +8bbc2c05cd1cc0d8cc1d5ec7230056f0691e3bed data/actuallyadditions/loot_tables/blocks/phantom_placer.json +27e84fefae09c6f00d88918223be693f43f8f754 data/actuallyadditions/loot_tables/blocks/phantom_redstoneface.json +51293067f66de14942faa14105f099d931b73885 data/actuallyadditions/loot_tables/blocks/placer.json +ba950fc805546f2ed7c2a4d229881dd1f93922a9 data/actuallyadditions/loot_tables/blocks/player_interface.json +f3a486718523a4cbfad968849e2e68433e629ec5 data/actuallyadditions/loot_tables/blocks/powered_furnace.json +91f5fc461c294bcb386fc207d5d286b0eb30dd48 data/actuallyadditions/loot_tables/blocks/ranged_collector.json +91bc0ca71f77559edeb53a1890a9101e705f69f8 data/actuallyadditions/loot_tables/blocks/restonia_crystal_block.json +03058b2216c8e6ba63b8d03d085958265177f767 data/actuallyadditions/loot_tables/blocks/restonia_crystal_cluster.json +7088d02cc3db67b5b0bdafb11238f70c46d8a1ec data/actuallyadditions/loot_tables/blocks/rice.json +5e5b0d4e5f14451d183eb1c62e824070532011fd data/actuallyadditions/loot_tables/blocks/shock_suppressor.json +0d1bb5c5ee2cbd625edd9696e4ec3112df41d800 data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_block.json +300ea1d06816038e03e2e6ec236b9bb6af757364 data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_slab.json +852df54c2c4b4409ee9fd5d9336f2bf6ce95951a data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_stair.json +2ab70e5e713d0cbb22a321d5f1862479bb692dfa data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_wall.json +fc971ee4bff8fbcca6cfc0e0ef5e0d5120be45c1 data/actuallyadditions/loot_tables/blocks/tiny_torch.json +a2ea79148f316e1c330774cc5b3de2f7fce0fa73 data/actuallyadditions/loot_tables/blocks/vertical_digger.json +e6ca4acfe5b66ae48056f102c2356ff78aecca64 data/actuallyadditions/loot_tables/blocks/void_crystal_block.json +03f30533040961eff84f574ddb7b546d185b9fc3 data/actuallyadditions/loot_tables/blocks/void_crystal_cluster.json +a3323427ca7c75ad3a86614f25eda7a9bd483814 data/actuallyadditions/loot_tables/blocks/wood_casing.json +818b5655b0c35661f41abb8f94b600f910f992be data/actuallyadditions/loot_tables/blocks/xp_solidifier.json 64711e28d6fb7579f1ba2fed4a46440e213a2fac data/actuallyadditions/recipes/advanced_coil.json d2666ce077d5892a3bffde70ddf53492ec876900 data/actuallyadditions/recipes/advanced_leaf_blower.json a91ac0f76c7b325ac3ef0eefe5614d17f1f533d3 data/actuallyadditions/recipes/atomic_reconstructor.json @@ -842,7 +842,7 @@ f2692c35f23f12a2468dd84a1e66c1c9219a7048 data/actuallyadditions/recipes/laser_wr e51e98b13f1949ce31485b93133568792745243c data/actuallyadditions/recipes/leaf_blower.json ec31df01057ad65de89068b01f96b3fb9f837bb4 data/actuallyadditions/recipes/lens.json 634680e59ff81f293e3c44fd871e84fca96336ea data/actuallyadditions/recipes/lens_of_disenchanting.json -9a958fc55ca0f759841f9813a8449639e175bbcc data/actuallyadditions/recipes/lens_of_the_killer.json +46bd3a03bb46db005c8de2dcb563d36c01a5210b data/actuallyadditions/recipes/lens_of_the_killer.json 1d560167a16962d870f0a4bf0cf9e74ac1431b3c data/actuallyadditions/recipes/lens_of_the_miner.json 701af1122ed158e5d162815a9f744169031698f4 data/actuallyadditions/recipes/liquid_fuel/canola_oil.json 0c908206a367aa9c04f751d1f69aa50d6d09ce3a data/actuallyadditions/recipes/liquid_fuel/crystallized_canola_oil.json @@ -892,8 +892,13 @@ d8611ae9f616794678bb7f2d0c253383f09e8b27 data/actuallyadditions/recipes/vertical 17503be947b6e654606f28e6d07d197eb91abc88 data/actuallyadditions/recipes/wings_of_the_bats.json c562b938e29b85572f1b30952f5711bca2c9c899 data/actuallyadditions/recipes/wood_casing.json 5d0b3e0b27c0a7f82438fd24673866ce087d47f0 data/actuallyadditions/recipes/wooden_aiot.json +f25af32614eaea3e33bbbe473df3768ed1575261 data/actuallyadditions/tags/blocks/mineable/aio.json +f455b03ca55c4ab3e7b0e1e60a516332cfe41fa7 data/actuallyadditions/tags/blocks/mineable/drill.json a18f00e11fa55ff1b767eeab7a4756c2e0e93429 data/actuallyadditions/tags/items/coffee_beans.json 1714cd34792c6448f7316094c105e2e953b36e73 data/actuallyadditions/tags/items/crystals.json 2290b1829e049ab3002f3576379ad58f6d7b6ace data/actuallyadditions/tags/items/drills.json 8c1e24d7377b6bdf64c13643d94c3826ac925c25 data/actuallyadditions/tags/items/tiny_coals.json +6d90fc27d45eb34ac60019b82494e90acba77135 data/minecraft/tags/blocks/mineable/axe.json +be19b436d177039f96f3dea1ce5a8e6e749d4844 data/minecraft/tags/blocks/mineable/pickaxe.json +925347d0ff7e8c38945bb9782564e5321f2846bd data/minecraft/tags/blocks/needs_stone_tool.json 84fb4202cf40368e8c1a1d36bca0a4952aa05866 data/minecraft/tags/blocks/walls.json diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_coal_generator.json b/src/generated/resources/data/actuallyadditions/advancements/craft_coal_generator.json index 10b90820f..31a04ed84 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_coal_generator.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_coal_generator.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:coal_generator" + "items": [ + "actuallyadditions:coal_generator" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_coffee_machine.json b/src/generated/resources/data/actuallyadditions/advancements/craft_coffee_machine.json index 3ad10d567..e488c7c76 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_coffee_machine.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_coffee_machine.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:coffee_machine" + "items": [ + "actuallyadditions:coffee_machine" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_crusher.json b/src/generated/resources/data/actuallyadditions/advancements/craft_crusher.json index d3b5a240f..715e683ea 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_crusher.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_crusher.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:crusher" + "items": [ + "actuallyadditions:crusher" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_double_crusher.json b/src/generated/resources/data/actuallyadditions/advancements/craft_double_crusher.json index bb0e12447..21094f45d 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_double_crusher.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_double_crusher.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:crusher_double" + "items": [ + "actuallyadditions:crusher_double" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_empowerer.json b/src/generated/resources/data/actuallyadditions/advancements/craft_empowerer.json index efe01e237..5353af633 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_empowerer.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_empowerer.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:empowerer" + "items": [ + "actuallyadditions:empowerer" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_energyface.json b/src/generated/resources/data/actuallyadditions/advancements/craft_energyface.json index ae34fdf5a..555e79de5 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_energyface.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_energyface.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:phantom_energyface" + "items": [ + "actuallyadditions:phantom_energyface" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_item_interface.json b/src/generated/resources/data/actuallyadditions/advancements/craft_item_interface.json index f27a264af..fa6e38e5b 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_item_interface.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_item_interface.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:item_interface" + "items": [ + "actuallyadditions:item_interface" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay.json b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay.json index 9d921b423..67dc9581d 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:laser_relay" + "items": [ + "actuallyadditions:laser_relay" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_advanced.json b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_advanced.json index 80c64d44c..9fef2a695 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_advanced.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_advanced.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:laser_relay_advanced" + "items": [ + "actuallyadditions:laser_relay_advanced" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_extreme.json b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_extreme.json index 0c47c61cc..ddf4e9caa 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_extreme.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_extreme.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:laser_relay_extreme" + "items": [ + "actuallyadditions:laser_relay_extreme" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_item.json b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_item.json index 92f4fa7bd..9abffffba 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_item.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_item.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:laser_relay_item" + "items": [ + "actuallyadditions:laser_relay_item" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_leaf_generator.json b/src/generated/resources/data/actuallyadditions/advancements/craft_leaf_generator.json index 4e7de054b..53685adc3 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_leaf_generator.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_leaf_generator.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:leaf_generator" + "items": [ + "actuallyadditions:leaf_generator" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_liquiface.json b/src/generated/resources/data/actuallyadditions/advancements/craft_liquiface.json index 782ae3951..71d4f4903 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_liquiface.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_liquiface.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:phantom_liquiface" + "items": [ + "actuallyadditions:phantom_liquiface" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_phantom_face.json b/src/generated/resources/data/actuallyadditions/advancements/craft_phantom_face.json index 2c8f3334d..adaa4936e 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_phantom_face.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_phantom_face.json @@ -22,7 +22,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:phantom_itemface" + "items": [ + "actuallyadditions:phantom_itemface" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_reconstructor.json b/src/generated/resources/data/actuallyadditions/advancements/craft_reconstructor.json index 405c363a0..6ce4cbf03 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_reconstructor.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_reconstructor.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:atomic_reconstructor" + "items": [ + "actuallyadditions:atomic_reconstructor" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/advancements/pickup_coffee.json b/src/generated/resources/data/actuallyadditions/advancements/pickup_coffee.json index 2b2bcada0..07803b4fa 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/pickup_coffee.json +++ b/src/generated/resources/data/actuallyadditions/advancements/pickup_coffee.json @@ -21,7 +21,9 @@ "conditions": { "items": [ { - "item": "actuallyadditions:coffee_beans" + "items": [ + "actuallyadditions:coffee_beans" + ] } ] } diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/atomic_reconstructor.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/atomic_reconstructor.json index 7f8a593e1..1054ce438 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/atomic_reconstructor.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/atomic_reconstructor.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/battery_box.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/battery_box.json index cc3783fcc..3f63c6924 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/battery_box.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/battery_box.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/bio_reactor.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/bio_reactor.json index 7e53a85f6..60439a516 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/bio_reactor.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/bio_reactor.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_block.json index c349d995b..598323abb 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_block.json index c85c03adf..7c650b89c 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_slab.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_slab.json index f2898361b..6bbc59b94 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_slab.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_slab.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_stair.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_stair.json index 26d4ab873..d66d22c8a 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_stair.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_stair.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_wall.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_wall.json index 60bf420c5..643e7c14f 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_wall.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_wall.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_ore.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_ore.json index cde4868eb..d25ac3370 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_ore.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_ore.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_block.json index 7e8df5dde..02033ad87 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_slab.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_slab.json index 620008d31..6798b9899 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_slab.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_slab.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_stair.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_stair.json index 6c2943e38..bb3cf0d61 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_stair.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_stair.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_wall.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_wall.json index 17e277eb6..b20f0d41d 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_wall.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_wall.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_slab.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_slab.json index f9cc6ccfb..1bd033119 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_slab.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_slab.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_stair.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_stair.json index 1c0313302..26476d55f 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_stair.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_stair.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_wall.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_wall.json index 119bc938f..1c5410f66 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_wall.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_wall.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/breaker.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/breaker.json index 75b4f2e82..249eaaa8f 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/breaker.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/breaker.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola.json index fee7d3116..b3b7a7828 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola.json @@ -3,6 +3,7 @@ "pools": [ { "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:alternatives", @@ -30,6 +31,7 @@ }, { "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola_press.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola_press.json index b051f7ea6..015c84660 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola_press.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola_press.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_block.json index 5d709f85d..cb9d06fee 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_slab.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_slab.json index f50eeafda..7d6b111ca 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_slab.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_slab.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_stair.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_stair.json index 0c7c22f05..df0b9dbe8 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_stair.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_stair.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_wall.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_wall.json index bafebbace..6b40fcadf 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_wall.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_wall.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coal_generator.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coal_generator.json index dbb3d389d..fa7efa496 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coal_generator.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coal_generator.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee.json index a12e5c4c9..325f11ad2 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee.json @@ -3,6 +3,7 @@ "pools": [ { "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:alternatives", @@ -30,6 +31,7 @@ }, { "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee_machine.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee_machine.json index be08468f4..efdfc9ebe 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee_machine.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee_machine.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher.json index d3cc6a7ff..2dc3ac2b1 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher_double.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher_double.json index 6d67d9a3f..16b1926cd 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher_double.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher_double.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_block.json index 3704715f1..8d02e3718 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_cluster.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_cluster.json index 934d71467..f94a936cb 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_cluster.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_cluster.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/display_stand.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/display_stand.json index 77fcb37f1..1d2356135 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/display_stand.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/display_stand.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/dropper.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/dropper.json index e453d016b..d037144f4 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/dropper.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/dropper.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_block.json index 95c7982a8..39745aea1 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_cluster.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_cluster.json index 49739a130..f3c1e44e6 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_cluster.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_cluster.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_diamatine_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_diamatine_crystal_block.json index 278e689e8..adeb26142 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_diamatine_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_diamatine_crystal_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_emeradic_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_emeradic_crystal_block.json index 1ad79f4fb..ebd0f62ed 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_emeradic_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_emeradic_crystal_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_enori_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_enori_crystal_block.json index ed2b3c2a7..040b109e7 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_enori_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_enori_crystal_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_palis_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_palis_crystal_block.json index 5d05cfaa0..66fb81542 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_palis_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_palis_crystal_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_restonia_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_restonia_crystal_block.json index 1162e05fc..e635129bd 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_restonia_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_restonia_crystal_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_void_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_void_crystal_block.json index 48e3ee045..977f40f13 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_void_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_void_crystal_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowerer.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowerer.json index 6c87a1b0d..9784699f6 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowerer.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowerer.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ender_casing.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ender_casing.json index b8480d0b3..8c0b34e27 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ender_casing.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ender_casing.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/energizer.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/energizer.json index 40eda9fa9..2018794d8 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/energizer.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/energizer.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enervator.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enervator.json index 1c2e317a7..a34c3c96c 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enervator.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enervator.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_block.json index 7812cc289..7b1c1d2f2 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_cluster.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_cluster.json index 03d13e69f..3080e00b9 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_cluster.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_cluster.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_block.json index 11655c60f..afb60f13f 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_slab.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_slab.json index c0f71c050..0855a601f 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_slab.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_slab.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_stairs.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_stairs.json index eb7469718..4dd260e7f 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_stairs.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_stairs.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_wall.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_wall.json index 1022b37d9..3a9e14efe 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_wall.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_wall.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_block.json index 95626507f..17f2d1365 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_slab.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_slab.json index 739231548..da141db6d 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_slab.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_slab.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_stairs.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_stairs.json index ed0b5d407..b57ea1d90 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_stairs.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_stairs.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_wall.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_wall.json index fef6318e3..334165edb 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_wall.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_wall.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/farmer.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/farmer.json index f5d7decef..cc7b4e28e 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/farmer.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/farmer.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/feeder.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/feeder.json index d8455965b..0a5418e23 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/feeder.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/feeder.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fermenting_barrel.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fermenting_barrel.json index 316a0fd33..5f771aa63 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fermenting_barrel.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fermenting_barrel.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/firework_box.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/firework_box.json index b849b5634..d4d996294 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/firework_box.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/firework_box.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/flax.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/flax.json index bbd332024..7025abdbe 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/flax.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/flax.json @@ -3,6 +3,7 @@ "pools": [ { "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:alternatives", @@ -30,6 +31,7 @@ }, { "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_collector.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_collector.json index 2ef37ac61..d7f123c78 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_collector.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_collector.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_placer.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_placer.json index a26d40596..894e79fec 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_placer.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_placer.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/greenhouse_glass.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/greenhouse_glass.json index 82a4c7345..b0abe5f8d 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/greenhouse_glass.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/greenhouse_glass.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/heat_collector.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/heat_collector.json index 666cf36bc..06fab2a33 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/heat_collector.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/heat_collector.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/hopping_item_interface.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/hopping_item_interface.json index 43824b2a1..f3f59af62 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/hopping_item_interface.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/hopping_item_interface.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/iron_casing.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/iron_casing.json index 1607c5d56..157ca96d0 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/iron_casing.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/iron_casing.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/item_interface.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/item_interface.json index 33c35df22..8609b8dab 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/item_interface.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/item_interface.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_black.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_black.json index b310c2238..10f140aee 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_black.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_black.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_blue.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_blue.json index e07de6fb6..8ac9b4e3c 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_blue.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_blue.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_brown.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_brown.json index ae58a56d3..bdfd31329 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_brown.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_brown.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_controller.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_controller.json index 6e2905aad..2544bf104 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_controller.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_controller.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_cyan.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_cyan.json index 3f2534a63..8e91bdcb9 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_cyan.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_cyan.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_gray.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_gray.json index 790a33a64..7a3a6e072 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_gray.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_gray.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_green.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_green.json index 92ccdf7c0..02f1fd2f2 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_green.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_green.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_blue.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_blue.json index 1c146e07d..1364c84d4 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_blue.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_blue.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_gray.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_gray.json index 351092aca..f0feae162 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_gray.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_gray.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_lime.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_lime.json index 12dd72f26..40e4d6093 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_lime.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_lime.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_magenta.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_magenta.json index e4acf9dc6..e031695ad 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_magenta.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_magenta.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_orange.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_orange.json index aea32880b..b1f7533d8 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_orange.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_orange.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_pink.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_pink.json index 5bb862ca7..155fcf4e6 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_pink.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_pink.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_purple.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_purple.json index d4cffa594..8f8561e41 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_purple.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_purple.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_red.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_red.json index 865ba6041..e498e6d17 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_red.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_red.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_white.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_white.json index bc964510c..819009386 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_white.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_white.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_yellow.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_yellow.json index 88f7b6d7b..8b42e5419 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_yellow.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_yellow.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay.json index 974b46b05..a75c1c700 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_advanced.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_advanced.json index ed921d838..d1f1ab4e5 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_advanced.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_advanced.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_extreme.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_extreme.json index e12231e8d..730316004 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_extreme.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_extreme.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_fluids.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_fluids.json index 40ff1bf4b..d10694a22 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_fluids.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_fluids.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item.json index 4362ae851..a4001d3fe 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item_advanced.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item_advanced.json index 417cf655f..c56f0f75c 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item_advanced.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item_advanced.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_casing.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_casing.json index 9203cdaf6..d65699e50 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_casing.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_casing.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_controller.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_controller.json index a51f05555..ce43b4217 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_controller.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_controller.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/leaf_generator.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/leaf_generator.json index cee315d03..abd380ec7 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/leaf_generator.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/leaf_generator.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/long_range_breaker.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/long_range_breaker.json index 3aabeb3f6..a0f462673 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/long_range_breaker.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/long_range_breaker.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/oil_generator.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/oil_generator.json index 4405208c1..c393f058a 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/oil_generator.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/oil_generator.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_block.json index 3921c4344..d17752cc9 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_cluster.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_cluster.json index 3dff1575a..34224fbc7 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_cluster.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_cluster.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_booster.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_booster.json index 56a3a386c..6b7f3adf8 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_booster.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_booster.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_breaker.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_breaker.json index 3a239e439..f9a8780d4 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_breaker.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_breaker.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_energyface.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_energyface.json index 5aa30bbd6..9df709985 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_energyface.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_energyface.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_itemface.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_itemface.json index 02a9549d4..e4f4e5d83 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_itemface.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_itemface.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_liquiface.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_liquiface.json index da68bb045..7214352e8 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_liquiface.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_liquiface.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_placer.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_placer.json index ac9a9e788..d07fedb09 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_placer.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_placer.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_redstoneface.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_redstoneface.json index a3fb43b99..16a7eb941 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_redstoneface.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_redstoneface.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/placer.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/placer.json index fe6d92410..441ddf30e 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/placer.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/placer.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/player_interface.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/player_interface.json index 5f291febc..03c3a189d 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/player_interface.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/player_interface.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/powered_furnace.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/powered_furnace.json index da1571118..8086e5274 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/powered_furnace.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/powered_furnace.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ranged_collector.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ranged_collector.json index 23d55561d..b0b03792f 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ranged_collector.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ranged_collector.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_block.json index 347561b44..315433d0c 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_cluster.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_cluster.json index bc5cf1be1..99614b795 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_cluster.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_cluster.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/rice.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/rice.json index 3ec5f7bc5..014ed3aab 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/rice.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/rice.json @@ -3,6 +3,7 @@ "pools": [ { "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:alternatives", @@ -30,6 +31,7 @@ }, { "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/shock_suppressor.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/shock_suppressor.json index f9f248b51..a2ccdd18d 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/shock_suppressor.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/shock_suppressor.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_block.json index 8550f0446..5fc1b2f73 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_slab.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_slab.json index 2741e1ee2..c99cb676c 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_slab.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_slab.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_stair.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_stair.json index 5a8908830..933a915d6 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_stair.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_stair.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_wall.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_wall.json index ee414b56c..f31422f41 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_wall.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_wall.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/tiny_torch.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/tiny_torch.json index c7319da63..6a1ef52e0 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/tiny_torch.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/tiny_torch.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/vertical_digger.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/vertical_digger.json index 722ab9ea0..91dc432a6 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/vertical_digger.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/vertical_digger.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_block.json index 99f296029..c3a95c3c9 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_block.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_cluster.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_cluster.json index 8e2350932..bf676af26 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_cluster.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_cluster.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/wood_casing.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/wood_casing.json index e52db8519..8df18ba49 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/wood_casing.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/wood_casing.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/xp_solidifier.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/xp_solidifier.json index dcda55b39..27d7de05f 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/xp_solidifier.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/xp_solidifier.json @@ -2,7 +2,8 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1, + "rolls": 1.0, + "bonus_rolls": 0.0, "entries": [ { "type": "minecraft:item", diff --git a/src/generated/resources/data/actuallyadditions/recipes/lens_of_the_killer.json b/src/generated/resources/data/actuallyadditions/recipes/lens_of_the_killer.json index 167322151..6e8b9284f 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/lens_of_the_killer.json +++ b/src/generated/resources/data/actuallyadditions/recipes/lens_of_the_killer.json @@ -8,7 +8,10 @@ "item": "actuallyadditions:lens_of_certain_death" }, { - "item": "minecraft:enchanted_book" + "type": "forge:nbt", + "item": "minecraft:enchanted_book", + "count": 1, + "nbt": "{Enchantments:[{id:\"minecraft:sharpness\",lvl:5s}]}" } ], "result": { diff --git a/src/generated/resources/data/actuallyadditions/tags/blocks/mineable/aio.json b/src/generated/resources/data/actuallyadditions/tags/blocks/mineable/aio.json new file mode 100644 index 000000000..311da04cc --- /dev/null +++ b/src/generated/resources/data/actuallyadditions/tags/blocks/mineable/aio.json @@ -0,0 +1,9 @@ +{ + "replace": false, + "values": [ + "#minecraft:mineable/axe", + "#minecraft:mineable/hoe", + "#minecraft:mineable/pickaxe", + "#minecraft:mineable/shovel" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/tags/blocks/mineable/drill.json b/src/generated/resources/data/actuallyadditions/tags/blocks/mineable/drill.json new file mode 100644 index 000000000..190180da3 --- /dev/null +++ b/src/generated/resources/data/actuallyadditions/tags/blocks/mineable/drill.json @@ -0,0 +1,7 @@ +{ + "replace": false, + "values": [ + "#minecraft:mineable/shovel", + "#minecraft:mineable/pickaxe" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json new file mode 100644 index 000000000..36b45d4a7 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "actuallyadditions:fermenting_barrel" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json new file mode 100644 index 000000000..4da0c02df --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -0,0 +1,92 @@ +{ + "replace": false, + "values": [ + "actuallyadditions:lamp_white", + "actuallyadditions:lamp_orange", + "actuallyadditions:lamp_magenta", + "actuallyadditions:lamp_light_blue", + "actuallyadditions:lamp_yellow", + "actuallyadditions:lamp_lime", + "actuallyadditions:lamp_pink", + "actuallyadditions:lamp_gray", + "actuallyadditions:lamp_light_gray", + "actuallyadditions:lamp_cyan", + "actuallyadditions:lamp_purple", + "actuallyadditions:lamp_blue", + "actuallyadditions:lamp_brown", + "actuallyadditions:lamp_green", + "actuallyadditions:lamp_red", + "actuallyadditions:lamp_black", + "actuallyadditions:leaf_generator", + "actuallyadditions:wood_casing", + "actuallyadditions:iron_casing", + "actuallyadditions:ender_casing", + "actuallyadditions:lava_factory_casing", + "actuallyadditions:black_quartz_ore", + "actuallyadditions:ethetic_green_block", + "actuallyadditions:ethetic_white_block", + "actuallyadditions:black_quartz_block", + "actuallyadditions:black_quartz_pillar_block", + "actuallyadditions:chiseled_black_quartz_block", + "actuallyadditions:smooth_black_quartz_block", + "actuallyadditions:black_quartz_brick_block", + "actuallyadditions:feeder", + "actuallyadditions:crusher", + "actuallyadditions:crusher_double", + "actuallyadditions:energizer", + "actuallyadditions:enervator", + "actuallyadditions:lava_factory_controller", + "actuallyadditions:lamp_controller", + "actuallyadditions:canola_press", + "actuallyadditions:oil_generator", + "actuallyadditions:coal_generator", + "actuallyadditions:xp_solidifier", + "actuallyadditions:placer", + "actuallyadditions:breaker", + "actuallyadditions:dropper", + "actuallyadditions:fluid_collector", + "actuallyadditions:farmer", + "actuallyadditions:bio_reactor", + "actuallyadditions:vertical_digger", + "actuallyadditions:atomic_reconstructor", + "actuallyadditions:ranged_collector", + "actuallyadditions:long_range_breaker", + "actuallyadditions:coffee_machine", + "actuallyadditions:powered_furnace", + "actuallyadditions:enori_crystal_block", + "actuallyadditions:restonia_crystal_block", + "actuallyadditions:palis_crystal_block", + "actuallyadditions:diamatine_crystal_block", + "actuallyadditions:void_crystal_block", + "actuallyadditions:emeradic_crystal_block", + "actuallyadditions:empowered_enori_crystal_block", + "actuallyadditions:empowered_restonia_crystal_block", + "actuallyadditions:empowered_palis_crystal_block", + "actuallyadditions:empowered_diamatine_crystal_block", + "actuallyadditions:empowered_void_crystal_block", + "actuallyadditions:empowered_emeradic_crystal_block", + "actuallyadditions:display_stand", + "actuallyadditions:empowerer", + "actuallyadditions:player_interface", + "actuallyadditions:item_interface", + "actuallyadditions:hopping_item_interface", + "actuallyadditions:phantom_itemface", + "actuallyadditions:phantom_placer", + "actuallyadditions:phantom_liquiface", + "actuallyadditions:phantom_energyface", + "actuallyadditions:phantom_redstoneface", + "actuallyadditions:phantom_breaker", + "actuallyadditions:phantom_booster", + "actuallyadditions:battery_box", + "actuallyadditions:firework_box", + "actuallyadditions:shock_suppressor", + "actuallyadditions:heat_collector", + "actuallyadditions:laser_relay", + "actuallyadditions:laser_relay_advanced", + "actuallyadditions:laser_relay_extreme", + "actuallyadditions:laser_relay_fluids", + "actuallyadditions:laser_relay_item", + "actuallyadditions:laser_relay_item_advanced", + "actuallyadditions:greenhouse_glass" + ] +} \ No newline at end of file diff --git a/src/generated/resources/data/minecraft/tags/blocks/needs_stone_tool.json b/src/generated/resources/data/minecraft/tags/blocks/needs_stone_tool.json new file mode 100644 index 000000000..08bee803a --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/blocks/needs_stone_tool.json @@ -0,0 +1,29 @@ +{ + "replace": false, + "values": [ + "actuallyadditions:wood_casing", + "actuallyadditions:iron_casing", + "actuallyadditions:ender_casing", + "actuallyadditions:lava_factory_casing", + "actuallyadditions:black_quartz_ore", + "actuallyadditions:ethetic_green_block", + "actuallyadditions:ethetic_white_block", + "actuallyadditions:black_quartz_block", + "actuallyadditions:black_quartz_pillar_block", + "actuallyadditions:chiseled_black_quartz_block", + "actuallyadditions:smooth_black_quartz_block", + "actuallyadditions:black_quartz_brick_block", + "actuallyadditions:enori_crystal_block", + "actuallyadditions:restonia_crystal_block", + "actuallyadditions:palis_crystal_block", + "actuallyadditions:diamatine_crystal_block", + "actuallyadditions:void_crystal_block", + "actuallyadditions:emeradic_crystal_block", + "actuallyadditions:empowered_enori_crystal_block", + "actuallyadditions:empowered_restonia_crystal_block", + "actuallyadditions:empowered_palis_crystal_block", + "actuallyadditions:empowered_diamatine_crystal_block", + "actuallyadditions:empowered_void_crystal_block", + "actuallyadditions:empowered_emeradic_crystal_block" + ] +} \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java index 44d4e5608..692d4d5ba 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyAdditionsAPI.java @@ -18,20 +18,29 @@ import de.ellpeck.actuallyadditions.api.internal.IMethodHandler; import de.ellpeck.actuallyadditions.api.laser.ILaserRelayConnectionHandler; import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.api.lens.LensConversion; -import de.ellpeck.actuallyadditions.api.recipe.*; -import de.ellpeck.actuallyadditions.mod.crafting.*; -import de.ellpeck.actuallyadditions.mod.items.lens.*; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.util.ResourceLocation; +import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient; +import de.ellpeck.actuallyadditions.api.recipe.WeightedOre; +import de.ellpeck.actuallyadditions.mod.crafting.ColorChangeRecipe; +import de.ellpeck.actuallyadditions.mod.crafting.CrushingRecipe; +import de.ellpeck.actuallyadditions.mod.crafting.EmpowererRecipe; +import de.ellpeck.actuallyadditions.mod.crafting.FermentingRecipe; +import de.ellpeck.actuallyadditions.mod.crafting.LaserRecipe; +import de.ellpeck.actuallyadditions.mod.crafting.LiquidFuelRecipe; +import de.ellpeck.actuallyadditions.mod.crafting.MiningLensRecipe; +import de.ellpeck.actuallyadditions.mod.crafting.PressingRecipe; +import de.ellpeck.actuallyadditions.mod.crafting.SolidFuelRecipe; +import de.ellpeck.actuallyadditions.mod.items.lens.LensColor; +import de.ellpeck.actuallyadditions.mod.items.lens.LensDeath; +import de.ellpeck.actuallyadditions.mod.items.lens.LensDetonation; +import de.ellpeck.actuallyadditions.mod.items.lens.LensDisenchanting; +import de.ellpeck.actuallyadditions.mod.items.lens.LensKiller; +import de.ellpeck.actuallyadditions.mod.items.lens.LensMining; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; -import java.util.Map; public final class ActuallyAdditionsAPI { diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyTags.java b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyTags.java index afb2c435c..d55b04435 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyTags.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyTags.java @@ -1,10 +1,13 @@ package de.ellpeck.actuallyadditions.api; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.item.Item; -import net.minecraft.tags.ITag; +import net.minecraft.core.Registry; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.BlockTags; import net.minecraft.tags.ItemTags; -import net.minecraft.util.ResourceLocation; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; public final class ActuallyTags { public static final void init() { @@ -15,14 +18,34 @@ public final class ActuallyTags { public static void touch() { // load the stupid tags } - public static final ITag.INamedTag DRILLS = tag("drills"); - public static final ITag.INamedTag COFFEE_BEANS = tag("coffee_beans"); - public static final ITag.INamedTag TINY_COALS = tag("tiny_coals"); - public static final ITag.INamedTag HOLDS_ITEMS = ItemTags.createOptional(new ResourceLocation("forge", "holds_items")); - public static final ITag.INamedTag CRYSTALS = tag("crystals"); + public static final TagKey DRILLS = tag("drills"); + public static final TagKey COFFEE_BEANS = tag("coffee_beans"); + public static final TagKey TINY_COALS = tag("tiny_coals"); + public static final TagKey HOLDS_ITEMS = ItemTags.create(new ResourceLocation("forge", "holds_items")); + public static final TagKey CRYSTALS = tag("crystals"); - private static ITag.INamedTag tag(String name) { - return ItemTags.bind(String.format("%s:%s", ActuallyAdditions.MODID, name)); + private static TagKey tag(String name) { + return TagKey.create(Registry.ITEM_REGISTRY, new ResourceLocation(ActuallyAdditions.MODID, name)); + } + } + + public static class Blocks { + public static void touch() { + // load the stupid tags + } + + public static final TagKey MINEABLE_WITH_DRILL = tag("mineable/drill"); + public static final TagKey MINEABLE_WITH_AIO = tag("mineable/aio"); + public static final TagKey NEEDS_BLACK_QUARTZ_TOOL = tag("needs_black_quartz_tool"); + public static final TagKey NEEDS_RESTONIA_TOOL = tag("needs_restonia_tool"); + public static final TagKey NEEDS_PALIS_TOOL = tag("needs_palis_tool"); + public static final TagKey NEEDS_DIAMATINE_TOOL = tag("needs_diamatine_tool"); + public static final TagKey NEEDS_VOID_TOOL = tag("needs_void_tool"); + public static final TagKey NEEDS_EMERADIC_TOOL = tag("needs_emeradic_tool"); + public static final TagKey NEEDS_ENORI_TOOL = tag("needs_enori_tool"); + + private static TagKey tag(String name) { + return TagKey.create(Registry.BLOCK_REGISTRY, new ResourceLocation(ActuallyAdditions.MODID, name)); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/booklet/IBookletChapter.java b/src/main/java/de/ellpeck/actuallyadditions/api/booklet/IBookletChapter.java index d43607114..bac2207da 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/booklet/IBookletChapter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/booklet/IBookletChapter.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.api.booklet; -import net.minecraft.item.ItemStack; +import net.minecraft.world.item.ItemStack; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/booklet/IBookletPage.java b/src/main/java/de/ellpeck/actuallyadditions/api/booklet/IBookletPage.java index 35939ea51..ca84df9b8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/booklet/IBookletPage.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/booklet/IBookletPage.java @@ -11,8 +11,8 @@ package de.ellpeck.actuallyadditions.api.booklet; import de.ellpeck.actuallyadditions.api.booklet.internal.GuiBookletBase; -import net.minecraft.client.gui.widget.button.Button; -import net.minecraft.item.ItemStack; +import net.minecraft.client.gui.components.Button; +import net.minecraft.world.item.ItemStack; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fluids.FluidStack; diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/booklet/internal/GuiBookletBase.java b/src/main/java/de/ellpeck/actuallyadditions/api/booklet/internal/GuiBookletBase.java index dad853253..fb90777e5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/booklet/internal/GuiBookletBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/booklet/internal/GuiBookletBase.java @@ -10,16 +10,16 @@ package de.ellpeck.actuallyadditions.api.booklet.internal; -import net.minecraft.client.gui.IGuiEventListener; -import net.minecraft.client.gui.screen.Screen; -import net.minecraft.item.ItemStack; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.client.gui.components.events.GuiEventListener; +import net.minecraft.client.gui.screens.Screen; +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.ItemStack; import java.util.List; public abstract class GuiBookletBase extends Screen { - protected GuiBookletBase(ITextComponent titleIn) { + protected GuiBookletBase(Component titleIn) { super(titleIn); } @@ -27,7 +27,7 @@ public abstract class GuiBookletBase extends Screen { public abstract void renderSplitScaledAsciiString(String text, int x, int y, int color, boolean shadow, float scale, int length); - public abstract List getButtonList(); + public abstract List getButtonList(); public abstract int getGuiLeft(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/farmer/IFarmerBehavior.java b/src/main/java/de/ellpeck/actuallyadditions/api/farmer/IFarmerBehavior.java index 6ae0616a8..910eb750e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/farmer/IFarmerBehavior.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/farmer/IFarmerBehavior.java @@ -12,11 +12,15 @@ package de.ellpeck.actuallyadditions.api.farmer; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.internal.IFarmer; -import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.*; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.CactusFarmerBehavior; +import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.DefaultFarmerBehavior; +import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.MelonPumpkinFarmerBehavior; +import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.NetherWartFarmerBehavior; +import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.ReedFarmerBehavior; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; public interface IFarmerBehavior { @@ -31,7 +35,7 @@ public interface IFarmerBehavior { * @param farmer The Farmer doing this action. Can be used to query and extract energy and add items to the slots * @return If planting was successful */ - FarmerResult tryPlantSeed(ItemStack seed, World world, BlockPos pos, IFarmer farmer); + FarmerResult tryPlantSeed(ItemStack seed, Level world, BlockPos pos, IFarmer farmer); /** * Try to harvest a plant with this behavior @@ -41,7 +45,7 @@ public interface IFarmerBehavior { * @param farmer The Farmer doing this action. Can be used to query and extract energy and add items to the slots * @return If harvesting was successful */ - FarmerResult tryHarvestPlant(ServerWorld world, BlockPos pos, IFarmer farmer); + FarmerResult tryHarvestPlant(ServerLevel world, BlockPos pos, IFarmer farmer); int getPriority(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/internal/IAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/api/internal/IAtomicReconstructor.java index aefa0ec0b..f7d97a910 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/internal/IAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/internal/IAtomicReconstructor.java @@ -11,7 +11,7 @@ package de.ellpeck.actuallyadditions.api.internal; import de.ellpeck.actuallyadditions.api.lens.Lens; -import net.minecraft.util.Direction; +import net.minecraft.core.Direction; /** * This is a helper interface for Lens' invoke() method. diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/internal/IEnergyTile.java b/src/main/java/de/ellpeck/actuallyadditions/api/internal/IEnergyTile.java index cffde8875..a05c96761 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/internal/IEnergyTile.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/internal/IEnergyTile.java @@ -10,8 +10,8 @@ package de.ellpeck.actuallyadditions.api.internal; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; /** * This is not supposed to be implemented. @@ -28,7 +28,7 @@ public interface IEnergyTile { int getZ(); //TODO: Rename to getWorld - World getWorldObject(); + Level getWorldObject(); void extractEnergy(int amount); diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/internal/IFarmer.java b/src/main/java/de/ellpeck/actuallyadditions/api/internal/IFarmer.java index 2796cff84..39ef0f948 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/internal/IFarmer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/internal/IFarmer.java @@ -10,10 +10,10 @@ package de.ellpeck.actuallyadditions.api.internal; -import java.util.List; +import net.minecraft.core.Direction; +import net.minecraft.world.item.ItemStack; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Direction; +import java.util.List; /** * This is a helper interface for IFarmerBehavior. diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/internal/IMethodHandler.java b/src/main/java/de/ellpeck/actuallyadditions/api/internal/IMethodHandler.java index 21ff53c89..896ed12c1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/internal/IMethodHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/internal/IMethodHandler.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.api.internal; import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient; -import net.minecraft.block.BlockState; -import net.minecraft.item.ItemStack; -import net.minecraft.potion.EffectInstance; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.state.BlockState; import java.util.List; @@ -27,13 +27,13 @@ public interface IMethodHandler { boolean addEffectToStack(ItemStack stack, CoffeeIngredient ingredient); - EffectInstance getSameEffectFromStack(ItemStack stack, EffectInstance effect); + MobEffectInstance getSameEffectFromStack(ItemStack stack, MobEffectInstance effect); - void addEffectProperties(ItemStack stack, EffectInstance effect, boolean addDur, boolean addAmp); + void addEffectProperties(ItemStack stack, MobEffectInstance effect, boolean addDur, boolean addAmp); - void addEffectToStack(ItemStack stack, EffectInstance effect); + void addEffectToStack(ItemStack stack, MobEffectInstance effect); - EffectInstance[] getEffectsFromStack(ItemStack stack); + MobEffectInstance[] getEffectsFromStack(ItemStack stack); boolean invokeConversionLens(BlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile); diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/laser/IConnectionPair.java b/src/main/java/de/ellpeck/actuallyadditions/api/laser/IConnectionPair.java index 5d1c9f6f0..d54522c1a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/laser/IConnectionPair.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/laser/IConnectionPair.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.api.laser; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; public interface IConnectionPair { - void writeToNBT(CompoundNBT compound); + void writeToNBT(CompoundTag compound); - void readFromNBT(CompoundNBT compound); + void readFromNBT(CompoundTag compound); BlockPos[] getPositions(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/laser/ILaserRelayConnectionHandler.java b/src/main/java/de/ellpeck/actuallyadditions/api/laser/ILaserRelayConnectionHandler.java index 700eed229..47a75558e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/laser/ILaserRelayConnectionHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/laser/ILaserRelayConnectionHandler.java @@ -11,9 +11,9 @@ package de.ellpeck.actuallyadditions.api.laser; import io.netty.util.internal.ConcurrentSet; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; /** * This is the internal laser relay connection handler. @@ -25,21 +25,21 @@ import net.minecraft.world.World; */ public interface ILaserRelayConnectionHandler { - ConcurrentSet getConnectionsFor(BlockPos relay, World world); + ConcurrentSet getConnectionsFor(BlockPos relay, Level world); - void removeRelayFromNetwork(BlockPos relay, World world); + void removeRelayFromNetwork(BlockPos relay, Level world); - Network getNetworkFor(BlockPos relay, World world); + Network getNetworkFor(BlockPos relay, Level world); - boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, World world); + boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, Level world); - boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, World world, boolean suppressConnectionRender); + boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, Level world, boolean suppressConnectionRender); - boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, World world, boolean suppressConnectionRender, boolean removeIfConnected); + boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, Level world, boolean suppressConnectionRender, boolean removeIfConnected); - void removeConnection(World world, BlockPos firstRelay, BlockPos secondRelay); + void removeConnection(Level world, BlockPos firstRelay, BlockPos secondRelay); - LaserType getTypeFromLaser(TileEntity tile); + LaserType getTypeFromLaser(BlockEntity tile); - LaserType getTypeFromLaser(BlockPos pos, World world); + LaserType getTypeFromLaser(BlockPos pos, Level world); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/lens/Lens.java b/src/main/java/de/ellpeck/actuallyadditions/api/lens/Lens.java index 9337f3272..06f237217 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/lens/Lens.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/lens/Lens.java @@ -11,9 +11,9 @@ package de.ellpeck.actuallyadditions.api.lens; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; -import net.minecraft.block.BlockState; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.state.BlockState; /** * This is the base class for a Reconstructor Lens Type (NOT THE ITEM!) diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/lens/LensConversion.java b/src/main/java/de/ellpeck/actuallyadditions/api/lens/LensConversion.java index b77f4587b..722189d3b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/lens/LensConversion.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/lens/LensConversion.java @@ -12,8 +12,8 @@ package de.ellpeck.actuallyadditions.api.lens; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; -import net.minecraft.block.BlockState; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.block.state.BlockState; /** * This is the base class for a Reconstructor Lens Type that converts two items diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/misc/IDisplayStandItem.java b/src/main/java/de/ellpeck/actuallyadditions/api/misc/IDisplayStandItem.java index 21605c82b..e176667dd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/misc/IDisplayStandItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/misc/IDisplayStandItem.java @@ -10,12 +10,12 @@ package de.ellpeck.actuallyadditions.api.misc; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.entity.BlockEntity; public interface IDisplayStandItem { - boolean update(ItemStack stack, TileEntity tile, int elapsedTicks); + boolean update(ItemStack stack, BlockEntity tile, int elapsedTicks); - int getUsePerTick(ItemStack stack, TileEntity tile, int elapsedTicks); + int getUsePerTick(ItemStack stack, BlockEntity tile, int elapsedTicks); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CoffeeIngredient.java b/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CoffeeIngredient.java index 6a1fa6381..c787f4027 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CoffeeIngredient.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/recipe/CoffeeIngredient.java @@ -11,23 +11,23 @@ package de.ellpeck.actuallyadditions.api.recipe; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.potion.EffectInstance; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; @Deprecated public class CoffeeIngredient { protected final Ingredient input; protected final int maxAmplifier; - protected EffectInstance[] effects; + protected MobEffectInstance[] effects; @Deprecated - public CoffeeIngredient(ItemStack input, EffectInstance[] effects, int maxAmplifier) { + public CoffeeIngredient(ItemStack input, MobEffectInstance[] effects, int maxAmplifier) { this(Ingredient.of(input), maxAmplifier, effects); } - public CoffeeIngredient(Ingredient input, int maxAmplifier, EffectInstance... effects) { + public CoffeeIngredient(Ingredient input, int maxAmplifier, MobEffectInstance... effects) { this.input = input; this.effects = effects; this.maxAmplifier = maxAmplifier; @@ -41,7 +41,7 @@ public class CoffeeIngredient { return this.input; } - public EffectInstance[] getEffects() { + public MobEffectInstance[] getEffects() { return this.effects; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/recipe/WeightedOre.java b/src/main/java/de/ellpeck/actuallyadditions/api/recipe/WeightedOre.java index 9cd0a93dd..7883793d8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/recipe/WeightedOre.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/recipe/WeightedOre.java @@ -10,14 +10,21 @@ package de.ellpeck.actuallyadditions.api.recipe; -import net.minecraft.util.WeightedRandom; +import net.minecraft.util.random.Weight; +import net.minecraft.util.random.WeightedEntry; -public class WeightedOre extends WeightedRandom.Item { +public class WeightedOre implements WeightedEntry { public final String name; + public final Weight weight; public WeightedOre(String name, int weight) { - super(weight); + this.weight = Weight.of(weight); this.name = name; } + + @Override + public Weight getWeight() { + return this.weight; + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/tile/IPhantomTile.java b/src/main/java/de/ellpeck/actuallyadditions/api/tile/IPhantomTile.java index 7fb45a1c2..5546a8d2c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/tile/IPhantomTile.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/tile/IPhantomTile.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.api.tile; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; /** * Extending this will cause a TileEntity to be able to be connected via a Phantom Connector diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/ActuallyAdditionsData.java b/src/main/java/de/ellpeck/actuallyadditions/data/ActuallyAdditionsData.java index 5f6bddd82..3a3605df9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/ActuallyAdditionsData.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/ActuallyAdditionsData.java @@ -7,7 +7,7 @@ import net.minecraftforge.common.crafting.CraftingHelper; import net.minecraftforge.common.data.ExistingFileHelper; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.event.lifecycle.GatherDataEvent; +import net.minecraftforge.forge.event.lifecycle.GatherDataEvent; @Mod.EventBusSubscriber(modid = ActuallyAdditions.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public class ActuallyAdditionsData { diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/AdvancementGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/AdvancementGenerator.java index 3edadddfd..52744ad97 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/AdvancementGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/AdvancementGenerator.java @@ -6,13 +6,13 @@ import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import net.minecraft.advancements.Advancement; import net.minecraft.advancements.DisplayInfo; import net.minecraft.advancements.FrameType; -import net.minecraft.advancements.criterion.ImpossibleTrigger; -import net.minecraft.advancements.criterion.InventoryChangeTrigger; -import net.minecraft.advancements.criterion.ItemPredicate; -import net.minecraft.data.AdvancementProvider; +import net.minecraft.advancements.critereon.ImpossibleTrigger; +import net.minecraft.advancements.critereon.InventoryChangeTrigger; +import net.minecraft.advancements.critereon.ItemPredicate; import net.minecraft.data.DataGenerator; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.data.advancements.AdvancementProvider; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.resources.ResourceLocation; import net.minecraftforge.common.data.ExistingFileHelper; import java.util.function.Consumer; @@ -26,10 +26,10 @@ public class AdvancementGenerator extends AdvancementProvider { protected void registerAdvancements(Consumer consumer, ExistingFileHelper exFileHelper) { Advancement root = Advancement.Builder.advancement() .display(new DisplayInfo(ActuallyItems.ITEM_BOOKLET.get().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.openBooklet"), - new TranslationTextComponent("achievement.actuallyadditions.openBooklet.desc"), + new TranslatableComponent("achievement.actuallyadditions.openBooklet"), + new TranslatableComponent("achievement.actuallyadditions.openBooklet.desc"), new ResourceLocation("textures/gui/advancements/backgrounds/stone.png"), FrameType.TASK, true, true, false)) - .addCriterion("right_click", new ImpossibleTrigger.Instance()) + .addCriterion("right_click", new ImpossibleTrigger.TriggerInstance()) .save(consumer, "actuallyadditions:root"); //TODO: Underwater Treasure Chest Advancement? @@ -37,84 +37,84 @@ public class AdvancementGenerator extends AdvancementProvider { Advancement phantomFace = Advancement.Builder.advancement() .parent(root) .display(new DisplayInfo(ActuallyBlocks.PHANTOM_ITEMFACE.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftPhantomface"), - new TranslationTextComponent("achievement.actuallyadditions.craftPhantomface.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftPhantomface"), + new TranslatableComponent("achievement.actuallyadditions.craftPhantomface.desc"), new ResourceLocation("textures/blocks/stone.png"), FrameType.TASK, true, true, false)) - .addCriterion("phantom_face", InventoryChangeTrigger.Instance.hasItems(ActuallyBlocks.PHANTOM_ITEMFACE.get())) + .addCriterion("phantom_face", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.PHANTOM_ITEMFACE.get())) .save(consumer, "actuallyadditions:craft_phantom_face"); Advancement.Builder.advancement() .parent(phantomFace) .display(new DisplayInfo(ActuallyBlocks.PHANTOM_LIQUIFACE.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftLiquiface"), - new TranslationTextComponent("achievement.actuallyadditions.craftLiquiface.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftLiquiface"), + new TranslatableComponent("achievement.actuallyadditions.craftLiquiface.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("liquiface", InventoryChangeTrigger.Instance.hasItems(ActuallyBlocks.PHANTOM_LIQUIFACE.get())) + .addCriterion("liquiface", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.PHANTOM_LIQUIFACE.get())) .save(consumer, "actuallyadditions:craft_liquiface"); Advancement.Builder.advancement() .parent(phantomFace) .display(new DisplayInfo(ActuallyBlocks.PHANTOM_ENERGYFACE.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftEnergyface"), - new TranslationTextComponent("achievement.actuallyadditions.craftEnergyface.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftEnergyface"), + new TranslatableComponent("achievement.actuallyadditions.craftEnergyface.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("energyface", InventoryChangeTrigger.Instance.hasItems(ActuallyBlocks.PHANTOM_ENERGYFACE.get())) + .addCriterion("energyface", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.PHANTOM_ENERGYFACE.get())) .save(consumer, "actuallyadditions:craft_energyface"); Advancement coalGenerator = Advancement.Builder.advancement() .parent(root) .display(new DisplayInfo(ActuallyBlocks.COAL_GENERATOR.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftCoalGen"), - new TranslationTextComponent("achievement.actuallyadditions.craftCoalGen.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftCoalGen"), + new TranslatableComponent("achievement.actuallyadditions.craftCoalGen.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("coal_generator", InventoryChangeTrigger.Instance.hasItems(ActuallyBlocks.COAL_GENERATOR.get())) + .addCriterion("coal_generator", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.COAL_GENERATOR.get())) .save(consumer, "actuallyadditions:craft_coal_generator"); Advancement.Builder.advancement() .parent(coalGenerator) .display(new DisplayInfo(ActuallyBlocks.LEAF_GENERATOR.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftLeafGen"), - new TranslationTextComponent("achievement.actuallyadditions.craftLeafGen.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftLeafGen"), + new TranslatableComponent("achievement.actuallyadditions.craftLeafGen.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("leaf_generator", InventoryChangeTrigger.Instance.hasItems(ActuallyBlocks.LEAF_GENERATOR.get())) + .addCriterion("leaf_generator", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.LEAF_GENERATOR.get())) .save(consumer, "actuallyadditions:craft_leaf_generator"); Advancement coffeeBeans = Advancement.Builder.advancement() .parent(coalGenerator) .display(new DisplayInfo(ActuallyItems.COFFEE_BEANS.get().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.pickUpCoffee"), - new TranslationTextComponent("achievement.actuallyadditions.pickUpCoffee.desc"), + new TranslatableComponent("achievement.actuallyadditions.pickUpCoffee"), + new TranslatableComponent("achievement.actuallyadditions.pickUpCoffee.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("coffee_beans", InventoryChangeTrigger.Instance.hasItems(ActuallyItems.COFFEE_BEANS.get())) + .addCriterion("coffee_beans", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyItems.COFFEE_BEANS.get())) .save(consumer, "actuallyadditions:pickup_coffee"); Advancement.Builder.advancement() .parent(coffeeBeans) .display(new DisplayInfo(ActuallyBlocks.COFFEE_MACHINE.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftCoffeeMachine"), - new TranslationTextComponent("achievement.actuallyadditions.craftCoffeeMachine.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftCoffeeMachine"), + new TranslatableComponent("achievement.actuallyadditions.craftCoffeeMachine.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("coffee_machine", InventoryChangeTrigger.Instance.hasItems(ActuallyBlocks.COFFEE_MACHINE.get())) + .addCriterion("coffee_machine", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.COFFEE_MACHINE.get())) .save(consumer, "actuallyadditions:craft_coffee_machine"); Advancement reconstructor = Advancement.Builder.advancement() .parent(coalGenerator) .display(new DisplayInfo(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftReconstructor"), - new TranslationTextComponent("achievement.actuallyadditions.craftReconstructor.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftReconstructor"), + new TranslatableComponent("achievement.actuallyadditions.craftReconstructor.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("atomic_reconstructor", InventoryChangeTrigger.Instance.hasItems(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get())) + .addCriterion("atomic_reconstructor", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get())) .save(consumer, "actuallyadditions:craft_reconstructor"); Advancement makeFirstCrystal = Advancement.Builder.advancement() .parent(reconstructor) .display(new DisplayInfo(ActuallyItems.EMERADIC_CRYSTAL.get().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.makeCrystal"), - new TranslationTextComponent("achievement.actuallyadditions.makeCrystal.desc"), + new TranslatableComponent("achievement.actuallyadditions.makeCrystal"), + new TranslatableComponent("achievement.actuallyadditions.makeCrystal.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("crystal", InventoryChangeTrigger.Instance.hasItems( + .addCriterion("crystal", InventoryChangeTrigger.TriggerInstance.hasItems( ItemPredicate.Builder.item().of(ActuallyTags.Items.CRYSTALS).build()) ) .save(consumer, "actuallyadditions:make_first_crystal"); @@ -122,19 +122,19 @@ public class AdvancementGenerator extends AdvancementProvider { Advancement.Builder.advancement() .parent(makeFirstCrystal) .display(new DisplayInfo(ActuallyBlocks.EMPOWERER.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftEmpowerer"), - new TranslationTextComponent("achievement.actuallyadditions.craftEmpowerer.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftEmpowerer"), + new TranslatableComponent("achievement.actuallyadditions.craftEmpowerer.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("empowerer", InventoryChangeTrigger.Instance.hasItems(ActuallyBlocks.EMPOWERER.get())) + .addCriterion("empowerer", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.EMPOWERER.get())) .save(consumer, "actuallyadditions:craft_empowerer"); Advancement craftCrusher = Advancement.Builder.advancement() .parent(reconstructor) .display(new DisplayInfo(ActuallyBlocks.CRUSHER.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftCrusher"), - new TranslationTextComponent("achievement.actuallyadditions.craftCrusher.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftCrusher"), + new TranslatableComponent("achievement.actuallyadditions.craftCrusher.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("crystal", InventoryChangeTrigger.Instance.hasItems( + .addCriterion("crystal", InventoryChangeTrigger.TriggerInstance.hasItems( ItemPredicate.Builder.item().of(ActuallyBlocks.CRUSHER.get()).build()) ) .save(consumer, "actuallyadditions:craft_crusher"); @@ -142,10 +142,10 @@ public class AdvancementGenerator extends AdvancementProvider { Advancement craftDoubleCrusher = Advancement.Builder.advancement() .parent(craftCrusher) .display(new DisplayInfo(ActuallyBlocks.CRUSHER_DOUBLE.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftDoubleCrusher"), - new TranslationTextComponent("achievement.actuallyadditions.craftDoubleCrusher.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftDoubleCrusher"), + new TranslatableComponent("achievement.actuallyadditions.craftDoubleCrusher.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("crystal", InventoryChangeTrigger.Instance.hasItems( + .addCriterion("crystal", InventoryChangeTrigger.TriggerInstance.hasItems( ItemPredicate.Builder.item().of(ActuallyBlocks.CRUSHER_DOUBLE.get()).build()) ) .save(consumer, "actuallyadditions:craft_double_crusher"); @@ -153,10 +153,10 @@ public class AdvancementGenerator extends AdvancementProvider { Advancement craftLaserRelay = Advancement.Builder.advancement() .parent(reconstructor) .display(new DisplayInfo(ActuallyBlocks.LASER_RELAY.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftLaserRelay"), - new TranslationTextComponent("achievement.actuallyadditions.craftLaserRelay.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftLaserRelay"), + new TranslatableComponent("achievement.actuallyadditions.craftLaserRelay.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("laser_relay", InventoryChangeTrigger.Instance.hasItems( + .addCriterion("laser_relay", InventoryChangeTrigger.TriggerInstance.hasItems( ItemPredicate.Builder.item().of(ActuallyBlocks.LASER_RELAY.get()).build()) ) .save(consumer, "actuallyadditions:craft_laser_relay"); @@ -164,10 +164,10 @@ public class AdvancementGenerator extends AdvancementProvider { Advancement craftLaserRelayAdvanced = Advancement.Builder.advancement() .parent(craftLaserRelay) .display(new DisplayInfo(ActuallyBlocks.LASER_RELAY_ADVANCED.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftLaserRelayAdvanced"), - new TranslationTextComponent("achievement.actuallyadditions.craftLaserRelayAdvanced.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftLaserRelayAdvanced"), + new TranslatableComponent("achievement.actuallyadditions.craftLaserRelayAdvanced.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("laser_relay_advanced", InventoryChangeTrigger.Instance.hasItems( + .addCriterion("laser_relay_advanced", InventoryChangeTrigger.TriggerInstance.hasItems( ItemPredicate.Builder.item().of(ActuallyBlocks.LASER_RELAY_ADVANCED.get()).build()) ) .save(consumer, "actuallyadditions:craft_laser_relay_advanced"); @@ -175,10 +175,10 @@ public class AdvancementGenerator extends AdvancementProvider { Advancement craftLaserRelayExtreme = Advancement.Builder.advancement() .parent(craftLaserRelayAdvanced) .display(new DisplayInfo(ActuallyBlocks.LASER_RELAY_EXTREME.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftLaserRelayExtreme"), - new TranslationTextComponent("achievement.actuallyadditions.craftLaserRelayExtreme.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftLaserRelayExtreme"), + new TranslatableComponent("achievement.actuallyadditions.craftLaserRelayExtreme.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("laser_relay_extreme", InventoryChangeTrigger.Instance.hasItems( + .addCriterion("laser_relay_extreme", InventoryChangeTrigger.TriggerInstance.hasItems( ItemPredicate.Builder.item().of(ActuallyBlocks.LASER_RELAY_EXTREME.get()).build()) ) .save(consumer, "actuallyadditions:craft_laser_relay_extreme"); @@ -186,10 +186,10 @@ public class AdvancementGenerator extends AdvancementProvider { Advancement craftLaserRelayItem = Advancement.Builder.advancement() .parent(craftLaserRelay) .display(new DisplayInfo(ActuallyBlocks.LASER_RELAY_ITEM.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftLaserRelayItem"), - new TranslationTextComponent("achievement.actuallyadditions.craftLaserRelayItem.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftLaserRelayItem"), + new TranslatableComponent("achievement.actuallyadditions.craftLaserRelayItem.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("laser_relay_item", InventoryChangeTrigger.Instance.hasItems( + .addCriterion("laser_relay_item", InventoryChangeTrigger.TriggerInstance.hasItems( ItemPredicate.Builder.item().of(ActuallyBlocks.LASER_RELAY_ITEM.get()).build()) ) .save(consumer, "actuallyadditions:craft_laser_relay_item"); @@ -197,10 +197,10 @@ public class AdvancementGenerator extends AdvancementProvider { Advancement craftItemInterface = Advancement.Builder.advancement() .parent(craftLaserRelay) .display(new DisplayInfo(ActuallyBlocks.ITEM_INTERFACE.get().asItem().getDefaultInstance(), - new TranslationTextComponent("achievement.actuallyadditions.craftItemInterface"), - new TranslationTextComponent("achievement.actuallyadditions.craftItemInterface.desc"), + new TranslatableComponent("achievement.actuallyadditions.craftItemInterface"), + new TranslatableComponent("achievement.actuallyadditions.craftItemInterface.desc"), null, FrameType.TASK, true, true, false)) - .addCriterion("item_interface", InventoryChangeTrigger.Instance.hasItems( + .addCriterion("item_interface", InventoryChangeTrigger.TriggerInstance.hasItems( ItemPredicate.Builder.item().of(ActuallyBlocks.ITEM_INTERFACE.get()).build()) ) .save(consumer, "actuallyadditions:craft_item_interface"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/BlockRecipeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/BlockRecipeGenerator.java index 1937dcf6a..b745f7f76 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/BlockRecipeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/BlockRecipeGenerator.java @@ -4,10 +4,15 @@ import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.api.ActuallyTags; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.data.*; -import net.minecraft.item.Items; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.HashCache; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeProvider; +import net.minecraft.data.recipes.ShapedRecipeBuilder; +import net.minecraft.data.recipes.ShapelessRecipeBuilder; import net.minecraft.tags.ItemTags; -import net.minecraft.util.IItemProvider; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.ItemLike; import net.minecraftforge.common.Tags; import javax.annotation.Nonnull; @@ -21,7 +26,7 @@ public class BlockRecipeGenerator extends RecipeProvider { } @Override - protected void buildShapelessRecipes(@Nonnull Consumer consumer) { + protected void buildCraftingRecipes(@Nonnull Consumer consumer) { //Battery Box Recipe.shapeless(ActuallyBlocks.BATTERY_BOX.getItem()).ingredients(ActuallyBlocks.ENERGIZER.get(), ActuallyBlocks.ENERVATOR.get(), ActuallyItems.BASIC_COIL.get()).save(consumer); @@ -226,66 +231,66 @@ public class BlockRecipeGenerator extends RecipeProvider { } @Override - protected void saveAdvancement(DirectoryCache p_208310_1_, JsonObject p_208310_2_, Path p_208310_3_) { + protected void saveAdvancement(HashCache p_208310_1_, JsonObject p_208310_2_, Path p_208310_3_) { //Nope... maybe later... } public static class Recipe { - public static Shapeless shapeless(IItemProvider result) { + public static Shapeless shapeless(ItemLike result) { return new Shapeless(result); } - public static Shapeless shapeless(IItemProvider result, int count) { + public static Shapeless shapeless(ItemLike result, int count) { return new Shapeless(result, count); } - public static Shaped shaped(IItemProvider result) { + public static Shaped shaped(ItemLike result) { return new Shaped(result); } - public static Shaped shaped(IItemProvider result, int count) { + public static Shaped shaped(ItemLike result, int count) { return new Shaped(result, count); } - public static void stairs(IItemProvider result, IItemProvider resource, Consumer consumer) { + public static void stairs(ItemLike result, ItemLike resource, Consumer consumer) { Recipe.shaped(result).patternSingleKey('Q', resource, "Q ", "QQ ", "QQQ").save(consumer); } - public static void wall(IItemProvider result, IItemProvider resource, Consumer consumer) { + public static void wall(ItemLike result, ItemLike resource, Consumer consumer) { Recipe.shaped(result).patternSingleKey('Q', resource, "QQQ", "QQQ").save(consumer); } - public static void slab(IItemProvider result, IItemProvider resource, Consumer consumer) { + public static void slab(ItemLike result, ItemLike resource, Consumer consumer) { Recipe.shaped(result).patternSingleKey('Q', resource, "QQQ").save(consumer); } private static class Shapeless extends ShapelessRecipeBuilder { - public Shapeless(IItemProvider result) { + public Shapeless(ItemLike result) { this(result, 1); } - public Shapeless(IItemProvider result, int countIn) { + public Shapeless(ItemLike result, int countIn) { super(result, countIn); } - public Shapeless ingredients(IItemProvider... ingredients) { + public Shapeless ingredients(ItemLike... ingredients) { Arrays.asList(ingredients).forEach(this::requires); return this; } @Override - public void save(Consumer consumer) { + public void save(Consumer consumer) { this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get())); super.save(consumer); } } private static class Shaped extends ShapedRecipeBuilder { - public Shaped(IItemProvider resultIn) { + public Shaped(ItemLike resultIn) { this(resultIn, 1); } - public Shaped(IItemProvider resultIn, int countIn) { + public Shaped(ItemLike resultIn, int countIn) { super(resultIn, countIn); } @@ -302,7 +307,7 @@ public class BlockRecipeGenerator extends RecipeProvider { return this; } - public Shaped patternSingleKey(char key, IItemProvider resource, String... lines) { + public Shaped patternSingleKey(char key, ItemLike resource, String... lines) { this.define(key, resource); for (String line : lines) { this.pattern(line); @@ -312,7 +317,7 @@ public class BlockRecipeGenerator extends RecipeProvider { } @Override - public void save(Consumer consumerIn) { + public void save(Consumer consumerIn) { this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get())); super.save(consumerIn); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/BlockStateGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/BlockStateGenerator.java index b3e3ff6a5..41f2af837 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/BlockStateGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/BlockStateGenerator.java @@ -2,10 +2,14 @@ package de.ellpeck.actuallyadditions.data; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; -import net.minecraft.block.*; import net.minecraft.data.DataGenerator; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.ResourceLocation; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.CropBlock; +import net.minecraft.world.level.block.SlabBlock; +import net.minecraft.world.level.block.StairBlock; +import net.minecraft.world.level.block.WallBlock; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraftforge.client.model.generators.BlockStateProvider; import net.minecraftforge.client.model.generators.ConfiguredModel; import net.minecraftforge.client.model.generators.ModelFile; @@ -114,44 +118,44 @@ public class BlockStateGenerator extends BlockStateProvider { // TO BE SORTED getVariantBuilder(ActuallyBlocks.CANOLA.get()).partialState() - .with(CropsBlock.AGE, 0).modelForState().modelFile(models().crop("canola_1", modLoc("block/canola_stage_1"))).addModel() - .partialState().with(CropsBlock.AGE, 1).modelForState().modelFile(models().crop("canola_2", modLoc("block/canola_stage_2"))).addModel() - .partialState().with(CropsBlock.AGE, 2).modelForState().modelFile(models().crop("canola_2", modLoc("block/canola_stage_2"))).addModel() - .partialState().with(CropsBlock.AGE, 3).modelForState().modelFile(models().crop("canola_2", modLoc("block/canola_stage_2"))).addModel() - .partialState().with(CropsBlock.AGE, 4).modelForState().modelFile(models().crop("canola_3", modLoc("block/canola_stage_3"))).addModel() - .partialState().with(CropsBlock.AGE, 5).modelForState().modelFile(models().crop("canola_3", modLoc("block/canola_stage_3"))).addModel() - .partialState().with(CropsBlock.AGE, 6).modelForState().modelFile(models().crop("canola_3", modLoc("block/canola_stage_3"))).addModel() - .partialState().with(CropsBlock.AGE, 7).modelForState().modelFile(models().crop("canola_4", modLoc("block/canola_stage_4"))).addModel(); + .with(CropBlock.AGE, 0).modelForState().modelFile(models().crop("canola_1", modLoc("block/canola_stage_1"))).addModel() + .partialState().with(CropBlock.AGE, 1).modelForState().modelFile(models().crop("canola_2", modLoc("block/canola_stage_2"))).addModel() + .partialState().with(CropBlock.AGE, 2).modelForState().modelFile(models().crop("canola_2", modLoc("block/canola_stage_2"))).addModel() + .partialState().with(CropBlock.AGE, 3).modelForState().modelFile(models().crop("canola_2", modLoc("block/canola_stage_2"))).addModel() + .partialState().with(CropBlock.AGE, 4).modelForState().modelFile(models().crop("canola_3", modLoc("block/canola_stage_3"))).addModel() + .partialState().with(CropBlock.AGE, 5).modelForState().modelFile(models().crop("canola_3", modLoc("block/canola_stage_3"))).addModel() + .partialState().with(CropBlock.AGE, 6).modelForState().modelFile(models().crop("canola_3", modLoc("block/canola_stage_3"))).addModel() + .partialState().with(CropBlock.AGE, 7).modelForState().modelFile(models().crop("canola_4", modLoc("block/canola_stage_4"))).addModel(); getVariantBuilder(ActuallyBlocks.RICE.get()).partialState() - .with(CropsBlock.AGE, 0).modelForState().modelFile(models().crop("rice_1", modLoc("block/rice_stage_1"))).addModel() - .partialState().with(CropsBlock.AGE, 1).modelForState().modelFile(models().crop("rice_2", modLoc("block/rice_stage_2"))).addModel() - .partialState().with(CropsBlock.AGE, 2).modelForState().modelFile(models().crop("rice_2", modLoc("block/rice_stage_2"))).addModel() - .partialState().with(CropsBlock.AGE, 3).modelForState().modelFile(models().crop("rice_2", modLoc("block/rice_stage_3"))).addModel() - .partialState().with(CropsBlock.AGE, 4).modelForState().modelFile(models().crop("rice_3", modLoc("block/rice_stage_4"))).addModel() - .partialState().with(CropsBlock.AGE, 5).modelForState().modelFile(models().crop("rice_3", modLoc("block/rice_stage_4"))).addModel() - .partialState().with(CropsBlock.AGE, 6).modelForState().modelFile(models().crop("rice_3", modLoc("block/rice_stage_5"))).addModel() - .partialState().with(CropsBlock.AGE, 7).modelForState().modelFile(models().crop("rice_4", modLoc("block/rice_stage_6"))).addModel(); + .with(CropBlock.AGE, 0).modelForState().modelFile(models().crop("rice_1", modLoc("block/rice_stage_1"))).addModel() + .partialState().with(CropBlock.AGE, 1).modelForState().modelFile(models().crop("rice_2", modLoc("block/rice_stage_2"))).addModel() + .partialState().with(CropBlock.AGE, 2).modelForState().modelFile(models().crop("rice_2", modLoc("block/rice_stage_2"))).addModel() + .partialState().with(CropBlock.AGE, 3).modelForState().modelFile(models().crop("rice_2", modLoc("block/rice_stage_3"))).addModel() + .partialState().with(CropBlock.AGE, 4).modelForState().modelFile(models().crop("rice_3", modLoc("block/rice_stage_4"))).addModel() + .partialState().with(CropBlock.AGE, 5).modelForState().modelFile(models().crop("rice_3", modLoc("block/rice_stage_4"))).addModel() + .partialState().with(CropBlock.AGE, 6).modelForState().modelFile(models().crop("rice_3", modLoc("block/rice_stage_5"))).addModel() + .partialState().with(CropBlock.AGE, 7).modelForState().modelFile(models().crop("rice_4", modLoc("block/rice_stage_6"))).addModel(); getVariantBuilder(ActuallyBlocks.FLAX.get()).partialState() - .with(CropsBlock.AGE, 0).modelForState().modelFile(models().crop("flax_1", modLoc("block/flax_stage_1"))).addModel() - .partialState().with(CropsBlock.AGE, 1).modelForState().modelFile(models().crop("flax_2", modLoc("block/flax_stage_2"))).addModel() - .partialState().with(CropsBlock.AGE, 2).modelForState().modelFile(models().crop("flax_2", modLoc("block/flax_stage_2"))).addModel() - .partialState().with(CropsBlock.AGE, 3).modelForState().modelFile(models().crop("flax_2", modLoc("block/flax_stage_3"))).addModel() - .partialState().with(CropsBlock.AGE, 4).modelForState().modelFile(models().crop("flax_3", modLoc("block/flax_stage_4"))).addModel() - .partialState().with(CropsBlock.AGE, 5).modelForState().modelFile(models().crop("flax_3", modLoc("block/flax_stage_4"))).addModel() - .partialState().with(CropsBlock.AGE, 6).modelForState().modelFile(models().crop("flax_3", modLoc("block/flax_stage_5"))).addModel() - .partialState().with(CropsBlock.AGE, 7).modelForState().modelFile(models().crop("flax_4", modLoc("block/flax_stage_6"))).addModel(); + .with(CropBlock.AGE, 0).modelForState().modelFile(models().crop("flax_1", modLoc("block/flax_stage_1"))).addModel() + .partialState().with(CropBlock.AGE, 1).modelForState().modelFile(models().crop("flax_2", modLoc("block/flax_stage_2"))).addModel() + .partialState().with(CropBlock.AGE, 2).modelForState().modelFile(models().crop("flax_2", modLoc("block/flax_stage_2"))).addModel() + .partialState().with(CropBlock.AGE, 3).modelForState().modelFile(models().crop("flax_2", modLoc("block/flax_stage_3"))).addModel() + .partialState().with(CropBlock.AGE, 4).modelForState().modelFile(models().crop("flax_3", modLoc("block/flax_stage_4"))).addModel() + .partialState().with(CropBlock.AGE, 5).modelForState().modelFile(models().crop("flax_3", modLoc("block/flax_stage_4"))).addModel() + .partialState().with(CropBlock.AGE, 6).modelForState().modelFile(models().crop("flax_3", modLoc("block/flax_stage_5"))).addModel() + .partialState().with(CropBlock.AGE, 7).modelForState().modelFile(models().crop("flax_4", modLoc("block/flax_stage_6"))).addModel(); getVariantBuilder(ActuallyBlocks.COFFEE.get()).partialState() - .with(CropsBlock.AGE, 0).modelForState().modelFile(models().crop("coffee_1", modLoc("block/coffee_stage_1"))).addModel() - .partialState().with(CropsBlock.AGE, 1).modelForState().modelFile(models().crop("coffee_2", modLoc("block/coffee_stage_2"))).addModel() - .partialState().with(CropsBlock.AGE, 2).modelForState().modelFile(models().crop("coffee_2", modLoc("block/coffee_stage_2"))).addModel() - .partialState().with(CropsBlock.AGE, 3).modelForState().modelFile(models().crop("coffee_2", modLoc("block/coffee_stage_3"))).addModel() - .partialState().with(CropsBlock.AGE, 4).modelForState().modelFile(models().crop("coffee_3", modLoc("block/coffee_stage_4"))).addModel() - .partialState().with(CropsBlock.AGE, 5).modelForState().modelFile(models().crop("coffee_3", modLoc("block/coffee_stage_4"))).addModel() - .partialState().with(CropsBlock.AGE, 6).modelForState().modelFile(models().crop("coffee_3", modLoc("block/coffee_stage_5"))).addModel() - .partialState().with(CropsBlock.AGE, 7).modelForState().modelFile(models().crop("coffee_4", modLoc("block/coffee_stage_6"))).addModel(); + .with(CropBlock.AGE, 0).modelForState().modelFile(models().crop("coffee_1", modLoc("block/coffee_stage_1"))).addModel() + .partialState().with(CropBlock.AGE, 1).modelForState().modelFile(models().crop("coffee_2", modLoc("block/coffee_stage_2"))).addModel() + .partialState().with(CropBlock.AGE, 2).modelForState().modelFile(models().crop("coffee_2", modLoc("block/coffee_stage_2"))).addModel() + .partialState().with(CropBlock.AGE, 3).modelForState().modelFile(models().crop("coffee_2", modLoc("block/coffee_stage_3"))).addModel() + .partialState().with(CropBlock.AGE, 4).modelForState().modelFile(models().crop("coffee_3", modLoc("block/coffee_stage_4"))).addModel() + .partialState().with(CropBlock.AGE, 5).modelForState().modelFile(models().crop("coffee_3", modLoc("block/coffee_stage_4"))).addModel() + .partialState().with(CropBlock.AGE, 6).modelForState().modelFile(models().crop("coffee_3", modLoc("block/coffee_stage_5"))).addModel() + .partialState().with(CropBlock.AGE, 7).modelForState().modelFile(models().crop("coffee_4", modLoc("block/coffee_stage_6"))).addModel(); buildCubeAll(ActuallyBlocks.ENDER_CASING); @@ -179,13 +183,13 @@ public class BlockStateGenerator extends BlockStateProvider { wallBlock((WallBlock) ActuallyBlocks.ETHETIC_WHITE_WALL.get(), modLoc("block/ethetic_white_block")); // Stairs - stairsBlock((StairsBlock) ActuallyBlocks.BLACK_QUARTZ_STAIR.get(), modLoc("block/black_quartz_block")); - stairsBlock((StairsBlock) ActuallyBlocks.SMOOTH_BLACK_QUARTZ_STAIR.get(), modLoc("block/smooth_black_quartz_block")); - stairsBlock((StairsBlock) ActuallyBlocks.CHISELED_BLACK_QUARTZ_STAIR.get(), modLoc("block/chiseled_black_quartz_block")); - stairsBlock((StairsBlock) ActuallyBlocks.BLACK_QUARTZ_PILLAR_STAIR.get(), modLoc("block/black_quartz_pillar_block")); - stairsBlock((StairsBlock) ActuallyBlocks.BLACK_QUARTZ_BRICK_STAIR.get(), modLoc("block/black_quartz_brick_block")); - stairsBlock((StairsBlock) ActuallyBlocks.ETHETIC_GREEN_STAIRS.get(), modLoc("block/ethetic_green_block")); - stairsBlock((StairsBlock) ActuallyBlocks.ETHETIC_WHITE_STAIRS.get(), modLoc("block/ethetic_white_block")); + stairsBlock((StairBlock) ActuallyBlocks.BLACK_QUARTZ_STAIR.get(), modLoc("block/black_quartz_block")); + stairsBlock((StairBlock) ActuallyBlocks.SMOOTH_BLACK_QUARTZ_STAIR.get(), modLoc("block/smooth_black_quartz_block")); + stairsBlock((StairBlock) ActuallyBlocks.CHISELED_BLACK_QUARTZ_STAIR.get(), modLoc("block/chiseled_black_quartz_block")); + stairsBlock((StairBlock) ActuallyBlocks.BLACK_QUARTZ_PILLAR_STAIR.get(), modLoc("block/black_quartz_pillar_block")); + stairsBlock((StairBlock) ActuallyBlocks.BLACK_QUARTZ_BRICK_STAIR.get(), modLoc("block/black_quartz_brick_block")); + stairsBlock((StairBlock) ActuallyBlocks.ETHETIC_GREEN_STAIRS.get(), modLoc("block/ethetic_green_block")); + stairsBlock((StairBlock) ActuallyBlocks.ETHETIC_WHITE_STAIRS.get(), modLoc("block/ethetic_white_block")); // Slabs slabBlock((SlabBlock) ActuallyBlocks.BLACK_QUARTZ_SLAB.get(), modLoc("block/black_quartz_block"), modLoc("block/black_quartz_block")); diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/BlockTagsGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/BlockTagsGenerator.java index 9e40e3d3e..4cbbd38ac 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/BlockTagsGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/BlockTagsGenerator.java @@ -1,11 +1,12 @@ package de.ellpeck.actuallyadditions.data; +import de.ellpeck.actuallyadditions.api.ActuallyTags; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; -import net.minecraft.data.BlockTagsProvider; import net.minecraft.data.DataGenerator; +import net.minecraft.data.tags.BlockTagsProvider; +import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.BlockTags; -import net.minecraft.util.ResourceLocation; import net.minecraftforge.common.data.ExistingFileHelper; import javax.annotation.Nullable; @@ -27,6 +28,138 @@ public class BlockTagsGenerator extends BlockTagsProvider { ActuallyBlocks.CHISELED_BLACK_QUARTZ_WALL.get(), ActuallyBlocks.BLACK_QUARTZ_BRICK_WALL.get() ); + + tag(BlockTags.MINEABLE_WITH_AXE).add( + ActuallyBlocks.FERMENTING_BARREL.get() + ); + tag(BlockTags.MINEABLE_WITH_PICKAXE).add( + ActuallyBlocks.LAMP_WHITE.get(), + ActuallyBlocks.LAMP_ORANGE.get(), + ActuallyBlocks.LAMP_MAGENTA.get(), + ActuallyBlocks.LAMP_LIGHT_BLUE.get(), + ActuallyBlocks.LAMP_YELLOW.get(), + ActuallyBlocks.LAMP_LIME.get(), + ActuallyBlocks.LAMP_PINK.get(), + ActuallyBlocks.LAMP_GRAY.get(), + ActuallyBlocks.LAMP_LIGHT_GRAY.get(), + ActuallyBlocks.LAMP_CYAN.get(), + ActuallyBlocks.LAMP_PURPLE.get(), + ActuallyBlocks.LAMP_BLUE.get(), + ActuallyBlocks.LAMP_BROWN.get(), + ActuallyBlocks.LAMP_GREEN.get(), + ActuallyBlocks.LAMP_RED.get(), + ActuallyBlocks.LAMP_BLACK.get(), + ActuallyBlocks.LEAF_GENERATOR.get(), + ActuallyBlocks.WOOD_CASING.get(), + ActuallyBlocks.IRON_CASING.get(), + ActuallyBlocks.ENDER_CASING.get(), + ActuallyBlocks.LAVA_FACTORY_CASING.get(), + ActuallyBlocks.BLACK_QUARTZ_ORE.get(), + ActuallyBlocks.ETHETIC_GREEN_BLOCK.get(), + ActuallyBlocks.ETHETIC_WHITE_BLOCK.get(), + ActuallyBlocks.BLACK_QUARTZ.get(), + ActuallyBlocks.BLACK_QUARTZ_PILLAR.get(), + ActuallyBlocks.CHISELED_BLACK_QUARTZ.get(), + ActuallyBlocks.SMOOTH_BLACK_QUARTZ.get(), + ActuallyBlocks.BLACK_QUARTZ_BRICK.get(), + ActuallyBlocks.FEEDER.get(), + ActuallyBlocks.CRUSHER.get(), + ActuallyBlocks.CRUSHER_DOUBLE.get(), + ActuallyBlocks.ENERGIZER.get(), + ActuallyBlocks.ENERVATOR.get(), + ActuallyBlocks.LAVA_FACTORY_CONTROLLER.get(), + ActuallyBlocks.LAMP_CONTROLLER.get(), + ActuallyBlocks.CANOLA_PRESS.get(), + ActuallyBlocks.OIL_GENERATOR.get(), + ActuallyBlocks.COAL_GENERATOR.get(), + ActuallyBlocks.XP_SOLIDIFIER.get(), + ActuallyBlocks.PLACER.get(), + ActuallyBlocks.BREAKER.get(), + ActuallyBlocks.DROPPER.get(), + ActuallyBlocks.FLUID_COLLECTOR.get(), + ActuallyBlocks.FARMER.get(), + ActuallyBlocks.BIOREACTOR.get(), + ActuallyBlocks.VERTICAL_DIGGER.get(), + ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get(), + ActuallyBlocks.RANGED_COLLECTOR.get(), + ActuallyBlocks.LONG_RANGE_BREAKER.get(), + ActuallyBlocks.COFFEE_MACHINE.get(), + ActuallyBlocks.POWERED_FURNACE.get(), + ActuallyBlocks.ENORI_CRYSTAL.get(), + ActuallyBlocks.RESTONIA_CRYSTAL.get(), + ActuallyBlocks.PALIS_CRYSTAL.get(), + ActuallyBlocks.DIAMATINE_CRYSTAL.get(), + ActuallyBlocks.VOID_CRYSTAL.get(), + ActuallyBlocks.EMERADIC_CRYSTAL.get(), + ActuallyBlocks.EMPOWERED_ENORI_CRYSTAL.get(), + ActuallyBlocks.EMPOWERED_RESTONIA_CRYSTAL.get(), + ActuallyBlocks.EMPOWERED_PALIS_CRYSTAL.get(), + ActuallyBlocks.EMPOWERED_DIAMATINE_CRYSTAL.get(), + ActuallyBlocks.EMPOWERED_VOID_CRYSTAL.get(), + ActuallyBlocks.EMPOWERED_EMERADIC_CRYSTAL.get(), + ActuallyBlocks.DISPLAY_STAND.get(), + ActuallyBlocks.EMPOWERER.get(), + ActuallyBlocks.PLAYER_INTERFACE.get(), + ActuallyBlocks.ITEM_INTERFACE.get(), + ActuallyBlocks.ITEM_INTERFACE_HOPPING.get(), + ActuallyBlocks.PHANTOM_ITEMFACE.get(), + ActuallyBlocks.PHANTOM_PLACER.get(), + ActuallyBlocks.PHANTOM_LIQUIFACE.get(), + ActuallyBlocks.PHANTOM_ENERGYFACE.get(), + ActuallyBlocks.PHANTOM_REDSTONEFACE.get(), + ActuallyBlocks.PHANTOM_BREAKER.get(), + ActuallyBlocks.PHANTOM_BOOSTER.get(), + ActuallyBlocks.BATTERY_BOX.get(), + ActuallyBlocks.FIREWORK_BOX.get(), + ActuallyBlocks.SHOCK_SUPPRESSOR.get(), + ActuallyBlocks.HEAT_COLLECTOR.get(), + ActuallyBlocks.LASER_RELAY.get(), + ActuallyBlocks.LASER_RELAY_ADVANCED.get(), + ActuallyBlocks.LASER_RELAY_EXTREME.get(), + ActuallyBlocks.LASER_RELAY_FLUIDS.get(), + ActuallyBlocks.LASER_RELAY_ITEM.get(), + ActuallyBlocks.LASER_RELAY_ITEM_ADVANCED.get(), + ActuallyBlocks.GREENHOUSE_GLASS.get() + ); + + tag(BlockTags.NEEDS_STONE_TOOL).add( + ActuallyBlocks.WOOD_CASING.get(), + ActuallyBlocks.IRON_CASING.get(), + ActuallyBlocks.ENDER_CASING.get(), + ActuallyBlocks.LAVA_FACTORY_CASING.get(), + ActuallyBlocks.BLACK_QUARTZ_ORE.get(), + ActuallyBlocks.ETHETIC_GREEN_BLOCK.get(), + ActuallyBlocks.ETHETIC_WHITE_BLOCK.get(), + ActuallyBlocks.BLACK_QUARTZ.get(), + ActuallyBlocks.BLACK_QUARTZ_PILLAR.get(), + ActuallyBlocks.CHISELED_BLACK_QUARTZ.get(), + ActuallyBlocks.SMOOTH_BLACK_QUARTZ.get(), + ActuallyBlocks.BLACK_QUARTZ_BRICK.get(), + ActuallyBlocks.ENORI_CRYSTAL.get(), + ActuallyBlocks.RESTONIA_CRYSTAL.get(), + ActuallyBlocks.PALIS_CRYSTAL.get(), + ActuallyBlocks.DIAMATINE_CRYSTAL.get(), + ActuallyBlocks.VOID_CRYSTAL.get(), + ActuallyBlocks.EMERADIC_CRYSTAL.get(), + ActuallyBlocks.EMPOWERED_ENORI_CRYSTAL.get(), + ActuallyBlocks.EMPOWERED_RESTONIA_CRYSTAL.get(), + ActuallyBlocks.EMPOWERED_PALIS_CRYSTAL.get(), + ActuallyBlocks.EMPOWERED_DIAMATINE_CRYSTAL.get(), + ActuallyBlocks.EMPOWERED_VOID_CRYSTAL.get(), + ActuallyBlocks.EMPOWERED_EMERADIC_CRYSTAL.get() + ); + + this.tag(ActuallyTags.Blocks.MINEABLE_WITH_DRILL).addTags( + BlockTags.MINEABLE_WITH_SHOVEL, + BlockTags.MINEABLE_WITH_PICKAXE + ); + + this.tag(ActuallyTags.Blocks.MINEABLE_WITH_AIO).addTags( + BlockTags.MINEABLE_WITH_AXE, + BlockTags.MINEABLE_WITH_HOE, + BlockTags.MINEABLE_WITH_PICKAXE, + BlockTags.MINEABLE_WITH_SHOVEL + ); } /** diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/ColorChangeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/ColorChangeGenerator.java index 37d7611b2..5a1ce8aa3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/ColorChangeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/ColorChangeGenerator.java @@ -5,14 +5,14 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.crafting.ColorChangeRecipe; import net.minecraft.data.DataGenerator; -import net.minecraft.data.DirectoryCache; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.data.RecipeProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.util.IItemProvider; -import net.minecraft.util.ResourceLocation; +import net.minecraft.data.HashCache; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeProvider; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.level.ItemLike; import javax.annotation.Nonnull; import java.nio.file.Path; @@ -23,11 +23,11 @@ public class ColorChangeGenerator extends RecipeProvider { super(p_i48262_1_); } @Override - protected void saveAdvancement(@Nonnull DirectoryCache pCache, @Nonnull JsonObject pAdvancementJson, @Nonnull Path pPath) { + protected void saveAdvancement(@Nonnull HashCache pCache, @Nonnull JsonObject pAdvancementJson, @Nonnull Path pPath) { } @Override - protected void buildShapelessRecipes(@Nonnull Consumer consumer) { + protected void buildCraftingRecipes(@Nonnull Consumer consumer) { buildWool(consumer); buildStainedGlass(consumer); buildStainedGlassPane(consumer); @@ -38,7 +38,7 @@ public class ColorChangeGenerator extends RecipeProvider { buildDye(consumer); } - private void buildWool(@Nonnull Consumer c) { + private void buildWool(@Nonnull Consumer c) { //Wool changeColor(c, Items.WHITE_WOOL, Items.BLACK_WOOL); changeColor(c, Items.ORANGE_WOOL, Items.WHITE_WOOL); @@ -58,7 +58,7 @@ public class ColorChangeGenerator extends RecipeProvider { changeColor(c, Items.BLACK_WOOL, Items.RED_WOOL); } - private void buildStainedGlass(@Nonnull Consumer c) { + private void buildStainedGlass(@Nonnull Consumer c) { changeColor(c, Items.WHITE_STAINED_GLASS, Items.BLACK_STAINED_GLASS); changeColor(c, Items.ORANGE_STAINED_GLASS, Items.WHITE_STAINED_GLASS); changeColor(c, Items.MAGENTA_STAINED_GLASS, Items.ORANGE_STAINED_GLASS); @@ -77,7 +77,7 @@ public class ColorChangeGenerator extends RecipeProvider { changeColor(c, Items.BLACK_STAINED_GLASS, Items.RED_STAINED_GLASS); } - private void buildStainedGlassPane(@Nonnull Consumer c) { + private void buildStainedGlassPane(@Nonnull Consumer c) { changeColor(c, Items.WHITE_STAINED_GLASS_PANE, Items.BLACK_STAINED_GLASS_PANE); changeColor(c, Items.ORANGE_STAINED_GLASS_PANE, Items.WHITE_STAINED_GLASS_PANE); changeColor(c, Items.MAGENTA_STAINED_GLASS_PANE, Items.ORANGE_STAINED_GLASS_PANE); @@ -96,7 +96,7 @@ public class ColorChangeGenerator extends RecipeProvider { changeColor(c, Items.BLACK_STAINED_GLASS_PANE, Items.RED_STAINED_GLASS_PANE); } - private void buildTerracotta(@Nonnull Consumer c) { + private void buildTerracotta(@Nonnull Consumer c) { changeColor(c, Items.WHITE_TERRACOTTA, Items.BLACK_TERRACOTTA); changeColor(c, Items.ORANGE_TERRACOTTA, Items.WHITE_TERRACOTTA); changeColor(c, Items.MAGENTA_TERRACOTTA, Items.ORANGE_TERRACOTTA); @@ -115,7 +115,7 @@ public class ColorChangeGenerator extends RecipeProvider { changeColor(c, Items.BLACK_TERRACOTTA, Items.RED_TERRACOTTA); } - private void buildGlazedTerracotta(@Nonnull Consumer c) { + private void buildGlazedTerracotta(@Nonnull Consumer c) { changeColor(c, Items.WHITE_GLAZED_TERRACOTTA, Items.BLACK_GLAZED_TERRACOTTA); changeColor(c, Items.ORANGE_GLAZED_TERRACOTTA, Items.WHITE_GLAZED_TERRACOTTA); changeColor(c, Items.MAGENTA_GLAZED_TERRACOTTA, Items.ORANGE_GLAZED_TERRACOTTA); @@ -134,7 +134,7 @@ public class ColorChangeGenerator extends RecipeProvider { changeColor(c, Items.BLACK_GLAZED_TERRACOTTA, Items.RED_GLAZED_TERRACOTTA); } - private void buildCarpet(@Nonnull Consumer c) { + private void buildCarpet(@Nonnull Consumer c) { changeColor(c, Items.WHITE_CARPET, Items.BLACK_CARPET); changeColor(c, Items.ORANGE_CARPET, Items.WHITE_CARPET); changeColor(c, Items.MAGENTA_CARPET, Items.ORANGE_CARPET); @@ -153,7 +153,7 @@ public class ColorChangeGenerator extends RecipeProvider { changeColor(c, Items.BLACK_CARPET, Items.RED_CARPET); } - private void buildLamps(@Nonnull Consumer c) { + private void buildLamps(@Nonnull Consumer c) { changeColor(c, ActuallyBlocks.LAMP_WHITE.getItem(), ActuallyBlocks.LAMP_BLACK.getItem()); changeColor(c, ActuallyBlocks.LAMP_ORANGE.getItem(), ActuallyBlocks.LAMP_WHITE.getItem()); changeColor(c, ActuallyBlocks.LAMP_MAGENTA.getItem(), ActuallyBlocks.LAMP_ORANGE.getItem()); @@ -172,7 +172,7 @@ public class ColorChangeGenerator extends RecipeProvider { changeColor(c, ActuallyBlocks.LAMP_BLACK.getItem(), ActuallyBlocks.LAMP_RED.getItem()); } - private void buildDye(@Nonnull Consumer c) { + private void buildDye(@Nonnull Consumer c) { changeColor(c, Items.WHITE_DYE, Items.BLACK_DYE); changeColor(c, Items.ORANGE_DYE, Items.WHITE_DYE); changeColor(c, Items.MAGENTA_DYE, Items.ORANGE_DYE); @@ -192,16 +192,16 @@ public class ColorChangeGenerator extends RecipeProvider { } - private void changeColor(Consumer consumer, IItemProvider output, Ingredient input) { - consumer.accept(new ColorChangeRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "colorchange/" + output.asItem().getRegistryName().getPath()), + private void changeColor(Consumer consumer, ItemLike output, Ingredient input) { + consumer.accept(new ColorChangeRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "colorchange/" + output.asItem().getRegistryName().getPath()), input, output)); } - private void changeColor(Consumer consumer, IItemProvider output, IItemProvider input) { - consumer.accept(new ColorChangeRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "colorchange/" + output.asItem().getRegistryName().getPath()), + private void changeColor(Consumer consumer, ItemLike output, ItemLike input) { + consumer.accept(new ColorChangeRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "colorchange/" + output.asItem().getRegistryName().getPath()), Ingredient.of(input), output)); } - private void changeColor(Consumer consumer, IItemProvider output, ItemStack input) { - consumer.accept(new ColorChangeRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "colorchange/" + output.asItem().getRegistryName().getPath()), + private void changeColor(Consumer consumer, ItemLike output, ItemStack input) { + consumer.accept(new ColorChangeRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "colorchange/" + output.asItem().getRegistryName().getPath()), Ingredient.of(input), output)); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/CrushingRecipeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/CrushingRecipeGenerator.java index 7a6a2ebde..9c1a88427 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/CrushingRecipeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/CrushingRecipeGenerator.java @@ -4,12 +4,12 @@ import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.crafting.CrushingRecipe; import net.minecraft.data.DataGenerator; -import net.minecraft.data.DirectoryCache; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.data.RecipeProvider; -import net.minecraft.item.Items; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.util.ResourceLocation; +import net.minecraft.data.HashCache; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeProvider; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.Ingredient; import javax.annotation.Nonnull; import java.nio.file.Path; @@ -21,12 +21,12 @@ public class CrushingRecipeGenerator extends RecipeProvider { } @Override - protected void saveAdvancement(@Nonnull DirectoryCache p_208310_1_, @Nonnull JsonObject p_208310_2_, @Nonnull Path p_208310_3_) { + protected void saveAdvancement(@Nonnull HashCache p_208310_1_, @Nonnull JsonObject p_208310_2_, @Nonnull Path p_208310_3_) { } @Override - protected void buildShapelessRecipes(Consumer consumer) { - consumer.accept(new CrushingRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "crushing/bone_crusher"), + protected void buildCraftingRecipes(Consumer consumer) { + consumer.accept(new CrushingRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "crushing/bone_crusher"), Ingredient.of(Items.BONE), Items.BONE_MEAL, 6, 1.0f , Items.AIR, 0, 0.0f)); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/EmpoweringRecipeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/EmpoweringRecipeGenerator.java index 20d961664..86ab36c19 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/EmpoweringRecipeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/EmpoweringRecipeGenerator.java @@ -7,17 +7,18 @@ import de.ellpeck.actuallyadditions.mod.crafting.EmpowererRecipe; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import de.ellpeck.actuallyadditions.mod.items.metalists.Crystals; import net.minecraft.data.DataGenerator; -import net.minecraft.data.DirectoryCache; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.data.RecipeProvider; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.tags.ITag; +import net.minecraft.data.HashCache; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeProvider; +import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; -import net.minecraft.util.IItemProvider; -import net.minecraft.util.ResourceLocation; +import net.minecraft.tags.Tag; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.level.ItemLike; import net.minecraftforge.common.Tags; import java.nio.file.Path; @@ -31,11 +32,11 @@ public class EmpoweringRecipeGenerator extends RecipeProvider { } @Override - protected void saveAdvancement(DirectoryCache pCache, JsonObject pAdvancementJson, Path pPath) { + protected void saveAdvancement(HashCache pCache, JsonObject pAdvancementJson, Path pPath) { } @Override - protected void buildShapelessRecipes(Consumer consumer) { + protected void buildCraftingRecipes(Consumer consumer) { EmpoweringBuilder.builder(ActuallyItems.EMPOWERED_RESTONIA_CRYSTAL.get(), ActuallyItems.RESTONIA_CRYSTAL.get(), 5000, 50, Crystals.REDSTONE.conversionColorParticles) .addModifier(Tags.Items.DYES_RED) .addModifier(Items.NETHER_BRICK) @@ -118,7 +119,7 @@ public class EmpoweringRecipeGenerator extends RecipeProvider { private final int color; private final List modifiers = new ArrayList<>(); - public EmpoweringBuilder(IItemProvider resultIn, Ingredient baseIn, int energyIn, int timeIn, int colorIn) { + public EmpoweringBuilder(ItemLike resultIn, Ingredient baseIn, int energyIn, int timeIn, int colorIn) { result = resultIn.asItem(); base = baseIn; energy = energyIn; @@ -126,11 +127,11 @@ public class EmpoweringRecipeGenerator extends RecipeProvider { color = colorIn; } - public static EmpoweringBuilder builder(IItemProvider resultIn, IItemProvider base, int energyIn, int timeIn, int colorIn) { + public static EmpoweringBuilder builder(ItemLike resultIn, ItemLike base, int energyIn, int timeIn, int colorIn) { return new EmpoweringBuilder(resultIn, Ingredient.of(base), energyIn, timeIn, colorIn); } - public EmpoweringBuilder addModifier(IItemProvider input) { + public EmpoweringBuilder addModifier(ItemLike input) { if (modifiers.size() >= 4) throw new IllegalStateException("too many modifiers for empowering recipe, input: " + input.asItem().getRegistryName()); modifiers.add(Ingredient.of(input)); @@ -144,24 +145,24 @@ public class EmpoweringRecipeGenerator extends RecipeProvider { return this; } - public EmpoweringBuilder addModifier(ITag input) { + public EmpoweringBuilder addModifier(TagKey input) { if (modifiers.size() >= 4) throw new IllegalStateException("too many modifiers for empowering recipe, input: " + input.toString()); modifiers.add(Ingredient.of(input)); return this; } - public void save(Consumer consumer, ResourceLocation name) { + public void save(Consumer consumer, ResourceLocation name) { if (modifiers.size() != 4) throw new IllegalStateException("invalid modifier count: " + modifiers.size() + ", recipe: " + name.toString()); - consumer.accept(new EmpowererRecipe.FinishedRecipe(name, result, base, modifiers.get(0), modifiers.get(1), modifiers.get(2), modifiers.get(3), energy, color, time)); + consumer.accept(new EmpowererRecipe.Result(name, result, base, modifiers.get(0), modifiers.get(1), modifiers.get(2), modifiers.get(3), energy, color, time)); } - public void save(Consumer consumer, String name) { + public void save(Consumer consumer, String name) { ResourceLocation res = new ResourceLocation(ActuallyAdditions.MODID, "empowering/" + name); if (modifiers.size() != 4) throw new IllegalStateException("invalid modifier count: " + modifiers.size() + ", recipe: " + res); - consumer.accept(new EmpowererRecipe.FinishedRecipe(res, result, base, modifiers.get(0), modifiers.get(1), modifiers.get(2), modifiers.get(3), energy, color, time)); + consumer.accept(new EmpowererRecipe.Result(res, result, base, modifiers.get(0), modifiers.get(1), modifiers.get(2), modifiers.get(3), energy, color, time)); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/FuelRecipeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/FuelRecipeGenerator.java index 2eb67e966..528ec0b66 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/FuelRecipeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/FuelRecipeGenerator.java @@ -3,19 +3,18 @@ package de.ellpeck.actuallyadditions.data; import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.api.ActuallyTags; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.crafting.LiquidFuelRecipe; import de.ellpeck.actuallyadditions.mod.crafting.SolidFuelRecipe; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import net.minecraft.data.DataGenerator; -import net.minecraft.data.DirectoryCache; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.data.RecipeProvider; -import net.minecraft.item.Item; -import net.minecraft.item.Items; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.tags.ITag; -import net.minecraft.util.ResourceLocation; +import net.minecraft.data.HashCache; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeProvider; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.Ingredient; import net.minecraftforge.fluids.FluidStack; import javax.annotation.Nonnull; @@ -28,12 +27,12 @@ public class FuelRecipeGenerator extends RecipeProvider { } @Override - protected void saveAdvancement(@Nonnull DirectoryCache pCache, @Nonnull JsonObject pAdvancementJson, @Nonnull Path pPath) { + protected void saveAdvancement(@Nonnull HashCache pCache, @Nonnull JsonObject pAdvancementJson, @Nonnull Path pPath) { //Nah } @Override - protected void buildShapelessRecipes(@Nonnull Consumer consumer) { + protected void buildCraftingRecipes(@Nonnull Consumer consumer) { addSolid(consumer, "coal", Items.COAL, 32000, 1600); addSolid(consumer, "stick", Items.STICK, 2000, 100); addSolid(consumer, "tiny-coal", ActuallyTags.Items.TINY_COALS, 4000, 200); @@ -41,26 +40,26 @@ public class FuelRecipeGenerator extends RecipeProvider { addSolid(consumer, "coal-block", Items.COAL_BLOCK, 320000, 16000); addSolid(consumer, "lava", Items.LAVA_BUCKET, 400000, 20000); - consumer.accept(new LiquidFuelRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "liquid_fuel/canola_oil"), + consumer.accept(new LiquidFuelRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "liquid_fuel/canola_oil"), new FluidStack(InitFluids.CANOLA_OIL.get(), 50), 4000, 100)); - consumer.accept(new LiquidFuelRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "liquid_fuel/refined_canola_oil"), + consumer.accept(new LiquidFuelRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "liquid_fuel/refined_canola_oil"), new FluidStack(InitFluids.REFINED_CANOLA_OIL.get(), 50), 9600, 120)); - consumer.accept(new LiquidFuelRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "liquid_fuel/crystallized_canola_oil"), + consumer.accept(new LiquidFuelRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "liquid_fuel/crystallized_canola_oil"), new FluidStack(InitFluids.CRYSTALLIZED_OIL.get(), 50), 28000, 280)); - consumer.accept(new LiquidFuelRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "liquid_fuel/empowered_canola_oil"), + consumer.accept(new LiquidFuelRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "liquid_fuel/empowered_canola_oil"), new FluidStack(InitFluids.EMPOWERED_OIL.get(), 50), 48000, 400)); } - private void addSolid(Consumer consumer, String name, Item item, int energy, int burnTime) { - consumer.accept(new SolidFuelRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "solid_fuel/"+name), Ingredient.of(item), energy, burnTime)); + private void addSolid(Consumer consumer, String name, Item item, int energy, int burnTime) { + consumer.accept(new SolidFuelRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "solid_fuel/"+name), Ingredient.of(item), energy, burnTime)); } - private void addSolid(Consumer consumer, String name, Ingredient item, int energy, int burnTime) { - consumer.accept(new SolidFuelRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "solid_fuel/"+name), item, energy, burnTime)); + private void addSolid(Consumer consumer, String name, Ingredient item, int energy, int burnTime) { + consumer.accept(new SolidFuelRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "solid_fuel/"+name), item, energy, burnTime)); } - private void addSolid(Consumer consumer, String name, ITag tag, int energy, int burnTime) { - consumer.accept(new SolidFuelRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "solid_fuel/"+name), Ingredient.of(tag), energy, burnTime)); + private void addSolid(Consumer consumer, String name, TagKey tag, int energy, int burnTime) { + consumer.accept(new SolidFuelRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "solid_fuel/"+name), Ingredient.of(tag), energy, burnTime)); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/ItemModelGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/ItemModelGenerator.java index 151361d6a..3c5500894 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/ItemModelGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/ItemModelGenerator.java @@ -6,16 +6,16 @@ import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.fluids.FluidAA; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.block.Block; -import net.minecraft.block.WallBlock; import net.minecraft.data.DataGenerator; -import net.minecraft.item.Item; -import net.minecraft.util.ResourceLocation; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.WallBlock; import net.minecraftforge.client.model.generators.ItemModelProvider; import net.minecraftforge.client.model.generators.ModelFile; import net.minecraftforge.client.model.generators.loaders.DynamicBucketModelBuilder; import net.minecraftforge.common.data.ExistingFileHelper; -import net.minecraftforge.fml.RegistryObject; +import net.minecraftforge.registries.RegistryObject; import java.util.Set; import java.util.function.Supplier; diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/ItemRecipeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/ItemRecipeGenerator.java index a2ac7a125..8ac3bf6c4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/ItemRecipeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/ItemRecipeGenerator.java @@ -8,19 +8,24 @@ import de.ellpeck.actuallyadditions.mod.crafting.ActuallyRecipes; import de.ellpeck.actuallyadditions.mod.crafting.TargetNBTIngredient; import de.ellpeck.actuallyadditions.mod.crafting.WrappedRecipe; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.data.*; -import net.minecraft.enchantment.Enchantments; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; +import net.minecraft.data.DataGenerator; +import net.minecraft.data.HashCache; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeProvider; +import net.minecraft.data.recipes.ShapedRecipeBuilder; +import net.minecraft.data.recipes.ShapelessRecipeBuilder; +import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; -import net.minecraft.util.IItemProvider; -import net.minecraft.util.ResourceLocation; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.enchantment.Enchantments; +import net.minecraft.world.level.ItemLike; import net.minecraftforge.common.Tags; import net.minecraftforge.common.crafting.ConditionalRecipe; import net.minecraftforge.common.crafting.NBTIngredient; -import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; import javax.annotation.Nonnull; import java.nio.file.Path; @@ -33,7 +38,7 @@ public class ItemRecipeGenerator extends RecipeProvider { } @Override - protected void buildShapelessRecipes(Consumer consumer) { + protected void buildCraftingRecipes(Consumer consumer) { generatePaxels(consumer); //Goggles @@ -504,7 +509,7 @@ public class ItemRecipeGenerator extends RecipeProvider { // GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.COAL.ordinal()), new ItemStack(Items.COAL), 1F); } - protected void generatePaxels(Consumer consumer) { + protected void generatePaxels(Consumer consumer) { addPaxel(consumer, ActuallyItems.WOODEN_AIOT, Items.WOODEN_AXE, Items.WOODEN_PICKAXE, Items.WOODEN_SWORD, Items.WOODEN_SHOVEL, Items.WOODEN_HOE); addPaxel(consumer, ActuallyItems.STONE_AIOT, Items.STONE_AXE, Items.STONE_PICKAXE, Items.STONE_SWORD, Items.STONE_SHOVEL, Items.STONE_HOE); addPaxel(consumer, ActuallyItems.IRON_AIOT, Items.IRON_AXE, Items.IRON_PICKAXE, Items.IRON_SWORD, Items.IRON_SHOVEL, Items.IRON_HOE); @@ -513,7 +518,7 @@ public class ItemRecipeGenerator extends RecipeProvider { addPaxel(consumer, ActuallyItems.NETHERITE_AIOT, Items.NETHERITE_AXE, Items.NETHERITE_PICKAXE, Items.NETHERITE_SWORD, Items.NETHERITE_SHOVEL, Items.NETHERITE_HOE); } - public static void addPaxel(Consumer consumer, RegistryObject output, Item axe, Item pickaxe, Item sword, Item shovel, Item hoe) { + public static void addPaxel(Consumer consumer, RegistryObject output, Item axe, Item pickaxe, Item sword, Item shovel, Item hoe) { Recipe.shapeless(output.get()) .requires(axe) .requires(pickaxe) @@ -523,7 +528,7 @@ public class ItemRecipeGenerator extends RecipeProvider { .save(consumer); } - public static void addPaxel(Consumer consumer, RegistryObject output, RegistryObject axe, RegistryObject pickaxe, RegistryObject sword, RegistryObject shovel, RegistryObject hoe) { + public static void addPaxel(Consumer consumer, RegistryObject output, RegistryObject axe, RegistryObject pickaxe, RegistryObject sword, RegistryObject shovel, RegistryObject hoe) { Recipe.shapeless(output.get()) .requires(axe.get()) .requires(pickaxe.get()) @@ -533,26 +538,26 @@ public class ItemRecipeGenerator extends RecipeProvider { .save(consumer); } - public static void decompress(Consumer consumer, RegistryObject output, RegistryObject input) { + public static void decompress(Consumer consumer, RegistryObject output, RegistryObject input) { ResourceLocation key = ForgeRegistries.ITEMS.getKey(output.get()); Recipe.shapeless(output.get(), 9).requires(input.get()).save(consumer, new ResourceLocation(key.getNamespace(), "decompress/" + key.getPath())); } - public static void compress(Consumer consumer, RegistryObject output, RegistryObject input) { + public static void compress(Consumer consumer, RegistryObject output, RegistryObject input) { ResourceLocation key = ForgeRegistries.ITEMS.getKey(output.get()); Recipe.shaped(output.get()).pattern("xxx","xxx", "xxx").define('x', input.get()).save(consumer, new ResourceLocation(key.getNamespace(), "compress/" + key.getPath())); } - public static void addShard(Consumer consumer, RegistryObject shard, RegistryObject crystal) { + public static void addShard(Consumer consumer, RegistryObject shard, RegistryObject crystal) { compress(consumer, crystal, shard); decompress(consumer, shard, crystal); } @Override - protected void saveAdvancement(DirectoryCache cache, JsonObject cache2, Path advancementJson) { + protected void saveAdvancement(HashCache cache, JsonObject cache2, Path advancementJson) { //Nope... } - public static void addToolAndArmorRecipes(Consumer consumer, RegistryObject base, RegistryObject pickaxe, RegistryObject sword, RegistryObject axe, RegistryObject shovel, RegistryObject hoe, RegistryObject helm, RegistryObject chest, RegistryObject pants, RegistryObject boots) { + public static void addToolAndArmorRecipes(Consumer consumer, RegistryObject base, RegistryObject pickaxe, RegistryObject sword, RegistryObject axe, RegistryObject shovel, RegistryObject hoe, RegistryObject helm, RegistryObject chest, RegistryObject pants, RegistryObject boots) { //Pickaxe Recipe.shaped(pickaxe.get()) .pattern("EEE", " S ", " S ") @@ -614,33 +619,33 @@ public class ItemRecipeGenerator extends RecipeProvider { } public static class Recipe { - public static ItemRecipeGenerator.Recipe.Shapeless shapeless(IItemProvider result) { + public static ItemRecipeGenerator.Recipe.Shapeless shapeless(ItemLike result) { return new ItemRecipeGenerator.Recipe.Shapeless(result); } - public static ItemRecipeGenerator.Recipe.Shapeless shapeless(IItemProvider result, int count) { + public static ItemRecipeGenerator.Recipe.Shapeless shapeless(ItemLike result, int count) { return new ItemRecipeGenerator.Recipe.Shapeless(result, count); } - public static ItemRecipeGenerator.Recipe.Shaped shaped(IItemProvider result) { + public static ItemRecipeGenerator.Recipe.Shaped shaped(ItemLike result) { return new ItemRecipeGenerator.Recipe.Shaped(result); } - public static ItemRecipeGenerator.Recipe.Shaped shaped(IItemProvider result, int count) { + public static ItemRecipeGenerator.Recipe.Shaped shaped(ItemLike result, int count) { return new ItemRecipeGenerator.Recipe.Shaped(result, count); } private static class Shapeless extends ShapelessRecipeBuilder { private ResourceLocation name; - public Shapeless(IItemProvider result) { + public Shapeless(ItemLike result) { this(result, 1); } - public Shapeless(IItemProvider result, int countIn) { + public Shapeless(ItemLike result, int countIn) { super(result, countIn); } - public ItemRecipeGenerator.Recipe.Shapeless ingredients(IItemProvider... ingredients) { + public ItemRecipeGenerator.Recipe.Shapeless ingredients(ItemLike... ingredients) { Arrays.asList(ingredients).forEach(this::requires); return this; } @@ -651,7 +656,7 @@ public class ItemRecipeGenerator extends RecipeProvider { } @Override - public void save(@Nonnull Consumer consumer) { + public void save(@Nonnull Consumer consumer) { this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get())); if (this.name != null) { this.save(consumer, this.name); @@ -660,18 +665,18 @@ public class ItemRecipeGenerator extends RecipeProvider { } } @Override - public void save(@Nonnull Consumer consumer, @Nonnull ResourceLocation location) { + public void save(@Nonnull Consumer consumer, @Nonnull ResourceLocation location) { this.unlockedBy("", has(Items.AIR)); super.save(consumer, location); } } private static class Shaped extends ShapedRecipeBuilder { - public Shaped(IItemProvider resultIn) { + public Shaped(ItemLike resultIn) { this(resultIn, 1); } - public Shaped(IItemProvider resultIn, int countIn) { + public Shaped(ItemLike resultIn, int countIn) { super(resultIn, countIn); } @@ -688,7 +693,7 @@ public class ItemRecipeGenerator extends RecipeProvider { return this; } - public ItemRecipeGenerator.Recipe.Shaped patternSingleKey(char key, IItemProvider resource, String... lines) { + public ItemRecipeGenerator.Recipe.Shaped patternSingleKey(char key, ItemLike resource, String... lines) { this.define(key, resource); for (String line : lines) { this.pattern(line); @@ -703,13 +708,13 @@ public class ItemRecipeGenerator extends RecipeProvider { } @Override - public void save(@Nonnull Consumer consumerIn) { + public void save(@Nonnull Consumer consumerIn) { this.unlockedBy("has_book", has(ActuallyItems.ITEM_BOOKLET.get())); super.save(consumerIn); } @Override - public void save(@Nonnull Consumer consumer, @Nonnull ResourceLocation location) { + public void save(@Nonnull Consumer consumer, @Nonnull ResourceLocation location) { this.unlockedBy("", has(Items.AIR)); super.save(consumer, location); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/ItemTagsGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/ItemTagsGenerator.java index 1bb00ffc3..20bb76439 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/ItemTagsGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/ItemTagsGenerator.java @@ -3,9 +3,9 @@ package de.ellpeck.actuallyadditions.data; import de.ellpeck.actuallyadditions.api.ActuallyTags; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.data.BlockTagsProvider; import net.minecraft.data.DataGenerator; -import net.minecraft.data.ItemTagsProvider; +import net.minecraft.data.tags.BlockTagsProvider; +import net.minecraft.data.tags.ItemTagsProvider; import net.minecraftforge.common.data.ExistingFileHelper; import javax.annotation.Nullable; diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/LaserRecipeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/LaserRecipeGenerator.java index 3af08eb2a..88e8676b7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/LaserRecipeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/LaserRecipeGenerator.java @@ -6,16 +6,17 @@ import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.crafting.LaserRecipe; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import net.minecraft.data.DataGenerator; -import net.minecraft.data.DirectoryCache; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.data.RecipeProvider; -import net.minecraft.item.Item; -import net.minecraft.item.Items; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.tags.ITag; +import net.minecraft.data.HashCache; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeProvider; +import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; -import net.minecraft.util.IItemProvider; -import net.minecraft.util.ResourceLocation; +import net.minecraft.tags.Tag; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.level.ItemLike; import net.minecraftforge.common.Tags; import java.nio.file.Path; @@ -27,11 +28,11 @@ public class LaserRecipeGenerator extends RecipeProvider { } @Override - protected void saveAdvancement(DirectoryCache pCache, JsonObject pAdvancementJson, Path pPath) { + protected void saveAdvancement(HashCache pCache, JsonObject pAdvancementJson, Path pPath) { } @Override - protected void buildShapelessRecipes(Consumer consumer) { + protected void buildCraftingRecipes(Consumer consumer) { //Crystal Blocks laserCrystalizeRecipe(consumer, ActuallyBlocks.RESTONIA_CRYSTAL.getItem(), Tags.Items.STORAGE_BLOCKS_REDSTONE, 400); laserCrystalizeRecipe(consumer, ActuallyBlocks.PALIS_CRYSTAL.getItem(), Tags.Items.STORAGE_BLOCKS_LAPIS, 400); @@ -70,28 +71,28 @@ public class LaserRecipeGenerator extends RecipeProvider { } - private void laserRecipe(Consumer consumer, IItemProvider output, Ingredient input, int energy) { - consumer.accept(new LaserRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "laser/" + output.asItem().getRegistryName().getPath()), + private void laserRecipe(Consumer consumer, ItemLike output, Ingredient input, int energy) { + consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/" + output.asItem().getRegistryName().getPath()), input, energy, output)); } - private void laserRecipe(Consumer consumer, IItemProvider output, ITag input, int energy) { - consumer.accept(new LaserRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "laser/" + output.asItem().getRegistryName().getPath()), + private void laserRecipe(Consumer consumer, ItemLike output, TagKey input, int energy) { + consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/" + output.asItem().getRegistryName().getPath()), Ingredient.of(input), energy, output)); } - private void laserRecipe(Consumer consumer, IItemProvider output, IItemProvider input, int energy) { - consumer.accept(new LaserRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "laser/" + output.asItem().getRegistryName().getPath()), + private void laserRecipe(Consumer consumer, ItemLike output, ItemLike input, int energy) { + consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/" + output.asItem().getRegistryName().getPath()), Ingredient.of(input), energy, output)); } - private void laserCrystalizeRecipe(Consumer consumer, IItemProvider output, Ingredient input, int energy) { - consumer.accept(new LaserRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "laser/crystalize_" + output.asItem().getRegistryName().getPath()), + private void laserCrystalizeRecipe(Consumer consumer, ItemLike output, Ingredient input, int energy) { + consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/crystalize_" + output.asItem().getRegistryName().getPath()), input, energy, output)); } - private void laserCrystalizeRecipe(Consumer consumer, IItemProvider output, ITag input, int energy) { - consumer.accept(new LaserRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "laser/crystalize_" + output.asItem().getRegistryName().getPath()), + private void laserCrystalizeRecipe(Consumer consumer, ItemLike output, TagKey input, int energy) { + consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/crystalize_" + output.asItem().getRegistryName().getPath()), Ingredient.of(input), energy, output)); } - private void laserCrystalizeRecipe(Consumer consumer, IItemProvider output, IItemProvider input, int energy) { - consumer.accept(new LaserRecipe.FinishedRecipe(new ResourceLocation(ActuallyAdditions.MODID, "laser/crystalize_" + output.asItem().getRegistryName().getPath()), + private void laserCrystalizeRecipe(Consumer consumer, ItemLike output, ItemLike input, int energy) { + consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/crystalize_" + output.asItem().getRegistryName().getPath()), Ingredient.of(input), energy, output)); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/LootTableGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/LootTableGenerator.java index 25754afb6..f09b3ccc6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/LootTableGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/LootTableGenerator.java @@ -7,20 +7,27 @@ import com.mojang.datafixers.util.Pair; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.advancements.criterion.StatePropertiesPredicate; -import net.minecraft.block.Block; -import net.minecraft.block.CropsBlock; +import net.minecraft.advancements.critereon.StatePropertiesPredicate; import net.minecraft.data.DataGenerator; -import net.minecraft.data.LootTableProvider; -import net.minecraft.data.loot.BlockLootTables; -import net.minecraft.item.Item; -import net.minecraft.item.Items; -import net.minecraft.loot.*; -import net.minecraft.loot.conditions.BlockStateProperty; -import net.minecraft.loot.functions.CopyName; -import net.minecraft.loot.functions.CopyNbt; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fml.RegistryObject; +import net.minecraft.data.loot.BlockLoot; +import net.minecraft.data.loot.LootTableProvider; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.CropBlock; +import net.minecraft.world.level.storage.loot.LootPool; +import net.minecraft.world.level.storage.loot.LootTable; +import net.minecraft.world.level.storage.loot.LootTables; +import net.minecraft.world.level.storage.loot.ValidationContext; +import net.minecraft.world.level.storage.loot.entries.LootItem; +import net.minecraft.world.level.storage.loot.functions.CopyNbtFunction; +import net.minecraft.world.level.storage.loot.parameters.LootContextParamSet; +import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; +import net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition; +import net.minecraft.world.level.storage.loot.providers.nbt.ContextNbtProvider; +import net.minecraft.world.level.storage.loot.providers.number.ConstantValue; +import net.minecraftforge.registries.RegistryObject; import javax.annotation.Nonnull; import java.util.List; @@ -37,20 +44,20 @@ public class LootTableGenerator extends LootTableProvider { } @Nonnull @Override - protected List>>, LootParameterSet>> getTables() { - return ImmutableList.of(Pair.of(Blocks::new, LootParameterSets.BLOCK)); + protected List>>, LootContextParamSet>> getTables() { + return ImmutableList.of(Pair.of(Blocks::new, LootContextParamSets.BLOCK)); } @Override - protected void validate(Map map, @Nonnull ValidationTracker validationtracker) { - map.forEach((name, table) -> LootTableManager.validate(validationtracker, name, table)); + protected void validate(Map map, @Nonnull ValidationContext validationtracker) { + map.forEach((name, table) -> LootTables.validate(validationtracker, name, table)); } - public static class Blocks extends BlockLootTables { + public static class Blocks extends BlockLoot { @Override protected void addTables() { - CopyNbt.Builder copyEnergy = CopyNbt.copyData(CopyNbt.Source.BLOCK_ENTITY).copy("Energy", "BlockEntityTag.Energy"); - CopyNbt.Builder copyPulseMode = CopyNbt.copyData(CopyNbt.Source.BLOCK_ENTITY).copy("IsPulseMode", "BlockEntityTag.IsPulseMode"); + CopyNbtFunction.Builder copyEnergy = CopyNbtFunction.copyData(ContextNbtProvider.BLOCK_ENTITY).copy("Energy", "BlockEntityTag.Energy"); + CopyNbtFunction.Builder copyPulseMode = CopyNbtFunction.copyData(ContextNbtProvider.BLOCK_ENTITY).copy("IsPulseMode", "BlockEntityTag.IsPulseMode"); //Special Drops dropNBT(ActuallyBlocks.ATOMIC_RECONSTRUCTOR, $ -> $.apply(copyEnergy).apply(copyPulseMode)); @@ -195,19 +202,19 @@ public class LootTableGenerator extends LootTableProvider { private void addCrop(Supplier block, Supplier item, Supplier seed) { add(block.get(), createCropDrops(block.get(), item.get(), seed.get(), - BlockStateProperty.hasBlockStateProperties(block.get()).setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(CropsBlock.AGE, 7)))); + LootItemBlockStatePropertyCondition.hasBlockStateProperties(block.get()).setProperties(StatePropertiesPredicate.Builder.properties().hasProperty(CropBlock.AGE, 7)))); } private void dropNBT(Supplier blockSupplier, Consumer lootFunctionProvider) { - LootPool.Builder lootpool = LootPool.lootPool().setRolls(ConstantRange.exactly(1)).add(ItemLootEntry.lootTableItem(blockSupplier.get())); + LootPool.Builder lootpool = LootPool.lootPool().setRolls(ConstantValue.exactly(1)).add(LootItem.lootTableItem(blockSupplier.get())); lootFunctionProvider.accept(lootpool); add(blockSupplier.get(), LootTable.lootTable().withPool(applyExplosionCondition(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get(), lootpool))); } private void dropKeepEnergy(Supplier blockSupplier) { - dropNBT(blockSupplier, $ -> $.apply(CopyNbt.copyData(CopyNbt.Source.BLOCK_ENTITY).copy("Energy", "BlockEntityTag.Energy"))); + dropNBT(blockSupplier, $ -> $.apply(CopyNbtFunction.copyData(ContextNbtProvider.BLOCK_ENTITY).copy("Energy", "BlockEntityTag.Energy"))); } /* // This isn't quite right :cry: fortune doesn't change it diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/MiningLensGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/MiningLensGenerator.java index 42c6e1cac..9b2e70442 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/MiningLensGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/MiningLensGenerator.java @@ -4,14 +4,16 @@ import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.crafting.MiningLensRecipe; import net.minecraft.data.DataGenerator; -import net.minecraft.data.DirectoryCache; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.data.RecipeProvider; -import net.minecraft.item.Items; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.tags.ITag; -import net.minecraft.util.IItemProvider; -import net.minecraft.util.ResourceLocation; +import net.minecraft.data.HashCache; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeProvider; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.Tag; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.level.ItemLike; import net.minecraftforge.common.Tags; import net.minecraftforge.registries.ForgeRegistries; @@ -24,31 +26,31 @@ public class MiningLensGenerator extends RecipeProvider { } @Override - protected void saveAdvancement(DirectoryCache pCache, JsonObject pAdvancementJson, Path pPath) { + protected void saveAdvancement(HashCache pCache, JsonObject pAdvancementJson, Path pPath) { } @Override - protected void buildShapelessRecipes(Consumer consumer) { + protected void buildCraftingRecipes(Consumer consumer) { buildMiningLens(consumer); } - private String getItemName(IItemProvider item) { - return ForgeRegistries.ITEMS.getKey(item.asItem()).getPath(); - } +// private String getItemName(ItemLike item) { +// return ForgeRegistries.ITEMS.getKey(item.asItem()).getPath(); +// } private ResourceLocation folderRecipe(String folder, String recipe) { return new ResourceLocation(ActuallyAdditions.MODID, folder + "/" + recipe); } - private void buildStoneOre(Consumer consumer, int weight, IItemProvider output) { + private void buildStoneOre(Consumer consumer, int weight, ItemLike output) { buildTagOre(consumer, Tags.Items.STONE, "stone", weight, output); } - private void buildNetherOre(Consumer consumer, int weight, IItemProvider output) { + private void buildNetherOre(Consumer consumer, int weight, ItemLike output) { buildTagOre(consumer, Tags.Items.NETHERRACK, "nether", weight, output); } - private void buildTagOre(Consumer consumer, ITag tag, String prefix, int weight, IItemProvider output) { - consumer.accept(new MiningLensRecipe.FinishedRecipe( + private void buildTagOre(Consumer consumer, TagKey tag, String prefix, int weight, ItemLike output) { + consumer.accept(new MiningLensRecipe.Result( folderRecipe("mininglens", prefix + "_" + getItemName(output)), Ingredient.of(tag), weight, @@ -56,7 +58,7 @@ public class MiningLensGenerator extends RecipeProvider { )); } - private void buildMiningLens(Consumer consumer) { + private void buildMiningLens(Consumer consumer) { buildStoneOre(consumer, 5000, Items.COAL_ORE); buildStoneOre(consumer, 3000, Items.IRON_ORE); buildStoneOre(consumer, 500, Items.GOLD_ORE); diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/MiscMachineRecipeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/MiscMachineRecipeGenerator.java index 9f106df61..d3255f594 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/MiscMachineRecipeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/MiscMachineRecipeGenerator.java @@ -3,22 +3,16 @@ package de.ellpeck.actuallyadditions.data; import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.crafting.FermentingRecipe; -import de.ellpeck.actuallyadditions.mod.crafting.MiningLensRecipe; import de.ellpeck.actuallyadditions.mod.crafting.PressingRecipe; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import net.minecraft.data.DataGenerator; -import net.minecraft.data.DirectoryCache; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.data.RecipeProvider; -import net.minecraft.fluid.Fluids; -import net.minecraft.item.Items; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.tags.ITag; -import net.minecraft.util.IItemProvider; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.registry.Registry; -import net.minecraftforge.common.Tags; +import net.minecraft.data.HashCache; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeProvider; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.level.ItemLike; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.registries.ForgeRegistries; @@ -31,21 +25,21 @@ public class MiscMachineRecipeGenerator extends RecipeProvider { } @Override - protected void saveAdvancement(DirectoryCache pCache, JsonObject pAdvancementJson, Path pPath) { + protected void saveAdvancement(HashCache pCache, JsonObject pAdvancementJson, Path pPath) { } @Override - protected void buildShapelessRecipes(Consumer consumer) { - consumer.accept(new PressingRecipe.FinishedRecipe(folderRecipe("pressing", "canola"), + protected void buildCraftingRecipes(Consumer consumer) { + consumer.accept(new PressingRecipe.Result(folderRecipe("pressing", "canola"), Ingredient.of(ActuallyItems.CANOLA.get()), new FluidStack(InitFluids.CANOLA_OIL.get(), 80))); - consumer.accept(new FermentingRecipe.FinishedRecipe(folderRecipe("fermenting", "refined_canola"), + consumer.accept(new FermentingRecipe.Result(folderRecipe("fermenting", "refined_canola"), new FluidStack(InitFluids.CANOLA_OIL.get(), 80), new FluidStack(InitFluids.REFINED_CANOLA_OIL.get(), 80), 100)); } - private String getItemName(IItemProvider item) { - return ForgeRegistries.ITEMS.getKey(item.asItem()).getPath(); - } +// private String getItemName(ItemLike item) { +// return ForgeRegistries.ITEMS.getKey(item.asItem()).getPath(); +// } private ResourceLocation folderRecipe(String folder, String recipe) { return new ResourceLocation(ActuallyAdditions.MODID, folder + "/" + recipe); diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/SoundsGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/SoundsGenerator.java index 594930017..260cd0af0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/SoundsGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/SoundsGenerator.java @@ -3,7 +3,7 @@ package de.ellpeck.actuallyadditions.data; import de.ellpeck.actuallyadditions.mod.AASounds; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.data.DataGenerator; -import net.minecraft.util.ResourceLocation; +import net.minecraft.resources.ResourceLocation; import net.minecraftforge.common.data.ExistingFileHelper; import net.minecraftforge.common.data.SoundDefinitionsProvider; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/AASounds.java b/src/main/java/de/ellpeck/actuallyadditions/mod/AASounds.java index d6b6fef83..811ab818b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/AASounds.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/AASounds.java @@ -1,11 +1,11 @@ package de.ellpeck.actuallyadditions.mod; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.SoundEvent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.sounds.SoundEvent; import net.minecraftforge.eventbus.api.IEventBus; -import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; public class AASounds { public static final DeferredRegister SOUNDS = DeferredRegister.create(ForgeRegistries.SOUND_EVENTS, ActuallyAdditions.MODID); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java index af7b5f03e..2f86bea70 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java @@ -36,31 +36,33 @@ import de.ellpeck.actuallyadditions.mod.network.PacketHandler; import de.ellpeck.actuallyadditions.mod.particle.ActuallyParticles; import de.ellpeck.actuallyadditions.mod.update.UpdateChecker; import de.ellpeck.actuallyadditions.mod.util.ResourceReloader; -import net.minecraft.entity.EntityClassification; -import net.minecraft.entity.EntityType; -import net.minecraft.item.Item; -import net.minecraft.item.ItemGroup; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.util.ResourceLocation; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.MobCategory; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.client.event.ParticleFactoryRegisterEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.crafting.CraftingHelper; import net.minecraftforge.event.AddReloadListenerEvent; +import net.minecraftforge.event.server.ServerStartedEvent; +import net.minecraftforge.event.server.ServerStoppedEvent; import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.ModLoadingContext; -import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.config.ModConfig; +import net.minecraftforge.fml.event.config.ModConfigEvent; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent; -import net.minecraftforge.fml.event.server.FMLServerStartedEvent; -import net.minecraftforge.fml.event.server.FMLServerStoppedEvent; import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -77,7 +79,7 @@ public class ActuallyAdditions { public static final String GUIFACTORY = "de.ellpeck.actuallyadditions.mod.config.GuiFactory"; public static final String DEPS = "required:forge@[14.23.5.2836,);before:craftingtweaks;after:fastbench@[1.3.2,)"; - public static final ItemGroup GROUP = new ItemGroup(MODID) { + public static final CreativeModeTab GROUP = new CreativeModeTab(MODID) { @OnlyIn(Dist.CLIENT) @Override public ItemStack makeIcon() { @@ -87,7 +89,7 @@ public class ActuallyAdditions { public static final Logger LOGGER = LogManager.getLogger(NAME); public static final DeferredRegister> ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITIES, MODID); - public static final RegistryObject> ENTITY_WORM = ENTITIES.register("worm", () -> EntityType.Builder.of(EntityWorm::new, EntityClassification.MISC).build(MODID + ":worm")); + public static final RegistryObject> ENTITY_WORM = ENTITIES.register("worm", () -> EntityType.Builder.of(EntityWorm::new, MobCategory.MISC).build(MODID + ":worm")); public static boolean commonCapsLoaded; @@ -115,13 +117,17 @@ public class ActuallyAdditions { InitFluids.init(eventBus); eventBus.addListener(this::setup); - eventBus.addListener(this::clientSetup); - eventBus.addListener(this::particleFactoryRegister); + + DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> { + eventBus.addListener(this::clientSetup); + eventBus.addListener(ActuallyAdditionsClient::setupSpecialRenders); + eventBus.addListener(this::particleFactoryRegister); + }); IFarmerBehavior.initBehaviors(); } private static void reloadEvent(AddReloadListenerEvent event) { - event.addListener(new ResourceReloader(event.getDataPackRegistries())); + event.addListener(new ResourceReloader(event.getServerResources())); } private void setup(FMLCommonSetupEvent event) { @@ -148,7 +154,7 @@ public class ActuallyAdditions { //LensMining.init(); } - private void onConfigReload(ModConfig.ModConfigEvent event) { + private void onConfigReload(ModConfigEvent event) { Item item1 = ForgeRegistries.ITEMS.getValue(new ResourceLocation(CommonConfig.Other.REDSTONECONFIGURATOR.get())); Item item2 = ForgeRegistries.ITEMS.getValue(new ResourceLocation(CommonConfig.Other.RELAYCONFIGURATOR.get())); CommonConfig.Other.redstoneConfigureItem = item1 != null?item1: Items.AIR; @@ -163,7 +169,7 @@ public class ActuallyAdditions { ActuallyAdditionsClient.registerParticleFactories(); } - public void serverStarted(FMLServerStartedEvent event) { + public void serverStarted(ServerStartedEvent event) { // TODO: [port] check if this is needed // if (event.getServer() != null) { @@ -174,7 +180,7 @@ public class ActuallyAdditions { // } } - public void serverStopped(FMLServerStoppedEvent event) { + public void serverStopped(ServerStoppedEvent event) { // TODO: [port] check if this is needed WorldData.clear(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditionsClient.java b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditionsClient.java index 698b6fd01..ac36911f3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditionsClient.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditionsClient.java @@ -11,104 +11,129 @@ package de.ellpeck.actuallyadditions.mod; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; -import de.ellpeck.actuallyadditions.mod.blocks.render.*; +import de.ellpeck.actuallyadditions.mod.blocks.render.ReconstructorRenderer; +import de.ellpeck.actuallyadditions.mod.blocks.render.RenderBatteryBox; +import de.ellpeck.actuallyadditions.mod.blocks.render.RenderDisplayStand; +import de.ellpeck.actuallyadditions.mod.blocks.render.RenderEmpowerer; +import de.ellpeck.actuallyadditions.mod.blocks.render.RenderLaserRelay; import de.ellpeck.actuallyadditions.mod.entity.RenderWorm; import de.ellpeck.actuallyadditions.mod.event.ClientEvents; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.inventory.ActuallyContainers; -import de.ellpeck.actuallyadditions.mod.inventory.gui.*; +import de.ellpeck.actuallyadditions.mod.inventory.gui.CrusherScreen; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiBioReactor; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiBreaker; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiCanolaPress; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiCoalGenerator; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiCoffeeMachine; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiDirectionalBreaker; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiDrill; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiDropper; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiEnergizer; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiEnervator; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFarmer; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFeeder; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFermentingBarrel; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFilter; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFireworkBox; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFluidCollector; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiFurnaceDouble; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiLaserRelayItemWhitelist; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiMiner; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiOilGenerator; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiPhantomPlacer; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiRangedCollector; +import de.ellpeck.actuallyadditions.mod.inventory.gui.GuiXPSolidifier; +import de.ellpeck.actuallyadditions.mod.inventory.gui.SackGui; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import de.ellpeck.actuallyadditions.mod.misc.special.SpecialRenderInit; import de.ellpeck.actuallyadditions.mod.particle.ActuallyParticles; import de.ellpeck.actuallyadditions.mod.particle.ParticleBeam; import de.ellpeck.actuallyadditions.mod.particle.ParticleLaserItem; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.ScreenManager; -import net.minecraft.client.network.play.ClientPlayNetHandler; +import net.minecraft.client.gui.screens.MenuScreens; +import net.minecraft.client.multiplayer.ClientPacketListener; +import net.minecraft.client.renderer.ItemBlockRenderTypes; import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.RenderTypeLookup; -import net.minecraft.item.ItemModelsProperties; -import net.minecraft.network.play.client.CPlayerDiggingPacket; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; +import net.minecraft.client.renderer.item.ItemProperties; +import net.minecraft.core.BlockPos; +import net.minecraft.network.protocol.game.ServerboundPlayerActionPacket; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraftforge.client.event.EntityRenderersEvent; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.fml.client.registry.ClientRegistry; -import net.minecraftforge.fml.client.registry.RenderingRegistry; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; public class ActuallyAdditionsClient { public static void setup(FMLClientSetupEvent event) { - ScreenManager.register(ActuallyContainers.BAG_CONTAINER.get(), SackGui::new); - ScreenManager.register(ActuallyContainers.BIO_REACTOR_CONTAINER.get(), GuiBioReactor::new); - ScreenManager.register(ActuallyContainers.BREAKER_CONTAINER.get(), GuiBreaker::new); - ScreenManager.register(ActuallyContainers.CANOLA_PRESS_CONTAINER.get(), GuiCanolaPress::new); - ScreenManager.register(ActuallyContainers.COAL_GENERATOR_CONTAINER.get(), GuiCoalGenerator::new); - ScreenManager.register(ActuallyContainers.COFFEE_MACHINE_CONTAINER.get(), GuiCoffeeMachine::new); - ScreenManager.register(ActuallyContainers.DIRECTIONAL_BREAKER_CONTAINER.get(), GuiDirectionalBreaker::new); - ScreenManager.register(ActuallyContainers.DRILL_CONTAINER.get(), GuiDrill::new); - ScreenManager.register(ActuallyContainers.DROPPER_CONTAINER.get(), GuiDropper::new); - ScreenManager.register(ActuallyContainers.ENERVATOR_CONTAINER.get(), GuiEnervator::new); - ScreenManager.register(ActuallyContainers.ENERGIZER_CONTAINER.get(), GuiEnergizer::new); - ScreenManager.register(ActuallyContainers.FARMER_CONTAINER.get(), GuiFarmer::new); - ScreenManager.register(ActuallyContainers.FEEDER_CONTAINER.get(), GuiFeeder::new); - ScreenManager.register(ActuallyContainers.FERMENTING_BARREL_CONTAINER.get(), GuiFermentingBarrel::new); - ScreenManager.register(ActuallyContainers.FILTER_CONTAINER.get(), GuiFilter::new); - ScreenManager.register(ActuallyContainers.FIREWORK_BOX_CONTAINER.get(), GuiFireworkBox::new); - ScreenManager.register(ActuallyContainers.FLUID_COLLECTOR_CONTAINER.get(), GuiFluidCollector::new); - ScreenManager.register(ActuallyContainers.FURNACE_DOUBLE_CONTAINER.get(), GuiFurnaceDouble::new); - ScreenManager.register(ActuallyContainers.GRINDER_CONTAINER.get(), CrusherScreen::new); - ScreenManager.register(ActuallyContainers.LASER_RELAY_ITEM_WHITELIST_CONTAINER.get(), GuiLaserRelayItemWhitelist::new); - ScreenManager.register(ActuallyContainers.MINER_CONTAINER.get(), GuiMiner::new); - ScreenManager.register(ActuallyContainers.OIL_GENERATOR_CONTAINER.get(), GuiOilGenerator::new); - ScreenManager.register(ActuallyContainers.PHANTOM_PLACER_CONTAINER.get(), GuiPhantomPlacer::new); - ScreenManager.register(ActuallyContainers.RANGED_COLLECTOR_CONTAINER.get(), GuiRangedCollector::new); - ScreenManager.register(ActuallyContainers.XPSOLIDIFIER_CONTAINER.get(), GuiXPSolidifier::new); + MenuScreens.register(ActuallyContainers.BAG_CONTAINER.get(), SackGui::new); + MenuScreens.register(ActuallyContainers.BIO_REACTOR_CONTAINER.get(), GuiBioReactor::new); + MenuScreens.register(ActuallyContainers.BREAKER_CONTAINER.get(), GuiBreaker::new); + MenuScreens.register(ActuallyContainers.CANOLA_PRESS_CONTAINER.get(), GuiCanolaPress::new); + MenuScreens.register(ActuallyContainers.COAL_GENERATOR_CONTAINER.get(), GuiCoalGenerator::new); + MenuScreens.register(ActuallyContainers.COFFEE_MACHINE_CONTAINER.get(), GuiCoffeeMachine::new); + MenuScreens.register(ActuallyContainers.DIRECTIONAL_BREAKER_CONTAINER.get(), GuiDirectionalBreaker::new); + MenuScreens.register(ActuallyContainers.DRILL_CONTAINER.get(), GuiDrill::new); + MenuScreens.register(ActuallyContainers.DROPPER_CONTAINER.get(), GuiDropper::new); + MenuScreens.register(ActuallyContainers.ENERVATOR_CONTAINER.get(), GuiEnervator::new); + MenuScreens.register(ActuallyContainers.ENERGIZER_CONTAINER.get(), GuiEnergizer::new); + MenuScreens.register(ActuallyContainers.FARMER_CONTAINER.get(), GuiFarmer::new); + MenuScreens.register(ActuallyContainers.FEEDER_CONTAINER.get(), GuiFeeder::new); + MenuScreens.register(ActuallyContainers.FERMENTING_BARREL_CONTAINER.get(), GuiFermentingBarrel::new); + MenuScreens.register(ActuallyContainers.FILTER_CONTAINER.get(), GuiFilter::new); + MenuScreens.register(ActuallyContainers.FIREWORK_BOX_CONTAINER.get(), GuiFireworkBox::new); + MenuScreens.register(ActuallyContainers.FLUID_COLLECTOR_CONTAINER.get(), GuiFluidCollector::new); + MenuScreens.register(ActuallyContainers.FURNACE_DOUBLE_CONTAINER.get(), GuiFurnaceDouble::new); + MenuScreens.register(ActuallyContainers.GRINDER_CONTAINER.get(), CrusherScreen::new); + MenuScreens.register(ActuallyContainers.LASER_RELAY_ITEM_WHITELIST_CONTAINER.get(), GuiLaserRelayItemWhitelist::new); + MenuScreens.register(ActuallyContainers.MINER_CONTAINER.get(), GuiMiner::new); + MenuScreens.register(ActuallyContainers.OIL_GENERATOR_CONTAINER.get(), GuiOilGenerator::new); + MenuScreens.register(ActuallyContainers.PHANTOM_PLACER_CONTAINER.get(), GuiPhantomPlacer::new); + MenuScreens.register(ActuallyContainers.RANGED_COLLECTOR_CONTAINER.get(), GuiRangedCollector::new); + MenuScreens.register(ActuallyContainers.XPSOLIDIFIER_CONTAINER.get(), GuiXPSolidifier::new); // From old proxy MinecraftForge.EVENT_BUS.register(new ClientEvents()); MinecraftForge.EVENT_BUS.register(new ClientRegistryHandler()); MinecraftForge.EVENT_BUS.register(new SpecialRenderInit()); - setupSpecialRenders(); - event.enqueueWork(() -> - ItemModelsProperties.register(ActuallyItems.WORM.get(), new ResourceLocation(ActuallyAdditions.MODID, "snail"), - (stack, world, entity) -> "snail mail".equalsIgnoreCase(stack.getHoverName().getString()) ? 1F : 0F)); + ItemProperties.register(ActuallyItems.WORM.get(), new ResourceLocation(ActuallyAdditions.MODID, "snail"), + (stack, level, entity, tintIndex) -> "snail mail".equalsIgnoreCase(stack.getHoverName().getString()) ? 1F : 0F)); setupRenderLayers(); } private static void setupRenderLayers() { - RenderTypeLookup.setRenderLayer(InitFluids.CANOLA_OIL.get(), RenderType.translucent()); - RenderTypeLookup.setRenderLayer(InitFluids.CANOLA_OIL.getFlowing(), RenderType.translucent()); - RenderTypeLookup.setRenderLayer(InitFluids.REFINED_CANOLA_OIL.get(), RenderType.translucent()); - RenderTypeLookup.setRenderLayer(InitFluids.REFINED_CANOLA_OIL.getFlowing(), RenderType.translucent()); - RenderTypeLookup.setRenderLayer(InitFluids.CRYSTALLIZED_OIL.get(), RenderType.translucent()); - RenderTypeLookup.setRenderLayer(InitFluids.CRYSTALLIZED_OIL.getFlowing(), RenderType.translucent()); - RenderTypeLookup.setRenderLayer(InitFluids.EMPOWERED_OIL.get(), RenderType.translucent()); - RenderTypeLookup.setRenderLayer(InitFluids.EMPOWERED_OIL.getFlowing(), RenderType.translucent()); + ItemBlockRenderTypes.setRenderLayer(InitFluids.CANOLA_OIL.get(), RenderType.translucent()); + ItemBlockRenderTypes.setRenderLayer(InitFluids.CANOLA_OIL.getFlowing(), RenderType.translucent()); + ItemBlockRenderTypes.setRenderLayer(InitFluids.REFINED_CANOLA_OIL.get(), RenderType.translucent()); + ItemBlockRenderTypes.setRenderLayer(InitFluids.REFINED_CANOLA_OIL.getFlowing(), RenderType.translucent()); + ItemBlockRenderTypes.setRenderLayer(InitFluids.CRYSTALLIZED_OIL.get(), RenderType.translucent()); + ItemBlockRenderTypes.setRenderLayer(InitFluids.CRYSTALLIZED_OIL.getFlowing(), RenderType.translucent()); + ItemBlockRenderTypes.setRenderLayer(InitFluids.EMPOWERED_OIL.get(), RenderType.translucent()); + ItemBlockRenderTypes.setRenderLayer(InitFluids.EMPOWERED_OIL.getFlowing(), RenderType.translucent()); - RenderTypeLookup.setRenderLayer(ActuallyBlocks.CANOLA.get(), RenderType.cutout()); - RenderTypeLookup.setRenderLayer(ActuallyBlocks.RICE.get(), RenderType.cutout()); - RenderTypeLookup.setRenderLayer(ActuallyBlocks.FLAX.get(), RenderType.cutout()); - RenderTypeLookup.setRenderLayer(ActuallyBlocks.COFFEE.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(ActuallyBlocks.CANOLA.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(ActuallyBlocks.RICE.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(ActuallyBlocks.FLAX.get(), RenderType.cutout()); + ItemBlockRenderTypes.setRenderLayer(ActuallyBlocks.COFFEE.get(), RenderType.cutout()); } - private static void setupSpecialRenders() { - ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.getTileEntityType(), ReconstructorRenderer::new); - ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.DISPLAY_STAND.getTileEntityType(), RenderDisplayStand::new); - ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.EMPOWERER.getTileEntityType(), RenderEmpowerer::new); - ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.BATTERY_BOX.getTileEntityType(), RenderBatteryBox::new); + public static void setupSpecialRenders(EntityRenderersEvent.RegisterRenderers event) { + event.registerBlockEntityRenderer(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.getTileEntityType(), ReconstructorRenderer::new); + event.registerBlockEntityRenderer(ActuallyBlocks.DISPLAY_STAND.getTileEntityType(), RenderDisplayStand::new); + event.registerBlockEntityRenderer(ActuallyBlocks.EMPOWERER.getTileEntityType(), RenderEmpowerer::new); + event.registerBlockEntityRenderer(ActuallyBlocks.BATTERY_BOX.getTileEntityType(), RenderBatteryBox::new); - ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.LASER_RELAY.getTileEntityType(), RenderLaserRelay::new); - ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.LASER_RELAY_ADVANCED.getTileEntityType(), RenderLaserRelay::new); - ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.LASER_RELAY_EXTREME.getTileEntityType(), RenderLaserRelay::new); - ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.LASER_RELAY_ITEM.getTileEntityType(), RenderLaserRelay::new); - ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.LASER_RELAY_ITEM_ADVANCED.getTileEntityType(), RenderLaserRelay::new); - ClientRegistry.bindTileEntityRenderer(ActuallyBlocks.LASER_RELAY_FLUIDS.getTileEntityType(), RenderLaserRelay::new); + event.registerBlockEntityRenderer(ActuallyBlocks.LASER_RELAY.getTileEntityType(), RenderLaserRelay::new); + event.registerBlockEntityRenderer(ActuallyBlocks.LASER_RELAY_ADVANCED.getTileEntityType(), RenderLaserRelay::new); + event.registerBlockEntityRenderer(ActuallyBlocks.LASER_RELAY_EXTREME.getTileEntityType(), RenderLaserRelay::new); + event.registerBlockEntityRenderer(ActuallyBlocks.LASER_RELAY_ITEM.getTileEntityType(), RenderLaserRelay::new); + event.registerBlockEntityRenderer(ActuallyBlocks.LASER_RELAY_ITEM_ADVANCED.getTileEntityType(), RenderLaserRelay::new); + event.registerBlockEntityRenderer(ActuallyBlocks.LASER_RELAY_FLUIDS.getTileEntityType(), RenderLaserRelay::new); - RenderingRegistry.registerEntityRenderingHandler(ActuallyAdditions.ENTITY_WORM.get(), RenderWorm::new); + event.registerEntityRenderer(ActuallyAdditions.ENTITY_WORM.get(), RenderWorm::new); } public static void registerParticleFactories() { @@ -118,9 +143,9 @@ public class ActuallyAdditionsClient { // TODO: [port] validate that this works public static void sendBreakPacket(BlockPos pos) { - ClientPlayNetHandler connection = Minecraft.getInstance().getConnection(); + ClientPacketListener connection = Minecraft.getInstance().getConnection(); assert connection != null; assert Minecraft.getInstance().hitResult != null; - connection.send(new CPlayerDiggingPacket(CPlayerDiggingPacket.Action.STOP_DESTROY_BLOCK, pos, ((BlockRayTraceResult) Minecraft.getInstance().hitResult).getDirection())); + connection.send(new ServerboundPlayerActionPacket(ServerboundPlayerActionPacket.Action.STOP_DESTROY_BLOCK, pos, ((BlockHitResult) Minecraft.getInstance().hitResult).getDirection())); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/ClientRegistryHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/ClientRegistryHandler.java index 9fb2eb56d..1190516b9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/ClientRegistryHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/ClientRegistryHandler.java @@ -1,8 +1,8 @@ package de.ellpeck.actuallyadditions.mod; -import net.minecraft.client.renderer.model.ModelResourceLocation; -import net.minecraft.fluid.Fluid; -import net.minecraft.item.ItemStack; +import net.minecraft.client.resources.model.ModelResourceLocation; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.material.Fluid; import net.minecraftforge.client.event.ModelBakeEvent; import net.minecraftforge.client.event.ModelRegistryEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/AABlockItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/AABlockItem.java index c13afa46d..5ed14c274 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/AABlockItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/AABlockItem.java @@ -1,15 +1,14 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import net.minecraft.block.Block; -import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.item.BlockItem; -import net.minecraft.item.BlockNamedItem; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.World; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.ItemNameBlockItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; import javax.annotation.Nullable; import java.text.NumberFormat; @@ -20,7 +19,7 @@ public class AABlockItem extends BlockItem { super(blockIn, builder); } - public static class AASeedItem extends BlockNamedItem { + public static class AASeedItem extends ItemNameBlockItem { public AASeedItem(Block block, Properties properties) { super(block, properties); } @@ -37,17 +36,17 @@ public class AABlockItem extends BlockItem { } @Override - public void appendHoverText(ItemStack pStack, @Nullable World pLevel, List pTooltip, ITooltipFlag pFlag) { + public void appendHoverText(ItemStack pStack, @Nullable Level pLevel, List pTooltip, TooltipFlag pFlag) { super.appendHoverText(pStack, pLevel, pTooltip, pFlag); if (pStack.hasTag() && pStack.getTag().contains("BlockEntityTag")) { - CompoundNBT BET = pStack.getTag().getCompound("BlockEntityTag"); + CompoundTag BET = pStack.getTag().getCompound("BlockEntityTag"); int energy = 0; if (BET.contains("Energy")) { energy = BET.getInt("Energy"); } NumberFormat format = NumberFormat.getInstance(); - pTooltip.add(new TranslationTextComponent("misc.actuallyadditions.power_single", format.format(energy))); + pTooltip.add(new TranslatableComponent("misc.actuallyadditions.power_single", format.format(energy))); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlock.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlock.java index 908594aa4..3e83bcc53 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlock.java @@ -1,11 +1,11 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.SlabBlock; -import net.minecraft.block.StairsBlock; -import net.minecraft.item.Item; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SlabBlock; +import net.minecraft.world.level.block.StairBlock; +import net.minecraft.world.level.block.state.BlockState; import java.util.function.Supplier; @@ -30,7 +30,7 @@ public class ActuallyBlock extends Block implements IActuallyBlock { return new Item.Properties().tab(ActuallyAdditions.GROUP); } - public static class Stairs extends StairsBlock implements IActuallyBlock { + public static class Stairs extends StairBlock implements IActuallyBlock { public Stairs(Supplier state, Properties properties) { super(state, properties); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlocks.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlocks.java index 7dabd3532..48f96bb33 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlocks.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlocks.java @@ -12,17 +12,65 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.AACrops; -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import de.ellpeck.actuallyadditions.mod.items.metalists.Crystals; -import de.ellpeck.actuallyadditions.mod.tile.*; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityBatteryBox; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityCrusher; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityCrusherDouble; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityDisplayStand; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityEmpowerer; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityFireworkBox; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidPlacer; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityHeatCollector; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemInterface; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemInterfaceHopping; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergy; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergyAdvanced; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergyExtreme; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayFluids; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItem; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItemAdvanced; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLavaFactoryController; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLeafGenerator; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLongRangeBreaker; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomBooster; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomBreaker; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomEnergyface; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomItemface; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomLiquiface; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomPlacer; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomRedstoneface; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlacer; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPoweredFurnace; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityShockSuppressor; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityVerticalDigger; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier; import de.ellpeck.actuallyadditions.registration.AABlockReg; -import net.minecraft.block.*; -import net.minecraft.block.material.Material; -import net.minecraft.item.Item; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.util.IItemProvider; -import net.minecraftforge.common.ToolType; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SlabBlock; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.StairBlock; +import net.minecraft.world.level.block.WallBlock; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.material.Material; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; @@ -31,11 +79,11 @@ import java.util.function.Supplier; public final class ActuallyBlocks { public static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ActuallyAdditions.MODID); - public static final DeferredRegister> TILES = DeferredRegister.create(ForgeRegistries.TILE_ENTITIES, ActuallyAdditions.MODID); + public static final DeferredRegister> TILES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITIES, ActuallyAdditions.MODID); public static final Item.Properties defaultBlockItemProperties = new Item.Properties().tab(ActuallyAdditions.GROUP).stacksTo(64); - public static final AbstractBlock.Properties miscBlockProperties = AbstractBlock.Properties.of(Material.STONE).harvestLevel(1).harvestTool(ToolType.PICKAXE).strength(1.5f, 10f); + public static final BlockBehaviour.Properties miscBlockProperties = BlockBehaviour.Properties.of(Material.STONE).requiresCorrectToolForDrops().strength(1.5f, 10f); // Casings public static final AABlockReg WOOD_CASING = new AABlockReg<>("wood_casing", () -> new ActuallyBlock(miscBlockProperties), ActuallyBlock::createBlockItem); @@ -52,8 +100,8 @@ public final class ActuallyBlocks { public static final AABlockReg ENERGIZER = new AABlockReg<>("energizer", () -> new BlockEnergizer(true), (b) -> new AABlockItem(b, defaultBlockItemProperties), TileEntityEnergizer::new); - public static final AABlockReg ENERVATOR = new AABlockReg<>("enervator", () -> new BlockEnergizer(false), - (b) -> new AABlockItem(b, defaultBlockItemProperties), TileEntityEnergizer::new); + public static final AABlockReg ENERVATOR = new AABlockReg<>("enervator", () -> new BlockEnergizer(false), + (b) -> new AABlockItem(b, defaultBlockItemProperties), TileEntityEnervator::new); public static final AABlockReg LAVA_FACTORY_CONTROLLER = new AABlockReg<>("lava_factory_controller", BlockLavaFactoryController::new, (b) -> new AABlockItem(b, defaultBlockItemProperties), TileEntityLavaFactoryController::new); @@ -224,32 +272,32 @@ public final class ActuallyBlocks { public static final AABlockReg BLACK_QUARTZ_BRICK = new AABlockReg<>("black_quartz_brick_block", () -> new ActuallyBlock(miscBlockProperties), (b) -> new AABlockItem(b, defaultBlockItemProperties)); //Walls - public static final AABlockReg ETHETIC_GREEN_WALL = new AABlockReg<>("ethetic_green_wall", () -> new WallBlock(AbstractBlock.Properties.copy(ETHETIC_GREEN_BLOCK.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg ETHETIC_WHITE_WALL = new AABlockReg<>("ethetic_white_wall", () -> new WallBlock(AbstractBlock.Properties.copy(ETHETIC_WHITE_BLOCK.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg BLACK_QUARTZ_WALL = new AABlockReg<>("black_quartz_wall", () -> new WallBlock(AbstractBlock.Properties.copy(BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg CHISELED_BLACK_QUARTZ_WALL = new AABlockReg<>("chiseled_black_quartz_wall", () -> new WallBlock(AbstractBlock.Properties.copy(CHISELED_BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg SMOOTH_BLACK_QUARTZ_WALL = new AABlockReg<>("smooth_black_quartz_wall", () -> new WallBlock(AbstractBlock.Properties.copy(CHISELED_BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg BLACK_QUARTZ_BRICK_WALL = new AABlockReg<>("black_quartz_brick_wall", () -> new WallBlock(AbstractBlock.Properties.copy(CHISELED_BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg BLACK_QUARTZ_PILLAR_WALL = new AABlockReg<>("black_quartz_pillar_wall", () -> new WallBlock(AbstractBlock.Properties.copy(BLACK_QUARTZ_PILLAR.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg ETHETIC_GREEN_WALL = new AABlockReg<>("ethetic_green_wall", () -> new WallBlock(BlockBehaviour.Properties.copy(ETHETIC_GREEN_BLOCK.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg ETHETIC_WHITE_WALL = new AABlockReg<>("ethetic_white_wall", () -> new WallBlock(BlockBehaviour.Properties.copy(ETHETIC_WHITE_BLOCK.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg BLACK_QUARTZ_WALL = new AABlockReg<>("black_quartz_wall", () -> new WallBlock(BlockBehaviour.Properties.copy(BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg CHISELED_BLACK_QUARTZ_WALL = new AABlockReg<>("chiseled_black_quartz_wall", () -> new WallBlock(BlockBehaviour.Properties.copy(CHISELED_BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg SMOOTH_BLACK_QUARTZ_WALL = new AABlockReg<>("smooth_black_quartz_wall", () -> new WallBlock(BlockBehaviour.Properties.copy(CHISELED_BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg BLACK_QUARTZ_BRICK_WALL = new AABlockReg<>("black_quartz_brick_wall", () -> new WallBlock(BlockBehaviour.Properties.copy(CHISELED_BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg BLACK_QUARTZ_PILLAR_WALL = new AABlockReg<>("black_quartz_pillar_wall", () -> new WallBlock(BlockBehaviour.Properties.copy(BLACK_QUARTZ_PILLAR.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); //Slabs - public static final AABlockReg ETHETIC_GREEN_SLAB = new AABlockReg<>("ethetic_green_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(ETHETIC_GREEN_BLOCK.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg ETHETIC_WHITE_SLAB = new AABlockReg<>("ethetic_white_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(ETHETIC_WHITE_BLOCK.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg BLACK_QUARTZ_SLAB = new AABlockReg<>("black_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg CHISELED_BLACK_QUARTZ_SLAB = new AABlockReg<>("chiseled_black_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(CHISELED_BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg BLACK_QUARTZ_PILLAR_SLAB = new AABlockReg<>("black_quartz_pillar_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(BLACK_QUARTZ_PILLAR.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg SMOOTH_BLACK_QUARTZ_SLAB = new AABlockReg<>("smooth_black_quartz_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(BLACK_QUARTZ_PILLAR.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg BLACK_QUARTZ_BRICK_SLAB = new AABlockReg<>("black_quartz_brick_slab", () -> new SlabBlock(AbstractBlock.Properties.copy(BLACK_QUARTZ_PILLAR.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg ETHETIC_GREEN_SLAB = new AABlockReg<>("ethetic_green_slab", () -> new SlabBlock(BlockBehaviour.Properties.copy(ETHETIC_GREEN_BLOCK.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg ETHETIC_WHITE_SLAB = new AABlockReg<>("ethetic_white_slab", () -> new SlabBlock(BlockBehaviour.Properties.copy(ETHETIC_WHITE_BLOCK.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg BLACK_QUARTZ_SLAB = new AABlockReg<>("black_quartz_slab", () -> new SlabBlock(BlockBehaviour.Properties.copy(BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg CHISELED_BLACK_QUARTZ_SLAB = new AABlockReg<>("chiseled_black_quartz_slab", () -> new SlabBlock(BlockBehaviour.Properties.copy(CHISELED_BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg BLACK_QUARTZ_PILLAR_SLAB = new AABlockReg<>("black_quartz_pillar_slab", () -> new SlabBlock(BlockBehaviour.Properties.copy(BLACK_QUARTZ_PILLAR.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg SMOOTH_BLACK_QUARTZ_SLAB = new AABlockReg<>("smooth_black_quartz_slab", () -> new SlabBlock(BlockBehaviour.Properties.copy(BLACK_QUARTZ_PILLAR.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg BLACK_QUARTZ_BRICK_SLAB = new AABlockReg<>("black_quartz_brick_slab", () -> new SlabBlock(BlockBehaviour.Properties.copy(BLACK_QUARTZ_PILLAR.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); //Stairs - public static final AABlockReg ETHETIC_GREEN_STAIRS = new AABlockReg<>("ethetic_green_stairs", () -> new StairsBlock(() -> ETHETIC_GREEN_BLOCK.get().defaultBlockState(), AbstractBlock.Properties.copy(ETHETIC_GREEN_BLOCK.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg ETHETIC_WHITE_STAIRS = new AABlockReg<>("ethetic_white_stairs", () -> new StairsBlock(() -> ETHETIC_WHITE_BLOCK.get().defaultBlockState(), AbstractBlock.Properties.copy(ETHETIC_WHITE_BLOCK.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg BLACK_QUARTZ_STAIR = new AABlockReg<>("black_quartz_stair", () -> new StairsBlock(() -> BLACK_QUARTZ.get().defaultBlockState(), AbstractBlock.Properties.copy(BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg CHISELED_BLACK_QUARTZ_STAIR = new AABlockReg<>("chiseled_black_quartz_stair", () -> new StairsBlock(() -> CHISELED_BLACK_QUARTZ.get().defaultBlockState(), AbstractBlock.Properties.copy(CHISELED_BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg BLACK_QUARTZ_PILLAR_STAIR = new AABlockReg<>("black_quartz_pillar_stair", () -> new StairsBlock(() -> BLACK_QUARTZ_PILLAR.get().defaultBlockState(), AbstractBlock.Properties.copy(BLACK_QUARTZ_PILLAR.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg SMOOTH_BLACK_QUARTZ_STAIR = new AABlockReg<>("smooth_black_quartz_stair", () -> new StairsBlock(() -> BLACK_QUARTZ_PILLAR.get().defaultBlockState(), AbstractBlock.Properties.copy(BLACK_QUARTZ_PILLAR.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static final AABlockReg BLACK_QUARTZ_BRICK_STAIR = new AABlockReg<>("black_quartz_brick_stair", () -> new StairsBlock(() -> BLACK_QUARTZ_PILLAR.get().defaultBlockState(), AbstractBlock.Properties.copy(BLACK_QUARTZ_PILLAR.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg ETHETIC_GREEN_STAIRS = new AABlockReg<>("ethetic_green_stairs", () -> new StairBlock(() -> ETHETIC_GREEN_BLOCK.get().defaultBlockState(), BlockBehaviour.Properties.copy(ETHETIC_GREEN_BLOCK.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg ETHETIC_WHITE_STAIRS = new AABlockReg<>("ethetic_white_stairs", () -> new StairBlock(() -> ETHETIC_WHITE_BLOCK.get().defaultBlockState(), BlockBehaviour.Properties.copy(ETHETIC_WHITE_BLOCK.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg BLACK_QUARTZ_STAIR = new AABlockReg<>("black_quartz_stair", () -> new StairBlock(() -> BLACK_QUARTZ.get().defaultBlockState(), BlockBehaviour.Properties.copy(BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg CHISELED_BLACK_QUARTZ_STAIR = new AABlockReg<>("chiseled_black_quartz_stair", () -> new StairBlock(() -> CHISELED_BLACK_QUARTZ.get().defaultBlockState(), BlockBehaviour.Properties.copy(CHISELED_BLACK_QUARTZ.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg BLACK_QUARTZ_PILLAR_STAIR = new AABlockReg<>("black_quartz_pillar_stair", () -> new StairBlock(() -> BLACK_QUARTZ_PILLAR.get().defaultBlockState(), BlockBehaviour.Properties.copy(BLACK_QUARTZ_PILLAR.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg SMOOTH_BLACK_QUARTZ_STAIR = new AABlockReg<>("smooth_black_quartz_stair", () -> new StairBlock(() -> BLACK_QUARTZ_PILLAR.get().defaultBlockState(), BlockBehaviour.Properties.copy(BLACK_QUARTZ_PILLAR.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); + public static final AABlockReg BLACK_QUARTZ_BRICK_STAIR = new AABlockReg<>("black_quartz_brick_stair", () -> new StairBlock(() -> BLACK_QUARTZ_PILLAR.get().defaultBlockState(), BlockBehaviour.Properties.copy(BLACK_QUARTZ_PILLAR.get())), (b) -> new AABlockItem(b, defaultBlockItemProperties)); @@ -267,16 +315,16 @@ public final class ActuallyBlocks { public static final AABlockReg GREENHOUSE_GLASS = new AABlockReg<>("greenhouse_glass", BlockGreenhouseGlass::new, (b) -> new AABlockItem(b, defaultBlockItemProperties)); - public static AbstractBlock.Properties defaultPickProps(int harvestLevel, float hardness, float resistance) { - return AbstractBlock.Properties.of(Material.STONE).harvestLevel(harvestLevel).harvestTool(ToolType.PICKAXE).strength(hardness, resistance).sound(SoundType.STONE); + public static BlockBehaviour.Properties defaultPickProps(float hardness, float resistance) { + return BlockBehaviour.Properties.of(Material.STONE).requiresCorrectToolForDrops().strength(hardness, resistance).sound(SoundType.STONE); } - public static AbstractBlock.Properties defaultPickProps(int harvestLevel) { - return AbstractBlock.Properties.of(Material.STONE).harvestLevel(harvestLevel).harvestTool(ToolType.PICKAXE).strength(1.5F, 10.0F).sound(SoundType.STONE); + public static BlockBehaviour.Properties defaultPickProps() { + return BlockBehaviour.Properties.of(Material.STONE).requiresCorrectToolForDrops().strength(1.5F, 10.0F).sound(SoundType.STONE); } - public static AbstractBlock.Properties defaultCropProps() { - return AbstractBlock.Properties.of(Material.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.CROP); + public static BlockBehaviour.Properties defaultCropProps() { + return BlockBehaviour.Properties.of(Material.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.CROP); } public static void init(IEventBus evt) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index 2cdf0c8d0..e51595fd6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -10,41 +10,35 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.platform.Window; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.api.lens.ILensItem; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.FullyDirectionalBlock; -import de.ellpeck.actuallyadditions.mod.config.CommonConfig; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import de.ellpeck.actuallyadditions.mod.util.Lang; -import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.client.MainWindow; +import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; -import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.state.DirectionProperty; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.MathHelper; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.util.Mth; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -61,14 +55,14 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im public static final int NAME_FLAVOR_AMOUNTS_2 = 14; public BlockAtomicReconstructor() { - super(ActuallyBlocks.defaultPickProps(0, 10.0F, 80F)); + super(ActuallyBlocks.defaultPickProps(10.0F, 80F)); } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { ItemStack heldItem = player.getItemInHand(hand); if (this.tryToggleRedstone(world, pos, player)) { - return ActionResultType.CONSUME; + return InteractionResult.CONSUME; } if (!world.isClientSide) { TileEntityAtomicReconstructor reconstructor = (TileEntityAtomicReconstructor) world.getBlockEntity(pos); @@ -82,52 +76,53 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im if (!player.isCreative()) { heldItem.shrink(1); } - return ActionResultType.CONSUME; + return InteractionResult.CONSUME; } } else { ItemStack slot = reconstructor.inv.getStackInSlot(0); - if (!slot.isEmpty() && hand == Hand.MAIN_HAND) { + if (!slot.isEmpty() && hand == InteractionHand.MAIN_HAND) { player.setItemInHand(hand, slot.copy()); reconstructor.inv.setStackInSlot(0, ItemStack.EMPTY); - return ActionResultType.CONSUME; + return InteractionResult.CONSUME; } } } - return ActionResultType.FAIL; + return InteractionResult.FAIL; } - return ActionResultType.CONSUME; + return InteractionResult.CONSUME; } @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return new TileEntityAtomicReconstructor(); + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityAtomicReconstructor(pos, state); } + @Nullable @Override - public boolean hasTileEntity(BlockState state) { - return true; + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityAtomicReconstructor::clientTick : TileEntityAtomicReconstructor::serverTick; } @Override @OnlyIn(Dist.CLIENT) - public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) { - if (!(rayCast instanceof BlockRayTraceResult) || minecraft.level == null) { + public void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { + if (!(rayCast instanceof BlockHitResult) || minecraft.level == null) { return; } - TileEntity tile = minecraft.level.getBlockEntity(((BlockRayTraceResult) rayCast).getBlockPos()); + BlockEntity tile = minecraft.level.getBlockEntity(((BlockHitResult) rayCast).getBlockPos()); if (tile instanceof TileEntityAtomicReconstructor) { ItemStack slot = ((TileEntityAtomicReconstructor) tile).inv.getStackInSlot(0); - ITextComponent lens_name; + Component lens_name; if (slot.isEmpty()) { - lens_name = new TranslationTextComponent("info.actuallyadditions.nolens"); + lens_name = new TranslatableComponent("info.actuallyadditions.nolens"); } else { lens_name = slot.getItem().getName(slot); AssetUtil.renderStackToGui(slot, resolution.getGuiScaledWidth() / 2 + 15, resolution.getGuiScaledHeight() / 2 - 19, 1F); } - minecraft.font.drawShadow(matrices, lens_name.plainCopy().withStyle(TextFormatting.YELLOW).withStyle(TextFormatting.ITALIC).getString(), resolution.getGuiScaledWidth() / 2.0f + 35, resolution.getGuiScaledHeight() / 2.0f - 15, 0xFFFFFF); + minecraft.font.drawShadow(matrices, lens_name.plainCopy().withStyle(ChatFormatting.YELLOW).withStyle(ChatFormatting.ITALIC).getString(), resolution.getGuiScaledWidth() / 2.0f + 35, resolution.getGuiScaledHeight() / 2.0f - 15, 0xFFFFFF); } } @@ -145,7 +140,7 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im @OnlyIn(Dist.CLIENT) @Override - public void appendHoverText(@Nonnull ItemStack pStack, @Nullable World pLevel, @Nonnull List pTooltip, @Nonnull ITooltipFlag pFlag) { + public void appendHoverText(@Nonnull ItemStack pStack, @Nullable Level pLevel, @Nonnull List pTooltip, @Nonnull TooltipFlag pFlag) { super.appendHoverText(pStack, pLevel, pTooltip, pFlag); long sysTime = System.currentTimeMillis(); @@ -160,26 +155,26 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im } String base = block.getDescriptionId() + ".info."; - pTooltip.add(new TranslationTextComponent(base + "1." + this.toPick1).append(" ").append(new TranslationTextComponent(base + "2." + this.toPick2)).withStyle(s -> s.withColor(TextFormatting.GRAY))); + pTooltip.add(new TranslatableComponent(base + "1." + this.toPick1).append(" ").append(new TranslatableComponent(base + "2." + this.toPick2)).withStyle(s -> s.withColor(ChatFormatting.GRAY))); if (pStack.hasTag() && pStack.getTag().contains("BlockEntityTag")) { - CompoundNBT BET = pStack.getTag().getCompound("BlockEntityTag"); + CompoundTag BET = pStack.getTag().getCompound("BlockEntityTag"); int energy = 0; if (BET.contains("Energy")) { energy = BET.getInt("Energy"); } NumberFormat format = NumberFormat.getInstance(); - pTooltip.add(new TranslationTextComponent("misc.actuallyadditions.power_single", format.format(energy))); + pTooltip.add(new TranslatableComponent("misc.actuallyadditions.power_single", format.format(energy))); if (BET.contains("IsPulseMode")) { - pTooltip.add(new TranslationTextComponent("info.actuallyadditions.redstoneMode").append(": ") - .append(new TranslationTextComponent(BET.getBoolean("IsPulseMode")?"info.actuallyadditions.redstoneMode.pulse":"info.actuallyadditions.redstoneMode.deactivation").withStyle($ -> $.withColor(TextFormatting.RED)))); + pTooltip.add(new TranslatableComponent("info.actuallyadditions.redstoneMode").append(": ") + .append(new TranslatableComponent(BET.getBoolean("IsPulseMode")?"info.actuallyadditions.redstoneMode.pulse":"info.actuallyadditions.redstoneMode.deactivation").withStyle($ -> $.withColor(ChatFormatting.RED)))); } } } @Override - protected boolean updateCustomBlockEntityTag(BlockPos pPos, World pLevel, @Nullable PlayerEntity pPlayer, ItemStack pStack, BlockState pState) { + protected boolean updateCustomBlockEntityTag(BlockPos pPos, Level pLevel, @Nullable Player pPlayer, ItemStack pStack, BlockState pState) { boolean ret = super.updateCustomBlockEntityTag(pPos, pLevel, pPlayer, pStack, pState); @@ -194,12 +189,12 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im } @Override - public int getAnalogOutputSignal(BlockState blockState, World world, BlockPos pos) { - TileEntity t = world.getBlockEntity(pos); + public int getAnalogOutputSignal(BlockState blockState, Level world, BlockPos pos) { + BlockEntity t = world.getBlockEntity(pos); int i = 0; if (t instanceof TileEntityAtomicReconstructor) { i = ((TileEntityAtomicReconstructor) t).getEnergy(); } - return MathHelper.clamp(i / 20000, 0, 15); + return Mth.clamp(i / 20000, 0, 15); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBatteryBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBatteryBox.java index 71c0f9799..49526030b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBatteryBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBatteryBox.java @@ -13,27 +13,27 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.items.ItemBattery; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBatteryBox; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; -import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import javax.annotation.Nullable; public class BlockBatteryBox extends BlockContainerBase { public BlockBatteryBox() { - super(ActuallyBlocks.defaultPickProps(0)); + super(ActuallyBlocks.defaultPickProps()); } // @Override @@ -41,24 +41,25 @@ public class BlockBatteryBox extends BlockContainerBase { // return BlockSlabs.AABB_BOTTOM_HALF; // } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.BATBOX_SHAPE; - } - - @Override - public boolean hasTileEntity(BlockState state) { - return true; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.BATBOX_SHAPE; } @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return new TileEntityBatteryBox(); + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityBatteryBox(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityBatteryBox::clientTick : TileEntityBatteryBox::serverTick; } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { - TileEntity tile = world.getBlockEntity(pos); + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityBatteryBox) { TileEntityBatteryBox box = (TileEntityBatteryBox) tile; ItemStack stack = player.getItemInHand(hand); @@ -67,17 +68,17 @@ public class BlockBatteryBox extends BlockContainerBase { if (stack.getItem() instanceof ItemBattery && box.inv.getStackInSlot(0).isEmpty()) { box.inv.setStackInSlot(0, stack.copy()); player.setItemInHand(hand, ItemStack.EMPTY); - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } } else { ItemStack inSlot = box.inv.getStackInSlot(0); if (!inSlot.isEmpty()) { player.setItemInHand(hand, inSlot.copy()); box.inv.setStackInSlot(0, ItemStack.EMPTY); - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } } } - return ActionResultType.PASS; + return InteractionResult.PASS; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBioReactor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBioReactor.java index 9b1a9df8e..b56a7216d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBioReactor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBioReactor.java @@ -12,29 +12,39 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; + +import javax.annotation.Nullable; public class BlockBioReactor extends BlockContainerBase { public BlockBioReactor() { - super(ActuallyBlocks.defaultPickProps(0, 2.0F, 10.0F)); + super(ActuallyBlocks.defaultPickProps(2.0F, 10.0F)); } - //@Override - public TileEntity newBlockEntity(IBlockReader worldIn) { - return new TileEntityBioReactor(); + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityBioReactor(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityBioReactor::clientTick : TileEntityBioReactor::serverTick; } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { return this.openGui(world, player, pos, TileEntityBioReactor.class); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java index 3b461ad32..73fd0a458 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBreaker.java @@ -13,15 +13,16 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.FullyDirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlacer; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; import javax.annotation.Nullable; @@ -30,27 +31,30 @@ public class BlockBreaker extends FullyDirectionalBlock.Container { private final boolean isPlacer; public BlockBreaker(boolean isPlacer) { - super(ActuallyBlocks.defaultPickProps(0)); + super(ActuallyBlocks.defaultPickProps()); this.isPlacer = isPlacer; } - @Override - public boolean hasTileEntity(BlockState state) { - return true; - } - @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { return this.isPlacer - ? new TileEntityPlacer() - : new TileEntityBreaker(); + ? new TileEntityPlacer(pos, state) + : new TileEntityBreaker(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return this.isPlacer + ? level.isClientSide? TileEntityPlacer::clientTick : TileEntityPlacer::serverTick + : level.isClientSide? TileEntityBreaker::clientTick : TileEntityBreaker::serverTick; } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { if (this.tryToggleRedstone(world, pos, player)) { - return ActionResultType.CONSUME; + return InteractionResult.CONSUME; } return this.openGui(world, player, pos, TileEntityBreaker.class); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java index 89c3803c7..7a42fd0f8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java @@ -12,27 +12,29 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.fluids.FluidUtil; -import net.minecraftforge.fml.network.NetworkHooks; +import net.minecraftforge.network.NetworkHooks; import javax.annotation.Nullable; public class BlockCanolaPress extends BlockContainerBase { public BlockCanolaPress() { - super(ActuallyBlocks.defaultPickProps(0)); + super(ActuallyBlocks.defaultPickProps()); } // @Override @@ -42,32 +44,33 @@ public class BlockCanolaPress extends BlockContainerBase { @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return new TileEntityCanolaPress(); + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityCanolaPress(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityCanolaPress::clientTick : TileEntityCanolaPress::serverTick; } @Override - public boolean hasTileEntity(BlockState state) { - return true; - } - - @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { TileEntityCanolaPress tile = (TileEntityCanolaPress) world.getBlockEntity(pos); if (tile == null) - return ActionResultType.PASS; //TODO this logic all needs to be rechecked... + return InteractionResult.PASS; //TODO this logic all needs to be rechecked... if (world.isClientSide) - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; if (!player.isShiftKeyDown()) { if (!FluidUtil.interactWithFluidHandler(player, hand, tile.tank)) - NetworkHooks.openGui((ServerPlayerEntity) player, tile, pos); - return ActionResultType.SUCCESS; + NetworkHooks.openGui((ServerPlayer) player, tile, pos); + return InteractionResult.SUCCESS; } - return ActionResultType.PASS; + return InteractionResult.PASS; } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.CANOLA_PRESS_SHAPE; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.CANOLA_PRESS_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java index bad352fb5..6f3fdd0f1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java @@ -12,42 +12,45 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.particles.ParticleTypes; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import javax.annotation.Nullable; import java.util.Random; public class BlockCoalGenerator extends DirectionalBlock.Container { public BlockCoalGenerator() { - super(ActuallyBlocks.defaultPickProps(0).randomTicks()); - } - - @Override - public boolean hasTileEntity(BlockState state) { - return true; + super(ActuallyBlocks.defaultPickProps().randomTicks()); } @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return new TileEntityCoalGenerator(); + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityCoalGenerator(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityCoalGenerator::clientTick : TileEntityCoalGenerator::serverTick; } @Override - public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { - TileEntity tile = world.getBlockEntity(pos); + public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) { + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityCoalGenerator) { if (((TileEntityCoalGenerator) tile).currentBurnTime > 0) { for (int i = 0; i < 5; i++) { @@ -58,21 +61,21 @@ public class BlockCoalGenerator extends DirectionalBlock.Container { } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { return this.openGui(world, player, pos, TileEntityCoalGenerator.class); } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case EAST: - return Shapes.CoalGeneratorShapes.EAST; + return VoxelShapes.CoalGeneratorShapes.EAST; case SOUTH: - return Shapes.CoalGeneratorShapes.SOUTH; + return VoxelShapes.CoalGeneratorShapes.SOUTH; case WEST: - return Shapes.CoalGeneratorShapes.WEST; + return VoxelShapes.CoalGeneratorShapes.WEST; default: - return Shapes.CoalGeneratorShapes.NORTH; + return VoxelShapes.CoalGeneratorShapes.NORTH; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java index 2aabe5aab..9670004c0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java @@ -12,63 +12,66 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; -import net.minecraftforge.fml.network.NetworkHooks; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; +import net.minecraftforge.network.NetworkHooks; import javax.annotation.Nullable; public class BlockCoffeeMachine extends DirectionalBlock.Container { public BlockCoffeeMachine() { - super(ActuallyBlocks.defaultPickProps(0)); + super(ActuallyBlocks.defaultPickProps()); } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { if (!world.isClientSide) { TileEntityCoffeeMachine tile = (TileEntityCoffeeMachine) world.getBlockEntity(pos); if (tile != null) { if (!this.tryUseItemOnTank(player, hand, tile.tank)) { - NetworkHooks.openGui((ServerPlayerEntity) player, tile, pos); + NetworkHooks.openGui((ServerPlayer) player, tile, pos); } } - return ActionResultType.PASS; + return InteractionResult.PASS; } return super.use(state, world, pos, player, hand, hit); } + @Nullable @Override - public boolean hasTileEntity(BlockState state) { - return true; + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityCoffeeMachine(pos, state); } @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return new TileEntityCoffeeMachine(); + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityCoffeeMachine::clientTick : TileEntityCoffeeMachine::serverTick; } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case EAST: - return Shapes.CoffeeMachineShapes.EAST; + return VoxelShapes.CoffeeMachineShapes.EAST; case SOUTH: - return Shapes.CoffeeMachineShapes.SOUTH; + return VoxelShapes.CoffeeMachineShapes.SOUTH; case WEST: - return Shapes.CoffeeMachineShapes.WEST; + return VoxelShapes.CoffeeMachineShapes.WEST; default: - return Shapes.CoffeeMachineShapes.NORTH; + return VoxelShapes.CoffeeMachineShapes.NORTH; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java index dd23482bb..60e4071a2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java @@ -12,30 +12,26 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.DyeColor; -import net.minecraft.item.DyeItem; -import net.minecraft.item.ItemStack; -import net.minecraft.state.BooleanProperty; -import net.minecraft.state.StateContainer; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; -import net.minecraftforge.common.ToolType; -import net.minecraftforge.common.util.Constants; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.DyeItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.BooleanProperty; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.phys.BlockHitResult; import java.util.HashMap; import java.util.function.Supplier; -import net.minecraft.block.AbstractBlock.Properties; - public class BlockColoredLamp extends BlockBase { private static final HashMap> COLOR_TO_LAMP = new HashMap>() {{ this.put(DyeColor.WHITE, ActuallyBlocks.LAMP_WHITE); @@ -59,35 +55,35 @@ public class BlockColoredLamp extends BlockBase { private static final BooleanProperty LIT = BlockStateProperties.LIT; public BlockColoredLamp() { - super(Properties.of(Material.BUILDABLE_GLASS).strength(0.5F, 3.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0)); + super(Properties.of(Material.BUILDABLE_GLASS).strength(0.5F, 3.0F).requiresCorrectToolForDrops()); this.registerDefaultState(this.stateDefinition.any().setValue(LIT, false)); } @Override - protected void createBlockStateDefinition(StateContainer.Builder builder) { + protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(LIT); } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { ItemStack stack = player.getItemInHand(hand); //Turning On - if (hand == Hand.MAIN_HAND && stack.isEmpty()) { - world.setBlock(pos, this.defaultBlockState().setValue(LIT, !state.getValue(LIT)), Constants.BlockFlags.NO_RERENDER); - return ActionResultType.PASS; + if (hand == InteractionHand.MAIN_HAND && stack.isEmpty()) { + world.setBlock(pos, this.defaultBlockState().setValue(LIT, !state.getValue(LIT)), Block.UPDATE_INVISIBLE); + return InteractionResult.PASS; } if (StackUtil.isValid(stack) && stack.getItem() instanceof DyeItem) { DyeColor color = DyeColor.getColor(stack); if (color == null) { - return ActionResultType.FAIL; + return InteractionResult.FAIL; } Block newColor = COLOR_TO_LAMP.get(color).get(); if (!world.isClientSide) { world.setBlock(pos, newColor.defaultBlockState().setValue(LIT, state.getValue(LIT)), 2); if (!player.isCreative()) { - player.inventory.removeItem(player.inventory.selected, 1); + player.getInventory().removeItem(player.getInventory().selected, 1); } } } @@ -95,7 +91,7 @@ public class BlockColoredLamp extends BlockBase { } @Override - public int getLightValue(BlockState state, IBlockReader world, BlockPos pos) { + public int getLightEmission(BlockState state, BlockGetter level, BlockPos pos) { return state.getValue(LIT) ? 15 : 0; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrusher.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrusher.java index 26a237e59..5b252bada 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrusher.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrusher.java @@ -10,58 +10,63 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import static net.minecraft.state.properties.BlockStateProperties.HORIZONTAL_FACING; -import static net.minecraft.state.properties.BlockStateProperties.LIT; - import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCrusher; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCrusherDouble; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.BlockItemUseContext; -import net.minecraft.particles.ParticleTypes; -import net.minecraft.state.StateContainer; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Direction; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import javax.annotation.Nullable; import java.util.Random; +import static net.minecraft.world.level.block.state.properties.BlockStateProperties.HORIZONTAL_FACING; +import static net.minecraft.world.level.block.state.properties.BlockStateProperties.LIT; + public class BlockCrusher extends BlockContainerBase { private final boolean isDouble; public BlockCrusher(boolean isDouble) { - super(ActuallyBlocks.defaultPickProps(0).randomTicks()); + super(ActuallyBlocks.defaultPickProps().randomTicks()); this.isDouble = isDouble; this.registerDefaultState(getStateDefinition().any().setValue(HORIZONTAL_FACING, Direction.NORTH).setValue(LIT, false)); } @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { return this.isDouble - ? new TileEntityCrusherDouble() - : new TileEntityCrusher(); + ? new TileEntityCrusherDouble(pos, state) + : new TileEntityCrusher(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return this.isDouble + ? level.isClientSide? TileEntityCrusherDouble::clientTick : TileEntityCrusherDouble::serverTick + : level.isClientSide? TileEntityCrusher::clientTick : TileEntityCrusher::serverTick; } @Override - public boolean hasTileEntity(BlockState state) { - return true; - } - - @Override - public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) { + public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random rand) { if (state.getValue(BlockStateProperties.LIT)) { for (int i = 0; i < 5; i++) { double xRand = rand.nextDouble() / 0.75D - 0.5D; @@ -73,7 +78,7 @@ public class BlockCrusher extends BlockContainerBase { } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { if (this.isDouble) { return this.openGui(world, player, pos, TileEntityCrusherDouble.class); } @@ -82,33 +87,33 @@ public class BlockCrusher extends BlockContainerBase { } @Override - public BlockState getStateForPlacement(BlockItemUseContext context) { + public BlockState getStateForPlacement(BlockPlaceContext context) { return defaultBlockState().setValue(HORIZONTAL_FACING, context.getHorizontalDirection().getOpposite()).setValue(LIT, false); } @Override - protected void createBlockStateDefinition(StateContainer.Builder builder) { + protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(LIT).add(HORIZONTAL_FACING); } @Override - public int getLightValue(BlockState state, IBlockReader world, BlockPos pos) { + public int getLightEmission(BlockState state, BlockGetter level, BlockPos pos) { return state.getValue(LIT) - ? 12 - : 0; + ? 12 + : 0; } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(HORIZONTAL_FACING)) { case EAST: - return Shapes.GrinderShapes.SHAPE_E; + return VoxelShapes.GrinderShapes.SHAPE_E; case SOUTH: - return Shapes.GrinderShapes.SHAPE_S; + return VoxelShapes.GrinderShapes.SHAPE_S; case WEST: - return Shapes.GrinderShapes.SHAPE_W; + return VoxelShapes.GrinderShapes.SHAPE_W; default: - return Shapes.GrinderShapes.SHAPE_N; + return VoxelShapes.GrinderShapes.SHAPE_N; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java index 781a0b544..c4f84daa9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrystal.java @@ -10,13 +10,13 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import net.minecraft.item.ItemStack; +import net.minecraft.world.item.ItemStack; public class BlockCrystal extends ActuallyBlock { private final boolean isEmpowered; public BlockCrystal(boolean isEmpowered) { - super(ActuallyBlocks.defaultPickProps(1)); + super(ActuallyBlocks.defaultPickProps()); this.isEmpowered = isEmpowered; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDisplayStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDisplayStand.java index f84103db9..e3ede242a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDisplayStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDisplayStand.java @@ -16,88 +16,93 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityEmpowerer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityInventoryBase; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import javax.annotation.Nullable; public class BlockDisplayStand extends BlockContainerBase { - public BlockDisplayStand(boolean empowerer) { - super(ActuallyBlocks.defaultPickProps(0)); - isEmpowerer = empowerer; - } + public BlockDisplayStand(boolean empowerer) { + super(ActuallyBlocks.defaultPickProps()); + isEmpowerer = empowerer; + } - private final boolean isEmpowerer; + private final boolean isEmpowerer; - public boolean isEmpowerer() { - return this.isEmpowerer; - } + public boolean isEmpowerer() { + return this.isEmpowerer; + } - @Nullable - @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return isEmpowerer? new TileEntityEmpowerer(): new TileEntityDisplayStand(); - } + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return isEmpowerer ? new TileEntityEmpowerer(pos, state) : new TileEntityDisplayStand(pos, state); + } - @Override - public boolean hasTileEntity(BlockState state) { - return true; - } + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return this.isEmpowerer + ? level.isClientSide? TileEntityEmpowerer::clientTick : TileEntityEmpowerer::serverTick + : level.isClientSide? TileEntityDisplayStand::clientTick : TileEntityDisplayStand::serverTick; + } - @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { - ItemStack heldItem = player.getItemInHand(hand); - if (!world.isClientSide) { - TileEntityInventoryBase stand = (TileEntityInventoryBase) world.getBlockEntity(pos); - if (stand != null) { - ItemStack stackThere = stand.inv.getStackInSlot(0); - if (!heldItem.isEmpty()) { - if (stackThere.isEmpty() && (!isEmpowerer || TileEntityEmpowerer.isPossibleInput(heldItem))) { - ItemStack toPut = heldItem.copy(); - toPut.setCount(1); - stand.inv.setStackInSlot(0, toPut); - if (!player.isCreative()) { - heldItem.shrink(1); - } - return ActionResultType.CONSUME; - } else if (ItemUtil.canBeStacked(heldItem, stackThere)) { - int maxTransfer = Math.min(stackThere.getCount(), heldItem.getMaxStackSize() - heldItem.getCount()); - if (maxTransfer > 0) { - if (!player.isCreative()) - player.setItemInHand(hand, StackUtil.grow(heldItem, maxTransfer)); - ItemStack newStackThere = stackThere.copy(); - newStackThere.shrink(maxTransfer); - stand.inv.setStackInSlot(0, newStackThere); - return ActionResultType.CONSUME; - } - } - } else { - if (!stackThere.isEmpty() && hand == Hand.MAIN_HAND) { - player.setItemInHand(hand, stackThere.copy()); - stand.inv.setStackInSlot(0, ItemStack.EMPTY); - return ActionResultType.CONSUME; - } - } - } - return ActionResultType.FAIL; - } + @Override + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { + ItemStack heldItem = player.getItemInHand(hand); + if (!world.isClientSide) { + TileEntityInventoryBase stand = (TileEntityInventoryBase) world.getBlockEntity(pos); + if (stand != null) { + ItemStack stackThere = stand.inv.getStackInSlot(0); + if (!heldItem.isEmpty()) { + if (stackThere.isEmpty() && (!isEmpowerer || TileEntityEmpowerer.isPossibleInput(heldItem))) { + ItemStack toPut = heldItem.copy(); + toPut.setCount(1); + stand.inv.setStackInSlot(0, toPut); + if (!player.isCreative()) { + heldItem.shrink(1); + } + return InteractionResult.CONSUME; + } else if (ItemUtil.canBeStacked(heldItem, stackThere)) { + int maxTransfer = Math.min(stackThere.getCount(), heldItem.getMaxStackSize() - heldItem.getCount()); + if (maxTransfer > 0) { + if (!player.isCreative()) + player.setItemInHand(hand, StackUtil.grow(heldItem, maxTransfer)); + ItemStack newStackThere = stackThere.copy(); + newStackThere.shrink(maxTransfer); + stand.inv.setStackInSlot(0, newStackThere); + return InteractionResult.CONSUME; + } + } + } else { + if (!stackThere.isEmpty() && hand == InteractionHand.MAIN_HAND) { + player.setItemInHand(hand, stackThere.copy()); + stand.inv.setStackInSlot(0, ItemStack.EMPTY); + return InteractionResult.CONSUME; + } + } + } + return InteractionResult.FAIL; + } - return ActionResultType.CONSUME; - } + return InteractionResult.CONSUME; + } - @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.DISPLAY_STAND_SHAPE; - } + @Override + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.DISPLAY_STAND_SHAPE; + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java index 97e139f36..0d01777d1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockDropper.java @@ -12,39 +12,41 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.FullyDirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; import javax.annotation.Nullable; public class BlockDropper extends FullyDirectionalBlock.Container { public BlockDropper() { - super(ActuallyBlocks.defaultPickProps(0)); - } - - @Override - public boolean hasTileEntity(BlockState state) { - return true; + super(ActuallyBlocks.defaultPickProps()); } @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return new TileEntityDropper(); + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityDropper(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityDropper::clientTick : TileEntityDropper::serverTick; } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { if (this.tryToggleRedstone(world, pos, player)) { - return ActionResultType.CONSUME; + return InteractionResult.CONSUME; } return this.openGui(world, player, pos, TileEntityDropper.class); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java index 7af361da8..e477ce66e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockEnergizer.java @@ -13,35 +13,48 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; public class BlockEnergizer extends BlockContainerBase { private final boolean isEnergizer; public BlockEnergizer(boolean isEnergizer) { - super(ActuallyBlocks.defaultPickProps(0, 2.0F, 10.0F)); + super(ActuallyBlocks.defaultPickProps(2.0F, 10.0F)); this.isEnergizer = isEnergizer; } - //@Override - public TileEntity newBlockEntity(IBlockReader worldIn) { + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { return this.isEnergizer - ? new TileEntityEnergizer() - : new TileEntityEnervator(); + ? new TileEntityEnergizer(pos, state) + : new TileEntityEnervator(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return this.isEnergizer + ? level.isClientSide? TileEntityEnergizer::clientTick : TileEntityEnergizer::serverTick + : level.isClientSide? TileEntityEnervator::clientTick : TileEntityEnervator::serverTick; } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { if (this.isEnergizer) { return this.openGui(world, player, pos, TileEntityEnergizer.class); } else { @@ -50,7 +63,7 @@ public class BlockEnergizer extends BlockContainerBase { } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.ENERGIZER_SHAPE; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.ENERGIZER_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFarmer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFarmer.java index 6e3be812d..c7ea799a5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFarmer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFarmer.java @@ -11,55 +11,57 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import javax.annotation.Nullable; public class BlockFarmer extends DirectionalBlock.Container { public BlockFarmer() { - super(ActuallyBlocks.defaultPickProps(0)); + super(ActuallyBlocks.defaultPickProps()); } @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return new TileEntityFarmer(); + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityFarmer(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityFarmer::clientTick : TileEntityFarmer::serverTick; } @Override - public boolean hasTileEntity(BlockState state) { - return true; - } - - @Override - public ActionResultType use(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { return this.openGui(worldIn, player, pos, TileEntityFarmer.class); } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case EAST: - return Shapes.FarmerShapes.SHAPE_E; + return VoxelShapes.FarmerShapes.SHAPE_E; case SOUTH: - return Shapes.FarmerShapes.SHAPE_S; + return VoxelShapes.FarmerShapes.SHAPE_S; case WEST: - return Shapes.FarmerShapes.SHAPE_W; + return VoxelShapes.FarmerShapes.SHAPE_W; default: - return Shapes.FarmerShapes.SHAPE_N; + return VoxelShapes.FarmerShapes.SHAPE_N; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java index 4357cea88..9d98e8e4f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFeeder.java @@ -12,36 +12,47 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; public class BlockFeeder extends BlockContainerBase { public BlockFeeder() { - super(ActuallyBlocks.defaultPickProps(0, 0.5F, 6.0F)); + super(ActuallyBlocks.defaultPickProps(0.5F, 6.0F)); } - //@Override - public TileEntity newBlockEntity(IBlockReader worldIn) { - return new TileEntityFeeder(); + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityFeeder(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityFeeder::clientTick : TileEntityFeeder::serverTick; } @Override - public ActionResultType use(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { return this.openGui(worldIn, player, pos, TileEntityFeeder.class); } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.FEEDER_SHAPE; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.FEEDER_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java index bdc5f2c0c..62ca5e63f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java @@ -11,69 +11,70 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel; -import net.minecraft.block.BlockState; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.SoundEvents; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; -import net.minecraftforge.common.ToolType; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.fluids.FluidUtil; -import net.minecraftforge.fml.network.NetworkHooks; +import net.minecraftforge.network.NetworkHooks; import javax.annotation.Nullable; public class BlockFermentingBarrel extends BlockContainerBase { public BlockFermentingBarrel() { - super(Properties.of(Material.WOOD).harvestTool(ToolType.AXE).harvestLevel(0).strength(0.5F, 5.0F).sound(SoundType.WOOD)); + super(Properties.of(Material.WOOD).requiresCorrectToolForDrops().strength(0.5F, 5.0F).sound(SoundType.WOOD)); } @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return new TileEntityFermentingBarrel(); + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityFermentingBarrel(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityFermentingBarrel::clientTick : TileEntityFermentingBarrel::serverTick; } @Override - public boolean hasTileEntity(BlockState state) { - return true; - } - - @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { TileEntityFermentingBarrel tile = (TileEntityFermentingBarrel) world.getBlockEntity(pos); if (tile == null) - return ActionResultType.PASS; //TODO this logic all needs to be rechecked... + return InteractionResult.PASS; //TODO this logic all needs to be rechecked... if (world.isClientSide) - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; if (!player.isShiftKeyDown()) { if (FluidUtil.interactWithFluidHandler(player, hand, tile.tanks)) { ItemStack stack = player.getItemInHand(hand); - world.playSound(null, pos, stack.getItem() == Items.BUCKET ? SoundEvents.BUCKET_EMPTY:SoundEvents.BUCKET_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F); + world.playSound(null, pos, stack.getItem() == Items.BUCKET ? SoundEvents.BUCKET_EMPTY:SoundEvents.BUCKET_FILL, SoundSource.BLOCKS, 1.0F, 1.0F); } else - NetworkHooks.openGui((ServerPlayerEntity) player, tile, pos); - return ActionResultType.SUCCESS; + NetworkHooks.openGui((ServerPlayer) player, tile, pos); + return InteractionResult.SUCCESS; } - return ActionResultType.PASS; + return InteractionResult.PASS; } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.BARREL_SHAPE; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.BARREL_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFireworkBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFireworkBox.java index 78ac11a02..5ed4f2160 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFireworkBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFireworkBox.java @@ -12,39 +12,49 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFireworkBox; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; public class BlockFireworkBox extends BlockContainerBase { public BlockFireworkBox() { - super(ActuallyBlocks.defaultPickProps(0)); + super(ActuallyBlocks.defaultPickProps()); } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { if (this.tryToggleRedstone(world, pos, player)) { - return ActionResultType.PASS; + return InteractionResult.PASS; } return this.openGui(world, player, pos, TileEntityFireworkBox.class); } + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityFireworkBox(pos, state); + } - //@Override - public TileEntity newBlockEntity(IBlockReader worldIn) { - return new TileEntityFireworkBox(); + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityFireworkBox::clientTick : TileEntityFireworkBox::serverTick; } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.FIREWORKS_BOX_SHAPE; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.FIREWORKS_BOX_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java index d6401687c..dcb613740 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFluidCollector.java @@ -11,28 +11,22 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.FullyDirectionalBlock; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidPlacer; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.SoundEvents; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.fluids.FluidUtil; -import net.minecraftforge.fml.network.NetworkHooks; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -42,34 +36,37 @@ public class BlockFluidCollector extends FullyDirectionalBlock.Container { private final boolean isPlacer; public BlockFluidCollector(boolean isPlacer) { - super(ActuallyBlocks.defaultPickProps(0)); + super(ActuallyBlocks.defaultPickProps()); this.isPlacer = isPlacer; } - @Override - public boolean hasTileEntity(BlockState state) { - return true; - } - @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { return this.isPlacer - ? new TileEntityFluidPlacer() - : new TileEntityFluidCollector(); + ? new TileEntityFluidPlacer(pos, state) + : new TileEntityFluidCollector(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return this.isPlacer + ? level.isClientSide? TileEntityFluidPlacer::clientTick : TileEntityFluidPlacer::serverTick + : level.isClientSide? TileEntityFluidCollector::clientTick : TileEntityFluidCollector::serverTick; } @Nonnull @Override - public ActionResultType use(@Nonnull BlockState state, @Nonnull World world, @Nonnull BlockPos pos, @Nonnull PlayerEntity player, @Nonnull Hand handIn, @Nonnull BlockRayTraceResult hit) { + public InteractionResult use(@Nonnull BlockState state, @Nonnull Level world, @Nonnull BlockPos pos, @Nonnull Player player, @Nonnull InteractionHand handIn, @Nonnull BlockHitResult hit) { if (world.isClientSide) - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; if (this.tryToggleRedstone(world, pos, player)) { - return ActionResultType.CONSUME; + return InteractionResult.CONSUME; } if (FluidUtil.interactWithFluidHandler(player, handIn, world, pos, hit.getDirection())) { - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } return this.openGui(world, player, pos, TileEntityFluidCollector.class); @@ -77,20 +74,20 @@ public class BlockFluidCollector extends FullyDirectionalBlock.Container { @Nonnull @Override - public VoxelShape getShape(BlockState state, @Nonnull IBlockReader worldIn, @Nonnull BlockPos pos, @Nonnull ISelectionContext context) { + public VoxelShape getShape(BlockState state, @Nonnull BlockGetter worldIn, @Nonnull BlockPos pos, @Nonnull CollisionContext context) { switch (state.getValue(FACING)) { case UP: - return Shapes.FluidCollectorShapes.SHAPE_U; + return VoxelShapes.FluidCollectorShapes.SHAPE_U; case DOWN: - return Shapes.FluidCollectorShapes.SHAPE_D; + return VoxelShapes.FluidCollectorShapes.SHAPE_D; case EAST: - return Shapes.FluidCollectorShapes.SHAPE_E; + return VoxelShapes.FluidCollectorShapes.SHAPE_E; case SOUTH: - return Shapes.FluidCollectorShapes.SHAPE_S; + return VoxelShapes.FluidCollectorShapes.SHAPE_S; case WEST: - return Shapes.FluidCollectorShapes.SHAPE_W; + return VoxelShapes.FluidCollectorShapes.SHAPE_W; default: - return Shapes.FluidCollectorShapes.SHAPE_N; + return VoxelShapes.FluidCollectorShapes.SHAPE_N; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGeneric.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGeneric.java index 62a4fdfa5..6352ca94c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGeneric.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGeneric.java @@ -14,6 +14,6 @@ import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; public class BlockGeneric extends BlockBase { public BlockGeneric() { - super(ActuallyBlocks.defaultPickProps(0)); + super(ActuallyBlocks.defaultPickProps()); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java index c9c4fe92c..a820a169c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java @@ -11,23 +11,23 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; -import net.minecraft.block.BlockRenderType; -import net.minecraft.block.BlockState; -import net.minecraft.block.IGrowable; -import net.minecraft.block.SoundType; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.BonemealableBlock; +import net.minecraft.world.level.block.RenderShape; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import org.apache.commons.lang3.tuple.Triple; import java.util.Random; public class BlockGreenhouseGlass extends BlockBase { public BlockGreenhouseGlass() { - super(ActuallyBlocks.defaultPickProps(0, 0.5F, 10.0F).sound(SoundType.GLASS).randomTicks()); + super(ActuallyBlocks.defaultPickProps(0.5F, 10.0F).sound(SoundType.GLASS).randomTicks()); } @@ -44,17 +44,17 @@ public class BlockGreenhouseGlass extends BlockBase { @Override - public BlockRenderType getRenderShape(BlockState state) { - return BlockRenderType.INVISIBLE; + public RenderShape getRenderShape(BlockState state) { + return RenderShape.INVISIBLE; } @Override - public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random rand) { + public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random rand) { if (world.isClientSide) { return; } if (world.canSeeSkyFromBelowWater(pos) && world.isDay()) { - Triple trip = this.firstBlock(world, pos); + Triple trip = this.firstBlock(world, pos); boolean once = false; if (trip != null) { for (int i = 0; i < 3; i++) { @@ -75,17 +75,17 @@ public class BlockGreenhouseGlass extends BlockBase { } } - public Triple firstBlock(World world, BlockPos glassPos) { - BlockPos.Mutable mut = new BlockPos(glassPos).mutable(); + public Triple firstBlock(Level world, BlockPos glassPos) { + BlockPos.MutableBlockPos mut = new BlockPos(glassPos).mutable(); while (true) { mut.set(mut.getX(), mut.getY() - 1, mut.getZ()); if (mut.getY() < 0) { return null; } BlockState state = world.getBlockState(mut); - if (state.isSolidRender(world, mut) || state.getBlock() instanceof IGrowable || state.getBlock() == this) { - if (state.getBlock() instanceof IGrowable) { - return Triple.of(mut.immutable(), state, (IGrowable) state.getBlock()); + if (state.isSolidRender(world, mut) || state.getBlock() instanceof BonemealableBlock || state.getBlock() == this) { + if (state.getBlock() instanceof BonemealableBlock) { + return Triple.of(mut.immutable(), state, (BonemealableBlock) state.getBlock()); } else { return null; } @@ -94,7 +94,7 @@ public class BlockGreenhouseGlass extends BlockBase { } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.GLASS_SHAPE; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.GLASS_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockHeatCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockHeatCollector.java index 03ea2bbd1..b03998f90 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockHeatCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockHeatCollector.java @@ -12,25 +12,37 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityHeatCollector; -import net.minecraft.block.BlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; public class BlockHeatCollector extends BlockContainerBase { public BlockHeatCollector() { - super(ActuallyBlocks.defaultPickProps(0, 2.5F, 10.0F)); + super(ActuallyBlocks.defaultPickProps(2.5F, 10.0F)); } - //@Override - public TileEntity newBlockEntity(IBlockReader worldIn) { - return new TileEntityHeatCollector(); + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityHeatCollector(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityHeatCollector::clientTick : TileEntityHeatCollector::serverTick; } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.HEAT_COLLECTOR_SHAPE; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.HEAT_COLLECTOR_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemInterface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemInterface.java index 66cba7948..91a35ae82 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemInterface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemInterface.java @@ -12,33 +12,37 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemInterface; -import net.minecraft.block.BlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import javax.annotation.Nullable; public class BlockItemInterface extends BlockContainerBase { public BlockItemInterface() { - super(ActuallyBlocks.defaultPickProps(0)); - } - - @Override - public boolean hasTileEntity(BlockState state) { - return true; + super(ActuallyBlocks.defaultPickProps()); } @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return new TileEntityItemInterface(); + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityItemInterface(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityItemInterface::clientTick : TileEntityItemInterface::serverTick; } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.ITEM_VIEWER_SHAPE; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.ITEM_VIEWER_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemInterfaceHopping.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemInterfaceHopping.java index 8ca38b568..d14ac8a22 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemInterfaceHopping.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockItemInterfaceHopping.java @@ -11,12 +11,17 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemInterfaceHopping; -import net.minecraft.block.BlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; public class BlockItemInterfaceHopping extends BlockItemInterface { public BlockItemInterfaceHopping() { @@ -24,12 +29,19 @@ public class BlockItemInterfaceHopping extends BlockItemInterface { } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.HOPPING_ITEM_VIEWER_SHAPE; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.HOPPING_ITEM_VIEWER_SHAPE; } - //@Override - public TileEntity newBlockEntity(IBlockReader worldIn) { - return new TileEntityItemInterfaceHopping(); + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityItemInterfaceHopping(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityItemInterfaceHopping::clientTick : TileEntityItemInterfaceHopping::serverTick; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampController.java index 7256ed778..dce43a34d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLampController.java @@ -12,15 +12,15 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.FullyDirectionalBlock; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import java.util.ArrayList; import java.util.List; @@ -28,20 +28,20 @@ import java.util.List; public class BlockLampController extends FullyDirectionalBlock { public BlockLampController() { - super(ActuallyBlocks.defaultPickProps(0)); + super(ActuallyBlocks.defaultPickProps()); } @Override - public void neighborChanged(BlockState state, World worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, boolean isMoving) { + public void neighborChanged(BlockState state, Level worldIn, BlockPos pos, Block blockIn, BlockPos fromPos, boolean isMoving) { this.updateLamp(worldIn, pos); } @Override - public void onPlace(BlockState state, World world, BlockPos pos, BlockState oldState, boolean isMoving) { + public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean isMoving) { this.updateLamp(world, pos); } - private void updateLamp(World world, BlockPos pos) { + private void updateLamp(Level world, BlockPos pos) { if (!world.isClientSide) { BlockState state = world.getBlockState(pos); BlockPos coords = pos.relative(WorldUtil.getDirectionByPistonRotation(state)); @@ -49,7 +49,7 @@ public class BlockLampController extends FullyDirectionalBlock { } } - private void updateLampsAtPos(World world, BlockPos pos, boolean powered, List updatedAlready) { + private void updateLampsAtPos(Level world, BlockPos pos, boolean powered, List updatedAlready) { BlockState state = world.getBlockState(pos); Block block = state.getBlock(); if (block instanceof BlockColoredLamp) { @@ -65,7 +65,7 @@ public class BlockLampController extends FullyDirectionalBlock { } } - private void updateSurrounding(World world, BlockPos pos, boolean powered, List updatedAlready) { + private void updateSurrounding(Level world, BlockPos pos, boolean powered, List updatedAlready) { for (Direction side : Direction.values()) { BlockPos offset = pos.relative(side); if (!updatedAlready.contains(offset)) { @@ -76,16 +76,16 @@ public class BlockLampController extends FullyDirectionalBlock { } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case EAST: - return Shapes.LampPowererShapes.SHAPE_E; + return VoxelShapes.LampPowererShapes.SHAPE_E; case SOUTH: - return Shapes.LampPowererShapes.SHAPE_S; + return VoxelShapes.LampPowererShapes.SHAPE_S; case WEST: - return Shapes.LampPowererShapes.SHAPE_W; + return VoxelShapes.LampPowererShapes.SHAPE_W; default: - return Shapes.LampPowererShapes.SHAPE_N; + return VoxelShapes.LampPowererShapes.SHAPE_N; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java index 713bbb6ec..682362681 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java @@ -10,7 +10,8 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.platform.Window; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.laser.IConnectionPair; import de.ellpeck.actuallyadditions.api.laser.Network; @@ -20,30 +21,38 @@ import de.ellpeck.actuallyadditions.mod.config.CommonConfig; import de.ellpeck.actuallyadditions.mod.items.ItemEngineerGoggles; import de.ellpeck.actuallyadditions.mod.items.ItemLaserRelayUpgrade; import de.ellpeck.actuallyadditions.mod.items.ItemLaserWrench; -import de.ellpeck.actuallyadditions.mod.tile.*; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergy; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergyAdvanced; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergyExtreme; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayFluids; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItem; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItemAdvanced; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import io.netty.util.internal.ConcurrentSet; -import net.minecraft.block.BlockState; -import net.minecraft.client.MainWindow; +import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.BlockItemUseContext; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; @@ -62,7 +71,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements private final Type type; public BlockLaserRelay(Type type) { - super(ActuallyBlocks.defaultPickProps(0)); + super(ActuallyBlocks.defaultPickProps()); this.type = type; } @@ -85,20 +94,20 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements @Override - public BlockState getStateForPlacement(BlockItemUseContext context) { + public BlockState getStateForPlacement(BlockPlaceContext context) { return this.defaultBlockState().setValue(FACING, context.getClickedFace()); } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { ItemStack stack = player.getItemInHand(hand); - TileEntity tile = world.getBlockEntity(pos); + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityLaserRelay) { TileEntityLaserRelay relay = (TileEntityLaserRelay) tile; if (StackUtil.isValid(stack)) { if (stack.getItem() instanceof ItemLaserWrench) { - return ActionResultType.FAIL; + return InteractionResult.FAIL; } else if (stack.getItem() == CommonConfig.Other.relayConfigureItem) { if (!world.isClientSide) { relay.onCompassAction(player); @@ -112,7 +121,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements relay.sendUpdate(); } - return ActionResultType.PASS; + return InteractionResult.PASS; } else if (stack.getItem() instanceof ItemLaserRelayUpgrade) { ItemStack inRelay = relay.inv.getStackInSlot(0); if (!StackUtil.isValid(inRelay)) { @@ -125,7 +134,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements set.setCount(1); relay.inv.setStackInSlot(0, set); } - return ActionResultType.PASS; + return InteractionResult.PASS; } } @@ -137,11 +146,11 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements if (!world.isClientSide) { relay.inv.setStackInSlot(0, ItemStack.EMPTY); - if (!player.inventory.add(inRelay)) { + if (!player.getInventory().add(inRelay)) { player.spawnAtLocation(inRelay, 0); } } - return ActionResultType.PASS; + return InteractionResult.PASS; } } @@ -149,46 +158,61 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements return this.openGui(world, player, pos, TileEntityLaserRelayItemAdvanced.class); } } - return ActionResultType.FAIL; + return InteractionResult.FAIL; } + @Nullable @Override - public boolean hasTileEntity(BlockState state) { - return true; - } - - @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { switch (this.type) { case ITEM: - return new TileEntityLaserRelayItem(); + return new TileEntityLaserRelayItem(pos, state); case ITEM_WHITELIST: - return new TileEntityLaserRelayItemAdvanced(); + return new TileEntityLaserRelayItemAdvanced(pos, state); case ENERGY_ADVANCED: - return new TileEntityLaserRelayEnergyAdvanced(); + return new TileEntityLaserRelayEnergyAdvanced(pos, state); case ENERGY_EXTREME: - return new TileEntityLaserRelayEnergyExtreme(); + return new TileEntityLaserRelayEnergyExtreme(pos, state); case FLUIDS: - return new TileEntityLaserRelayFluids(); + return new TileEntityLaserRelayFluids(pos, state); default: - return new TileEntityLaserRelayEnergy(); + return new TileEntityLaserRelayEnergy(pos, state); + } + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + switch (this.type) { + case ITEM: + return level.isClientSide? TileEntityLaserRelayItem::clientTick : TileEntityLaserRelayItem::serverTick; + case ITEM_WHITELIST: + return level.isClientSide? TileEntityLaserRelayItemAdvanced::clientTick : TileEntityLaserRelayItemAdvanced::serverTick; + case ENERGY_ADVANCED: + return level.isClientSide? TileEntityLaserRelayEnergyAdvanced::clientTick : TileEntityLaserRelayEnergyAdvanced::serverTick; + case ENERGY_EXTREME: + return level.isClientSide? TileEntityLaserRelayEnergyExtreme::clientTick : TileEntityLaserRelayEnergyExtreme::serverTick; + case FLUIDS: + return level.isClientSide? TileEntityLaserRelayFluids::clientTick : TileEntityLaserRelayFluids::serverTick; + default: + return level.isClientSide? TileEntityLaserRelayEnergy::clientTick : TileEntityLaserRelayEnergy::serverTick; } } @Override @OnlyIn(Dist.CLIENT) - public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) { - if (!(rayCast instanceof BlockRayTraceResult)) { + public void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { + if (!(rayCast instanceof BlockHitResult)) { return; } - BlockPos pos = ((BlockRayTraceResult) rayCast).getBlockPos(); + BlockPos pos = ((BlockHitResult) rayCast).getBlockPos(); if (minecraft.level != null) { boolean wearing = ItemEngineerGoggles.isWearing(player); if (wearing || StackUtil.isValid(stack)) { boolean compass = stack.getItem() == CommonConfig.Other.relayConfigureItem; if (wearing || compass || stack.getItem() instanceof ItemLaserWrench) { - TileEntity tile = minecraft.level.getBlockEntity(pos); + BlockEntity tile = minecraft.level.getBlockEntity(pos); if (tile instanceof TileEntityLaserRelay) { TileEntityLaserRelay relay = (TileEntityLaserRelay) tile; @@ -199,7 +223,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements if (compass) { expl = relay.getCompassDisplayString(); } else { - expl = TextFormatting.GRAY.toString() + TextFormatting.ITALIC + I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.mode.noCompasss", I18n.get(CommonConfig.Other.relayConfigureItem.getDescriptionId())); + expl = ChatFormatting.GRAY.toString() + ChatFormatting.ITALIC + I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.mode.noCompasss", I18n.get(CommonConfig.Other.relayConfigureItem.getDescriptionId())); } minecraft.font.draw(matrices, expl, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f + 15, 0xFFFFFF); @@ -210,7 +234,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements } @Override - public void onRemove(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) { + public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean isMoving) { if (state != newState) { ConcurrentSet connectionPairs = ActuallyAdditionsAPI.connectionHandler.getConnectionsFor(pos, world); ActuallyAdditionsAPI.connectionHandler.removeRelayFromNetwork(pos, world); @@ -224,7 +248,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements }); //Update the connected relays to sync the changes to the client relayPositions.forEach(relayPos -> { - TileEntity tile = world.getBlockEntity(relayPos); + BlockEntity tile = world.getBlockEntity(relayPos); if(tile instanceof TileEntityLaserRelay) { TileEntityLaserRelay relay = (TileEntityLaserRelay) tile; relay.sendUpdate(); @@ -251,20 +275,20 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case UP: - return Shapes.LaserRelayShapes.SHAPE_U; + return VoxelShapes.LaserRelayShapes.SHAPE_U; case DOWN: - return Shapes.LaserRelayShapes.SHAPE_D; + return VoxelShapes.LaserRelayShapes.SHAPE_D; case EAST: - return Shapes.LaserRelayShapes.SHAPE_E; + return VoxelShapes.LaserRelayShapes.SHAPE_E; case SOUTH: - return Shapes.LaserRelayShapes.SHAPE_S; + return VoxelShapes.LaserRelayShapes.SHAPE_S; case WEST: - return Shapes.LaserRelayShapes.SHAPE_W; + return VoxelShapes.LaserRelayShapes.SHAPE_W; default: - return Shapes.LaserRelayShapes.SHAPE_N; + return VoxelShapes.LaserRelayShapes.SHAPE_N; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java index 3cc9efb32..ca492a490 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java @@ -10,47 +10,59 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.platform.Window; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLavaFactoryController; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.BlockState; -import net.minecraft.client.MainWindow; import net.minecraft.client.Minecraft; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import javax.annotation.Nullable; + public class BlockLavaFactoryController extends DirectionalBlock.Container implements IHudDisplay { public BlockLavaFactoryController() { - super(ActuallyBlocks.defaultPickProps(0, 4.5F, 20.0F)); + super(ActuallyBlocks.defaultPickProps(4.5F, 20.0F)); } - //@Override - public TileEntity newBlockEntity(IBlockReader worldIn) { - return new TileEntityLavaFactoryController(); + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityLavaFactoryController(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityLavaFactoryController::clientTick : TileEntityLavaFactoryController::serverTick; } @Override @OnlyIn(Dist.CLIENT) - public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) { - if (!(rayCast instanceof BlockRayTraceResult)) { + public void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { + if (!(rayCast instanceof BlockHitResult)) { return; } - TileEntityLavaFactoryController factory = (TileEntityLavaFactoryController) minecraft.level.getBlockEntity(((BlockRayTraceResult) rayCast).getBlockPos()); + TileEntityLavaFactoryController factory = (TileEntityLavaFactoryController) minecraft.level.getBlockEntity(((BlockHitResult) rayCast).getBlockPos()); if (factory != null) { int state = factory.isMultiblock(); if (state == TileEntityLavaFactoryController.NOT_MULTI) { @@ -62,16 +74,16 @@ public class BlockLavaFactoryController extends DirectionalBlock.Container imple } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case EAST: - return Shapes.LavaFactoryShapes.SHAPE_E; + return VoxelShapes.LavaFactoryShapes.SHAPE_E; case SOUTH: - return Shapes.LavaFactoryShapes.SHAPE_S; + return VoxelShapes.LavaFactoryShapes.SHAPE_S; case WEST: - return Shapes.LavaFactoryShapes.SHAPE_W; + return VoxelShapes.LavaFactoryShapes.SHAPE_W; default: - return Shapes.LavaFactoryShapes.SHAPE_N; + return VoxelShapes.LavaFactoryShapes.SHAPE_N; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java index 5da468e85..af6463e62 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java @@ -12,40 +12,49 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLeafGenerator; -import net.minecraft.block.BlockState; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraftforge.common.ToolType; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; -import net.minecraft.block.AbstractBlock.Properties; +import javax.annotation.Nullable; public class BlockLeafGenerator extends DirectionalBlock.Container { public BlockLeafGenerator() { - super(Properties.of(Material.METAL).strength(5.0F, 10.0F).harvestTool(ToolType.PICKAXE).harvestLevel(0).strength(5.0F, 10.0F).sound(SoundType.METAL)); + super(Properties.of(Material.METAL).strength(5.0F, 10.0F).requiresCorrectToolForDrops().strength(5.0F, 10.0F).sound(SoundType.METAL)); } - //@Override - public TileEntity newBlockEntity(IBlockReader worldIn) { - return new TileEntityLeafGenerator(); + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityLeafGenerator(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityLeafGenerator::clientTick : TileEntityLeafGenerator::serverTick; } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case EAST: - return Shapes.LeafGeneratorShapes.SHAPE_E; + return VoxelShapes.LeafGeneratorShapes.SHAPE_E; case SOUTH: - return Shapes.LeafGeneratorShapes.SHAPE_S; + return VoxelShapes.LeafGeneratorShapes.SHAPE_S; case WEST: - return Shapes.LeafGeneratorShapes.SHAPE_W; + return VoxelShapes.LeafGeneratorShapes.SHAPE_W; default: - return Shapes.LeafGeneratorShapes.SHAPE_N; + return VoxelShapes.LeafGeneratorShapes.SHAPE_N; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLongRangeBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLongRangeBreaker.java index 6748b01c5..68fa2a7a3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLongRangeBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLongRangeBreaker.java @@ -12,53 +12,64 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.FullyDirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLongRangeBreaker; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; public class BlockLongRangeBreaker extends FullyDirectionalBlock.Container { public BlockLongRangeBreaker() { - super(ActuallyBlocks.defaultPickProps(0)); + super(ActuallyBlocks.defaultPickProps()); } - //@Override - public TileEntity newBlockEntity(IBlockReader worldIn) { - return new TileEntityLongRangeBreaker(); + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityLongRangeBreaker(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityLongRangeBreaker::clientTick : TileEntityLongRangeBreaker::serverTick; } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { if (this.tryToggleRedstone(world, pos, player)) { - return ActionResultType.PASS; + return InteractionResult.PASS; } return this.openGui(world, player, pos, TileEntityLongRangeBreaker.class); } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case UP: - return Shapes.DirectionalBlockBreakerShapes.SHAPE_U; + return VoxelShapes.DirectionalBlockBreakerShapes.SHAPE_U; case DOWN: - return Shapes.DirectionalBlockBreakerShapes.SHAPE_D; + return VoxelShapes.DirectionalBlockBreakerShapes.SHAPE_D; case EAST: - return Shapes.DirectionalBlockBreakerShapes.SHAPE_E; + return VoxelShapes.DirectionalBlockBreakerShapes.SHAPE_E; case SOUTH: - return Shapes.DirectionalBlockBreakerShapes.SHAPE_S; + return VoxelShapes.DirectionalBlockBreakerShapes.SHAPE_S; case WEST: - return Shapes.DirectionalBlockBreakerShapes.SHAPE_W; + return VoxelShapes.DirectionalBlockBreakerShapes.SHAPE_W; default: - return Shapes.DirectionalBlockBreakerShapes.SHAPE_N; + return VoxelShapes.DirectionalBlockBreakerShapes.SHAPE_N; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java index 99adad4a0..f137f9a1f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java @@ -11,23 +11,24 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.particles.ParticleTypes; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; -import net.minecraftforge.fml.network.NetworkHooks; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; +import net.minecraftforge.network.NetworkHooks; import javax.annotation.Nullable; import java.util.Random; @@ -35,24 +36,25 @@ import java.util.Random; public class BlockOilGenerator extends DirectionalBlock.Container { public BlockOilGenerator() { - super(ActuallyBlocks.defaultPickProps(0).randomTicks()); - } - - @Override - public boolean hasTileEntity(BlockState state) { - return true; + super(ActuallyBlocks.defaultPickProps().randomTicks()); } @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return new TileEntityOilGenerator(); + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityOilGenerator(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityOilGenerator::clientTick : TileEntityOilGenerator::serverTick; } // TODO: Move all of these over to the client version @Override - public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random random) { - TileEntity tile = world.getBlockEntity(pos); + public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) { + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityOilGenerator) { if (((TileEntityOilGenerator) tile).currentBurnTime > 0) { for (int i = 0; i < 5; i++) { @@ -63,30 +65,30 @@ public class BlockOilGenerator extends DirectionalBlock.Container { } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { if (!world.isClientSide) { TileEntityOilGenerator generator = (TileEntityOilGenerator) world.getBlockEntity(pos); if (generator != null) { if (!this.tryUseItemOnTank(player, hand, generator.tank)) { - NetworkHooks.openGui((ServerPlayerEntity) player, generator, pos); + NetworkHooks.openGui((ServerPlayer) player, generator, pos); } } } - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case EAST: - return Shapes.OilGeneratorShapes.SHAPE_E; + return VoxelShapes.OilGeneratorShapes.SHAPE_E; case SOUTH: - return Shapes.OilGeneratorShapes.SHAPE_S; + return VoxelShapes.OilGeneratorShapes.SHAPE_S; case WEST: - return Shapes.OilGeneratorShapes.SHAPE_W; + return VoxelShapes.OilGeneratorShapes.SHAPE_W; default: - return Shapes.OilGeneratorShapes.SHAPE_N; + return VoxelShapes.OilGeneratorShapes.SHAPE_N; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java index 02376d028..135a3c651 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java @@ -10,42 +10,51 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.platform.Window; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; -import de.ellpeck.actuallyadditions.mod.tile.*; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomBreaker; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomEnergyface; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomItemface; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomLiquiface; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomPlacer; +import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomRedstoneface; import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.client.MainWindow; +import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Direction; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.MathHelper; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.util.Mth; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import net.minecraft.world.phys.Vec3; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import javax.annotation.Nullable; + public class BlockPhantom extends BlockContainerBase implements IHudDisplay { public final Type type; public BlockPhantom(Type type) { - super(ActuallyBlocks.defaultPickProps(0, 4.5F, 10.0F)); + super(ActuallyBlocks.defaultPickProps(4.5F, 10.0F)); this.type = type; } @@ -55,9 +64,9 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay { } @Override - public int getSignal(BlockState blockState, IBlockReader world, BlockPos pos, Direction side) { + public int getSignal(BlockState blockState, BlockGetter world, BlockPos pos, Direction side) { if (this.type == Type.REDSTONEFACE) { - TileEntity tile = world.getBlockEntity(pos); + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityPhantomRedstoneface) { return ((TileEntityPhantomRedstoneface) tile).providesWeak[side.ordinal()]; } @@ -66,9 +75,9 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay { } @Override - public int getDirectSignal(BlockState blockState, IBlockReader world, BlockPos pos, Direction side) { + public int getDirectSignal(BlockState blockState, BlockGetter world, BlockPos pos, Direction side) { if (this.type == Type.REDSTONEFACE) { - TileEntity tile = world.getBlockEntity(pos); + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityPhantomRedstoneface) { return ((TileEntityPhantomRedstoneface) tile).providesStrong[side.ordinal()]; } @@ -77,33 +86,53 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay { } @Override - public boolean shouldDropInventory(World world, BlockPos pos) { + public boolean shouldDropInventory(Level world, BlockPos pos) { return this.type == Type.PLACER || this.type == Type.BREAKER; } - //@Override - public TileEntity newBlockEntity(IBlockReader worldIn) { + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { switch (this.type) { case PLACER: - return new TileEntityPhantomPlacer(); + return new TileEntityPhantomPlacer(pos, state); case BREAKER: - return new TileEntityPhantomBreaker(); + return new TileEntityPhantomBreaker(pos, state); case LIQUIFACE: - return new TileEntityPhantomLiquiface(); + return new TileEntityPhantomLiquiface(pos, state); case ENERGYFACE: - return new TileEntityPhantomEnergyface(); + return new TileEntityPhantomEnergyface(pos, state); case REDSTONEFACE: - return new TileEntityPhantomRedstoneface(); + return new TileEntityPhantomRedstoneface(pos, state); default: - return new TileEntityPhantomItemface(); + return new TileEntityPhantomItemface(pos, state); + } + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + switch (this.type) { + case PLACER: + return level.isClientSide? TileEntityPhantomPlacer::clientTick : TileEntityPhantomPlacer::serverTick; + case BREAKER: + return level.isClientSide? TileEntityPhantomBreaker::clientTick : TileEntityPhantomBreaker::serverTick; + case LIQUIFACE: + return level.isClientSide? TileEntityPhantomLiquiface::clientTick : TileEntityPhantomLiquiface::serverTick; + case ENERGYFACE: + return level.isClientSide? TileEntityPhantomEnergyface::clientTick : TileEntityPhantomEnergyface::serverTick; + case REDSTONEFACE: + return level.isClientSide? TileEntityPhantomRedstoneface::clientTick : TileEntityPhantomRedstoneface::serverTick; + default: + return level.isClientSide? TileEntityPhantomItemface::clientTick : TileEntityPhantomItemface::serverTick; } } // TODO: [port] validate this works @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { if (this.tryToggleRedstone(world, pos, player)) { - return ActionResultType.PASS; + return InteractionResult.PASS; } /* if (!world.isClientSide) { @@ -113,24 +142,24 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay { } } */ - return ActionResultType.PASS; + return InteractionResult.PASS; } // TODO: [port] fix all of this, it's a mess @Override @OnlyIn(Dist.CLIENT) - public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) { - if (!(rayCast instanceof BlockRayTraceResult)) { + public void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { + if (!(rayCast instanceof BlockHitResult)) { return; } - BlockPos pos = ((BlockRayTraceResult) rayCast).getBlockPos(); - TileEntity tile = minecraft.level.getBlockEntity(pos); + BlockPos pos = ((BlockHitResult) rayCast).getBlockPos(); + BlockEntity tile = minecraft.level.getBlockEntity(pos); if (tile != null) { if (tile instanceof IPhantomTile) { IPhantomTile phantom = (IPhantomTile) tile; - minecraft.font.drawShadow(matrices, TextFormatting.GOLD + I18n.get("tooltip." + ActuallyAdditions.MODID + ".blockPhantomRange.desc") + ": " + phantom.getRange(), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 - 40, TextFormatting.WHITE.getColor()); + minecraft.font.drawShadow(matrices, ChatFormatting.GOLD + I18n.get("tooltip." + ActuallyAdditions.MODID + ".blockPhantomRange.desc") + ": " + phantom.getRange(), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 - 40, ChatFormatting.WHITE.getColor()); if (phantom.hasBoundPosition()) { - int distance = MathHelper.ceil(new Vector3d(pos.getX(), pos.getY(), pos.getZ()).distanceTo(new Vector3d(phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ()))); + int distance = Mth.ceil(new Vec3(pos.getX(), pos.getY(), pos.getZ()).distanceTo(new Vec3(phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ()))); BlockState state = minecraft.level.getBlockState(phantom.getBoundPosition()); Block block = state.getBlock(); Item item = Item.byBlock(block); @@ -138,12 +167,12 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay { StringUtil.drawSplitString(minecraft.font, StringUtil.localizeFormatted("tooltip." + ActuallyAdditions.MODID + ".phantom.blockInfo.desc", name, phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ(), distance), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 - 30, 200, 0xFFFFFF, true); if (phantom.isBoundThingInRange()) { - StringUtil.drawSplitString(minecraft.font, TextFormatting.DARK_GREEN + I18n.get("tooltip." + ActuallyAdditions.MODID + ".phantom.connectedRange.desc"), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 25, 200, 0xFFFFFF, true); + StringUtil.drawSplitString(minecraft.font, ChatFormatting.DARK_GREEN + I18n.get("tooltip." + ActuallyAdditions.MODID + ".phantom.connectedRange.desc"), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 25, 200, 0xFFFFFF, true); } else { - StringUtil.drawSplitString(minecraft.font, TextFormatting.DARK_RED + I18n.get("tooltip." + ActuallyAdditions.MODID + ".phantom.connectedNoRange.desc"), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 25, 200, 0xFFFFFF, true); + StringUtil.drawSplitString(minecraft.font, ChatFormatting.DARK_RED + I18n.get("tooltip." + ActuallyAdditions.MODID + ".phantom.connectedNoRange.desc"), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 25, 200, 0xFFFFFF, true); } } else { - minecraft.font.drawShadow(matrices, TextFormatting.RED + I18n.get("tooltip." + ActuallyAdditions.MODID + ".phantom.notConnected.desc"), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 25, TextFormatting.WHITE.getColor()); + minecraft.font.drawShadow(matrices, ChatFormatting.RED + I18n.get("tooltip." + ActuallyAdditions.MODID + ".phantom.notConnected.desc"), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 25, ChatFormatting.WHITE.getColor()); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java index 01846a1ad..0e6f1e6b1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantomBooster.java @@ -12,26 +12,38 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomBooster; -import net.minecraft.block.BlockState; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; public class BlockPhantomBooster extends BlockContainerBase { public BlockPhantomBooster() { - super(ActuallyBlocks.defaultPickProps(0)); + super(ActuallyBlocks.defaultPickProps()); } - //@Override - public TileEntity newBlockEntity(IBlockReader world) { - return new TileEntityPhantomBooster(); + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityPhantomBooster(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityPhantomBooster::clientTick : TileEntityPhantomBooster::serverTick; } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.BOOSTER_SHAPE; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.BOOSTER_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java index ba0c72d55..c7188a5cb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java @@ -10,42 +10,52 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.platform.Window; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface; -import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.BlockState; -import net.minecraft.client.MainWindow; +import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; -import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import javax.annotation.Nullable; + public class BlockPlayerInterface extends BlockContainerBase implements IHudDisplay { public BlockPlayerInterface() { - super(ActuallyBlocks.defaultPickProps(0, 4.5F, 10.0F)); + super(ActuallyBlocks.defaultPickProps(4.5F, 10.0F)); } - //@Override - public TileEntity newBlockEntity(IBlockReader worldIn) { - return new TileEntityPlayerInterface(); + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityPlayerInterface(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityPlayerInterface::clientTick : TileEntityPlayerInterface::serverTick; } @Override - public void setPlacedBy(World world, BlockPos pos, BlockState state, LivingEntity player, ItemStack stack) { - TileEntity tile = world.getBlockEntity(pos); + public void setPlacedBy(Level world, BlockPos pos, BlockState state, LivingEntity player, ItemStack stack) { + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityPlayerInterface) { TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile; if (face.connectedPlayer == null) { @@ -61,26 +71,26 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp @Override @OnlyIn(Dist.CLIENT) - public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) { - if (!(rayCast instanceof BlockRayTraceResult)) { + public void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { + if (!(rayCast instanceof BlockHitResult)) { return; } - TileEntity tile = minecraft.level.getBlockEntity(((BlockRayTraceResult) rayCast).getBlockPos()); + BlockEntity tile = minecraft.level.getBlockEntity(((BlockHitResult) rayCast).getBlockPos()); if (tile != null) { if (tile instanceof TileEntityPlayerInterface) { TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile; String name = face.playerName == null ? "Unknown" : face.playerName; - minecraft.font.drawShadow(matrices, "Bound to: " + TextFormatting.RED + name, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f + 5, 0xFFFFFF); - minecraft.font.drawShadow(matrices, "UUID: " + TextFormatting.DARK_GREEN + face.connectedPlayer, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f + 15, 0xFFFFFF); + minecraft.font.drawShadow(matrices, "Bound to: " + ChatFormatting.RED + name, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f + 5, 0xFFFFFF); + minecraft.font.drawShadow(matrices, "UUID: " + ChatFormatting.DARK_GREEN + face.connectedPlayer, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f + 15, 0xFFFFFF); } } } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.PLAYER_INTERFACE_SHAPE; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.PLAYER_INTERFACE_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPoweredFurnace.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPoweredFurnace.java index d04a51127..ca9f5bfeb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPoweredFurnace.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPoweredFurnace.java @@ -10,37 +10,38 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import static net.minecraft.state.properties.BlockStateProperties.HORIZONTAL_FACING; -import static net.minecraft.state.properties.BlockStateProperties.LIT; - -import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPoweredFurnace; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.BlockItemUseContext; -import net.minecraft.particles.ParticleTypes; -import net.minecraft.state.StateContainer; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Direction; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import javax.annotation.Nullable; import java.util.Random; +import static net.minecraft.world.level.block.state.properties.BlockStateProperties.HORIZONTAL_FACING; +import static net.minecraft.world.level.block.state.properties.BlockStateProperties.LIT; + public class BlockPoweredFurnace extends DirectionalBlock.Container { public BlockPoweredFurnace() { // TODO: [port] confirm this is correct for light level... Might not be reactive. - super(ActuallyBlocks.defaultPickProps(0).randomTicks().lightLevel(state -> state.getValue(LIT) + super(ActuallyBlocks.defaultPickProps().randomTicks().lightLevel(state -> state.getValue(LIT) ? 12 : 0)); @@ -49,17 +50,18 @@ public class BlockPoweredFurnace extends DirectionalBlock.Container { @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return new TileEntityPoweredFurnace(); + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityPoweredFurnace(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityPoweredFurnace::clientTick : TileEntityPoweredFurnace::serverTick; } @Override - public boolean hasTileEntity(BlockState state) { - return true; - } - - @Override - public void randomTick(BlockState state, ServerWorld worldIn, BlockPos pos, Random random) { + public void randomTick(BlockState state, ServerLevel worldIn, BlockPos pos, Random random) { if (state.getValue(LIT)) { for (int i = 0; i < 5; i++) { worldIn.addParticle(ParticleTypes.SMOKE, (double) pos.getX() + 0.5F, (double) pos.getY() + 1.0F, (double) pos.getZ() + 0.5F, 0.0D, 0.0D, 0.0D); @@ -70,17 +72,17 @@ public class BlockPoweredFurnace extends DirectionalBlock.Container { @Override - public ActionResultType use(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { return this.openGui(worldIn, player, pos, TileEntityPoweredFurnace.class); } @Override - public BlockState getStateForPlacement(BlockItemUseContext context) { + public BlockState getStateForPlacement(BlockPlaceContext context) { return defaultBlockState().setValue(HORIZONTAL_FACING, context.getHorizontalDirection().getOpposite()).setValue(LIT, false); } @Override - protected void createBlockStateDefinition(StateContainer.Builder builder) { + protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(LIT).add(HORIZONTAL_FACING); } @@ -100,16 +102,16 @@ public class BlockPoweredFurnace extends DirectionalBlock.Container { @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(HORIZONTAL_FACING)) { case EAST: - return Shapes.FurnaceDoubleShapes.SHAPE_E; + return VoxelShapes.FurnaceDoubleShapes.SHAPE_E; case SOUTH: - return Shapes.FurnaceDoubleShapes.SHAPE_S; + return VoxelShapes.FurnaceDoubleShapes.SHAPE_S; case WEST: - return Shapes.FurnaceDoubleShapes.SHAPE_W; + return VoxelShapes.FurnaceDoubleShapes.SHAPE_W; default: - return Shapes.FurnaceDoubleShapes.SHAPE_N; + return VoxelShapes.FurnaceDoubleShapes.SHAPE_N; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java index 9a65baa51..c263e9e9e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockRangedCollector.java @@ -12,40 +12,51 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; public class BlockRangedCollector extends BlockContainerBase { public BlockRangedCollector() { - super(ActuallyBlocks.defaultPickProps(0)); + super(ActuallyBlocks.defaultPickProps()); } - //@Override - public TileEntity newBlockEntity(IBlockReader worldIn) { - return new TileEntityRangedCollector(); + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityRangedCollector(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityRangedCollector::clientTick : TileEntityRangedCollector::serverTick; } @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { if (this.tryToggleRedstone(world, pos, player)) { - return ActionResultType.PASS; + return InteractionResult.PASS; } return this.openGui(world, player, pos, TileEntityRangedCollector.class); } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.COLLECTOR_SHAPE; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.COLLECTOR_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java index b84cb8a97..1979be1c0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java @@ -11,15 +11,18 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.tile.TileEntityShockSuppressor; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.entity.Entity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.EntityBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.event.world.ExplosionEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -29,16 +32,16 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -public class BlockShockSuppressor extends Block { +public class BlockShockSuppressor extends Block implements EntityBlock { public BlockShockSuppressor() { - super(ActuallyBlocks.defaultPickProps(0, 20F, 2000.0F)); + super(ActuallyBlocks.defaultPickProps(20F, 2000.0F)); MinecraftForge.EVENT_BUS.register(this); } @SubscribeEvent public void onExplosion(ExplosionEvent.Detonate event) { - World world = event.getWorld(); + Level world = event.getWorld(); if (!world.isClientSide) { List affectedBlocks = event.getAffectedBlocks(); List affectedEntities = event.getAffectedEntities(); @@ -90,17 +93,18 @@ public class BlockShockSuppressor extends Block { @Nullable @Override - public TileEntity createTileEntity(BlockState state, IBlockReader world) { - return new TileEntityShockSuppressor(); + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityShockSuppressor(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityShockSuppressor::clientTick : TileEntityShockSuppressor::serverTick; } @Override - public boolean hasTileEntity(BlockState state) { - return true; - } - - @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.SUPPRESSOR_SHAPE; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.SUPPRESSOR_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java index 83c951b72..46ddf758c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java @@ -11,23 +11,19 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.util.math.AxisAlignedBB; - -//Copied from BlockTorch. -//I have no idea what all of this means. -import net.minecraft.block.AbstractBlock.Properties; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.phys.AABB; public class BlockTinyTorch extends BlockBase { //Thanks to xdjackiexd for these. //Man, I hate numbers. - private static final AxisAlignedBB STANDING_AABB = new AxisAlignedBB(0.4375D, 0.0D, 0.4375D, 0.5625D, 0.3125D, 0.5625D); - private static final AxisAlignedBB TORCH_NORTH_AABB = new AxisAlignedBB(0.4375D, 0.25D, 0.8125D, 0.5625D, 0.5625D, 1.0D); - private static final AxisAlignedBB TORCH_SOUTH_AABB = new AxisAlignedBB(0.4375D, 0.25D, 0.0D, 0.5625D, 0.5625D, 0.1875D); - private static final AxisAlignedBB TORCH_WEST_AABB = new AxisAlignedBB(0.8125D, 0.25D, 0.4375D, 1.0D, 0.5625D, 0.5625D); - private static final AxisAlignedBB TORCH_EAST_AABB = new AxisAlignedBB(0.0D, 0.25D, 0.4375D, 0.1875D, 0.5625D, 0.5625D); + private static final AABB STANDING_AABB = new AABB(0.4375D, 0.0D, 0.4375D, 0.5625D, 0.3125D, 0.5625D); + private static final AABB TORCH_NORTH_AABB = new AABB(0.4375D, 0.25D, 0.8125D, 0.5625D, 0.5625D, 1.0D); + private static final AABB TORCH_SOUTH_AABB = new AABB(0.4375D, 0.25D, 0.0D, 0.5625D, 0.5625D, 0.1875D); + private static final AABB TORCH_WEST_AABB = new AABB(0.8125D, 0.25D, 0.4375D, 1.0D, 0.5625D, 0.5625D); + private static final AABB TORCH_EAST_AABB = new AABB(0.0D, 0.25D, 0.4375D, 0.1875D, 0.5625D, 0.5625D); public BlockTinyTorch() { super(Properties.of(Material.DECORATION).sound(SoundType.WOOD).strength(0.0F, 0.8F)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockVerticalDigger.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockVerticalDigger.java index c8ff73331..58ae3ef0f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockVerticalDigger.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockVerticalDigger.java @@ -10,53 +10,62 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.platform.Window; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityVerticalDigger; -import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.block.BlockState; -import net.minecraft.client.MainWindow; import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import javax.annotation.Nullable; + public class BlockVerticalDigger extends DirectionalBlock.Container implements IHudDisplay { public BlockVerticalDigger() { - super(ActuallyBlocks.defaultPickProps(0, 8F, 30F)); + super(ActuallyBlocks.defaultPickProps(8F, 30F)); } @Override - public ActionResultType use(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { return this.openGui(worldIn, player, pos, TileEntityVerticalDigger.class); } - //@Override - public TileEntity newBlockEntity(IBlockReader world) { - return new TileEntityVerticalDigger(); + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityVerticalDigger(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityVerticalDigger::clientTick : TileEntityVerticalDigger::serverTick; } @Override @OnlyIn(Dist.CLIENT) - public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) { - if (!(rayCast instanceof BlockRayTraceResult)) { + public void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { + if (!(rayCast instanceof BlockHitResult)) { return; } - TileEntity tile = minecraft.level.getBlockEntity(((BlockRayTraceResult) rayCast).getBlockPos()); + BlockEntity tile = minecraft.level.getBlockEntity(((BlockHitResult) rayCast).getBlockPos()); if (tile instanceof TileEntityVerticalDigger) { TileEntityVerticalDigger miner = (TileEntityVerticalDigger) tile; String info = miner.checkY == 0 @@ -69,18 +78,18 @@ public class BlockVerticalDigger extends DirectionalBlock.Container implements I } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { switch (state.getValue(FACING)) { case NORTH: - return Shapes.MinerShapes.SHAPE_N; + return VoxelShapes.MinerShapes.SHAPE_N; case EAST: - return Shapes.MinerShapes.SHAPE_E; + return VoxelShapes.MinerShapes.SHAPE_E; case SOUTH: - return Shapes.MinerShapes.SHAPE_S; + return VoxelShapes.MinerShapes.SHAPE_S; case WEST: - return Shapes.MinerShapes.SHAPE_W; + return VoxelShapes.MinerShapes.SHAPE_W; default: - return Shapes.MinerShapes.SHAPE_N; + return VoxelShapes.MinerShapes.SHAPE_N; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java index 577ffd50d..c0db3582a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java @@ -11,10 +11,8 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBushBase; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; - -import net.minecraft.block.AbstractBlock.Properties; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.material.Material; public class BlockWildPlant extends BlockBushBase { @@ -22,7 +20,7 @@ public class BlockWildPlant extends BlockBushBase { // public static final PropertyEnum TYPE = PropertyEnum.create("type", TheWildPlants.class); public BlockWildPlant() { - super(Properties.of(Material.PLANT).sound(SoundType.GRASS).harvestLevel(0).strength(0, 0)); + super(Properties.of(Material.PLANT).sound(SoundType.GRASS).strength(0, 0)); // this.setSoundType(SoundType.PLANT); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java index 866002174..1083434c8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockXPSolidifier.java @@ -12,35 +12,46 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityTicker; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.VoxelShape; + +import javax.annotation.Nullable; public class BlockXPSolidifier extends DirectionalBlock.Container { public BlockXPSolidifier() { - super(ActuallyBlocks.defaultPickProps(0, 2.5F, 10.0F)); + super(ActuallyBlocks.defaultPickProps(2.5F, 10.0F)); } - //@Override - public TileEntity newBlockEntity(IBlockReader worldIn) { - return new TileEntityXPSolidifier(); + @Nullable + @Override + public BlockEntity newBlockEntity(BlockPos pos, BlockState state) { + return new TileEntityXPSolidifier(pos, state); + } + + @Nullable + @Override + public BlockEntityTicker getTicker(Level level, BlockState blockState, BlockEntityType entityType) { + return level.isClientSide? TileEntityXPSolidifier::clientTick : TileEntityXPSolidifier::serverTick; } @Override - public ActionResultType use(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level worldIn, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { return this.openGui(worldIn, player, pos, TileEntityXPSolidifier.class); } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { - return Shapes.SOLIDIFIER_SHAPE; + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { + return VoxelShapes.SOLIDIFIER_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/CrystalClusterBlock.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/CrystalClusterBlock.java index 51591296b..f59725c67 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/CrystalClusterBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/CrystalClusterBlock.java @@ -12,20 +12,19 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.FullyDirectionalBlock; import de.ellpeck.actuallyadditions.mod.items.metalists.Crystals; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.state.DirectionProperty; -import net.minecraft.state.StateContainer; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.shapes.IBooleanFunction; -import net.minecraft.util.math.shapes.ISelectionContext; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.util.math.shapes.VoxelShapes; -import net.minecraft.world.IBlockReader; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.DirectionProperty; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.phys.shapes.BooleanOp; +import net.minecraft.world.phys.shapes.CollisionContext; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; import java.util.stream.Stream; @@ -43,7 +42,7 @@ public class CrystalClusterBlock extends FullyDirectionalBlock { Block.box(3, 0, 9, 4, 2, 10), Block.box(2, 0, 8, 4, 1, 10), Block.box(5, 0, 11, 7, 2, 13), Block.box(7, 0, 11, 11, 1, 13), Block.box(10, 0, 9, 13, 1, 11), Block.box(11, 0, 7, 12, 3, 9) - ).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR) ).get(); + ).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR) ).get(); public CrystalClusterBlock(Crystals crystal) { super(Block.Properties.of(Material.GLASS) @@ -59,7 +58,7 @@ public class CrystalClusterBlock extends FullyDirectionalBlock { } @Override - public VoxelShape getShape(BlockState state, IBlockReader worldIn, BlockPos pos, ISelectionContext context) { + public VoxelShape getShape(BlockState state, BlockGetter worldIn, BlockPos pos, CollisionContext context) { return CRYSTAL_SHAPE; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IActuallyBlock.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IActuallyBlock.java index fca0054a3..bbcb92191 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IActuallyBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IActuallyBlock.java @@ -1,6 +1,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import net.minecraft.item.Item; +import net.minecraft.world.item.Item; public interface IActuallyBlock { /** diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IHudDisplay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IHudDisplay.java index 7dcd2ef8c..64e075cfa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IHudDisplay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IHudDisplay.java @@ -10,18 +10,18 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import com.mojang.blaze3d.matrix.MatrixStack; -import net.minecraft.client.MainWindow; +import com.mojang.blaze3d.platform.Window; +import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.RayTraceResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.phys.HitResult; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; public interface IHudDisplay { @OnlyIn(Dist.CLIENT) - void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution); + void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/Shapes.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/VoxelShapes.java similarity index 92% rename from src/main/java/de/ellpeck/actuallyadditions/mod/blocks/Shapes.java rename to src/main/java/de/ellpeck/actuallyadditions/mod/blocks/VoxelShapes.java index 5acc6e6d6..da5fbe9b6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/Shapes.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/VoxelShapes.java @@ -1,118 +1,119 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import net.minecraft.block.Block; -import net.minecraft.util.math.shapes.IBooleanFunction; -import net.minecraft.util.math.shapes.VoxelShape; -import net.minecraft.util.math.shapes.VoxelShapes; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.phys.shapes.BooleanOp; +import net.minecraft.world.phys.shapes.Shapes; +import net.minecraft.world.phys.shapes.VoxelShape; import java.util.Optional; import java.util.stream.Stream; -public class Shapes { - static final VoxelShape CANOLA_PRESS_SHAPE = Stream.of(Block.box(13, 0, 1, 15, 15.5, 3), Block.box(2, 0, 2, 14, 6, 14), Block.box(2, 10, 2, 14, 15, 14), Block.box(3, 6, 3, 13, 10, 13), Block.box(1, 0, 1, 3, 15.5, 3), Block.box(1, 0, 13, 3, 15.5, 15), Block.box(13, 0, 13, 15, 15.5, 15), Block.box(0.9, 0, 0.9, 3.1, 0.5, 3.1), Block.box(0.9, 0, 12.9, 3.1, 0.5, 15.1), Block.box(0.9, 5, 12.9, 3.1, 6.5, 15.1), Block.box(0.9, 5, 0.9, 3.1, 6.5, 3.1), Block.box(12.9, 5, 12.9, 15.1, 6.5, 15.1), Block.box(12.9, 5, 0.9, 15.1, 6.5, 3.1), Block.box(0.9, 9.5, 12.9, 3.1, 11, 15.1), Block.box(0.9, 9.5, 0.9, 3.1, 11, 3.1), Block.box(12.9, 9.5, 12.9, 15.1, 11, 15.1), Block.box(12.9, 9.5, 0.9, 15.1, 11, 3.1), Block.box(12.9, 0, 0.9, 15.1, 0.5, 3.1), Block.box(12.9, 0, 12.9, 15.1, 0.5, 15.1), Block.box(12.9, 15.5, 0.9, 15.1, 16, 3.1), Block.box(12.9, 15.5, 12.9, 15.1, 16, 15.1), Block.box(0.9, 15.5, 0.9, 3.1, 16, 3.1), Block.box(0.9, 15.5, 12.9, 3.1, 16, 15.1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape CRYSTAL_CLUSTER_SHAPE = Stream.of(Block.box(5, 4, 5, 10, 19, 10), Block.box(4, 0, 4, 11, 5, 11), Block.box(3, 0, 3, 5, 4, 5), Block.box(10, 0, 3, 12, 2, 5), Block.box(12, 0, 4, 13, 1, 5), Block.box(11, 0, 5, 12, 1, 6), Block.box(10, 0, 10, 12, 3, 12), Block.box(3, 0, 10, 5, 1, 12), Block.box(9, 0, 3, 10, 3, 4), Block.box(8, 0, 2, 11, 1, 4), Block.box(4, 0, 2, 5, 2, 3), Block.box(5, 0, 3, 7, 1, 4), Block.box(2, 0, 4, 4, 1, 6), Block.box(3, 0, 5, 4, 3, 6.5), Block.box(3, 0, 9, 4, 2, 10), Block.box(2, 0, 8, 4, 1, 10), Block.box(5, 0, 11, 7, 2, 13), Block.box(7, 0, 11, 11, 1, 13), Block.box(10, 0, 9, 13, 1, 11), Block.box(11, 0, 7, 12, 3, 9)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape DISPLAY_STAND_SHAPE = Stream.of(Block.box(1, 7, 0, 15, 8, 1), Block.box(0, 0, 0, 16, 1, 16), Block.box(1, 1, 1, 15, 7, 15), Block.box(6, 7, 6, 10, 9, 10), Block.box(0, 1, 0, 1, 7, 1), Block.box(15, 1, 0, 16, 7, 1), Block.box(15, 1, 15, 16, 7, 16), Block.box(0, 1, 15, 1, 7, 16), Block.box(0, 7, 0, 1, 8, 16), Block.box(15, 7, 0, 16, 8, 16), Block.box(1, 7, 15, 15, 8, 16), Block.box(5, 7, 5, 6, 9, 6), Block.box(5, 7, 10, 6, 9, 11), Block.box(10, 7, 10, 11, 9, 11), Block.box(10, 7, 5, 11, 9, 6)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); +public class VoxelShapes { + static final VoxelShape CANOLA_PRESS_SHAPE = Stream.of(Block.box(13, 0, 1, 15, 15.5, 3), Block.box(2, 0, 2, 14, 6, 14), Block.box(2, 10, 2, 14, 15, 14), Block.box(3, 6, 3, 13, 10, 13), Block.box(1, 0, 1, 3, 15.5, 3), Block.box(1, 0, 13, 3, 15.5, 15), Block.box(13, 0, 13, 15, 15.5, 15), Block.box(0.9, 0, 0.9, 3.1, 0.5, 3.1), Block.box(0.9, 0, 12.9, 3.1, 0.5, 15.1), Block.box(0.9, 5, 12.9, 3.1, 6.5, 15.1), Block.box(0.9, 5, 0.9, 3.1, 6.5, 3.1), Block.box(12.9, 5, 12.9, 15.1, 6.5, 15.1), Block.box(12.9, 5, 0.9, 15.1, 6.5, 3.1), Block.box(0.9, 9.5, 12.9, 3.1, 11, 15.1), Block.box(0.9, 9.5, 0.9, 3.1, 11, 3.1), Block.box(12.9, 9.5, 12.9, 15.1, 11, 15.1), Block.box(12.9, 9.5, 0.9, 15.1, 11, 3.1), Block.box(12.9, 0, 0.9, 15.1, 0.5, 3.1), Block.box(12.9, 0, 12.9, 15.1, 0.5, 15.1), Block.box(12.9, 15.5, 0.9, 15.1, 16, 3.1), Block.box(12.9, 15.5, 12.9, 15.1, 16, 15.1), Block.box(0.9, 15.5, 0.9, 3.1, 16, 3.1), Block.box(0.9, 15.5, 12.9, 3.1, 16, 15.1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + + static final VoxelShape CRYSTAL_CLUSTER_SHAPE = Stream.of(Block.box(5, 4, 5, 10, 19, 10), Block.box(4, 0, 4, 11, 5, 11), Block.box(3, 0, 3, 5, 4, 5), Block.box(10, 0, 3, 12, 2, 5), Block.box(12, 0, 4, 13, 1, 5), Block.box(11, 0, 5, 12, 1, 6), Block.box(10, 0, 10, 12, 3, 12), Block.box(3, 0, 10, 5, 1, 12), Block.box(9, 0, 3, 10, 3, 4), Block.box(8, 0, 2, 11, 1, 4), Block.box(4, 0, 2, 5, 2, 3), Block.box(5, 0, 3, 7, 1, 4), Block.box(2, 0, 4, 4, 1, 6), Block.box(3, 0, 5, 4, 3, 6.5), Block.box(3, 0, 9, 4, 2, 10), Block.box(2, 0, 8, 4, 1, 10), Block.box(5, 0, 11, 7, 2, 13), Block.box(7, 0, 11, 11, 1, 13), Block.box(10, 0, 9, 13, 1, 11), Block.box(11, 0, 7, 12, 3, 9)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape DISPLAY_STAND_SHAPE = Stream.of(Block.box(1, 7, 0, 15, 8, 1), Block.box(0, 0, 0, 16, 1, 16), Block.box(1, 1, 1, 15, 7, 15), Block.box(6, 7, 6, 10, 9, 10), Block.box(0, 1, 0, 1, 7, 1), Block.box(15, 1, 0, 16, 7, 1), Block.box(15, 1, 15, 16, 7, 16), Block.box(0, 1, 15, 1, 7, 16), Block.box(0, 7, 0, 1, 8, 16), Block.box(15, 7, 0, 16, 8, 16), Block.box(1, 7, 15, 15, 8, 16), Block.box(5, 7, 5, 6, 9, 6), Block.box(5, 7, 10, 6, 9, 11), Block.box(10, 7, 10, 11, 9, 11), Block.box(10, 7, 5, 11, 9, 6)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); static final VoxelShape BATBOX_SHAPE = Block.box(0,0,0, 16, 8, 16); - static final VoxelShape EMPOWERER_SHAPE = Stream.of(Block.box(0, 0, 0, 16, 1, 16), Block.box(1, 1, 1, 15, 6, 15), Block.box(1, 6, 1, 15, 7, 15), Block.box(0, 7, 0, 16, 8, 1), Block.box(0, 7, 15, 16, 8, 16), Block.box(0, 7, 1, 1, 8, 15), Block.box(15, 7, 1, 16, 8, 15), Block.box(4, 7, 4, 12, 9, 12), Block.box(0, 1, 0, 1, 7, 1), Block.box(15, 1, 0, 16, 7, 1), Block.box(15, 1, 15, 16, 7, 16), Block.box(0, 1, 15, 1, 7, 16), Block.box(3, 7, 4, 4, 8, 5), Block.box(3, 7, 11, 4, 8, 12), Block.box(4, 7, 12, 5, 8, 13), Block.box(11, 7, 12, 12, 8, 13), Block.box(12, 7, 11, 13, 8, 12), Block.box(12, 7, 4, 13, 8, 5), Block.box(11, 7, 3, 12, 8, 4), Block.box(4, 7, 3, 5, 8, 4)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape ENERGIZER_SHAPE = Stream.of(Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(2, 2, 14, 14, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(9, 3, 0, 13, 4, 1), Block.box(3, 3, 15, 7, 4, 16), Block.box(9, 12, 0, 13, 13, 1), Block.box(3, 12, 15, 7, 13, 16), Block.box(10, 4, 0, 12, 12, 1), Block.box(4, 4, 15, 6, 12, 16), Block.box(0, 3, 3, 1, 4, 7), Block.box(15, 3, 9, 16, 4, 13), Block.box(0, 12, 3, 1, 13, 7), Block.box(15, 12, 9, 16, 13, 13), Block.box(0, 4, 4, 1, 12, 6), Block.box(15, 4, 10, 16, 12, 12)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape BARREL_SHAPE = Stream.of(Block.box(0, 12, 0, 16, 14, 1), Block.box(1, 0.5, 1, 15, 15, 15), Block.box(0, 2, 15, 16, 4, 16), Block.box(0, 7, 15, 16, 9, 16), Block.box(0, 12, 15, 16, 14, 16), Block.box(0, 2, 0, 16, 4, 1), Block.box(0, 7, 0, 16, 9, 1), Block.box(0, 2, 1, 1, 4, 15), Block.box(0, 7, 1, 1, 9, 15), Block.box(0, 12, 1, 1, 14, 15), Block.box(15, 12, 1, 16, 14, 15), Block.box(15, 7, 1, 16, 9, 15), Block.box(15, 2, 1, 16, 4, 15), Block.box(7, 0, 0.5, 9, 16, 1.5), Block.box(0.5, 0, 7, 1.5, 16, 9), Block.box(7, 0, 14.5, 9, 16, 15.5), Block.box(14.5, 0, 7, 15.5, 16, 9), Block.box(2, 0, 0.5, 5, 16, 1.5), Block.box(0.5, 0, 11, 1.5, 16, 14), Block.box(2, 0, 14.5, 5, 16, 15.5), Block.box(14.5, 0, 11, 15.5, 16, 14), Block.box(11, 0, 0.5, 14, 16, 1.5), Block.box(0.5, 0, 2, 1.5, 16, 5), Block.box(11, 0, 14.5, 14, 16, 15.5), Block.box(14.5, 0, 2, 15.5, 16, 5), Block.box(4, 15, 7, 6, 15.3, 9), Block.box(2, 15, 4, 3, 15.3, 12), Block.box(4, 15, 13, 12, 15.3, 14), Block.box(4, 15, 2, 12, 15.3, 3), Block.box(13, 15, 4, 14, 15.3, 12), Block.box(3, 15, 3, 4, 15.3, 4), Block.box(3, 15, 12, 4, 15.3, 13), Block.box(12, 15, 3, 13, 15.3, 4), Block.box(12, 15, 12, 13, 15.3, 13)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape FIREWORKS_BOX_SHAPE = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(10, 14, 9, 12, 15, 10), Block.box(7, 14, 9, 9, 15, 10), Block.box(4, 14, 9, 6, 15, 10), Block.box(10, 14, 6, 12, 15, 7), Block.box(7, 14, 6, 9, 15, 7), Block.box(4, 14, 6, 6, 15, 7), Block.box(6, 14, 4, 7, 15, 12), Block.box(9, 14, 4, 10, 15, 12), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 13, 2, 14, 14, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape GLASS_SHAPE = Stream.of(Block.box(15, 0, 1, 16, 1, 15), Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape HEAT_COLLECTOR_SHAPE = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(15, 11, 4, 16, 12, 12), Block.box(15, 5, 4, 16, 6, 12), Block.box(15, 7, 4, 16, 8, 12), Block.box(15, 9, 4, 16, 10, 12), Block.box(4, 11, 15, 12, 12, 16), Block.box(4, 9, 15, 12, 10, 16), Block.box(4, 7, 15, 12, 8, 16), Block.box(4, 5, 15, 12, 6, 16), Block.box(0, 11, 4, 1, 12, 12), Block.box(0, 5, 4, 1, 6, 12), Block.box(0, 7, 4, 1, 8, 12), Block.box(0, 9, 4, 1, 10, 12), Block.box(4, 11, 0, 12, 12, 1), Block.box(4, 9, 0, 12, 10, 1), Block.box(4, 7, 0, 12, 8, 1), Block.box(4, 5, 0, 12, 6, 1), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape ITEM_VIEWER_SHAPE = Stream.of(Block.box(15, 0, 1, 16, 1, 15), Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape HOPPING_ITEM_VIEWER_SHAPE = Stream.of(Block.box(0, 10, 0, 16, 11, 16), Block.box(1, 11, 1, 2, 15, 15), Block.box(14, 11, 1, 15, 15, 15), Block.box(2, 11, 1, 14, 15, 2), Block.box(2, 11, 14, 14, 15, 15), Block.box(4, 4, 4, 12, 10, 12), Block.box(6, 0, 6, 10, 4, 10), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 11, 0, 1, 15, 1), Block.box(0, 11, 15, 1, 15, 16), Block.box(15, 11, 15, 16, 15, 16), Block.box(15, 11, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape BOOSTER_SHAPE = Stream.of(Block.box(5, 12, 12, 11, 13, 13), Block.box(6, 0, 6, 10, 16, 10), Block.box(5, 2, 5, 11, 3, 11), Block.box(5, 4, 12, 11, 5, 13), Block.box(5, 6, 12, 11, 7, 13), Block.box(5, 8, 12, 11, 9, 13), Block.box(5, 10, 12, 11, 11, 13), Block.box(5, 4, 3, 11, 5, 4), Block.box(5, 6, 3, 11, 7, 4), Block.box(5, 8, 3, 11, 9, 4), Block.box(5, 10, 3, 11, 11, 4), Block.box(5, 12, 3, 11, 13, 4), Block.box(3, 4, 5, 4, 5, 11), Block.box(3, 6, 5, 4, 7, 11), Block.box(3, 8, 5, 4, 9, 11), Block.box(3, 10, 5, 4, 11, 11), Block.box(3, 12, 5, 4, 13, 11), Block.box(12, 4, 5, 13, 5, 11), Block.box(12, 6, 5, 13, 7, 11), Block.box(12, 8, 5, 13, 9, 11), Block.box(12, 10, 5, 13, 11, 11), Block.box(12, 12, 5, 13, 13, 11), Block.box(5, 14, 5, 11, 15, 11), Block.box(4, 4, 11, 5, 5, 12), Block.box(4, 6, 11, 5, 7, 12), Block.box(4, 8, 11, 5, 9, 12), Block.box(4, 10, 11, 5, 11, 12), Block.box(4, 12, 11, 5, 13, 12), Block.box(4, 4, 4, 5, 5, 5), Block.box(4, 6, 4, 5, 7, 5), Block.box(4, 8, 4, 5, 9, 5), Block.box(4, 10, 4, 5, 11, 5), Block.box(4, 12, 4, 5, 13, 5), Block.box(11, 4, 4, 12, 5, 5), Block.box(11, 6, 4, 12, 7, 5), Block.box(11, 8, 4, 12, 9, 5), Block.box(11, 10, 4, 12, 11, 5), Block.box(11, 12, 4, 12, 13, 5), Block.box(11, 4, 11, 12, 5, 12), Block.box(11, 6, 11, 12, 7, 12), Block.box(11, 8, 11, 12, 9, 12), Block.box(11, 10, 11, 12, 11, 12), Block.box(11, 12, 11, 12, 13, 12)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape PLAYER_INTERFACE_SHAPE = Stream.of(Block.box(15, 0, 1, 16, 1, 15), Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape COLLECTOR_SHAPE = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(1, 1, 4, 2, 4, 12), Block.box(14, 1, 4, 15, 4, 12), Block.box(4, 1, 1, 12, 4, 2), Block.box(4, 1, 14, 12, 4, 15), Block.box(4, 14, 12, 12, 15, 14), Block.box(1, 12, 4, 2, 15, 12), Block.box(14, 12, 4, 15, 15, 12), Block.box(4, 12, 1, 12, 15, 2), Block.box(4, 12, 14, 12, 15, 15), Block.box(4, 14, 2, 12, 15, 4), Block.box(1, 1, 12, 2, 15, 14), Block.box(14, 1, 2, 15, 15, 4), Block.box(1, 1, 1, 4, 15, 2), Block.box(12, 1, 14, 15, 15, 15), Block.box(12, 14, 2, 14, 15, 14), Block.box(1, 1, 2, 2, 15, 4), Block.box(14, 1, 12, 15, 15, 14), Block.box(12, 1, 1, 15, 15, 2), Block.box(1, 1, 14, 4, 15, 15), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 2, 2, 14, 14, 14), Block.box(1, 0, 1, 15, 1, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SUPPRESSOR_SHAPE = Stream.of(Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(9, 13, 9, 13, 16, 13), Block.box(9, 2, 9, 13, 3, 13), Block.box(3, 13, 9, 7, 16, 13), Block.box(3, 2, 9, 7, 3, 13), Block.box(9, 13, 3, 13, 16, 7), Block.box(9, 2, 3, 13, 3, 7), Block.box(3, 13, 3, 7, 16, 7), Block.box(3, 2, 3, 7, 3, 7), Block.box(4, 3, 10, 6, 13, 12), Block.box(10, 3, 10, 12, 13, 12), Block.box(10, 3, 4, 12, 13, 6), Block.box(4, 3, 4, 6, 13, 6)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape RELAY_SHAPE = Stream.of(Block.box(6, 4, 6, 7, 6, 7), Block.box(1, 0, 1, 15, 1, 15), Block.box(4, 2, 4, 12, 4, 12), Block.box(9, 4, 9, 10, 6, 10), Block.box(6, 4, 9, 7, 6, 10), Block.box(3, 1, 12, 4, 5, 13), Block.box(12, 1, 12, 13, 5, 13), Block.box(3, 1, 3, 4, 5, 4), Block.box(12, 1, 3, 13, 5, 4), Block.box(3, 4, 4, 4, 5, 12), Block.box(3, 1, 4, 4, 2, 12), Block.box(12, 4, 4, 13, 5, 12), Block.box(12, 1, 4, 13, 2, 12), Block.box(4, 4, 12, 12, 5, 13), Block.box(4, 4, 3, 12, 5, 4), Block.box(4, 1, 12, 12, 2, 13), Block.box(4, 1, 3, 12, 2, 4), Block.box(9, 4, 6, 10, 6, 7), Block.box(7, 4, 7, 9, 6, 9), Block.box(7, 6, 7, 9, 10, 9), Block.box(6.5, 5, 7, 7, 6, 9), Block.box(6.5, 7, 7, 7, 7.5, 9), Block.box(6.5, 9, 7, 7, 9.5, 9), Block.box(9, 5, 7, 9.5, 6, 9), Block.box(9, 7, 7, 9.5, 7.5, 9), Block.box(9, 9, 7, 9.5, 9.5, 9), Block.box(7, 5, 6.5, 9, 6, 7), Block.box(7, 7, 6.5, 9, 7.5, 7), Block.box(7, 9, 6.5, 9, 9.5, 7), Block.box(7, 5, 9, 9, 6, 9.5), Block.box(7, 7, 9, 9, 7.5, 9.5), Block.box(7, 9, 9, 9, 9.5, 9.5)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape EMPOWERER_SHAPE = Stream.of(Block.box(0, 0, 0, 16, 1, 16), Block.box(1, 1, 1, 15, 6, 15), Block.box(1, 6, 1, 15, 7, 15), Block.box(0, 7, 0, 16, 8, 1), Block.box(0, 7, 15, 16, 8, 16), Block.box(0, 7, 1, 1, 8, 15), Block.box(15, 7, 1, 16, 8, 15), Block.box(4, 7, 4, 12, 9, 12), Block.box(0, 1, 0, 1, 7, 1), Block.box(15, 1, 0, 16, 7, 1), Block.box(15, 1, 15, 16, 7, 16), Block.box(0, 1, 15, 1, 7, 16), Block.box(3, 7, 4, 4, 8, 5), Block.box(3, 7, 11, 4, 8, 12), Block.box(4, 7, 12, 5, 8, 13), Block.box(11, 7, 12, 12, 8, 13), Block.box(12, 7, 11, 13, 8, 12), Block.box(12, 7, 4, 13, 8, 5), Block.box(11, 7, 3, 12, 8, 4), Block.box(4, 7, 3, 5, 8, 4)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape ENERGIZER_SHAPE = Stream.of(Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(2, 2, 14, 14, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(9, 3, 0, 13, 4, 1), Block.box(3, 3, 15, 7, 4, 16), Block.box(9, 12, 0, 13, 13, 1), Block.box(3, 12, 15, 7, 13, 16), Block.box(10, 4, 0, 12, 12, 1), Block.box(4, 4, 15, 6, 12, 16), Block.box(0, 3, 3, 1, 4, 7), Block.box(15, 3, 9, 16, 4, 13), Block.box(0, 12, 3, 1, 13, 7), Block.box(15, 12, 9, 16, 13, 13), Block.box(0, 4, 4, 1, 12, 6), Block.box(15, 4, 10, 16, 12, 12)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape BARREL_SHAPE = Stream.of(Block.box(0, 12, 0, 16, 14, 1), Block.box(1, 0.5, 1, 15, 15, 15), Block.box(0, 2, 15, 16, 4, 16), Block.box(0, 7, 15, 16, 9, 16), Block.box(0, 12, 15, 16, 14, 16), Block.box(0, 2, 0, 16, 4, 1), Block.box(0, 7, 0, 16, 9, 1), Block.box(0, 2, 1, 1, 4, 15), Block.box(0, 7, 1, 1, 9, 15), Block.box(0, 12, 1, 1, 14, 15), Block.box(15, 12, 1, 16, 14, 15), Block.box(15, 7, 1, 16, 9, 15), Block.box(15, 2, 1, 16, 4, 15), Block.box(7, 0, 0.5, 9, 16, 1.5), Block.box(0.5, 0, 7, 1.5, 16, 9), Block.box(7, 0, 14.5, 9, 16, 15.5), Block.box(14.5, 0, 7, 15.5, 16, 9), Block.box(2, 0, 0.5, 5, 16, 1.5), Block.box(0.5, 0, 11, 1.5, 16, 14), Block.box(2, 0, 14.5, 5, 16, 15.5), Block.box(14.5, 0, 11, 15.5, 16, 14), Block.box(11, 0, 0.5, 14, 16, 1.5), Block.box(0.5, 0, 2, 1.5, 16, 5), Block.box(11, 0, 14.5, 14, 16, 15.5), Block.box(14.5, 0, 2, 15.5, 16, 5), Block.box(4, 15, 7, 6, 15.3, 9), Block.box(2, 15, 4, 3, 15.3, 12), Block.box(4, 15, 13, 12, 15.3, 14), Block.box(4, 15, 2, 12, 15.3, 3), Block.box(13, 15, 4, 14, 15.3, 12), Block.box(3, 15, 3, 4, 15.3, 4), Block.box(3, 15, 12, 4, 15.3, 13), Block.box(12, 15, 3, 13, 15.3, 4), Block.box(12, 15, 12, 13, 15.3, 13)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape FIREWORKS_BOX_SHAPE = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(10, 14, 9, 12, 15, 10), Block.box(7, 14, 9, 9, 15, 10), Block.box(4, 14, 9, 6, 15, 10), Block.box(10, 14, 6, 12, 15, 7), Block.box(7, 14, 6, 9, 15, 7), Block.box(4, 14, 6, 6, 15, 7), Block.box(6, 14, 4, 7, 15, 12), Block.box(9, 14, 4, 10, 15, 12), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 13, 2, 14, 14, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape GLASS_SHAPE = Stream.of(Block.box(15, 0, 1, 16, 1, 15), Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape HEAT_COLLECTOR_SHAPE = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(15, 11, 4, 16, 12, 12), Block.box(15, 5, 4, 16, 6, 12), Block.box(15, 7, 4, 16, 8, 12), Block.box(15, 9, 4, 16, 10, 12), Block.box(4, 11, 15, 12, 12, 16), Block.box(4, 9, 15, 12, 10, 16), Block.box(4, 7, 15, 12, 8, 16), Block.box(4, 5, 15, 12, 6, 16), Block.box(0, 11, 4, 1, 12, 12), Block.box(0, 5, 4, 1, 6, 12), Block.box(0, 7, 4, 1, 8, 12), Block.box(0, 9, 4, 1, 10, 12), Block.box(4, 11, 0, 12, 12, 1), Block.box(4, 9, 0, 12, 10, 1), Block.box(4, 7, 0, 12, 8, 1), Block.box(4, 5, 0, 12, 6, 1), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape ITEM_VIEWER_SHAPE = Stream.of(Block.box(15, 0, 1, 16, 1, 15), Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape HOPPING_ITEM_VIEWER_SHAPE = Stream.of(Block.box(0, 10, 0, 16, 11, 16), Block.box(1, 11, 1, 2, 15, 15), Block.box(14, 11, 1, 15, 15, 15), Block.box(2, 11, 1, 14, 15, 2), Block.box(2, 11, 14, 14, 15, 15), Block.box(4, 4, 4, 12, 10, 12), Block.box(6, 0, 6, 10, 4, 10), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 11, 0, 1, 15, 1), Block.box(0, 11, 15, 1, 15, 16), Block.box(15, 11, 15, 16, 15, 16), Block.box(15, 11, 0, 16, 15, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape BOOSTER_SHAPE = Stream.of(Block.box(5, 12, 12, 11, 13, 13), Block.box(6, 0, 6, 10, 16, 10), Block.box(5, 2, 5, 11, 3, 11), Block.box(5, 4, 12, 11, 5, 13), Block.box(5, 6, 12, 11, 7, 13), Block.box(5, 8, 12, 11, 9, 13), Block.box(5, 10, 12, 11, 11, 13), Block.box(5, 4, 3, 11, 5, 4), Block.box(5, 6, 3, 11, 7, 4), Block.box(5, 8, 3, 11, 9, 4), Block.box(5, 10, 3, 11, 11, 4), Block.box(5, 12, 3, 11, 13, 4), Block.box(3, 4, 5, 4, 5, 11), Block.box(3, 6, 5, 4, 7, 11), Block.box(3, 8, 5, 4, 9, 11), Block.box(3, 10, 5, 4, 11, 11), Block.box(3, 12, 5, 4, 13, 11), Block.box(12, 4, 5, 13, 5, 11), Block.box(12, 6, 5, 13, 7, 11), Block.box(12, 8, 5, 13, 9, 11), Block.box(12, 10, 5, 13, 11, 11), Block.box(12, 12, 5, 13, 13, 11), Block.box(5, 14, 5, 11, 15, 11), Block.box(4, 4, 11, 5, 5, 12), Block.box(4, 6, 11, 5, 7, 12), Block.box(4, 8, 11, 5, 9, 12), Block.box(4, 10, 11, 5, 11, 12), Block.box(4, 12, 11, 5, 13, 12), Block.box(4, 4, 4, 5, 5, 5), Block.box(4, 6, 4, 5, 7, 5), Block.box(4, 8, 4, 5, 9, 5), Block.box(4, 10, 4, 5, 11, 5), Block.box(4, 12, 4, 5, 13, 5), Block.box(11, 4, 4, 12, 5, 5), Block.box(11, 6, 4, 12, 7, 5), Block.box(11, 8, 4, 12, 9, 5), Block.box(11, 10, 4, 12, 11, 5), Block.box(11, 12, 4, 12, 13, 5), Block.box(11, 4, 11, 12, 5, 12), Block.box(11, 6, 11, 12, 7, 12), Block.box(11, 8, 11, 12, 9, 12), Block.box(11, 10, 11, 12, 11, 12), Block.box(11, 12, 11, 12, 13, 12)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape PLAYER_INTERFACE_SHAPE = Stream.of(Block.box(15, 0, 1, 16, 1, 15), Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape COLLECTOR_SHAPE = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(1, 1, 4, 2, 4, 12), Block.box(14, 1, 4, 15, 4, 12), Block.box(4, 1, 1, 12, 4, 2), Block.box(4, 1, 14, 12, 4, 15), Block.box(4, 14, 12, 12, 15, 14), Block.box(1, 12, 4, 2, 15, 12), Block.box(14, 12, 4, 15, 15, 12), Block.box(4, 12, 1, 12, 15, 2), Block.box(4, 12, 14, 12, 15, 15), Block.box(4, 14, 2, 12, 15, 4), Block.box(1, 1, 12, 2, 15, 14), Block.box(14, 1, 2, 15, 15, 4), Block.box(1, 1, 1, 4, 15, 2), Block.box(12, 1, 14, 15, 15, 15), Block.box(12, 14, 2, 14, 15, 14), Block.box(1, 1, 2, 2, 15, 4), Block.box(14, 1, 12, 15, 15, 14), Block.box(12, 1, 1, 15, 15, 2), Block.box(1, 1, 14, 4, 15, 15), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 2, 2, 14, 14, 14), Block.box(1, 0, 1, 15, 1, 15)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SUPPRESSOR_SHAPE = Stream.of(Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(9, 13, 9, 13, 16, 13), Block.box(9, 2, 9, 13, 3, 13), Block.box(3, 13, 9, 7, 16, 13), Block.box(3, 2, 9, 7, 3, 13), Block.box(9, 13, 3, 13, 16, 7), Block.box(9, 2, 3, 13, 3, 7), Block.box(3, 13, 3, 7, 16, 7), Block.box(3, 2, 3, 7, 3, 7), Block.box(4, 3, 10, 6, 13, 12), Block.box(10, 3, 10, 12, 13, 12), Block.box(10, 3, 4, 12, 13, 6), Block.box(4, 3, 4, 6, 13, 6)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape RELAY_SHAPE = Stream.of(Block.box(6, 4, 6, 7, 6, 7), Block.box(1, 0, 1, 15, 1, 15), Block.box(4, 2, 4, 12, 4, 12), Block.box(9, 4, 9, 10, 6, 10), Block.box(6, 4, 9, 7, 6, 10), Block.box(3, 1, 12, 4, 5, 13), Block.box(12, 1, 12, 13, 5, 13), Block.box(3, 1, 3, 4, 5, 4), Block.box(12, 1, 3, 13, 5, 4), Block.box(3, 4, 4, 4, 5, 12), Block.box(3, 1, 4, 4, 2, 12), Block.box(12, 4, 4, 13, 5, 12), Block.box(12, 1, 4, 13, 2, 12), Block.box(4, 4, 12, 12, 5, 13), Block.box(4, 4, 3, 12, 5, 4), Block.box(4, 1, 12, 12, 2, 13), Block.box(4, 1, 3, 12, 2, 4), Block.box(9, 4, 6, 10, 6, 7), Block.box(7, 4, 7, 9, 6, 9), Block.box(7, 6, 7, 9, 10, 9), Block.box(6.5, 5, 7, 7, 6, 9), Block.box(6.5, 7, 7, 7, 7.5, 9), Block.box(6.5, 9, 7, 7, 9.5, 9), Block.box(9, 5, 7, 9.5, 6, 9), Block.box(9, 7, 7, 9.5, 7.5, 9), Block.box(9, 9, 7, 9.5, 9.5, 9), Block.box(7, 5, 6.5, 9, 6, 7), Block.box(7, 7, 6.5, 9, 7.5, 7), Block.box(7, 9, 6.5, 9, 9.5, 7), Block.box(7, 5, 9, 9, 6, 9.5), Block.box(7, 7, 9, 9, 7.5, 9.5), Block.box(7, 9, 9, 9, 9.5, 9.5)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); static final class CoalGeneratorShapes { - static final VoxelShape NORTH = Stream.of(Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(2, 0, 2, 14, 1, 14), Block.box(5, 14, 6, 11, 15, 7), Block.box(5, 14, 8, 11, 15, 9), Block.box(5, 14, 10, 11, 15, 14), Block.box(5, 14, 2, 11, 15, 5), Block.box(11, 14, 2, 14, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 14, 15, 15, 15), Block.box(3, 11, 0, 13, 12, 1), Block.box(5, 3, 1, 6, 8, 2), Block.box(10, 3, 1, 11, 8, 2), Block.box(3, 8, 1, 13, 15, 2), Block.box(3, 0, 1, 13, 3, 2), Block.box(1, 0, 1, 3, 15, 2), Block.box(13, 0, 1, 15, 15, 2), Block.box(5, 13, 5, 11, 14, 10), Block.box(2, 3, 2, 14, 8, 3), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape EAST = Stream.of(Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(2, 0, 2, 14, 1, 14), Block.box(9, 14, 5, 10, 15, 11), Block.box(7, 14, 5, 8, 15, 11), Block.box(2, 14, 5, 6, 15, 11), Block.box(11, 14, 5, 14, 15, 11), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 0, 1, 14, 15, 2), Block.box(2, 0, 14, 14, 15, 15), Block.box(1, 0, 1, 2, 15, 15), Block.box(15, 11, 3, 16, 12, 13), Block.box(14, 3, 5, 15, 8, 6), Block.box(14, 3, 10, 15, 8, 11), Block.box(14, 8, 3, 15, 15, 13), Block.box(14, 0, 3, 15, 3, 13), Block.box(14, 0, 1, 15, 15, 3), Block.box(14, 0, 13, 15, 15, 15), Block.box(6, 13, 5, 11, 14, 11), Block.box(13, 3, 2, 14, 8, 14), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SOUTH = Stream.of(Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(2, 0, 2, 14, 1, 14), Block.box(5, 14, 9, 11, 15, 10), Block.box(5, 14, 7, 11, 15, 8), Block.box(5, 14, 2, 11, 15, 6), Block.box(5, 14, 11, 11, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(11, 14, 2, 14, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(3, 11, 15, 13, 12, 16), Block.box(10, 3, 14, 11, 8, 15), Block.box(5, 3, 14, 6, 8, 15), Block.box(3, 8, 14, 13, 15, 15), Block.box(3, 0, 14, 13, 3, 15), Block.box(13, 0, 14, 15, 15, 15), Block.box(1, 0, 14, 3, 15, 15), Block.box(5, 13, 6, 11, 14, 11), Block.box(2, 3, 13, 14, 8, 14), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape WEST = Stream.of(Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(2, 0, 2, 14, 1, 14), Block.box(6, 14, 5, 7, 15, 11), Block.box(8, 14, 5, 9, 15, 11), Block.box(10, 14, 5, 14, 15, 11), Block.box(2, 14, 5, 5, 15, 11), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 14, 15, 2), Block.box(14, 0, 1, 15, 15, 15), Block.box(0, 11, 3, 1, 12, 13), Block.box(1, 3, 10, 2, 8, 11), Block.box(1, 3, 5, 2, 8, 6), Block.box(1, 8, 3, 2, 15, 13), Block.box(1, 0, 3, 2, 3, 13), Block.box(1, 0, 13, 2, 15, 15), Block.box(1, 0, 1, 2, 15, 3), Block.box(5, 13, 5, 10, 14, 11), Block.box(2, 3, 2, 3, 8, 14), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape NORTH = Stream.of(Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(2, 0, 2, 14, 1, 14), Block.box(5, 14, 6, 11, 15, 7), Block.box(5, 14, 8, 11, 15, 9), Block.box(5, 14, 10, 11, 15, 14), Block.box(5, 14, 2, 11, 15, 5), Block.box(11, 14, 2, 14, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 14, 15, 15, 15), Block.box(3, 11, 0, 13, 12, 1), Block.box(5, 3, 1, 6, 8, 2), Block.box(10, 3, 1, 11, 8, 2), Block.box(3, 8, 1, 13, 15, 2), Block.box(3, 0, 1, 13, 3, 2), Block.box(1, 0, 1, 3, 15, 2), Block.box(13, 0, 1, 15, 15, 2), Block.box(5, 13, 5, 11, 14, 10), Block.box(2, 3, 2, 14, 8, 3), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape EAST = Stream.of(Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(2, 0, 2, 14, 1, 14), Block.box(9, 14, 5, 10, 15, 11), Block.box(7, 14, 5, 8, 15, 11), Block.box(2, 14, 5, 6, 15, 11), Block.box(11, 14, 5, 14, 15, 11), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 0, 1, 14, 15, 2), Block.box(2, 0, 14, 14, 15, 15), Block.box(1, 0, 1, 2, 15, 15), Block.box(15, 11, 3, 16, 12, 13), Block.box(14, 3, 5, 15, 8, 6), Block.box(14, 3, 10, 15, 8, 11), Block.box(14, 8, 3, 15, 15, 13), Block.box(14, 0, 3, 15, 3, 13), Block.box(14, 0, 1, 15, 15, 3), Block.box(14, 0, 13, 15, 15, 15), Block.box(6, 13, 5, 11, 14, 11), Block.box(13, 3, 2, 14, 8, 14), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SOUTH = Stream.of(Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(2, 0, 2, 14, 1, 14), Block.box(5, 14, 9, 11, 15, 10), Block.box(5, 14, 7, 11, 15, 8), Block.box(5, 14, 2, 11, 15, 6), Block.box(5, 14, 11, 11, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(11, 14, 2, 14, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(3, 11, 15, 13, 12, 16), Block.box(10, 3, 14, 11, 8, 15), Block.box(5, 3, 14, 6, 8, 15), Block.box(3, 8, 14, 13, 15, 15), Block.box(3, 0, 14, 13, 3, 15), Block.box(13, 0, 14, 15, 15, 15), Block.box(1, 0, 14, 3, 15, 15), Block.box(5, 13, 6, 11, 14, 11), Block.box(2, 3, 13, 14, 8, 14), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape WEST = Stream.of(Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(2, 0, 2, 14, 1, 14), Block.box(6, 14, 5, 7, 15, 11), Block.box(8, 14, 5, 9, 15, 11), Block.box(10, 14, 5, 14, 15, 11), Block.box(2, 14, 5, 5, 15, 11), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 14, 15, 2), Block.box(14, 0, 1, 15, 15, 15), Block.box(0, 11, 3, 1, 12, 13), Block.box(1, 3, 10, 2, 8, 11), Block.box(1, 3, 5, 2, 8, 6), Block.box(1, 8, 3, 2, 15, 13), Block.box(1, 0, 3, 2, 3, 13), Block.box(1, 0, 13, 2, 15, 15), Block.box(1, 0, 1, 2, 15, 3), Block.box(5, 13, 5, 10, 14, 11), Block.box(2, 3, 2, 3, 8, 14), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); } static class CoffeeMachineShapes { - static final VoxelShape NORTH = Stream.of(Block.box(8, 11, 7, 13, 14, 8), Block.box(1, 0, 1, 15, 1, 15), Block.box(7, 1, 8, 14, 9, 14), Block.box(6, 9, 3, 15, 11, 15), Block.box(8, 11, 8, 13, 13, 13), Block.box(10, 8, 3.5, 11, 9, 4.5), Block.box(9, 1, 2, 12, 2, 5), Block.box(9, 2, 5, 12, 7, 6), Block.box(9, 2, 1, 12, 7, 2), Block.box(12, 2, 2, 13, 7, 5), Block.box(8, 2, 2, 9, 7, 5), Block.box(13, 2, 3, 14, 3, 4), Block.box(13, 5, 3, 14, 6, 4), Block.box(14, 3, 3, 15, 5, 4), Block.box(13, 10.2, 4.2, 14, 11.2, 5.2), Block.box(11, 10.2, 4.2, 12, 11.2, 5.2), Block.box(13, 11, 7, 14, 14, 14), Block.box(7, 11, 7, 8, 14, 14), Block.box(8, 11, 13, 13, 14, 14), Block.box(14, 1, 14, 15, 9, 15), Block.box(6, 1, 14, 7, 9, 15), Block.box(14, 1, 7, 15, 9, 8), Block.box(6, 1, 7, 7, 9, 8), Block.box(6.8, 1.9, 11.9, 7, 3.1, 13.1), Block.box(6.8, 1.9, 9.9, 7, 3.1, 11.1), Block.box(3, 3, 10, 4, 5, 11), Block.box(2.9, 4.8, 9.9, 4.1, 5, 11.1), Block.box(2.9, 4.8, 11.9, 4.1, 5, 13.1), Block.box(3, 2, 12, 7, 3, 13), Block.box(3, 2, 10, 7, 3, 11), Block.box(3, 3, 12, 4, 5, 13), Block.box(2, 5, 9, 5, 11, 14), Block.box(2, 11, 11, 4, 12, 13), Block.box(1, 1, 11, 2, 12, 13)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape EAST = Stream.of(Block.box(8, 11, 8, 9, 14, 13), Block.box(1, 0, 1, 15, 1, 15), Block.box(2, 1, 7, 8, 9, 14), Block.box(1, 9, 6, 13, 11, 15), Block.box(3, 11, 8, 8, 13, 13), Block.box(11.5, 8, 10, 12.5, 9, 11), Block.box(11, 1, 9, 14, 2, 12), Block.box(10, 2, 9, 11, 7, 12), Block.box(14, 2, 9, 15, 7, 12), Block.box(11, 2, 12, 14, 7, 13), Block.box(11, 2, 8, 14, 7, 9), Block.box(12, 2, 13, 13, 3, 14), Block.box(12, 5, 13, 13, 6, 14), Block.box(12, 3, 14, 13, 5, 15), Block.box(10.8, 10.2, 13, 11.8, 11.2, 14), Block.box(10.8, 10.2, 11, 11.8, 11.2, 12), Block.box(2, 11, 13, 9, 14, 14), Block.box(2, 11, 7, 9, 14, 8), Block.box(2, 11, 8, 3, 14, 13), Block.box(1, 1, 14, 2, 9, 15), Block.box(1, 1, 6, 2, 9, 7), Block.box(8, 1, 14, 9, 9, 15), Block.box(8, 1, 6, 9, 9, 7), Block.box(2.9000000000000004, 1.9, 6.8, 4.1, 3.1, 7), Block.box(4.9, 1.9, 6.8, 6.1, 3.1, 7), Block.box(5, 3, 3, 6, 5, 4), Block.box(4.9, 4.8, 2.9000000000000004, 6.1, 5, 4.1), Block.box(2.9000000000000004, 4.8, 2.9000000000000004, 4.1, 5, 4.1), Block.box(3, 2, 3, 4, 3, 7), Block.box(5, 2, 3, 6, 3, 7), Block.box(3, 3, 3, 4, 5, 4), Block.box(2, 5, 2, 7, 11, 5), Block.box(3, 11, 2, 5, 12, 4), Block.box(3, 1, 1, 5, 12, 2)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SOUTH = Stream.of(Block.box(3, 11, 8, 8, 14, 9), Block.box(1, 0, 1, 15, 1, 15), Block.box(2, 1, 2, 9, 9, 8), Block.box(1, 9, 1, 10, 11, 13), Block.box(3, 11, 3, 8, 13, 8), Block.box(5, 8, 11.5, 6, 9, 12.5), Block.box(4, 1, 11, 7, 2, 14), Block.box(4, 2, 10, 7, 7, 11), Block.box(4, 2, 14, 7, 7, 15), Block.box(3, 2, 11, 4, 7, 14), Block.box(7, 2, 11, 8, 7, 14), Block.box(2, 2, 12, 3, 3, 13), Block.box(2, 5, 12, 3, 6, 13), Block.box(1, 3, 12, 2, 5, 13), Block.box(2, 10.2, 10.8, 3, 11.2, 11.8), Block.box(4, 10.2, 10.8, 5, 11.2, 11.8), Block.box(2, 11, 2, 3, 14, 9), Block.box(8, 11, 2, 9, 14, 9), Block.box(3, 11, 2, 8, 14, 3), Block.box(1, 1, 1, 2, 9, 2), Block.box(9, 1, 1, 10, 9, 2), Block.box(1, 1, 8, 2, 9, 9), Block.box(9, 1, 8, 10, 9, 9), Block.box(9, 1.9, 2.9000000000000004, 9.2, 3.1, 4.1), Block.box(9, 1.9, 4.9, 9.2, 3.1, 6.1), Block.box(12, 3, 5, 13, 5, 6), Block.box(11.9, 4.8, 4.9, 13.1, 5, 6.1), Block.box(11.9, 4.8, 2.9000000000000004, 13.1, 5, 4.1), Block.box(9, 2, 3, 13, 3, 4), Block.box(9, 2, 5, 13, 3, 6), Block.box(12, 3, 3, 13, 5, 4), Block.box(11, 5, 2, 14, 11, 7), Block.box(12, 11, 3, 14, 12, 5), Block.box(14, 1, 3, 15, 12, 5)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape WEST = Stream.of(Block.box(7, 11, 3, 8, 14, 8), Block.box(1, 0, 1, 15, 1, 15), Block.box(8, 1, 2, 14, 9, 9), Block.box(3, 9, 1, 15, 11, 10), Block.box(8, 11, 3, 13, 13, 8), Block.box(3.5, 8, 5, 4.5, 9, 6), Block.box(2, 1, 4, 5, 2, 7), Block.box(5, 2, 4, 6, 7, 7), Block.box(1, 2, 4, 2, 7, 7), Block.box(2, 2, 3, 5, 7, 4), Block.box(2, 2, 7, 5, 7, 8), Block.box(3, 2, 2, 4, 3, 3), Block.box(3, 5, 2, 4, 6, 3), Block.box(3, 3, 1, 4, 5, 2), Block.box(4.199999999999999, 10.2, 2, 5.199999999999999, 11.2, 3), Block.box(4.199999999999999, 10.2, 4, 5.199999999999999, 11.2, 5), Block.box(7, 11, 2, 14, 14, 3), Block.box(7, 11, 8, 14, 14, 9), Block.box(13, 11, 3, 14, 14, 8), Block.box(14, 1, 1, 15, 9, 2), Block.box(14, 1, 9, 15, 9, 10), Block.box(7, 1, 1, 8, 9, 2), Block.box(7, 1, 9, 8, 9, 10), Block.box(11.9, 1.9, 9, 13.1, 3.1, 9.2), Block.box(9.9, 1.9, 9, 11.1, 3.1, 9.2), Block.box(10, 3, 12, 11, 5, 13), Block.box(9.9, 4.8, 11.9, 11.1, 5, 13.1), Block.box(11.9, 4.8, 11.9, 13.1, 5, 13.1), Block.box(12, 2, 9, 13, 3, 13), Block.box(10, 2, 9, 11, 3, 13), Block.box(12, 3, 12, 13, 5, 13), Block.box(9, 5, 11, 14, 11, 14), Block.box(11, 11, 12, 13, 12, 14), Block.box(11, 1, 14, 13, 12, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape NORTH = Stream.of(Block.box(8, 11, 7, 13, 14, 8), Block.box(1, 0, 1, 15, 1, 15), Block.box(7, 1, 8, 14, 9, 14), Block.box(6, 9, 3, 15, 11, 15), Block.box(8, 11, 8, 13, 13, 13), Block.box(10, 8, 3.5, 11, 9, 4.5), Block.box(9, 1, 2, 12, 2, 5), Block.box(9, 2, 5, 12, 7, 6), Block.box(9, 2, 1, 12, 7, 2), Block.box(12, 2, 2, 13, 7, 5), Block.box(8, 2, 2, 9, 7, 5), Block.box(13, 2, 3, 14, 3, 4), Block.box(13, 5, 3, 14, 6, 4), Block.box(14, 3, 3, 15, 5, 4), Block.box(13, 10.2, 4.2, 14, 11.2, 5.2), Block.box(11, 10.2, 4.2, 12, 11.2, 5.2), Block.box(13, 11, 7, 14, 14, 14), Block.box(7, 11, 7, 8, 14, 14), Block.box(8, 11, 13, 13, 14, 14), Block.box(14, 1, 14, 15, 9, 15), Block.box(6, 1, 14, 7, 9, 15), Block.box(14, 1, 7, 15, 9, 8), Block.box(6, 1, 7, 7, 9, 8), Block.box(6.8, 1.9, 11.9, 7, 3.1, 13.1), Block.box(6.8, 1.9, 9.9, 7, 3.1, 11.1), Block.box(3, 3, 10, 4, 5, 11), Block.box(2.9, 4.8, 9.9, 4.1, 5, 11.1), Block.box(2.9, 4.8, 11.9, 4.1, 5, 13.1), Block.box(3, 2, 12, 7, 3, 13), Block.box(3, 2, 10, 7, 3, 11), Block.box(3, 3, 12, 4, 5, 13), Block.box(2, 5, 9, 5, 11, 14), Block.box(2, 11, 11, 4, 12, 13), Block.box(1, 1, 11, 2, 12, 13)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape EAST = Stream.of(Block.box(8, 11, 8, 9, 14, 13), Block.box(1, 0, 1, 15, 1, 15), Block.box(2, 1, 7, 8, 9, 14), Block.box(1, 9, 6, 13, 11, 15), Block.box(3, 11, 8, 8, 13, 13), Block.box(11.5, 8, 10, 12.5, 9, 11), Block.box(11, 1, 9, 14, 2, 12), Block.box(10, 2, 9, 11, 7, 12), Block.box(14, 2, 9, 15, 7, 12), Block.box(11, 2, 12, 14, 7, 13), Block.box(11, 2, 8, 14, 7, 9), Block.box(12, 2, 13, 13, 3, 14), Block.box(12, 5, 13, 13, 6, 14), Block.box(12, 3, 14, 13, 5, 15), Block.box(10.8, 10.2, 13, 11.8, 11.2, 14), Block.box(10.8, 10.2, 11, 11.8, 11.2, 12), Block.box(2, 11, 13, 9, 14, 14), Block.box(2, 11, 7, 9, 14, 8), Block.box(2, 11, 8, 3, 14, 13), Block.box(1, 1, 14, 2, 9, 15), Block.box(1, 1, 6, 2, 9, 7), Block.box(8, 1, 14, 9, 9, 15), Block.box(8, 1, 6, 9, 9, 7), Block.box(2.9000000000000004, 1.9, 6.8, 4.1, 3.1, 7), Block.box(4.9, 1.9, 6.8, 6.1, 3.1, 7), Block.box(5, 3, 3, 6, 5, 4), Block.box(4.9, 4.8, 2.9000000000000004, 6.1, 5, 4.1), Block.box(2.9000000000000004, 4.8, 2.9000000000000004, 4.1, 5, 4.1), Block.box(3, 2, 3, 4, 3, 7), Block.box(5, 2, 3, 6, 3, 7), Block.box(3, 3, 3, 4, 5, 4), Block.box(2, 5, 2, 7, 11, 5), Block.box(3, 11, 2, 5, 12, 4), Block.box(3, 1, 1, 5, 12, 2)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SOUTH = Stream.of(Block.box(3, 11, 8, 8, 14, 9), Block.box(1, 0, 1, 15, 1, 15), Block.box(2, 1, 2, 9, 9, 8), Block.box(1, 9, 1, 10, 11, 13), Block.box(3, 11, 3, 8, 13, 8), Block.box(5, 8, 11.5, 6, 9, 12.5), Block.box(4, 1, 11, 7, 2, 14), Block.box(4, 2, 10, 7, 7, 11), Block.box(4, 2, 14, 7, 7, 15), Block.box(3, 2, 11, 4, 7, 14), Block.box(7, 2, 11, 8, 7, 14), Block.box(2, 2, 12, 3, 3, 13), Block.box(2, 5, 12, 3, 6, 13), Block.box(1, 3, 12, 2, 5, 13), Block.box(2, 10.2, 10.8, 3, 11.2, 11.8), Block.box(4, 10.2, 10.8, 5, 11.2, 11.8), Block.box(2, 11, 2, 3, 14, 9), Block.box(8, 11, 2, 9, 14, 9), Block.box(3, 11, 2, 8, 14, 3), Block.box(1, 1, 1, 2, 9, 2), Block.box(9, 1, 1, 10, 9, 2), Block.box(1, 1, 8, 2, 9, 9), Block.box(9, 1, 8, 10, 9, 9), Block.box(9, 1.9, 2.9000000000000004, 9.2, 3.1, 4.1), Block.box(9, 1.9, 4.9, 9.2, 3.1, 6.1), Block.box(12, 3, 5, 13, 5, 6), Block.box(11.9, 4.8, 4.9, 13.1, 5, 6.1), Block.box(11.9, 4.8, 2.9000000000000004, 13.1, 5, 4.1), Block.box(9, 2, 3, 13, 3, 4), Block.box(9, 2, 5, 13, 3, 6), Block.box(12, 3, 3, 13, 5, 4), Block.box(11, 5, 2, 14, 11, 7), Block.box(12, 11, 3, 14, 12, 5), Block.box(14, 1, 3, 15, 12, 5)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape WEST = Stream.of(Block.box(7, 11, 3, 8, 14, 8), Block.box(1, 0, 1, 15, 1, 15), Block.box(8, 1, 2, 14, 9, 9), Block.box(3, 9, 1, 15, 11, 10), Block.box(8, 11, 3, 13, 13, 8), Block.box(3.5, 8, 5, 4.5, 9, 6), Block.box(2, 1, 4, 5, 2, 7), Block.box(5, 2, 4, 6, 7, 7), Block.box(1, 2, 4, 2, 7, 7), Block.box(2, 2, 3, 5, 7, 4), Block.box(2, 2, 7, 5, 7, 8), Block.box(3, 2, 2, 4, 3, 3), Block.box(3, 5, 2, 4, 6, 3), Block.box(3, 3, 1, 4, 5, 2), Block.box(4.199999999999999, 10.2, 2, 5.199999999999999, 11.2, 3), Block.box(4.199999999999999, 10.2, 4, 5.199999999999999, 11.2, 5), Block.box(7, 11, 2, 14, 14, 3), Block.box(7, 11, 8, 14, 14, 9), Block.box(13, 11, 3, 14, 14, 8), Block.box(14, 1, 1, 15, 9, 2), Block.box(14, 1, 9, 15, 9, 10), Block.box(7, 1, 1, 8, 9, 2), Block.box(7, 1, 9, 8, 9, 10), Block.box(11.9, 1.9, 9, 13.1, 3.1, 9.2), Block.box(9.9, 1.9, 9, 11.1, 3.1, 9.2), Block.box(10, 3, 12, 11, 5, 13), Block.box(9.9, 4.8, 11.9, 11.1, 5, 13.1), Block.box(11.9, 4.8, 11.9, 13.1, 5, 13.1), Block.box(12, 2, 9, 13, 3, 13), Block.box(10, 2, 9, 11, 3, 13), Block.box(12, 3, 12, 13, 5, 13), Block.box(9, 5, 11, 14, 11, 14), Block.box(11, 11, 12, 13, 12, 14), Block.box(11, 1, 14, 13, 12, 15)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); } static class DirectionalBlockBreakerShapes { - static final VoxelShape SHAPE_U = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 3, 9, 16, 13, 13), Block.box(15, 3, 3, 16, 13, 7), Block.box(0, 3, 9, 1, 13, 13), Block.box(0, 3, 3, 1, 13, 7), Block.box(5, 15, 5, 11, 16, 11), Block.box(3, 15, 6, 5, 16, 10), Block.box(11, 15, 6, 13, 16, 10)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_D = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(15, 3, 3, 16, 13, 7), Block.box(15, 3, 9, 16, 13, 13), Block.box(0, 3, 3, 1, 13, 7), Block.box(0, 3, 9, 1, 13, 13), Block.box(5, 0, 5, 11, 1, 11), Block.box(3, 0, 6, 5, 1, 10), Block.box(11, 0, 6, 13, 1, 10)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_N = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 9, 3, 16, 13, 13), Block.box(15, 3, 3, 16, 7, 13), Block.box(0, 9, 3, 1, 13, 13), Block.box(0, 3, 3, 1, 7, 13), Block.box(5, 5, 0, 11, 11, 1), Block.box(3, 6, 0, 5, 10, 1), Block.box(11, 6, 0, 13, 10, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_E = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(15, 15, 0, 16, 16, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 9, 15, 13, 13, 16), Block.box(3, 3, 15, 13, 7, 16), Block.box(3, 9, 0, 13, 13, 1), Block.box(3, 3, 0, 13, 7, 1), Block.box(15, 5, 5, 16, 11, 11), Block.box(15, 6, 3, 16, 10, 5), Block.box(15, 6, 11, 16, 10, 13)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_S = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 9, 3, 1, 13, 13), Block.box(0, 3, 3, 1, 7, 13), Block.box(15, 9, 3, 16, 13, 13), Block.box(15, 3, 3, 16, 7, 13), Block.box(5, 5, 15, 11, 11, 16), Block.box(11, 6, 15, 13, 10, 16), Block.box(3, 6, 15, 5, 10, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_W = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 0, 1, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(3, 9, 0, 13, 13, 1), Block.box(3, 3, 0, 13, 7, 1), Block.box(3, 9, 15, 13, 13, 16), Block.box(3, 3, 15, 13, 7, 16), Block.box(0, 5, 5, 1, 11, 11), Block.box(0, 6, 11, 1, 10, 13), Block.box(0, 6, 3, 1, 10, 5)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_U = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 3, 9, 16, 13, 13), Block.box(15, 3, 3, 16, 13, 7), Block.box(0, 3, 9, 1, 13, 13), Block.box(0, 3, 3, 1, 13, 7), Block.box(5, 15, 5, 11, 16, 11), Block.box(3, 15, 6, 5, 16, 10), Block.box(11, 15, 6, 13, 16, 10)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_D = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(15, 3, 3, 16, 13, 7), Block.box(15, 3, 9, 16, 13, 13), Block.box(0, 3, 3, 1, 13, 7), Block.box(0, 3, 9, 1, 13, 13), Block.box(5, 0, 5, 11, 1, 11), Block.box(3, 0, 6, 5, 1, 10), Block.box(11, 0, 6, 13, 1, 10)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 9, 3, 16, 13, 13), Block.box(15, 3, 3, 16, 7, 13), Block.box(0, 9, 3, 1, 13, 13), Block.box(0, 3, 3, 1, 7, 13), Block.box(5, 5, 0, 11, 11, 1), Block.box(3, 6, 0, 5, 10, 1), Block.box(11, 6, 0, 13, 10, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(15, 15, 0, 16, 16, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 9, 15, 13, 13, 16), Block.box(3, 3, 15, 13, 7, 16), Block.box(3, 9, 0, 13, 13, 1), Block.box(3, 3, 0, 13, 7, 1), Block.box(15, 5, 5, 16, 11, 11), Block.box(15, 6, 3, 16, 10, 5), Block.box(15, 6, 11, 16, 10, 13)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 9, 3, 1, 13, 13), Block.box(0, 3, 3, 1, 7, 13), Block.box(15, 9, 3, 16, 13, 13), Block.box(15, 3, 3, 16, 7, 13), Block.box(5, 5, 15, 11, 11, 16), Block.box(11, 6, 15, 13, 10, 16), Block.box(3, 6, 15, 5, 10, 16)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 0, 1, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(3, 9, 0, 13, 13, 1), Block.box(3, 3, 0, 13, 7, 1), Block.box(3, 9, 15, 13, 13, 16), Block.box(3, 3, 15, 13, 7, 16), Block.box(0, 5, 5, 1, 11, 11), Block.box(0, 6, 11, 1, 10, 13), Block.box(0, 6, 3, 1, 10, 5)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); } static class FarmerShapes { - static final VoxelShape SHAPE_N = Stream.of(Block.box(11, 14, 4, 12, 15, 5), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(4, 11, 4, 12, 12, 12), Block.box(4, 14, 4, 5, 15, 5), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 1, 5, 15, 2), Block.box(5, 5, 2, 11, 11, 3), Block.box(5, 0, 1, 11, 5, 2), Block.box(5, 11, 1, 11, 15, 2), Block.box(11, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_E = Stream.of(Block.box(11, 14, 11, 12, 15, 12), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(4, 11, 4, 12, 12, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 4, 4, 15, 12), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 1, 14, 15, 2), Block.box(2, 0, 14, 14, 15, 15), Block.box(14, 0, 1, 15, 15, 5), Block.box(13, 5, 5, 14, 11, 11), Block.box(14, 0, 5, 15, 5, 11), Block.box(14, 11, 5, 15, 15, 11), Block.box(14, 0, 11, 15, 15, 15), Block.box(1, 0, 1, 2, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_S = Stream.of(Block.box(4, 14, 11, 5, 15, 12), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(4, 11, 4, 12, 12, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(12, 14, 2, 14, 15, 14), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(11, 0, 14, 15, 15, 15), Block.box(5, 5, 13, 11, 11, 14), Block.box(5, 0, 14, 11, 5, 15), Block.box(5, 11, 14, 11, 15, 15), Block.box(1, 0, 14, 5, 15, 15), Block.box(1, 0, 1, 15, 15, 2)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_W = Stream.of(Block.box(4, 14, 4, 5, 15, 5), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(4, 11, 4, 12, 12, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 14, 15, 2), Block.box(1, 0, 11, 2, 15, 15), Block.box(2, 5, 5, 3, 11, 11), Block.box(1, 0, 5, 2, 5, 11), Block.box(1, 11, 5, 2, 15, 11), Block.box(1, 0, 1, 2, 15, 5), Block.box(14, 0, 1, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.box(11, 14, 4, 12, 15, 5), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(4, 11, 4, 12, 12, 12), Block.box(4, 14, 4, 5, 15, 5), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 1, 5, 15, 2), Block.box(5, 5, 2, 11, 11, 3), Block.box(5, 0, 1, 11, 5, 2), Block.box(5, 11, 1, 11, 15, 2), Block.box(11, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.box(11, 14, 11, 12, 15, 12), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(4, 11, 4, 12, 12, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 4, 4, 15, 12), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 1, 14, 15, 2), Block.box(2, 0, 14, 14, 15, 15), Block.box(14, 0, 1, 15, 15, 5), Block.box(13, 5, 5, 14, 11, 11), Block.box(14, 0, 5, 15, 5, 11), Block.box(14, 11, 5, 15, 15, 11), Block.box(14, 0, 11, 15, 15, 15), Block.box(1, 0, 1, 2, 15, 15)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.box(4, 14, 11, 5, 15, 12), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(4, 11, 4, 12, 12, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(12, 14, 2, 14, 15, 14), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(11, 0, 14, 15, 15, 15), Block.box(5, 5, 13, 11, 11, 14), Block.box(5, 0, 14, 11, 5, 15), Block.box(5, 11, 14, 11, 15, 15), Block.box(1, 0, 14, 5, 15, 15), Block.box(1, 0, 1, 15, 15, 2)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.box(4, 14, 4, 5, 15, 5), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(4, 11, 4, 12, 12, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 14, 15, 2), Block.box(1, 0, 11, 2, 15, 15), Block.box(2, 5, 5, 3, 11, 11), Block.box(1, 0, 5, 2, 5, 11), Block.box(1, 11, 5, 2, 15, 11), Block.box(1, 0, 1, 2, 15, 5), Block.box(14, 0, 1, 15, 15, 15)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); } static class FluidCollectorShapes { - static final VoxelShape SHAPE_U = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 3, 6, 16, 13, 10), Block.box(0, 3, 6, 1, 13, 10), Block.box(5, 15, 5, 11, 16, 11), Block.box(3, 15, 6, 5, 16, 10), Block.box(11, 15, 6, 13, 16, 10), Block.box(6, 15, 11, 10, 16, 13), Block.box(6, 15, 3, 10, 16, 5)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_D = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(15, 3, 6, 16, 13, 10), Block.box(0, 3, 6, 1, 13, 10), Block.box(5, 0, 5, 11, 1, 11), Block.box(3, 0, 6, 5, 1, 10), Block.box(11, 0, 6, 13, 1, 10), Block.box(6, 0, 3, 10, 1, 5), Block.box(6, 0, 11, 10, 1, 13)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_N = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 6, 3, 16, 10, 13), Block.box(0, 6, 3, 1, 10, 13), Block.box(5, 5, 0, 11, 11, 1), Block.box(3, 6, 0, 5, 10, 1), Block.box(11, 6, 0, 13, 10, 1), Block.box(6, 11, 0, 10, 13, 1), Block.box(6, 3, 0, 10, 5, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_E = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(15, 15, 0, 16, 16, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 6, 15, 13, 10, 16), Block.box(3, 6, 0, 13, 10, 1), Block.box(15, 5, 5, 16, 11, 11), Block.box(15, 6, 3, 16, 10, 5), Block.box(15, 6, 11, 16, 10, 13), Block.box(15, 11, 6, 16, 13, 10), Block.box(15, 3, 6, 16, 5, 10)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_S = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 6, 3, 1, 10, 13), Block.box(15, 6, 3, 16, 10, 13), Block.box(5, 5, 15, 11, 11, 16), Block.box(11, 6, 15, 13, 10, 16), Block.box(3, 6, 15, 5, 10, 16), Block.box(6, 11, 15, 10, 13, 16), Block.box(6, 3, 15, 10, 5, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_W = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 0, 1, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(3, 6, 0, 13, 10, 1), Block.box(3, 6, 15, 13, 10, 16), Block.box(0, 5, 5, 1, 11, 11), Block.box(0, 6, 11, 1, 10, 13), Block.box(0, 6, 3, 1, 10, 5), Block.box(0, 11, 6, 1, 13, 10), Block.box(0, 3, 6, 1, 5, 10)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_U = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 3, 6, 16, 13, 10), Block.box(0, 3, 6, 1, 13, 10), Block.box(5, 15, 5, 11, 16, 11), Block.box(3, 15, 6, 5, 16, 10), Block.box(11, 15, 6, 13, 16, 10), Block.box(6, 15, 11, 10, 16, 13), Block.box(6, 15, 3, 10, 16, 5)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_D = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(15, 3, 6, 16, 13, 10), Block.box(0, 3, 6, 1, 13, 10), Block.box(5, 0, 5, 11, 1, 11), Block.box(3, 0, 6, 5, 1, 10), Block.box(11, 0, 6, 13, 1, 10), Block.box(6, 0, 3, 10, 1, 5), Block.box(6, 0, 11, 10, 1, 13)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 6, 3, 16, 10, 13), Block.box(0, 6, 3, 1, 10, 13), Block.box(5, 5, 0, 11, 11, 1), Block.box(3, 6, 0, 5, 10, 1), Block.box(11, 6, 0, 13, 10, 1), Block.box(6, 11, 0, 10, 13, 1), Block.box(6, 3, 0, 10, 5, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(15, 15, 0, 16, 16, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 6, 15, 13, 10, 16), Block.box(3, 6, 0, 13, 10, 1), Block.box(15, 5, 5, 16, 11, 11), Block.box(15, 6, 3, 16, 10, 5), Block.box(15, 6, 11, 16, 10, 13), Block.box(15, 11, 6, 16, 13, 10), Block.box(15, 3, 6, 16, 5, 10)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 6, 3, 1, 10, 13), Block.box(15, 6, 3, 16, 10, 13), Block.box(5, 5, 15, 11, 11, 16), Block.box(11, 6, 15, 13, 10, 16), Block.box(3, 6, 15, 5, 10, 16), Block.box(6, 11, 15, 10, 13, 16), Block.box(6, 3, 15, 10, 5, 16)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.box(1, 1, 1, 15, 15, 15), Block.box(0, 15, 0, 1, 16, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(3, 6, 0, 13, 10, 1), Block.box(3, 6, 15, 13, 10, 16), Block.box(0, 5, 5, 1, 11, 11), Block.box(0, 6, 11, 1, 10, 13), Block.box(0, 6, 3, 1, 10, 5), Block.box(0, 11, 6, 1, 13, 10), Block.box(0, 3, 6, 1, 5, 10)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); } static class FurnaceDoubleShapes { - static final VoxelShape SHAPE_N = Stream.of(Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 0, 0, 16, 1, 16), Block.box(5, 14, 6, 11, 15, 7), Block.box(5, 14, 8, 11, 15, 9), Block.box(5, 14, 10, 11, 15, 14), Block.box(5, 14, 2, 11, 15, 5), Block.box(11, 14, 2, 14, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(1, 1, 2, 2, 15, 14), Block.box(14, 1, 2, 15, 15, 14), Block.box(1, 1, 14, 15, 15, 15), Block.box(7, 3, 1, 9, 7, 2), Block.box(3, 7, 1, 13, 15, 2), Block.box(3, 1, 1, 13, 3, 2), Block.box(1, 1, 1, 3, 15, 2), Block.box(13, 1, 1, 15, 15, 2), Block.box(5, 13, 5, 11, 14, 10), Block.box(2, 3, 2, 14, 8, 3)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 0, 0, 16, 1, 16), Block.box(9, 14, 5, 10, 15, 11), Block.box(7, 14, 5, 8, 15, 11), Block.box(2, 14, 5, 6, 15, 11), Block.box(11, 14, 5, 14, 15, 11), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 1, 1, 14, 15, 2), Block.box(2, 1, 14, 14, 15, 15), Block.box(1, 1, 1, 2, 15, 15), Block.box(14, 3, 7, 15, 7, 9), Block.box(14, 7, 3, 15, 15, 13), Block.box(14, 1, 3, 15, 3, 13), Block.box(14, 1, 1, 15, 15, 3), Block.box(14, 1, 13, 15, 15, 15), Block.box(6, 13, 5, 11, 14, 11), Block.box(13, 3, 2, 14, 8, 14)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_S = Stream.of(Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 0, 0, 16, 1, 16), Block.box(5, 14, 9, 11, 15, 10), Block.box(5, 14, 7, 11, 15, 8), Block.box(5, 14, 2, 11, 15, 6), Block.box(5, 14, 11, 11, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(11, 14, 2, 14, 15, 14), Block.box(14, 1, 2, 15, 15, 14), Block.box(1, 1, 2, 2, 15, 14), Block.box(1, 1, 1, 15, 15, 2), Block.box(7, 3, 14, 9, 7, 15), Block.box(3, 7, 14, 13, 15, 15), Block.box(3, 1, 14, 13, 3, 15), Block.box(13, 1, 14, 15, 15, 15), Block.box(1, 1, 14, 3, 15, 15), Block.box(5, 13, 6, 11, 14, 11), Block.box(2, 3, 13, 14, 8, 14)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 0, 0, 16, 1, 16), Block.box(6, 14, 5, 7, 15, 11), Block.box(8, 14, 5, 9, 15, 11), Block.box(10, 14, 5, 14, 15, 11), Block.box(2, 14, 5, 5, 15, 11), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 1, 14, 14, 15, 15), Block.box(2, 1, 1, 14, 15, 2), Block.box(14, 1, 1, 15, 15, 15), Block.box(1, 3, 7, 2, 7, 9), Block.box(1, 7, 3, 2, 15, 13), Block.box(1, 1, 3, 2, 3, 13), Block.box(1, 1, 13, 2, 15, 15), Block.box(1, 1, 1, 2, 15, 3), Block.box(5, 13, 5, 10, 14, 11), Block.box(2, 3, 2, 3, 8, 14)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 0, 0, 16, 1, 16), Block.box(5, 14, 6, 11, 15, 7), Block.box(5, 14, 8, 11, 15, 9), Block.box(5, 14, 10, 11, 15, 14), Block.box(5, 14, 2, 11, 15, 5), Block.box(11, 14, 2, 14, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(1, 1, 2, 2, 15, 14), Block.box(14, 1, 2, 15, 15, 14), Block.box(1, 1, 14, 15, 15, 15), Block.box(7, 3, 1, 9, 7, 2), Block.box(3, 7, 1, 13, 15, 2), Block.box(3, 1, 1, 13, 3, 2), Block.box(1, 1, 1, 3, 15, 2), Block.box(13, 1, 1, 15, 15, 2), Block.box(5, 13, 5, 11, 14, 10), Block.box(2, 3, 2, 14, 8, 3)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 0, 0, 16, 1, 16), Block.box(9, 14, 5, 10, 15, 11), Block.box(7, 14, 5, 8, 15, 11), Block.box(2, 14, 5, 6, 15, 11), Block.box(11, 14, 5, 14, 15, 11), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 1, 1, 14, 15, 2), Block.box(2, 1, 14, 14, 15, 15), Block.box(1, 1, 1, 2, 15, 15), Block.box(14, 3, 7, 15, 7, 9), Block.box(14, 7, 3, 15, 15, 13), Block.box(14, 1, 3, 15, 3, 13), Block.box(14, 1, 1, 15, 15, 3), Block.box(14, 1, 13, 15, 15, 15), Block.box(6, 13, 5, 11, 14, 11), Block.box(13, 3, 2, 14, 8, 14)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 0, 0, 16, 1, 16), Block.box(5, 14, 9, 11, 15, 10), Block.box(5, 14, 7, 11, 15, 8), Block.box(5, 14, 2, 11, 15, 6), Block.box(5, 14, 11, 11, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(11, 14, 2, 14, 15, 14), Block.box(14, 1, 2, 15, 15, 14), Block.box(1, 1, 2, 2, 15, 14), Block.box(1, 1, 1, 15, 15, 2), Block.box(7, 3, 14, 9, 7, 15), Block.box(3, 7, 14, 13, 15, 15), Block.box(3, 1, 14, 13, 3, 15), Block.box(13, 1, 14, 15, 15, 15), Block.box(1, 1, 14, 3, 15, 15), Block.box(5, 13, 6, 11, 14, 11), Block.box(2, 3, 13, 14, 8, 14)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 0, 0, 16, 1, 16), Block.box(6, 14, 5, 7, 15, 11), Block.box(8, 14, 5, 9, 15, 11), Block.box(10, 14, 5, 14, 15, 11), Block.box(2, 14, 5, 5, 15, 11), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 1, 14, 14, 15, 15), Block.box(2, 1, 1, 14, 15, 2), Block.box(14, 1, 1, 15, 15, 15), Block.box(1, 3, 7, 2, 7, 9), Block.box(1, 7, 3, 2, 15, 13), Block.box(1, 1, 3, 2, 3, 13), Block.box(1, 1, 13, 2, 15, 15), Block.box(1, 1, 1, 2, 15, 3), Block.box(5, 13, 5, 10, 14, 11), Block.box(2, 3, 2, 3, 8, 14)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); } static final class GrinderShapes { - static final VoxelShape SHAPE_N = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(14, 12, 4, 15, 15, 12), Block.box(1, 0, 4, 2, 4, 12), Block.box(14, 0, 4, 15, 4, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 4), Block.box(14, 0, 2, 15, 15, 4), Block.box(1, 0, 12, 2, 15, 14), Block.box(14, 0, 12, 15, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15), Block.box(13, 4, 4, 14, 12, 12), Block.box(2, 4, 4, 3, 12, 12), Block.box(3, 8, 0, 6, 10, 1), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 12, 4, 2, 15, 12), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 0, 0, 16, 1, 1), Block.box(4, 12, 14, 12, 15, 15), Block.box(4, 0, 1, 12, 4, 2), Block.box(4, 0, 14, 12, 4, 15), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 4, 4, 15, 12), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(12, 0, 1, 14, 15, 2), Block.box(12, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 4, 15, 2), Block.box(2, 0, 14, 4, 15, 15), Block.box(14, 0, 1, 15, 15, 15), Block.box(1, 0, 1, 2, 15, 15), Block.box(4, 4, 13, 12, 12, 14), Block.box(4, 4, 2, 12, 12, 3), Block.box(15, 8, 3, 16, 10, 6), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(4, 12, 1, 12, 15, 2), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 12, 4, 2, 15, 12), Block.box(14, 0, 4, 15, 4, 12), Block.box(1, 0, 4, 2, 4, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(12, 14, 2, 14, 15, 14), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(14, 0, 12, 15, 15, 14), Block.box(1, 0, 12, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 4), Block.box(1, 0, 2, 2, 15, 4), Block.box(1, 0, 14, 15, 15, 15), Block.box(1, 0, 1, 15, 15, 2), Block.box(2, 4, 4, 3, 12, 12), Block.box(13, 4, 4, 14, 12, 12), Block.box(10, 8, 15, 13, 10, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(14, 12, 4, 15, 15, 12), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 0, 15, 16, 1, 16), Block.box(4, 12, 1, 12, 15, 2), Block.box(4, 0, 14, 12, 4, 15), Block.box(4, 0, 1, 12, 4, 2), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 14, 4, 15, 15), Block.box(2, 0, 1, 4, 15, 2), Block.box(12, 0, 14, 14, 15, 15), Block.box(12, 0, 1, 14, 15, 2), Block.box(1, 0, 1, 2, 15, 15), Block.box(14, 0, 1, 15, 15, 15), Block.box(4, 4, 2, 12, 12, 3), Block.box(4, 4, 13, 12, 12, 14), Block.box(0, 8, 10, 1, 10, 13), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(4, 12, 14, 12, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(14, 12, 4, 15, 15, 12), Block.box(1, 0, 4, 2, 4, 12), Block.box(14, 0, 4, 15, 4, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 4), Block.box(14, 0, 2, 15, 15, 4), Block.box(1, 0, 12, 2, 15, 14), Block.box(14, 0, 12, 15, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15), Block.box(13, 4, 4, 14, 12, 12), Block.box(2, 4, 4, 3, 12, 12), Block.box(3, 8, 0, 6, 10, 1), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 12, 4, 2, 15, 12), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 0, 0, 16, 1, 1), Block.box(4, 12, 14, 12, 15, 15), Block.box(4, 0, 1, 12, 4, 2), Block.box(4, 0, 14, 12, 4, 15), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 4, 4, 15, 12), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(12, 0, 1, 14, 15, 2), Block.box(12, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 4, 15, 2), Block.box(2, 0, 14, 4, 15, 15), Block.box(14, 0, 1, 15, 15, 15), Block.box(1, 0, 1, 2, 15, 15), Block.box(4, 4, 13, 12, 12, 14), Block.box(4, 4, 2, 12, 12, 3), Block.box(15, 8, 3, 16, 10, 6), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(4, 12, 1, 12, 15, 2), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 12, 4, 2, 15, 12), Block.box(14, 0, 4, 15, 4, 12), Block.box(1, 0, 4, 2, 4, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(12, 14, 2, 14, 15, 14), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(14, 0, 12, 15, 15, 14), Block.box(1, 0, 12, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 4), Block.box(1, 0, 2, 2, 15, 4), Block.box(1, 0, 14, 15, 15, 15), Block.box(1, 0, 1, 15, 15, 2), Block.box(2, 4, 4, 3, 12, 12), Block.box(13, 4, 4, 14, 12, 12), Block.box(10, 8, 15, 13, 10, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(14, 12, 4, 15, 15, 12), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 0, 15, 16, 1, 16), Block.box(4, 12, 1, 12, 15, 2), Block.box(4, 0, 14, 12, 4, 15), Block.box(4, 0, 1, 12, 4, 2), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 14, 4, 15, 15), Block.box(2, 0, 1, 4, 15, 2), Block.box(12, 0, 14, 14, 15, 15), Block.box(12, 0, 1, 14, 15, 2), Block.box(1, 0, 1, 2, 15, 15), Block.box(14, 0, 1, 15, 15, 15), Block.box(4, 4, 2, 12, 12, 3), Block.box(4, 4, 13, 12, 12, 14), Block.box(0, 8, 10, 1, 10, 13), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(4, 12, 14, 12, 15, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); } static final class LampPowererShapes { - static final VoxelShape SHAPE_N = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(3, 3, 15, 13, 13, 16), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(2, 2, 14, 14, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(0, 7, 7, 1, 9, 10), Block.box(15, 7, 6, 16, 9, 9)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 3, 3, 1, 13, 13), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 14, 15, 14, 15), Block.box(1, 2, 1, 15, 14, 2), Block.box(1, 2, 2, 2, 14, 14), Block.box(14, 2, 2, 15, 14, 14), Block.box(6, 7, 0, 9, 9, 1), Block.box(7, 7, 15, 10, 9, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 0, 0, 16, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 0, 15, 15, 1, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 3, 0, 13, 13, 1), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(2, 2, 14, 14, 14, 15), Block.box(15, 7, 6, 16, 9, 9), Block.box(0, 7, 7, 1, 9, 10)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 3, 3, 16, 13, 13), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 1, 15, 14, 2), Block.box(1, 2, 14, 15, 14, 15), Block.box(14, 2, 2, 15, 14, 14), Block.box(1, 2, 2, 2, 14, 14), Block.box(7, 7, 15, 10, 9, 16), Block.box(6, 7, 0, 9, 9, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(3, 3, 15, 13, 13, 16), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(2, 2, 14, 14, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(0, 7, 7, 1, 9, 10), Block.box(15, 7, 6, 16, 9, 9)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 3, 3, 1, 13, 13), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 14, 15, 14, 15), Block.box(1, 2, 1, 15, 14, 2), Block.box(1, 2, 2, 2, 14, 14), Block.box(14, 2, 2, 15, 14, 14), Block.box(6, 7, 0, 9, 9, 1), Block.box(7, 7, 15, 10, 9, 16)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 0, 0, 16, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 0, 15, 15, 1, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 3, 0, 13, 13, 1), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(2, 2, 14, 14, 14, 15), Block.box(15, 7, 6, 16, 9, 9), Block.box(0, 7, 7, 1, 9, 10)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 3, 3, 16, 13, 13), Block.box(1, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 1, 15, 14, 2), Block.box(1, 2, 14, 15, 14, 15), Block.box(14, 2, 2, 15, 14, 14), Block.box(1, 2, 2, 2, 14, 14), Block.box(7, 7, 15, 10, 9, 16), Block.box(6, 7, 0, 9, 9, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); } static final class OilGeneratorShapes { - static final VoxelShape SHAPE_N = Stream.of(Block.box(4, 3, 1.5, 12, 4, 2), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(12, 3, 1, 13, 4, 2), Block.box(3, 3, 1, 4, 4, 2), Block.box(3, 7, 1, 4, 8, 2), Block.box(12, 7, 1, 13, 8, 2), Block.box(4, 10, 0.5, 6, 11, 1), Block.box(4, 13, 0.5, 6, 14, 1), Block.box(3, 11, 0.5, 4, 13, 1), Block.box(6, 11, 0.5, 7, 13, 1), Block.box(4, 11, 0, 6, 13, 1), Block.box(5, 5, 1.5, 6, 6, 2), Block.box(6, 4, 1.5, 7, 5, 2), Block.box(10, 5, 1.5, 11, 6, 2), Block.box(9, 6, 1.5, 10, 7, 2), Block.box(4, 7, 1.5, 12, 8, 2), Block.box(3, 4, 1.5, 4, 7, 2), Block.box(12, 4, 1.5, 13, 7, 2), Block.box(2, 0, 2, 14, 1, 14), Block.box(5, 14, 6, 11, 15, 7), Block.box(5, 14, 8, 11, 15, 9), Block.box(5, 14, 10, 11, 15, 14), Block.box(5, 14, 2, 11, 15, 5), Block.box(11, 14, 2, 14, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 14, 15, 15, 15), Block.box(3, 8, 1, 13, 15, 2), Block.box(3, 0, 1, 13, 3, 2), Block.box(1, 0, 1, 3, 15, 2), Block.box(13, 0, 1, 15, 15, 2), Block.box(5, 13, 5, 11, 14, 10), Block.box(2, 3, 2, 14, 8, 3), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(14, 3, 12, 15, 4, 13), Block.box(14, 3, 3, 15, 4, 4), Block.box(14, 7, 3, 15, 8, 4), Block.box(14, 7, 12, 15, 8, 13), Block.box(15, 10, 4, 15.5, 11, 6), Block.box(15, 13, 4, 15.5, 14, 6), Block.box(15, 11, 3, 15.5, 13, 4), Block.box(15, 11, 6, 15.5, 13, 7), Block.box(15, 11, 4, 16, 13, 6), Block.box(14, 5, 5, 14.5, 6, 6), Block.box(14, 4, 6, 14.5, 5, 7), Block.box(14, 5, 10, 14.5, 6, 11), Block.box(14, 6, 9, 14.5, 7, 10), Block.box(14, 3, 4, 14.5, 4, 12), Block.box(14, 7, 4, 14.5, 8, 12), Block.box(14, 4, 3, 14.5, 7, 4), Block.box(14, 4, 12, 14.5, 7, 13), Block.box(2, 0, 2, 14, 1, 14), Block.box(9, 14, 5, 10, 15, 11), Block.box(7, 14, 5, 8, 15, 11), Block.box(2, 14, 5, 6, 15, 11), Block.box(11, 14, 5, 14, 15, 11), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 0, 1, 14, 15, 2), Block.box(2, 0, 14, 14, 15, 15), Block.box(1, 0, 1, 2, 15, 15), Block.box(14, 8, 3, 15, 15, 13), Block.box(14, 0, 3, 15, 3, 13), Block.box(14, 0, 1, 15, 15, 3), Block.box(14, 0, 13, 15, 15, 15), Block.box(6, 13, 5, 11, 14, 11), Block.box(13, 3, 2, 14, 8, 14), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 3, 14, 4, 4, 15), Block.box(12, 3, 14, 13, 4, 15), Block.box(12, 7, 14, 13, 8, 15), Block.box(3, 7, 14, 4, 8, 15), Block.box(10, 10, 15, 12, 11, 15.5), Block.box(10, 13, 15, 12, 14, 15.5), Block.box(12, 11, 15, 13, 13, 15.5), Block.box(9, 11, 15, 10, 13, 15.5), Block.box(10, 11, 15, 12, 13, 16), Block.box(10, 5, 14, 11, 6, 14.5), Block.box(9, 4, 14, 10, 5, 14.5), Block.box(5, 5, 14, 6, 6, 14.5), Block.box(6, 6, 14, 7, 7, 14.5), Block.box(4, 3, 14, 12, 4, 14.5), Block.box(4, 7, 14, 12, 8, 14.5), Block.box(12, 4, 14, 13, 7, 14.5), Block.box(3, 4, 14, 4, 7, 14.5), Block.box(2, 0, 2, 14, 1, 14), Block.box(5, 14, 9, 11, 15, 10), Block.box(5, 14, 7, 11, 15, 8), Block.box(5, 14, 2, 11, 15, 6), Block.box(5, 14, 11, 11, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(11, 14, 2, 14, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(3, 8, 14, 13, 15, 15), Block.box(3, 0, 14, 13, 3, 15), Block.box(13, 0, 14, 15, 15, 15), Block.box(1, 0, 14, 3, 15, 15), Block.box(5, 13, 6, 11, 14, 11), Block.box(2, 3, 13, 14, 8, 14), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(1, 3, 3, 2, 4, 4), Block.box(1, 3, 12, 2, 4, 13), Block.box(1, 7, 12, 2, 8, 13), Block.box(1, 7, 3, 2, 8, 4), Block.box(0.5, 10, 10, 1, 11, 12), Block.box(0.5, 13, 10, 1, 14, 12), Block.box(0.5, 11, 12, 1, 13, 13), Block.box(0.5, 11, 9, 1, 13, 10), Block.box(0, 11, 10, 1, 13, 12), Block.box(1.5, 5, 10, 2, 6, 11), Block.box(1.5, 4, 9, 2, 5, 10), Block.box(1.5, 5, 5, 2, 6, 6), Block.box(1.5, 6, 6, 2, 7, 7), Block.box(1.5, 3, 4, 2, 4, 12), Block.box(1.5, 7, 4, 2, 8, 12), Block.box(1.5, 4, 12, 2, 7, 13), Block.box(1.5, 4, 3, 2, 7, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(6, 14, 5, 7, 15, 11), Block.box(8, 14, 5, 9, 15, 11), Block.box(10, 14, 5, 14, 15, 11), Block.box(2, 14, 5, 5, 15, 11), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 14, 15, 2), Block.box(14, 0, 1, 15, 15, 15), Block.box(1, 8, 3, 2, 15, 13), Block.box(1, 0, 3, 2, 3, 13), Block.box(1, 0, 13, 2, 15, 15), Block.box(1, 0, 1, 2, 15, 3), Block.box(5, 13, 5, 10, 14, 11), Block.box(2, 3, 2, 3, 8, 14), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.box(4, 3, 1.5, 12, 4, 2), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(12, 3, 1, 13, 4, 2), Block.box(3, 3, 1, 4, 4, 2), Block.box(3, 7, 1, 4, 8, 2), Block.box(12, 7, 1, 13, 8, 2), Block.box(4, 10, 0.5, 6, 11, 1), Block.box(4, 13, 0.5, 6, 14, 1), Block.box(3, 11, 0.5, 4, 13, 1), Block.box(6, 11, 0.5, 7, 13, 1), Block.box(4, 11, 0, 6, 13, 1), Block.box(5, 5, 1.5, 6, 6, 2), Block.box(6, 4, 1.5, 7, 5, 2), Block.box(10, 5, 1.5, 11, 6, 2), Block.box(9, 6, 1.5, 10, 7, 2), Block.box(4, 7, 1.5, 12, 8, 2), Block.box(3, 4, 1.5, 4, 7, 2), Block.box(12, 4, 1.5, 13, 7, 2), Block.box(2, 0, 2, 14, 1, 14), Block.box(5, 14, 6, 11, 15, 7), Block.box(5, 14, 8, 11, 15, 9), Block.box(5, 14, 10, 11, 15, 14), Block.box(5, 14, 2, 11, 15, 5), Block.box(11, 14, 2, 14, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 14, 15, 15, 15), Block.box(3, 8, 1, 13, 15, 2), Block.box(3, 0, 1, 13, 3, 2), Block.box(1, 0, 1, 3, 15, 2), Block.box(13, 0, 1, 15, 15, 2), Block.box(5, 13, 5, 11, 14, 10), Block.box(2, 3, 2, 14, 8, 3), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(14, 3, 12, 15, 4, 13), Block.box(14, 3, 3, 15, 4, 4), Block.box(14, 7, 3, 15, 8, 4), Block.box(14, 7, 12, 15, 8, 13), Block.box(15, 10, 4, 15.5, 11, 6), Block.box(15, 13, 4, 15.5, 14, 6), Block.box(15, 11, 3, 15.5, 13, 4), Block.box(15, 11, 6, 15.5, 13, 7), Block.box(15, 11, 4, 16, 13, 6), Block.box(14, 5, 5, 14.5, 6, 6), Block.box(14, 4, 6, 14.5, 5, 7), Block.box(14, 5, 10, 14.5, 6, 11), Block.box(14, 6, 9, 14.5, 7, 10), Block.box(14, 3, 4, 14.5, 4, 12), Block.box(14, 7, 4, 14.5, 8, 12), Block.box(14, 4, 3, 14.5, 7, 4), Block.box(14, 4, 12, 14.5, 7, 13), Block.box(2, 0, 2, 14, 1, 14), Block.box(9, 14, 5, 10, 15, 11), Block.box(7, 14, 5, 8, 15, 11), Block.box(2, 14, 5, 6, 15, 11), Block.box(11, 14, 5, 14, 15, 11), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 0, 1, 14, 15, 2), Block.box(2, 0, 14, 14, 15, 15), Block.box(1, 0, 1, 2, 15, 15), Block.box(14, 8, 3, 15, 15, 13), Block.box(14, 0, 3, 15, 3, 13), Block.box(14, 0, 1, 15, 15, 3), Block.box(14, 0, 13, 15, 15, 15), Block.box(6, 13, 5, 11, 14, 11), Block.box(13, 3, 2, 14, 8, 14), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 3, 14, 4, 4, 15), Block.box(12, 3, 14, 13, 4, 15), Block.box(12, 7, 14, 13, 8, 15), Block.box(3, 7, 14, 4, 8, 15), Block.box(10, 10, 15, 12, 11, 15.5), Block.box(10, 13, 15, 12, 14, 15.5), Block.box(12, 11, 15, 13, 13, 15.5), Block.box(9, 11, 15, 10, 13, 15.5), Block.box(10, 11, 15, 12, 13, 16), Block.box(10, 5, 14, 11, 6, 14.5), Block.box(9, 4, 14, 10, 5, 14.5), Block.box(5, 5, 14, 6, 6, 14.5), Block.box(6, 6, 14, 7, 7, 14.5), Block.box(4, 3, 14, 12, 4, 14.5), Block.box(4, 7, 14, 12, 8, 14.5), Block.box(12, 4, 14, 13, 7, 14.5), Block.box(3, 4, 14, 4, 7, 14.5), Block.box(2, 0, 2, 14, 1, 14), Block.box(5, 14, 9, 11, 15, 10), Block.box(5, 14, 7, 11, 15, 8), Block.box(5, 14, 2, 11, 15, 6), Block.box(5, 14, 11, 11, 15, 14), Block.box(2, 14, 2, 5, 15, 14), Block.box(11, 14, 2, 14, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(3, 8, 14, 13, 15, 15), Block.box(3, 0, 14, 13, 3, 15), Block.box(13, 0, 14, 15, 15, 15), Block.box(1, 0, 14, 3, 15, 15), Block.box(5, 13, 6, 11, 14, 11), Block.box(2, 3, 13, 14, 8, 14), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16), Block.box(15, 0, 15, 16, 1, 16)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(1, 3, 3, 2, 4, 4), Block.box(1, 3, 12, 2, 4, 13), Block.box(1, 7, 12, 2, 8, 13), Block.box(1, 7, 3, 2, 8, 4), Block.box(0.5, 10, 10, 1, 11, 12), Block.box(0.5, 13, 10, 1, 14, 12), Block.box(0.5, 11, 12, 1, 13, 13), Block.box(0.5, 11, 9, 1, 13, 10), Block.box(0, 11, 10, 1, 13, 12), Block.box(1.5, 5, 10, 2, 6, 11), Block.box(1.5, 4, 9, 2, 5, 10), Block.box(1.5, 5, 5, 2, 6, 6), Block.box(1.5, 6, 6, 2, 7, 7), Block.box(1.5, 3, 4, 2, 4, 12), Block.box(1.5, 7, 4, 2, 8, 12), Block.box(1.5, 4, 12, 2, 7, 13), Block.box(1.5, 4, 3, 2, 7, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(6, 14, 5, 7, 15, 11), Block.box(8, 14, 5, 9, 15, 11), Block.box(10, 14, 5, 14, 15, 11), Block.box(2, 14, 5, 5, 15, 11), Block.box(2, 14, 2, 14, 15, 5), Block.box(2, 14, 11, 14, 15, 14), Block.box(2, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 14, 15, 2), Block.box(14, 0, 1, 15, 15, 15), Block.box(1, 8, 3, 2, 15, 13), Block.box(1, 0, 3, 2, 3, 13), Block.box(1, 0, 13, 2, 15, 15), Block.box(1, 0, 1, 2, 15, 3), Block.box(5, 13, 5, 10, 14, 11), Block.box(2, 3, 2, 3, 8, 14), Block.box(15, 0, 15, 16, 1, 16), Block.box(15, 0, 0, 16, 1, 1), Block.box(0, 0, 0, 1, 1, 1), Block.box(0, 0, 15, 1, 1, 16)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); } static final class MinerShapes { - static final VoxelShape SHAPE_N = Stream.of(Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(15, 3, 3, 16, 13, 13), Block.box(0, 3, 3, 1, 13, 13), Block.box(4, 11, 4, 12, 12, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(3, 3, 15, 13, 13, 16), Block.box(3, 3, 0, 13, 13, 1), Block.box(4, 11, 4, 12, 12, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 4, 4, 15, 12), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 1, 14, 15, 2), Block.box(2, 0, 14, 14, 15, 15), Block.box(14, 0, 1, 15, 15, 15), Block.box(1, 0, 1, 2, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 3, 3, 1, 13, 13), Block.box(15, 3, 3, 16, 13, 13), Block.box(4, 11, 4, 12, 12, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(12, 14, 2, 14, 15, 14), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(1, 0, 14, 15, 15, 15), Block.box(1, 0, 1, 15, 15, 2)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_W = Stream.of(Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(3, 3, 0, 13, 13, 1), Block.box(3, 3, 15, 13, 13, 16), Block.box(4, 11, 4, 12, 12, 12), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 14, 15, 2), Block.box(1, 0, 1, 2, 15, 15), Block.box(14, 0, 1, 15, 15, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.box(0, 1, 15, 1, 15, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(15, 3, 3, 16, 13, 13), Block.box(0, 3, 3, 1, 13, 13), Block.box(4, 11, 4, 12, 12, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 14, 15, 15, 15)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(3, 3, 15, 13, 13, 16), Block.box(3, 3, 0, 13, 13, 1), Block.box(4, 11, 4, 12, 12, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(5, 12, 3, 11, 14, 4), Block.box(5, 12, 12, 11, 14, 13), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 4, 4, 15, 12), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 1, 14, 15, 2), Block.box(2, 0, 14, 14, 15, 15), Block.box(14, 0, 1, 15, 15, 15), Block.box(1, 0, 1, 2, 15, 15)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 1, 0, 16, 15, 1), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 3, 3, 1, 13, 13), Block.box(15, 3, 3, 16, 13, 13), Block.box(4, 11, 4, 12, 12, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(12, 12, 5, 13, 14, 11), Block.box(3, 12, 5, 4, 14, 11), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 12, 4, 12, 14, 5), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(12, 14, 2, 14, 15, 14), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(14, 0, 2, 15, 15, 14), Block.box(1, 0, 2, 2, 15, 14), Block.box(1, 0, 14, 15, 15, 15), Block.box(1, 0, 1, 15, 15, 2)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.box(15, 1, 15, 16, 15, 16), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(3, 3, 0, 13, 13, 1), Block.box(3, 3, 15, 13, 13, 16), Block.box(4, 11, 4, 12, 12, 12), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(5, 12, 12, 11, 14, 13), Block.box(5, 12, 3, 11, 14, 4), Block.box(3, 12, 5, 4, 14, 11), Block.box(12, 12, 5, 13, 14, 11), Block.box(11, 12, 4, 12, 14, 5), Block.box(4, 12, 4, 5, 14, 5), Block.box(4, 12, 11, 5, 14, 12), Block.box(11, 12, 11, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(2, 0, 14, 14, 15, 15), Block.box(2, 0, 1, 14, 15, 2), Block.box(1, 0, 1, 2, 15, 15), Block.box(14, 0, 1, 15, 15, 15)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); } static final class LeafGeneratorShapes { - static final VoxelShape SHAPE_N = Stream.of(Block.box(1, 0, 14, 15, 15, 15), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(5, 11, 0, 11, 12, 1), Block.box(0, 11, 5, 1, 12, 11), Block.box(15, 11, 5, 16, 12, 11), Block.box(5, 4, 0, 11, 5, 1), Block.box(0, 4, 5, 1, 5, 11), Block.box(15, 4, 5, 16, 5, 11), Block.box(4, 4, 0, 5, 12, 1), Block.box(0, 4, 4, 1, 12, 5), Block.box(15, 4, 4, 16, 12, 5), Block.box(11, 4, 0, 12, 12, 1), Block.box(0, 4, 11, 1, 12, 12), Block.box(15, 4, 11, 16, 12, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(12, 14, 2, 14, 15, 14), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 2, 2, 5, 14), Block.box(2, 1, 2, 3, 14, 14), Block.box(1, 11, 2, 2, 15, 14), Block.box(1, 5, 2, 2, 11, 5), Block.box(1, 5, 11, 2, 11, 14), Block.box(13, 1, 2, 14, 14, 14), Block.box(14, 11, 2, 15, 15, 14), Block.box(14, 5, 11, 15, 11, 14), Block.box(14, 5, 2, 15, 11, 5), Block.box(14, 0, 2, 15, 5, 14)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_E = Stream.of(Block.box(1, 0, 1, 2, 15, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 11, 5, 16, 12, 11), Block.box(5, 11, 0, 11, 12, 1), Block.box(5, 11, 15, 11, 12, 16), Block.box(15, 4, 5, 16, 5, 11), Block.box(5, 4, 0, 11, 5, 1), Block.box(5, 4, 15, 11, 5, 16), Block.box(15, 4, 4, 16, 12, 5), Block.box(11, 4, 0, 12, 12, 1), Block.box(11, 4, 15, 12, 12, 16), Block.box(15, 4, 11, 16, 12, 12), Block.box(4, 4, 0, 5, 12, 1), Block.box(4, 4, 15, 5, 12, 16), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(14, 0, 1, 15, 15, 15), Block.box(2, 0, 1, 14, 5, 2), Block.box(2, 1, 2, 14, 14, 3), Block.box(2, 11, 1, 14, 15, 2), Block.box(11, 5, 1, 14, 11, 2), Block.box(2, 5, 1, 5, 11, 2), Block.box(2, 1, 13, 14, 14, 14), Block.box(2, 11, 14, 14, 15, 15), Block.box(2, 5, 14, 5, 11, 15), Block.box(11, 5, 14, 14, 11, 15), Block.box(2, 0, 14, 14, 5, 15)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_S = Stream.of(Block.box(1, 0, 1, 15, 15, 2), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(5, 11, 15, 11, 12, 16), Block.box(15, 11, 5, 16, 12, 11), Block.box(0, 11, 5, 1, 12, 11), Block.box(5, 4, 15, 11, 5, 16), Block.box(15, 4, 5, 16, 5, 11), Block.box(0, 4, 5, 1, 5, 11), Block.box(11, 4, 15, 12, 12, 16), Block.box(15, 4, 11, 16, 12, 12), Block.box(0, 4, 11, 1, 12, 12), Block.box(4, 4, 15, 5, 12, 16), Block.box(15, 4, 4, 16, 12, 5), Block.box(0, 4, 4, 1, 12, 5), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 14, 15, 15, 15), Block.box(14, 0, 2, 15, 5, 14), Block.box(13, 1, 2, 14, 14, 14), Block.box(14, 11, 2, 15, 15, 14), Block.box(14, 5, 11, 15, 11, 14), Block.box(14, 5, 2, 15, 11, 5), Block.box(2, 1, 2, 3, 14, 14), Block.box(1, 11, 2, 2, 15, 14), Block.box(1, 5, 2, 2, 11, 5), Block.box(1, 5, 11, 2, 11, 14), Block.box(1, 0, 2, 2, 5, 14)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_W = Stream.of(Block.box(14, 0, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 11, 5, 1, 12, 11), Block.box(5, 11, 15, 11, 12, 16), Block.box(5, 11, 0, 11, 12, 1), Block.box(0, 4, 5, 1, 5, 11), Block.box(5, 4, 15, 11, 5, 16), Block.box(5, 4, 0, 11, 5, 1), Block.box(0, 4, 11, 1, 12, 12), Block.box(4, 4, 15, 5, 12, 16), Block.box(4, 4, 0, 5, 12, 1), Block.box(0, 4, 4, 1, 12, 5), Block.box(11, 4, 15, 12, 12, 16), Block.box(11, 4, 0, 12, 12, 1), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 4, 4, 15, 12), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 1, 2, 15, 15), Block.box(2, 0, 14, 14, 5, 15), Block.box(2, 1, 13, 14, 14, 14), Block.box(2, 11, 14, 14, 15, 15), Block.box(2, 5, 14, 5, 11, 15), Block.box(11, 5, 14, 14, 11, 15), Block.box(2, 1, 2, 14, 14, 3), Block.box(2, 11, 1, 14, 15, 2), Block.box(11, 5, 1, 14, 11, 2), Block.box(2, 5, 1, 5, 11, 2), Block.box(2, 0, 1, 14, 5, 2)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.box(1, 0, 14, 15, 15, 15), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(5, 11, 0, 11, 12, 1), Block.box(0, 11, 5, 1, 12, 11), Block.box(15, 11, 5, 16, 12, 11), Block.box(5, 4, 0, 11, 5, 1), Block.box(0, 4, 5, 1, 5, 11), Block.box(15, 4, 5, 16, 5, 11), Block.box(4, 4, 0, 5, 12, 1), Block.box(0, 4, 4, 1, 12, 5), Block.box(15, 4, 4, 16, 12, 5), Block.box(11, 4, 0, 12, 12, 1), Block.box(0, 4, 11, 1, 12, 12), Block.box(15, 4, 11, 16, 12, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(12, 14, 2, 14, 15, 14), Block.box(4, 14, 12, 12, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(2, 14, 2, 4, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 1, 15, 15, 2), Block.box(1, 0, 2, 2, 5, 14), Block.box(2, 1, 2, 3, 14, 14), Block.box(1, 11, 2, 2, 15, 14), Block.box(1, 5, 2, 2, 11, 5), Block.box(1, 5, 11, 2, 11, 14), Block.box(13, 1, 2, 14, 14, 14), Block.box(14, 11, 2, 15, 15, 14), Block.box(14, 5, 11, 15, 11, 14), Block.box(14, 5, 2, 15, 11, 5), Block.box(14, 0, 2, 15, 5, 14)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.box(1, 0, 1, 2, 15, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 11, 5, 16, 12, 11), Block.box(5, 11, 0, 11, 12, 1), Block.box(5, 11, 15, 11, 12, 16), Block.box(15, 4, 5, 16, 5, 11), Block.box(5, 4, 0, 11, 5, 1), Block.box(5, 4, 15, 11, 5, 16), Block.box(15, 4, 4, 16, 12, 5), Block.box(11, 4, 0, 12, 12, 1), Block.box(11, 4, 15, 12, 12, 16), Block.box(15, 4, 11, 16, 12, 12), Block.box(4, 4, 0, 5, 12, 1), Block.box(4, 4, 15, 5, 12, 16), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(2, 0, 2, 14, 1, 14), Block.box(14, 0, 1, 15, 15, 15), Block.box(2, 0, 1, 14, 5, 2), Block.box(2, 1, 2, 14, 14, 3), Block.box(2, 11, 1, 14, 15, 2), Block.box(11, 5, 1, 14, 11, 2), Block.box(2, 5, 1, 5, 11, 2), Block.box(2, 1, 13, 14, 14, 14), Block.box(2, 11, 14, 14, 15, 15), Block.box(2, 5, 14, 5, 11, 15), Block.box(11, 5, 14, 14, 11, 15), Block.box(2, 0, 14, 14, 5, 15)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.box(1, 0, 1, 15, 15, 2), Block.box(0, 0, 0, 1, 1, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(15, 0, 0, 16, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(5, 11, 15, 11, 12, 16), Block.box(15, 11, 5, 16, 12, 11), Block.box(0, 11, 5, 1, 12, 11), Block.box(5, 4, 15, 11, 5, 16), Block.box(15, 4, 5, 16, 5, 11), Block.box(0, 4, 5, 1, 5, 11), Block.box(11, 4, 15, 12, 12, 16), Block.box(15, 4, 11, 16, 12, 12), Block.box(0, 4, 11, 1, 12, 12), Block.box(4, 4, 15, 5, 12, 16), Block.box(15, 4, 4, 16, 12, 5), Block.box(0, 4, 4, 1, 12, 5), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(2, 14, 2, 4, 15, 14), Block.box(4, 14, 2, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 14), Block.box(12, 14, 2, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 14, 15, 15, 15), Block.box(14, 0, 2, 15, 5, 14), Block.box(13, 1, 2, 14, 14, 14), Block.box(14, 11, 2, 15, 15, 14), Block.box(14, 5, 11, 15, 11, 14), Block.box(14, 5, 2, 15, 11, 5), Block.box(2, 1, 2, 3, 14, 14), Block.box(1, 11, 2, 2, 15, 14), Block.box(1, 5, 2, 2, 11, 5), Block.box(1, 5, 11, 2, 11, 14), Block.box(1, 0, 2, 2, 5, 14)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.box(14, 0, 1, 15, 15, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 11, 5, 1, 12, 11), Block.box(5, 11, 15, 11, 12, 16), Block.box(5, 11, 0, 11, 12, 1), Block.box(0, 4, 5, 1, 5, 11), Block.box(5, 4, 15, 11, 5, 16), Block.box(5, 4, 0, 11, 5, 1), Block.box(0, 4, 11, 1, 12, 12), Block.box(4, 4, 15, 5, 12, 16), Block.box(4, 4, 0, 5, 12, 1), Block.box(0, 4, 4, 1, 12, 5), Block.box(11, 4, 15, 12, 12, 16), Block.box(11, 4, 0, 12, 12, 1), Block.box(4, 13, 4, 12, 14, 12), Block.box(11, 14, 11, 12, 15, 12), Block.box(11, 14, 4, 12, 15, 5), Block.box(4, 14, 4, 5, 15, 5), Block.box(4, 14, 11, 5, 15, 12), Block.box(2, 14, 2, 14, 15, 4), Block.box(12, 14, 4, 14, 15, 12), Block.box(2, 14, 4, 4, 15, 12), Block.box(2, 14, 12, 14, 15, 14), Block.box(2, 0, 2, 14, 1, 14), Block.box(1, 0, 1, 2, 15, 15), Block.box(2, 0, 14, 14, 5, 15), Block.box(2, 1, 13, 14, 14, 14), Block.box(2, 11, 14, 14, 15, 15), Block.box(2, 5, 14, 5, 11, 15), Block.box(11, 5, 14, 14, 11, 15), Block.box(2, 1, 2, 14, 14, 3), Block.box(2, 11, 1, 14, 15, 2), Block.box(11, 5, 1, 14, 11, 2), Block.box(2, 5, 1, 5, 11, 2), Block.box(2, 0, 1, 14, 5, 2)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); } static final class LavaFactoryShapes { - static final VoxelShape SHAPE_N = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(12, 15, 5, 13, 16, 11), Block.box(3, 15, 5, 4, 16, 11), Block.box(11, 14, 11, 12, 16, 12), Block.box(11, 14, 4, 12, 16, 5), Block.box(4, 14, 11, 5, 16, 12), Block.box(4, 14, 4, 5, 16, 5), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 12, 12, 15, 15), Block.box(4, 14, 1, 12, 15, 4), Block.box(1, 14, 1, 4, 15, 15), Block.box(12, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(2, 2, 14, 14, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(5, 15, 3, 11, 16, 4), Block.box(5, 15, 12, 11, 16, 13)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(5, 15, 12, 11, 16, 13), Block.box(5, 15, 3, 11, 16, 4), Block.box(4, 14, 11, 5, 16, 12), Block.box(11, 14, 11, 12, 16, 12), Block.box(4, 14, 4, 5, 16, 5), Block.box(11, 14, 4, 12, 16, 5), Block.box(4, 13, 4, 12, 14, 12), Block.box(1, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 15, 15, 12), Block.box(1, 14, 1, 15, 15, 4), Block.box(1, 14, 12, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 14, 15, 14, 15), Block.box(1, 2, 1, 15, 14, 2), Block.box(1, 2, 2, 2, 14, 14), Block.box(14, 2, 2, 15, 14, 14), Block.box(12, 15, 5, 13, 16, 11), Block.box(3, 15, 5, 4, 16, 11)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 0, 0, 16, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 0, 15, 15, 1, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 15, 5, 4, 16, 11), Block.box(12, 15, 5, 13, 16, 11), Block.box(4, 14, 4, 5, 16, 5), Block.box(4, 14, 11, 5, 16, 12), Block.box(11, 14, 4, 12, 16, 5), Block.box(11, 14, 11, 12, 16, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 1, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 15), Block.box(12, 14, 1, 15, 15, 15), Block.box(1, 14, 1, 4, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(2, 2, 14, 14, 14, 15), Block.box(5, 15, 12, 11, 16, 13), Block.box(5, 15, 3, 11, 16, 4)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(5, 15, 3, 11, 16, 4), Block.box(5, 15, 12, 11, 16, 13), Block.box(11, 14, 4, 12, 16, 5), Block.box(4, 14, 4, 5, 16, 5), Block.box(11, 14, 11, 12, 16, 12), Block.box(4, 14, 11, 5, 16, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(12, 14, 4, 15, 15, 12), Block.box(1, 14, 4, 4, 15, 12), Block.box(1, 14, 12, 15, 15, 15), Block.box(1, 14, 1, 15, 15, 4), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 1, 15, 14, 2), Block.box(1, 2, 14, 15, 14, 15), Block.box(14, 2, 2, 15, 14, 14), Block.box(1, 2, 2, 2, 14, 14), Block.box(3, 15, 5, 4, 16, 11), Block.box(12, 15, 5, 13, 16, 11)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.box(0, 0, 0, 1, 1, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 0, 15, 15, 1, 16), Block.box(1, 0, 0, 15, 1, 1), Block.box(15, 0, 0, 16, 1, 16), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(12, 15, 5, 13, 16, 11), Block.box(3, 15, 5, 4, 16, 11), Block.box(11, 14, 11, 12, 16, 12), Block.box(11, 14, 4, 12, 16, 5), Block.box(4, 14, 11, 5, 16, 12), Block.box(4, 14, 4, 5, 16, 5), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 12, 12, 15, 15), Block.box(4, 14, 1, 12, 15, 4), Block.box(1, 14, 1, 4, 15, 15), Block.box(12, 14, 1, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(2, 2, 14, 14, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(5, 15, 3, 11, 16, 4), Block.box(5, 15, 12, 11, 16, 13)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 0, 0, 16, 1, 1), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 15, 16, 16, 16), Block.box(15, 15, 1, 16, 16, 15), Block.box(0, 15, 1, 1, 16, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(5, 15, 12, 11, 16, 13), Block.box(5, 15, 3, 11, 16, 4), Block.box(4, 14, 11, 5, 16, 12), Block.box(11, 14, 11, 12, 16, 12), Block.box(4, 14, 4, 5, 16, 5), Block.box(11, 14, 4, 12, 16, 5), Block.box(4, 13, 4, 12, 14, 12), Block.box(1, 14, 4, 4, 15, 12), Block.box(12, 14, 4, 15, 15, 12), Block.box(1, 14, 1, 15, 15, 4), Block.box(1, 14, 12, 15, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 14, 15, 14, 15), Block.box(1, 2, 1, 15, 14, 2), Block.box(1, 2, 2, 2, 14, 14), Block.box(14, 2, 2, 15, 14, 14), Block.box(12, 15, 5, 13, 16, 11), Block.box(3, 15, 5, 4, 16, 11)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.box(15, 0, 0, 16, 1, 16), Block.box(15, 15, 0, 16, 16, 16), Block.box(0, 15, 0, 1, 16, 16), Block.box(1, 15, 15, 15, 16, 16), Block.box(1, 15, 0, 15, 16, 1), Block.box(1, 0, 0, 15, 1, 1), Block.box(1, 0, 15, 15, 1, 16), Block.box(0, 0, 0, 1, 1, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(15, 1, 15, 16, 15, 16), Block.box(3, 15, 5, 4, 16, 11), Block.box(12, 15, 5, 13, 16, 11), Block.box(4, 14, 4, 5, 16, 5), Block.box(4, 14, 11, 5, 16, 12), Block.box(11, 14, 4, 12, 16, 5), Block.box(11, 14, 11, 12, 16, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(4, 14, 1, 12, 15, 4), Block.box(4, 14, 12, 12, 15, 15), Block.box(12, 14, 1, 15, 15, 15), Block.box(1, 14, 1, 4, 15, 15), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 1, 2, 14, 15), Block.box(14, 2, 1, 15, 14, 15), Block.box(2, 2, 1, 14, 14, 2), Block.box(2, 2, 14, 14, 14, 15), Block.box(5, 15, 12, 11, 16, 13), Block.box(5, 15, 3, 11, 16, 4)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.box(0, 0, 15, 16, 1, 16), Block.box(0, 15, 15, 16, 16, 16), Block.box(0, 15, 0, 16, 16, 1), Block.box(0, 15, 1, 1, 16, 15), Block.box(15, 15, 1, 16, 16, 15), Block.box(15, 0, 1, 16, 1, 15), Block.box(0, 0, 1, 1, 1, 15), Block.box(0, 0, 0, 16, 1, 1), Block.box(15, 1, 15, 16, 15, 16), Block.box(15, 1, 0, 16, 15, 1), Block.box(0, 1, 0, 1, 15, 1), Block.box(0, 1, 15, 1, 15, 16), Block.box(5, 15, 3, 11, 16, 4), Block.box(5, 15, 12, 11, 16, 13), Block.box(11, 14, 4, 12, 16, 5), Block.box(4, 14, 4, 5, 16, 5), Block.box(11, 14, 11, 12, 16, 12), Block.box(4, 14, 11, 5, 16, 12), Block.box(4, 13, 4, 12, 14, 12), Block.box(12, 14, 4, 15, 15, 12), Block.box(1, 14, 4, 4, 15, 12), Block.box(1, 14, 12, 15, 15, 15), Block.box(1, 14, 1, 15, 15, 4), Block.box(1, 1, 1, 15, 2, 15), Block.box(1, 2, 1, 15, 14, 2), Block.box(1, 2, 14, 15, 14, 15), Block.box(14, 2, 2, 15, 14, 14), Block.box(1, 2, 2, 2, 14, 14), Block.box(3, 15, 5, 4, 16, 11), Block.box(12, 15, 5, 13, 16, 11)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); } public static final VoxelShape FEEDER_SHAPE = ShapeBuilder.get() @@ -136,12 +137,12 @@ public class Shapes { .standardReduceBuild().get(); static final class LaserRelayShapes { - static final VoxelShape SHAPE_U = Stream.of(Block.box(1, 0, 1, 15, 1, 15), Block.box(3, 1, 3, 13, 5, 13), Block.box(7, 4, 7, 9, 10, 9)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_D = Stream.of(Block.box(1, 15, 1, 15, 16, 15), Block.box(3, 11, 3, 13, 15, 13), Block.box(7, 6, 7, 9, 12, 9)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_N = Stream.of(Block.box(1, 1, 15, 15, 15, 16), Block.box(3, 3, 11, 13, 13, 15), Block.box(7, 7, 6, 9, 9, 12)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 1, 1, 1, 15, 15), Block.box(1, 3, 3, 5, 13, 13), Block.box(4, 7, 7, 10, 9, 9)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_S = Stream.of(Block.box(1, 1, 0, 15, 15, 1), Block.box(3, 3, 1, 13, 13, 5), Block.box(7, 7, 4, 9, 9, 10)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); - static final VoxelShape SHAPE_W = Stream.of(Block.box(15, 1, 1, 16, 15, 15), Block.box(11, 3, 3, 15, 13, 13), Block.box(6, 7, 7, 12, 9, 9)).reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)).get(); + static final VoxelShape SHAPE_U = Stream.of(Block.box(1, 0, 1, 15, 1, 15), Block.box(3, 1, 3, 13, 5, 13), Block.box(7, 4, 7, 9, 10, 9)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_D = Stream.of(Block.box(1, 15, 1, 15, 16, 15), Block.box(3, 11, 3, 13, 15, 13), Block.box(7, 6, 7, 9, 12, 9)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_N = Stream.of(Block.box(1, 1, 15, 15, 15, 16), Block.box(3, 3, 11, 13, 13, 15), Block.box(7, 7, 6, 9, 9, 12)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_E = Stream.of(Block.box(0, 1, 1, 1, 15, 15), Block.box(1, 3, 3, 5, 13, 13), Block.box(4, 7, 7, 10, 9, 9)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_S = Stream.of(Block.box(1, 1, 0, 15, 15, 1), Block.box(3, 3, 1, 13, 13, 5), Block.box(7, 7, 4, 9, 9, 10)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); + static final VoxelShape SHAPE_W = Stream.of(Block.box(15, 1, 1, 16, 15, 15), Block.box(11, 3, 3, 15, 13, 13), Block.box(6, 7, 7, 12, 9, 9)).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)).get(); } public static class ShapeBuilder { @@ -157,7 +158,7 @@ public class Shapes { } public Optional standardReduceBuild() { - return this.shapes.build().reduce((v1, v2) -> VoxelShapes.join(v1, v2, IBooleanFunction.OR)); + return this.shapes.build().reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR)); } public static ShapeBuilder get() { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/AACrops.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/AACrops.java index 9f1b5ce12..a4f70df7f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/AACrops.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/AACrops.java @@ -1,12 +1,12 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import net.minecraft.block.CropsBlock; -import net.minecraft.item.Item; -import net.minecraft.util.IItemProvider; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.ItemLike; +import net.minecraft.world.level.block.CropBlock; import java.util.function.Supplier; -public class AACrops extends CropsBlock { +public class AACrops extends CropBlock { Supplier itemSupplier; public AACrops(Properties p_i48421_1_, Supplier seedSupplier) { super(p_i48421_1_); @@ -14,7 +14,7 @@ public class AACrops extends CropsBlock { } @Override - protected IItemProvider getBaseSeedId() { + protected ItemLike getBaseSeedId() { return this.itemSupplier.get(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java index 372573806..a90287dfb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java @@ -11,10 +11,8 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.block.Block; -import net.minecraft.item.Item; - -import net.minecraft.block.AbstractBlock.Properties; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; public class BlockBase extends Block { public BlockBase(Properties properties) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java index 709f9dcba..ded3dfaab 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBushBase.java @@ -10,10 +10,8 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import net.minecraft.block.BushBlock; -import net.minecraft.block.SoundType; - -import net.minecraft.block.AbstractBlock.Properties; +import net.minecraft.world.level.block.BushBlock; +import net.minecraft.world.level.block.SoundType; public class BlockBushBase extends BushBlock { public BlockBushBase(Properties properties) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index c7c939b55..9b1ae9f20 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -12,59 +12,57 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; -import de.ellpeck.actuallyadditions.mod.config.ConfigValues; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityInventoryBase; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockRenderType; -import net.minecraft.block.BlockState; -import net.minecraft.block.ContainerBlock; -import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.fluid.FluidState; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.IWorldReader; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.ChatFormatting; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.LevelReader; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.EntityBlock; +import net.minecraft.world.level.block.RenderShape; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.fluids.FluidUtil; import net.minecraftforge.fluids.capability.templates.FluidTank; -import net.minecraftforge.fml.network.NetworkHooks; +import net.minecraftforge.network.NetworkHooks; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Random; -public abstract class BlockContainerBase extends Block { +public abstract class BlockContainerBase extends Block implements EntityBlock { public BlockContainerBase(Properties properties) { super(properties); } - public ActionResultType openGui(World world, PlayerEntity player, BlockPos pos, Class expectedInstance) { + public InteractionResult openGui(Level world, Player player, BlockPos pos, Class expectedInstance) { if (!world.isClientSide) { - TileEntity tile = world.getBlockEntity(pos); + BlockEntity tile = world.getBlockEntity(pos); if (expectedInstance.isInstance(tile)) { - NetworkHooks.openGui((ServerPlayerEntity) player, (INamedContainerProvider) tile, pos); + NetworkHooks.openGui((ServerPlayer) player, (MenuProvider) tile, pos); } - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } - private void dropInventory(World world, BlockPos position) { + private void dropInventory(Level world, BlockPos position) { if (!world.isClientSide) { - TileEntity aTile = world.getBlockEntity(position); + BlockEntity aTile = world.getBlockEntity(position); if (aTile instanceof TileEntityInventoryBase) { TileEntityInventoryBase tile = (TileEntityInventoryBase) aTile; if (tile.inv.getSlots() > 0) { @@ -76,7 +74,7 @@ public abstract class BlockContainerBase extends Block { } } - private void dropSlotFromInventory(int i, TileEntityInventoryBase tile, World world, BlockPos pos) { + private void dropSlotFromInventory(int i, TileEntityInventoryBase tile, Level world, BlockPos pos) { ItemStack stack = tile.inv.getStackInSlot(i); if (stack.isEmpty()) { return; @@ -91,10 +89,10 @@ public abstract class BlockContainerBase extends Block { world.addFreshEntity(entityItem); } - public boolean tryToggleRedstone(World world, BlockPos pos, PlayerEntity player) { + public boolean tryToggleRedstone(Level world, BlockPos pos, Player player) { ItemStack stack = player.getMainHandItem(); if (stack.getItem() == CommonConfig.Other.redstoneConfigureItem) { - TileEntity tile = world.getBlockEntity(pos); + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityBase) { TileEntityBase base = (TileEntityBase) tile; if (!world.isClientSide && base.isRedstoneToggle()) { @@ -109,9 +107,9 @@ public abstract class BlockContainerBase extends Block { } @Override - public void tick(@Nonnull BlockState state, ServerWorld world, @Nonnull BlockPos pos, @Nonnull Random rand) { + public void tick(@Nonnull BlockState state, ServerLevel world, @Nonnull BlockPos pos, @Nonnull Random rand) { if (!world.isClientSide) { - TileEntity tile = world.getBlockEntity(pos); + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityBase) { TileEntityBase base = (TileEntityBase) tile; if (base.respondsToPulses()) { @@ -121,10 +119,10 @@ public abstract class BlockContainerBase extends Block { } } - public void neighborsChangedCustom(World world, BlockPos pos) { + public void neighborsChangedCustom(Level world, BlockPos pos) { this.updateRedstoneState(world, pos); - TileEntity tile = world.getBlockEntity(pos); + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityBase) { TileEntityBase base = (TileEntityBase) tile; if (base.shouldSaveDataOnChangeOrWorldStart()) { @@ -134,21 +132,21 @@ public abstract class BlockContainerBase extends Block { } @Override //TODO do we need this? - public void neighborChanged(@Nonnull BlockState state, @Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull Block blockIn, @Nonnull BlockPos fromPos, boolean isMoving) { + public void neighborChanged(@Nonnull BlockState state, @Nonnull Level worldIn, @Nonnull BlockPos pos, @Nonnull Block blockIn, @Nonnull BlockPos fromPos, boolean isMoving) { this.neighborsChangedCustom(worldIn, pos); } @Override - public void onNeighborChange(BlockState state, IWorldReader world, BlockPos pos, BlockPos neighbor) { + public void onNeighborChange(BlockState state, LevelReader world, BlockPos pos, BlockPos neighbor) { super.onNeighborChange(state, world, pos, neighbor); - if (world instanceof World) { //TODO what? - this.neighborsChangedCustom((World) world, pos); + if (world instanceof Level) { //TODO what? + this.neighborsChangedCustom((Level) world, pos); } } - public void updateRedstoneState(World world, BlockPos pos) { + public void updateRedstoneState(Level world, BlockPos pos) { if (!world.isClientSide) { - TileEntity tile = world.getBlockEntity(pos); + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityBase) { TileEntityBase base = (TileEntityBase) tile; boolean powered = world.getBestNeighborSignal(pos) > 0; @@ -168,36 +166,36 @@ public abstract class BlockContainerBase extends Block { } } - protected boolean tryUseItemOnTank(PlayerEntity player, Hand hand, FluidTank tank) { + protected boolean tryUseItemOnTank(Player player, InteractionHand hand, FluidTank tank) { ItemStack heldItem = player.getItemInHand(hand); return StackUtil.isValid(heldItem) && FluidUtil.interactWithFluidHandler(player, hand, tank); } @Override - public void onPlace(@Nonnull BlockState state, @Nonnull World worldIn, @Nonnull BlockPos pos, @Nonnull BlockState oldState, boolean isMoving) { + public void onPlace(@Nonnull BlockState state, @Nonnull Level worldIn, @Nonnull BlockPos pos, @Nonnull BlockState oldState, boolean isMoving) { this.updateRedstoneState(worldIn, pos); } @Override - public void setPlacedBy(World world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) { + public void setPlacedBy(Level world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) { if (stack.hasTag()) { - TileEntity tile = world.getBlockEntity(pos); + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityBase) { TileEntityBase base = (TileEntityBase) tile; - CompoundNBT compound = stack.getOrCreateTag().getCompound("Data"); + CompoundTag compound = stack.getOrCreateTag().getCompound("Data"); base.readSyncableNBT(compound, TileEntityBase.NBTType.SAVE_BLOCK); } } } @Override - public void playerWillDestroy(@Nonnull World world, @Nonnull BlockPos pos, @Nonnull BlockState state, PlayerEntity player) { + public void playerWillDestroy(@Nonnull Level world, @Nonnull BlockPos pos, @Nonnull BlockState state, Player player) { super.playerWillDestroy(world, pos, state, player); if (!player.isCreative()) { - TileEntity tile = world.getBlockEntity(pos); + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityBase && ((TileEntityBase) tile).stopFromDropping) { - player.displayClientMessage(new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".machineBroke").withStyle(TextFormatting.RED), false); + player.displayClientMessage(new TranslatableComponent("info." + ActuallyAdditions.MODID + ".machineBroke").withStyle(ChatFormatting.RED), false); } } } @@ -208,8 +206,8 @@ public abstract class BlockContainerBase extends Block { } @Override - public int getAnalogOutputSignal(BlockState state, World world, BlockPos pos) { - TileEntity tile = world.getBlockEntity(pos); + public int getAnalogOutputSignal(BlockState state, Level world, BlockPos pos) { + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityBase) { return ((TileEntityBase) tile).getComparatorStrength(); } @@ -266,12 +264,12 @@ public abstract class BlockContainerBase extends Block { @Override - public BlockRenderType getRenderShape(BlockState pState) { - return BlockRenderType.MODEL; + public RenderShape getRenderShape(BlockState pState) { + return RenderShape.MODEL; } @Override - public void onRemove(BlockState state, World world, BlockPos pos, BlockState newState, boolean isMoving) { + public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean isMoving) { if (state.getBlock() != newState.getBlock()) { if (this.shouldDropInventory(world, pos)) { this.dropInventory(world, pos); @@ -280,7 +278,7 @@ public abstract class BlockContainerBase extends Block { super.onRemove(state, world, pos, newState, isMoving); } - public boolean shouldDropInventory(World world, BlockPos pos) { + public boolean shouldDropInventory(Level world, BlockPos pos) { return true; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java index 898492fdb..962dbaae3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockFluidFlowing.java @@ -10,9 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import net.minecraft.block.material.Material; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; /* public class BlockFluidFlowing extends BlockFluidClassic implements ItemBlockBase.ICustomRarity { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java index eb212d6c2..1558750ab 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java @@ -11,29 +11,29 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.CropsBlock; -import net.minecraft.block.SoundType; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.IItemProvider; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.world.IBlockReader; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.ItemLike; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.CropBlock; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.phys.BlockHitResult; import net.minecraftforge.common.PlantType; import net.minecraftforge.items.ItemHandlerHelper; import java.util.List; import java.util.function.Supplier; -public class BlockPlant extends CropsBlock { +public class BlockPlant extends CropBlock { public Supplier seedItem; // Stolen from potato for now @@ -52,7 +52,7 @@ public class BlockPlant extends CropsBlock { } @Override - public PlantType getPlantType(IBlockReader world, BlockPos pos) { + public PlantType getPlantType(BlockGetter world, BlockPos pos) { return PlantType.CROP; } // @@ -65,13 +65,13 @@ public class BlockPlant extends CropsBlock { @Override - public ActionResultType use(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { + public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand handIn, BlockHitResult hit) { if (this.getAge(state) < 7) { - return ActionResultType.PASS; + return InteractionResult.PASS; } if (!world.isClientSide) { - List drops = Block.getDrops(state, (ServerWorld) world, pos, null); + List drops = Block.getDrops(state, (ServerLevel) world, pos, null); boolean deductedSeedSize = false; for (ItemStack drop : drops) { if (StackUtil.isValid(drop)) { @@ -92,7 +92,7 @@ public class BlockPlant extends CropsBlock { } @Override - protected IItemProvider getBaseSeedId() { + protected ItemLike getBaseSeedId() { return this.seedItem.get(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/DirectionalBlock.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/DirectionalBlock.java index 7c814125b..24220cf7a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/DirectionalBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/DirectionalBlock.java @@ -1,14 +1,12 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.item.BlockItemUseContext; -import net.minecraft.state.DirectionProperty; -import net.minecraft.state.StateContainer; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.Direction; - -import net.minecraft.block.AbstractBlock.Properties; +import net.minecraft.core.Direction; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.DirectionProperty; /** * Wrapper for Directional block states extending from our base blocks. It's not super nice but it'll do. @@ -21,12 +19,12 @@ public abstract class DirectionalBlock extends BlockBase { } @Override - public BlockState getStateForPlacement(BlockItemUseContext context) { + public BlockState getStateForPlacement(BlockPlaceContext context) { return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite()); } @Override - protected void createBlockStateDefinition(StateContainer.Builder builder) { + protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(FACING); } @@ -40,12 +38,12 @@ public abstract class DirectionalBlock extends BlockBase { } @Override - public BlockState getStateForPlacement(BlockItemUseContext context) { + public BlockState getStateForPlacement(BlockPlaceContext context) { return this.defaultBlockState().setValue(FACING, context.getHorizontalDirection().getOpposite()); } @Override - protected void createBlockStateDefinition(StateContainer.Builder builder) { + protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(FACING); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/FullyDirectionalBlock.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/FullyDirectionalBlock.java index fee383377..8f1bde8f7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/FullyDirectionalBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/FullyDirectionalBlock.java @@ -1,12 +1,12 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.item.BlockItemUseContext; -import net.minecraft.state.DirectionProperty; -import net.minecraft.state.StateContainer; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.Direction; +import net.minecraft.core.Direction; +import net.minecraft.world.item.context.BlockPlaceContext; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.StateDefinition; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.block.state.properties.DirectionProperty; /** * Wrapper for Fully Direction block states extending from our base blocks. It's not super nice but it'll do. @@ -20,7 +20,7 @@ public abstract class FullyDirectionalBlock extends BlockBase { } @Override - public BlockState getStateForPlacement(BlockItemUseContext context) { + public BlockState getStateForPlacement(BlockPlaceContext context) { return this.defaultBlockState().setValue(FACING, context.getNearestLookingDirection().getOpposite()); } @@ -30,7 +30,7 @@ public abstract class FullyDirectionalBlock extends BlockBase { } @Override - protected void createBlockStateDefinition(StateContainer.Builder builder) { + protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(FACING); } @@ -44,12 +44,12 @@ public abstract class FullyDirectionalBlock extends BlockBase { } @Override - public BlockState getStateForPlacement(BlockItemUseContext context) { + public BlockState getStateForPlacement(BlockPlaceContext context) { return this.defaultBlockState().setValue(FACING, context.getNearestLookingDirection().getOpposite()); } @Override - protected void createBlockStateDefinition(StateContainer.Builder builder) { + protected void createBlockStateDefinition(StateDefinition.Builder builder) { builder.add(FACING); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/ItemBlockBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/ItemBlockBase.java index 197a2961e..7cc6f2cba 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/ItemBlockBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/ItemBlockBase.java @@ -10,9 +10,9 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import net.minecraft.block.Block; -import net.minecraft.item.BlockItem; -import net.minecraft.item.Item; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; public class ItemBlockBase extends BlockItem { public ItemBlockBase(Block block, Item.Properties properties) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheColoredLampColors.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheColoredLampColors.java index ac61cba61..acd2bfb21 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheColoredLampColors.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheColoredLampColors.java @@ -10,10 +10,10 @@ package de.ellpeck.actuallyadditions.mod.blocks.metalists; -import net.minecraft.util.IStringSerializable; +import net.minecraft.util.StringRepresentable; @Deprecated -public enum TheColoredLampColors implements IStringSerializable { +public enum TheColoredLampColors implements StringRepresentable { WHITE("White", "white"), ORANGE("Orange", "orange"), diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheMiscBlocks.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheMiscBlocks.java index e659d669c..76ba1b99b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheMiscBlocks.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/metalists/TheMiscBlocks.java @@ -10,11 +10,11 @@ package de.ellpeck.actuallyadditions.mod.blocks.metalists; -import net.minecraft.item.Rarity; -import net.minecraft.util.IStringSerializable; +import net.minecraft.util.StringRepresentable; +import net.minecraft.world.item.Rarity; @Deprecated -public enum TheMiscBlocks implements IStringSerializable { +public enum TheMiscBlocks implements StringRepresentable { QUARTZ_PILLAR("black_quartz_pillar", Rarity.RARE), QUARTZ_CHISELED("black_quartz_chiseled", Rarity.RARE), diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/package-info.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/package-info.java index 6ed11c4ff..b9ba0f7b3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/package-info.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/package-info.java @@ -2,5 +2,6 @@ @MethodsReturnNonnullByDefault package de.ellpeck.actuallyadditions.mod.blocks; -import mcp.MethodsReturnNonnullByDefault; +import net.minecraft.MethodsReturnNonnullByDefault; + import javax.annotation.ParametersAreNonnullByDefault; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/ReconstructorRenderer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/ReconstructorRenderer.java index f4a6eac79..e7addb4de 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/ReconstructorRenderer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/ReconstructorRenderer.java @@ -10,35 +10,27 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; -import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.math.Vector3f; import de.ellpeck.actuallyadditions.api.lens.ILensItem; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.BlockState; -import net.minecraft.client.renderer.IRenderTypeBuffer; -import net.minecraft.client.renderer.WorldRenderer; -import net.minecraft.client.renderer.tileentity.TileEntityRenderer; -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.Direction; -import net.minecraft.util.NonNullList; -import net.minecraft.util.math.vector.Quaternion; -import net.minecraft.util.math.vector.Vector3f; +import net.minecraft.client.renderer.LevelRenderer; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.core.Direction; +import net.minecraft.world.item.ItemStack; import javax.annotation.Nonnull; -public class ReconstructorRenderer extends TileEntityRenderer { +public class ReconstructorRenderer implements BlockEntityRenderer { - public ReconstructorRenderer(TileEntityRendererDispatcher rendererDispatcherIn) { - super(rendererDispatcherIn); + public ReconstructorRenderer(BlockEntityRendererProvider.Context context) { } @Override - public void render(TileEntityAtomicReconstructor tile, float partialTicks, @Nonnull MatrixStack matrices, @Nonnull IRenderTypeBuffer buffer, int combinedLight, int combinedOverlay) { + public void render(TileEntityAtomicReconstructor tile, float partialTicks, @Nonnull PoseStack matrices, @Nonnull MultiBufferSource buffer, int combinedLight, int combinedOverlay) { ItemStack stack = tile.inv.getStackInSlot(0); //default color 0x1b6dff int color = tile.getBeamColor(); @@ -73,7 +65,7 @@ public class ReconstructorRenderer extends TileEntityRenderer { - public RenderBatteryBox(TileEntityRendererDispatcher rendererDispatcherIn) { - super(rendererDispatcherIn); +public class RenderBatteryBox implements BlockEntityRenderer { + public RenderBatteryBox(BlockEntityRendererProvider.Context context) { } @Override - public void render(TileEntityBatteryBox tile, float partialTicks, MatrixStack matrices, IRenderTypeBuffer buffer, int combinedLight, int combinedOverlay) { + public void render(TileEntityBatteryBox tile, float partialTicks, PoseStack matrices, MultiBufferSource buffer, int combinedLight, int combinedOverlay) { ItemStack stack = tile.inv.getStackInSlot(0); if (stack.isEmpty() || !(stack.getItem() instanceof ItemBattery)) { return; @@ -53,7 +51,7 @@ public class RenderBatteryBox extends TileEntityRenderer { matrices.translate(0F, 0F, -60F); stack.getCapability(CapabilityEnergy.ENERGY).ifPresent(cap -> { - FontRenderer font = Minecraft.getInstance().font; + Font font = Minecraft.getInstance().font; String energyTotal = Lang.cleanEnergyValues(cap, false); String energyName = I18n.get("misc.actuallyadditions.power_name_long"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderDisplayStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderDisplayStand.java index 293d11825..0f9f2e83d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderDisplayStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderDisplayStand.java @@ -10,29 +10,26 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; -import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.math.Vector3f; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDisplayStand; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.client.renderer.IRenderTypeBuffer; -import net.minecraft.client.renderer.tileentity.TileEntityRenderer; -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; -import net.minecraft.item.BlockItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Util; -import net.minecraft.util.math.vector.Quaternion; -import net.minecraft.util.math.vector.Vector3f; +import net.minecraft.Util; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.ItemStack; import javax.annotation.Nonnull; -public class RenderDisplayStand extends TileEntityRenderer { - public RenderDisplayStand(TileEntityRendererDispatcher rendererDispatcherIn) { - super(rendererDispatcherIn); +public class RenderDisplayStand implements BlockEntityRenderer { + public RenderDisplayStand(BlockEntityRendererProvider.Context context) { } @Override - public void render(TileEntityDisplayStand tile, float partialTicks, @Nonnull MatrixStack matrices, @Nonnull IRenderTypeBuffer buffer, int combinedLightIn, int combinedOverlayIn) { + public void render(TileEntityDisplayStand tile, float partialTicks, @Nonnull PoseStack matrices, @Nonnull MultiBufferSource buffer, int combinedLightIn, int combinedOverlayIn) { ItemStack stack = tile.inv.getStackInSlot(0); if (stack.isEmpty()) { return; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderEmpowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderEmpowerer.java index 9a5fa5888..2aa0e9f74 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderEmpowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderEmpowerer.java @@ -10,32 +10,29 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; -import com.mojang.blaze3d.matrix.MatrixStack; -import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.math.Vector3f; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.crafting.EmpowererRecipe; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEmpowerer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.client.renderer.IRenderTypeBuffer; -import net.minecraft.client.renderer.tileentity.TileEntityRenderer; -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; -import net.minecraft.item.BlockItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Direction; -import net.minecraft.util.Util; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.vector.Quaternion; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.util.math.vector.Vector3f; +import net.minecraft.Util; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.phys.Vec3; -public class RenderEmpowerer extends TileEntityRenderer { - public RenderEmpowerer(TileEntityRendererDispatcher rendererDispatcherIn) { - super(rendererDispatcherIn); +public class RenderEmpowerer implements BlockEntityRenderer { + public RenderEmpowerer(BlockEntityRendererProvider.Context context) { } @Override - public void render(TileEntityEmpowerer tile, float partialTicks, MatrixStack matrices, IRenderTypeBuffer buffer, int combinedLight, int combinedOverlay) { + public void render(TileEntityEmpowerer tile, float partialTicks, PoseStack matrices, MultiBufferSource buffer, int combinedLight, int combinedOverlay) { ItemStack stack = tile.inv.getStackInSlot(0); if (StackUtil.isValid(stack)) { // TODO: [port][refactor] migrate this logic into a single method, most renders use it @@ -79,7 +76,7 @@ public class RenderEmpowerer extends TileEntityRenderer { Direction facing = Direction.from2DDataValue(i); BlockPos offset = new BlockPos(0,0,0).relative(facing, 3); - AssetUtil.renderLaser(matrices, buffer, new Vector3d(0.0d, 0.0d, 0.0d), new Vector3d(offset.getX(), offset.getY() + 0.45, offset.getZ()), 80, recipe.getParticleColors(), 1.0f ,0.1F); + AssetUtil.renderLaser(matrices, buffer, new Vec3(0.0d, 0.0d, 0.0d), new Vec3(offset.getX(), offset.getY() + 0.45, offset.getZ()), 80, recipe.getParticleColors(), 1.0f ,0.1F); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java index c4932ffd7..821de6619 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java @@ -10,7 +10,8 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; -import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.math.Vector3f; import de.ellpeck.actuallyadditions.api.laser.IConnectionPair; import de.ellpeck.actuallyadditions.api.laser.LaserType; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; @@ -21,40 +22,38 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import io.netty.util.internal.ConcurrentSet; -import net.minecraft.block.BlockState; +import net.minecraft.Util; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.IRenderTypeBuffer; -import net.minecraft.client.renderer.tileentity.TileEntityRenderer; -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.Rotation; -import net.minecraft.util.Util; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.util.math.vector.Vector3f; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.blockentity.BlockEntityRenderer; +import net.minecraft.client.renderer.blockentity.BlockEntityRendererProvider; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.Rotation; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.phys.Vec3; -public class RenderLaserRelay extends TileEntityRenderer { +public class RenderLaserRelay implements BlockEntityRenderer { private static final int COLOR = 16711680; private static final int COLOR_ITEM = 31760; private static final int COLOR_FLUIDS = 25030; private static final int COLOR_INFRARED = 13743087; - public RenderLaserRelay(TileEntityRendererDispatcher rendererDispatcherIn) { - super(rendererDispatcherIn); + public RenderLaserRelay(BlockEntityRendererProvider.Context context) { } @Override - public void render(TileEntityLaserRelay tile, float partialTicks, MatrixStack matrices, IRenderTypeBuffer buffer, int combinedLight, int combinedOverlay) { + public void render(TileEntityLaserRelay tile, float partialTicks, PoseStack matrices, MultiBufferSource buffer, int combinedLight, int combinedOverlay) { TileEntityLaserRelay relay = tile; BlockState state = tile.getBlockState(); boolean hasInvis = false; - PlayerEntity player = Minecraft.getInstance().player; + Player player = Minecraft.getInstance().player; boolean hasGoggles = ItemEngineerGoggles.isWearing(player); ItemStack upgrade = relay.inv.getStackInSlot(0); @@ -89,7 +88,7 @@ public class RenderLaserRelay extends TileEntityRenderer { BlockPos first = tile.getBlockPos(); BlockPos second = pair.getPositions()[1]; - TileEntity secondTile = tile.getLevel().getBlockEntity(second); + BlockEntity secondTile = tile.getLevel().getBlockEntity(second); if (secondTile instanceof TileEntityLaserRelay) { ItemStack secondUpgrade = ((TileEntityLaserRelay) secondTile).inv.getStackInSlot(0); boolean otherInvis = StackUtil.isValid(secondUpgrade) && secondUpgrade.getItem() == ActuallyItems.LASER_UPGRADE_INVISIBILITY.get(); @@ -107,8 +106,8 @@ public class RenderLaserRelay extends TileEntityRenderer { matrices.pushPose(); AssetUtil.renderLaser(matrices, buffer, - new Vector3d(offsetStart.getX(), offsetStart.getY(), offsetStart.getZ()), - new Vector3d(offsetEnd.getX(), offsetEnd.getY(), offsetEnd.getZ()), + new Vec3(offsetStart.getX(), offsetStart.getY(), offsetStart.getZ()), + new Vec3(offsetEnd.getX(), offsetEnd.getY(), offsetEnd.getZ()), 120, color, hasInvis && otherInvis ? 0.1F diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTypes.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTypes.java index 38eabe2b3..f9f316d6d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTypes.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderTypes.java @@ -1,15 +1,12 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; -import com.mojang.blaze3d.platform.GlStateManager; -import com.mojang.blaze3d.systems.RenderSystem; -import net.minecraft.client.renderer.RenderState; +import com.mojang.blaze3d.vertex.DefaultVertexFormat; +import com.mojang.blaze3d.vertex.VertexFormat; +import net.minecraft.client.renderer.RenderStateShard; import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.client.renderer.vertex.VertexFormat; -import org.lwjgl.opengl.GL11; public class RenderTypes extends RenderType { - public RenderTypes(String NameIn, VertexFormat FormatIn, int GLMode, int BufferSize, boolean useDelegate, boolean needsSorting, Runnable setupTask, Runnable ClearTask) { + public RenderTypes(String NameIn, VertexFormat FormatIn, VertexFormat.Mode GLMode, int BufferSize, boolean useDelegate, boolean needsSorting, Runnable setupTask, Runnable ClearTask) { super(NameIn, FormatIn, GLMode, BufferSize, useDelegate, needsSorting, setupTask, ClearTask); } @@ -20,14 +17,14 @@ public class RenderTypes extends RenderType { .setTextureState(NO_TEXTURE) .setOutputState(RenderType.OUTLINE_TARGET) .createCompositeState(true));*/ - public static final RenderType LASER = create("actuallyadditions:laser", DefaultVertexFormats.POSITION_COLOR_LIGHTMAP, - GL11.GL_QUADS, 256, false, true, - RenderType.State.builder() + public static final RenderType LASER = create("actuallyadditions:laser", DefaultVertexFormat.POSITION_COLOR_LIGHTMAP, + VertexFormat.Mode.QUADS, 256, false, true, + RenderType.CompositeState.builder() .setTransparencyState(ADDITIVE_TRANSPARENCY) .setTextureState(NO_TEXTURE) .setOutputState(RenderType.TRANSLUCENT_TARGET) - .setLightmapState(RenderState.LIGHTMAP) - .setAlphaState(RenderState.DEFAULT_ALPHA) - .setCullState(RenderState.NO_CULL) + .setLightmapState(RenderStateShard.LIGHTMAP) +// .setAlphaState(RenderStateShard.DEFAULT_ALPHA) + .setCullState(RenderStateShard.NO_CULL) .createCompositeState(true)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/CommonConfig.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/CommonConfig.java index 311cadef8..2eb80f2d0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/CommonConfig.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/CommonConfig.java @@ -1,7 +1,7 @@ package de.ellpeck.actuallyadditions.mod.config; -import net.minecraft.item.Item; -import net.minecraft.item.Items; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.Items; import net.minecraftforge.common.ForgeConfigSpec; import java.util.ArrayList; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/ConfigValues.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/ConfigValues.java index ce0fb9ded..d4c30ca2b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/ConfigValues.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/ConfigValues.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.config; -import net.minecraft.item.Item; +import net.minecraft.world.item.Item; public final class ConfigValues { // diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/conditions/BoolConfigCondition.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/conditions/BoolConfigCondition.java index 63f0a09d2..a44b84a74 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/conditions/BoolConfigCondition.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/conditions/BoolConfigCondition.java @@ -3,7 +3,7 @@ package de.ellpeck.actuallyadditions.mod.config.conditions; import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; -import net.minecraft.util.ResourceLocation; +import net.minecraft.resources.ResourceLocation; import net.minecraftforge.common.crafting.conditions.ICondition; import net.minecraftforge.common.crafting.conditions.IConditionSerializer; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ActuallyRecipes.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ActuallyRecipes.java index f09044bb1..bc1d8fb67 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ActuallyRecipes.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ActuallyRecipes.java @@ -1,42 +1,42 @@ package de.ellpeck.actuallyadditions.mod.crafting; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.item.crafting.IRecipeSerializer; -import net.minecraft.item.crafting.IRecipeType; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.RecipeType; import net.minecraftforge.eventbus.api.IEventBus; -import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; public class ActuallyRecipes { - public static final DeferredRegister> SERIALIZERS = DeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, ActuallyAdditions.MODID); + public static final DeferredRegister> SERIALIZERS = DeferredRegister.create(ForgeRegistries.RECIPE_SERIALIZERS, ActuallyAdditions.MODID); public static void init(IEventBus bus) { SERIALIZERS.register(bus); } - public static final RegistryObject> KEEP_DATA_SHAPED_RECIPE = SERIALIZERS.register(RecipeKeepDataShaped.NAME, RecipeKeepDataShaped.Serializer::new); - public static final RegistryObject> LASER_RECIPE = SERIALIZERS.register(LaserRecipe.NAME, LaserRecipe.Serializer::new); - public static final RegistryObject> EMPOWERING_RECIPE = SERIALIZERS.register(EmpowererRecipe.NAME, EmpowererRecipe.Serializer::new); - public static final RegistryObject> CRUSHING_RECIPE = SERIALIZERS.register(CrushingRecipe.NAME, CrushingRecipe.Serializer::new); - public static final RegistryObject> SOLID_FUEL_RECIPE = SERIALIZERS.register(SolidFuelRecipe.NAME, SolidFuelRecipe.Serializer::new); - public static final RegistryObject> LIQUID_FUEL_RECIPE = SERIALIZERS.register(LiquidFuelRecipe.NAME, LiquidFuelRecipe.Serializer::new); - public static final RegistryObject> PRESSING_RECIPE = SERIALIZERS.register(PressingRecipe.NAME, PressingRecipe.Serializer::new); - public static final RegistryObject> FERMENTING_RECIPE = SERIALIZERS.register(FermentingRecipe.NAME, FermentingRecipe.Serializer::new); - public static final RegistryObject> COLOR_CHANGE_RECIPE = SERIALIZERS.register(ColorChangeRecipe.NAME, ColorChangeRecipe.Serializer::new); - public static final RegistryObject> MINING_LENS_RECIPE = SERIALIZERS.register(MiningLensRecipe.NAME, MiningLensRecipe.Serializer::new); + public static final RegistryObject> KEEP_DATA_SHAPED_RECIPE = SERIALIZERS.register(RecipeKeepDataShaped.NAME, RecipeKeepDataShaped.Serializer::new); + public static final RegistryObject> LASER_RECIPE = SERIALIZERS.register(LaserRecipe.NAME, LaserRecipe.Serializer::new); + public static final RegistryObject> EMPOWERING_RECIPE = SERIALIZERS.register(EmpowererRecipe.NAME, EmpowererRecipe.Serializer::new); + public static final RegistryObject> CRUSHING_RECIPE = SERIALIZERS.register(CrushingRecipe.NAME, CrushingRecipe.Serializer::new); + public static final RegistryObject> SOLID_FUEL_RECIPE = SERIALIZERS.register(SolidFuelRecipe.NAME, SolidFuelRecipe.Serializer::new); + public static final RegistryObject> LIQUID_FUEL_RECIPE = SERIALIZERS.register(LiquidFuelRecipe.NAME, LiquidFuelRecipe.Serializer::new); + public static final RegistryObject> PRESSING_RECIPE = SERIALIZERS.register(PressingRecipe.NAME, PressingRecipe.Serializer::new); + public static final RegistryObject> FERMENTING_RECIPE = SERIALIZERS.register(FermentingRecipe.NAME, FermentingRecipe.Serializer::new); + public static final RegistryObject> COLOR_CHANGE_RECIPE = SERIALIZERS.register(ColorChangeRecipe.NAME, ColorChangeRecipe.Serializer::new); + public static final RegistryObject> MINING_LENS_RECIPE = SERIALIZERS.register(MiningLensRecipe.NAME, MiningLensRecipe.Serializer::new); public static class Types { - public static final IRecipeType LASER = IRecipeType.register(ActuallyAdditions.MODID + ":laser"); - public static final IRecipeType EMPOWERING = IRecipeType.register(ActuallyAdditions.MODID + ":empower"); - public static final IRecipeType CRUSHING = IRecipeType.register(ActuallyAdditions.MODID + ":crushing"); - public static final IRecipeType SOLID_FUEL = IRecipeType.register(ActuallyAdditions.MODID + ":solid_fuel"); - public static final IRecipeType LIQUID_FUEL = IRecipeType.register(ActuallyAdditions.MODID + ":liquid_fuel"); - public static final IRecipeType PRESSING = IRecipeType.register(ActuallyAdditions.MODID + ":pressing"); - public static final IRecipeType FERMENTING = IRecipeType.register(ActuallyAdditions.MODID + ":fermenting"); - public static final IRecipeType COLOR_CHANGE = IRecipeType.register(ActuallyAdditions.MODID + ":color_change"); - public static final IRecipeType MINING_LENS = IRecipeType.register(ActuallyAdditions.MODID + ":mining_lens"); + public static final RecipeType LASER = RecipeType.register(ActuallyAdditions.MODID + ":laser"); + public static final RecipeType EMPOWERING = RecipeType.register(ActuallyAdditions.MODID + ":empower"); + public static final RecipeType CRUSHING = RecipeType.register(ActuallyAdditions.MODID + ":crushing"); + public static final RecipeType SOLID_FUEL = RecipeType.register(ActuallyAdditions.MODID + ":solid_fuel"); + public static final RecipeType LIQUID_FUEL = RecipeType.register(ActuallyAdditions.MODID + ":liquid_fuel"); + public static final RecipeType PRESSING = RecipeType.register(ActuallyAdditions.MODID + ":pressing"); + public static final RecipeType FERMENTING = RecipeType.register(ActuallyAdditions.MODID + ":fermenting"); + public static final RecipeType COLOR_CHANGE = RecipeType.register(ActuallyAdditions.MODID + ":color_change"); + public static final RecipeType MINING_LENS = RecipeType.register(ActuallyAdditions.MODID + ":mining_lens"); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ColorChangeRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ColorChangeRecipe.java index f5a7e768f..c16fe8d18 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ColorChangeRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ColorChangeRecipe.java @@ -2,25 +2,25 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.IRecipeSerializer; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.network.PacketBuffer; -import net.minecraft.util.IItemProvider; -import net.minecraft.util.JSONUtils; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.GsonHelper; +import net.minecraft.world.Container; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.ItemLike; +import net.minecraft.world.level.Level; import net.minecraftforge.registries.ForgeRegistryEntry; import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Optional; -public class ColorChangeRecipe implements IRecipe { +public class ColorChangeRecipe implements Recipe { public static final String NAME = "color_change"; private final Ingredient input; @@ -34,7 +34,7 @@ public class ColorChangeRecipe implements IRecipe { } @Override - public boolean matches(@Nonnull IInventory pInv, @Nonnull World pLevel) { + public boolean matches(@Nonnull Container pInv, @Nonnull Level pLevel) { return input.test(pInv.getItem(0)); } @@ -49,7 +49,7 @@ public class ColorChangeRecipe implements IRecipe { @Nonnull @Override - public ItemStack assemble(@Nonnull IInventory pInv) { + public ItemStack assemble(@Nonnull Container pInv) { return output.copy(); } @@ -76,46 +76,46 @@ public class ColorChangeRecipe implements IRecipe { @Nonnull @Override - public IRecipeSerializer getSerializer() { + public RecipeSerializer getSerializer() { return ActuallyRecipes.COLOR_CHANGE_RECIPE.get(); } @Override - public IRecipeType getType() { + public RecipeType getType() { return ActuallyRecipes.Types.COLOR_CHANGE; } - public static class Serializer extends ForgeRegistryEntry> implements IRecipeSerializer { + public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { @Override public ColorChangeRecipe fromJson(@Nonnull ResourceLocation pRecipeId, @Nonnull JsonObject pJson) { - Ingredient ingredient = Ingredient.fromJson(JSONUtils.getAsJsonObject(pJson, "ingredient")); - JsonObject resultObject = JSONUtils.getAsJsonObject(pJson, "result"); - ItemStack result = new ItemStack(JSONUtils.getAsItem(resultObject, "item")); + Ingredient ingredient = Ingredient.fromJson(GsonHelper.getAsJsonObject(pJson, "ingredient")); + JsonObject resultObject = GsonHelper.getAsJsonObject(pJson, "result"); + ItemStack result = new ItemStack(GsonHelper.getAsItem(resultObject, "item")); return new ColorChangeRecipe(pRecipeId, result, ingredient); } @Nullable @Override - public ColorChangeRecipe fromNetwork(@Nonnull ResourceLocation pRecipeId, @Nonnull PacketBuffer pBuffer) { + public ColorChangeRecipe fromNetwork(@Nonnull ResourceLocation pRecipeId, @Nonnull FriendlyByteBuf pBuffer) { Ingredient ingredient = Ingredient.fromNetwork(pBuffer); ItemStack result = pBuffer.readItem(); return new ColorChangeRecipe(pRecipeId, result, ingredient); } @Override - public void toNetwork(@Nonnull PacketBuffer pBuffer, ColorChangeRecipe pRecipe) { + public void toNetwork(@Nonnull FriendlyByteBuf pBuffer, ColorChangeRecipe pRecipe) { pRecipe.input.toNetwork(pBuffer); pBuffer.writeItem(pRecipe.output); } } - public static class FinishedRecipe implements IFinishedRecipe { + public static class Result implements FinishedRecipe { private final ResourceLocation id; private final Ingredient itemIngredient; - private final IItemProvider output; + private final ItemLike output; - public FinishedRecipe(ResourceLocation id, Ingredient itemIngredient, IItemProvider output) { + public Result(ResourceLocation id, Ingredient itemIngredient, ItemLike output) { this.id = id; this.itemIngredient = itemIngredient; this.output = output; @@ -137,7 +137,7 @@ public class ColorChangeRecipe implements IRecipe { } @Override - public IRecipeSerializer getType() { + public RecipeSerializer getType() { return ActuallyRecipes.COLOR_CHANGE_RECIPE.get(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/CrushingRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/CrushingRecipe.java index 9162a3013..3b49c1fe2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/CrushingRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/CrushingRecipe.java @@ -3,24 +3,24 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.IRecipeSerializer; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.network.PacketBuffer; -import net.minecraft.util.IItemProvider; -import net.minecraft.util.JSONUtils; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.GsonHelper; +import net.minecraft.world.Container; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.ItemLike; +import net.minecraft.world.level.Level; import net.minecraftforge.registries.ForgeRegistryEntry; import javax.annotation.Nonnull; import javax.annotation.Nullable; -public class CrushingRecipe implements IRecipe { +public class CrushingRecipe implements Recipe { public static String NAME = "crushing"; private final ResourceLocation id; protected Ingredient input; @@ -48,7 +48,7 @@ public class CrushingRecipe implements IRecipe { } @Override - public boolean matches(IInventory pInv, World pLevel) { + public boolean matches(Container pInv, Level pLevel) { return input.test(pInv.getItem(0)); } @@ -63,7 +63,7 @@ public class CrushingRecipe implements IRecipe { @Override @Nonnull - public ItemStack assemble(@Nonnull IInventory pInv) { + public ItemStack assemble(@Nonnull Container pInv) { return ItemStack.EMPTY; } @@ -86,13 +86,13 @@ public class CrushingRecipe implements IRecipe { @Override @Nonnull - public IRecipeSerializer getSerializer() { + public RecipeSerializer getSerializer() { return ActuallyRecipes.CRUSHING_RECIPE.get(); } @Override @Nonnull - public IRecipeType getType() { + public RecipeType getType() { return ActuallyRecipes.Types.CRUSHING; } @@ -115,36 +115,36 @@ public class CrushingRecipe implements IRecipe { return this.input; } - public static class Serializer extends ForgeRegistryEntry> implements IRecipeSerializer { + public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { @Override @Nonnull public CrushingRecipe fromJson(@Nonnull ResourceLocation pRecipeId, @Nonnull JsonObject pJson) { - Ingredient ingredient = Ingredient.fromJson(JSONUtils.getAsJsonObject(pJson, "ingredient")); + Ingredient ingredient = Ingredient.fromJson(GsonHelper.getAsJsonObject(pJson, "ingredient")); - JsonArray resultList = JSONUtils.getAsJsonArray(pJson, "result"); + JsonArray resultList = GsonHelper.getAsJsonArray(pJson, "result"); if (resultList.size() < 1) throw new IllegalStateException(pRecipeId.toString() + ": Recipe must contain at least 1 result item"); JsonObject result1 = resultList.get(0).getAsJsonObject(); - int count1 = JSONUtils.getAsInt(result1, "count", 0); - ItemStack output1 = new ItemStack(JSONUtils.getAsItem(result1, "item"), count1); - float chance1 = JSONUtils.getAsFloat(result1, "chance"); + int count1 = GsonHelper.getAsInt(result1, "count", 0); + ItemStack output1 = new ItemStack(GsonHelper.getAsItem(result1, "item"), count1); + float chance1 = GsonHelper.getAsFloat(result1, "chance"); ItemStack output2 = ItemStack.EMPTY; float chance2 = 1.0f; if (resultList.size() > 1) { JsonObject result2 = resultList.get(1).getAsJsonObject(); - int count2 = JSONUtils.getAsInt(result2, "count", 0); - output2 = new ItemStack(JSONUtils.getAsItem(result2, "item"), count2); - chance2 = JSONUtils.getAsFloat(result2, "chance"); + int count2 = GsonHelper.getAsInt(result2, "count", 0); + output2 = new ItemStack(GsonHelper.getAsItem(result2, "item"), count2); + chance2 = GsonHelper.getAsFloat(result2, "chance"); } return new CrushingRecipe(pRecipeId, ingredient, output1, chance1, output2, chance2); } @Override - public CrushingRecipe fromNetwork(@Nonnull ResourceLocation pRecipeId, @Nonnull PacketBuffer pBuffer) { + public CrushingRecipe fromNetwork(@Nonnull ResourceLocation pRecipeId, @Nonnull FriendlyByteBuf pBuffer) { Ingredient ingredient = Ingredient.fromNetwork(pBuffer); ItemStack output1 = pBuffer.readItem(); ItemStack output2 = pBuffer.readItem(); @@ -155,7 +155,7 @@ public class CrushingRecipe implements IRecipe { } @Override - public void toNetwork(@Nonnull PacketBuffer pBuffer, CrushingRecipe pRecipe) { + public void toNetwork(@Nonnull FriendlyByteBuf pBuffer, CrushingRecipe pRecipe) { pRecipe.input.toNetwork(pBuffer); pBuffer.writeItem(pRecipe.outputOne); pBuffer.writeItem(pRecipe.outputTwo); @@ -164,17 +164,17 @@ public class CrushingRecipe implements IRecipe { } } - public static class FinishedRecipe implements IFinishedRecipe { + public static class Result implements FinishedRecipe { private final ResourceLocation id; protected Ingredient input; - protected IItemProvider outputOne; + protected ItemLike outputOne; protected int countOne; protected float outputChance1; - protected IItemProvider outputTwo; + protected ItemLike outputTwo; protected int countTwo; protected float outputChance2; - public FinishedRecipe(ResourceLocation id, Ingredient input, IItemProvider outputOne, int countOne, float outputChance1, IItemProvider outputTwo, int countTwo, float outputChance2) { + public Result(ResourceLocation id, Ingredient input, ItemLike outputOne, int countOne, float outputChance1, ItemLike outputTwo, int countTwo, float outputChance2) { this.id = id; this.countOne = countOne; this.countTwo = countTwo; @@ -214,7 +214,7 @@ public class CrushingRecipe implements IRecipe { @Override @Nonnull - public IRecipeSerializer getType() { + public RecipeSerializer getType() { return ActuallyRecipes.CRUSHING_RECIPE.get(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/EmpowererRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/EmpowererRecipe.java index e78cd58c5..34c05f983 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/EmpowererRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/EmpowererRecipe.java @@ -2,18 +2,18 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonArray; import com.google.gson.JsonObject; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.IRecipeSerializer; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.network.PacketBuffer; -import net.minecraft.util.IItemProvider; -import net.minecraft.util.JSONUtils; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.GsonHelper; +import net.minecraft.world.Container; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.ItemLike; +import net.minecraft.world.level.Level; import net.minecraftforge.registries.ForgeRegistryEntry; import javax.annotation.Nonnull; @@ -21,7 +21,7 @@ import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; -public class EmpowererRecipe implements IRecipe { +public class EmpowererRecipe implements Recipe { public static String NAME = "empowering"; private final ResourceLocation id; protected final Ingredient input; @@ -75,7 +75,7 @@ public class EmpowererRecipe implements IRecipe { } @Override - public boolean matches(@Nonnull IInventory pInv, @Nonnull World pLevel) { + public boolean matches(@Nonnull Container pInv, @Nonnull Level pLevel) { return false; } @@ -86,7 +86,7 @@ public class EmpowererRecipe implements IRecipe { @Override @Nonnull - public ItemStack assemble(@Nonnull IInventory pInv) { + public ItemStack assemble(@Nonnull Container pInv) { return output.copy(); } @@ -109,13 +109,13 @@ public class EmpowererRecipe implements IRecipe { @Override @Nonnull - public IRecipeSerializer getSerializer() { + public RecipeSerializer getSerializer() { return ActuallyRecipes.EMPOWERING_RECIPE.get(); } @Override @Nonnull - public IRecipeType getType() { + public RecipeType getType() { return ActuallyRecipes.Types.EMPOWERING; } @@ -155,13 +155,13 @@ public class EmpowererRecipe implements IRecipe { return this.particleColor; } - public static class Serializer extends ForgeRegistryEntry> implements IRecipeSerializer { + public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { @Override @Nonnull public EmpowererRecipe fromJson(@Nonnull ResourceLocation pRecipeId, @Nonnull JsonObject pJson) { - Ingredient base = Ingredient.fromJson(JSONUtils.getAsJsonObject(pJson, "base")); + Ingredient base = Ingredient.fromJson(GsonHelper.getAsJsonObject(pJson, "base")); - JsonArray modifiers = JSONUtils.getAsJsonArray(pJson, "modifiers"); + JsonArray modifiers = GsonHelper.getAsJsonArray(pJson, "modifiers"); if (modifiers.size() != 4) throw new IllegalStateException(pRecipeId.toString() + ": Must have exactly 4 modifiers, has: " + modifiers.size()); @@ -169,18 +169,18 @@ public class EmpowererRecipe implements IRecipe { Ingredient mod2 = Ingredient.fromJson(modifiers.get(1)); Ingredient mod3 = Ingredient.fromJson(modifiers.get(2)); Ingredient mod4 = Ingredient.fromJson(modifiers.get(3)); - int energy = JSONUtils.getAsInt(pJson, "energy"); - int color = JSONUtils.getAsInt(pJson, "color"); - int time = JSONUtils.getAsInt(pJson, "time"); - JsonObject resultObject = JSONUtils.getAsJsonObject(pJson, "result"); - ItemStack result = new ItemStack(JSONUtils.getAsItem(resultObject, "item")); + int energy = GsonHelper.getAsInt(pJson, "energy"); + int color = GsonHelper.getAsInt(pJson, "color"); + int time = GsonHelper.getAsInt(pJson, "time"); + JsonObject resultObject = GsonHelper.getAsJsonObject(pJson, "result"); + ItemStack result = new ItemStack(GsonHelper.getAsItem(resultObject, "item")); return new EmpowererRecipe(pRecipeId, result, base, mod1, mod2, mod3, mod4, energy, color, time); } @Nullable @Override - public EmpowererRecipe fromNetwork(@Nonnull ResourceLocation pRecipeId, PacketBuffer pBuffer) { + public EmpowererRecipe fromNetwork(@Nonnull ResourceLocation pRecipeId, FriendlyByteBuf pBuffer) { ItemStack result = pBuffer.readItem(); Ingredient input = Ingredient.fromNetwork(pBuffer); Ingredient mod1 = Ingredient.fromNetwork(pBuffer); @@ -195,7 +195,7 @@ public class EmpowererRecipe implements IRecipe { } @Override - public void toNetwork(PacketBuffer pBuffer, EmpowererRecipe pRecipe) { + public void toNetwork(FriendlyByteBuf pBuffer, EmpowererRecipe pRecipe) { pBuffer.writeItem(pRecipe.output); pRecipe.input.toNetwork(pBuffer); pRecipe.modifier1.toNetwork(pBuffer); @@ -208,7 +208,7 @@ public class EmpowererRecipe implements IRecipe { } } - public static class FinishedRecipe implements IFinishedRecipe { + public static class Result implements FinishedRecipe { private final ResourceLocation id; private final Ingredient base; private final Ingredient mod1; @@ -218,9 +218,9 @@ public class EmpowererRecipe implements IRecipe { private final int energy; private final int color; private final int time; - private final IItemProvider output; + private final ItemLike output; - public FinishedRecipe(ResourceLocation id, IItemProvider output, Ingredient input, Ingredient modifier1, Ingredient modifier2, Ingredient modifier3, Ingredient modifier4, int energyPerStand, int particleColor, int time) { + public Result(ResourceLocation id, ItemLike output, Ingredient input, Ingredient modifier1, Ingredient modifier2, Ingredient modifier3, Ingredient modifier4, int energyPerStand, int particleColor, int time) { this.id = id; this.base = input; this.output = output; @@ -263,7 +263,7 @@ public class EmpowererRecipe implements IRecipe { @Override @Nonnull - public IRecipeSerializer getType() { + public RecipeSerializer getType() { return ActuallyRecipes.EMPOWERING_RECIPE.get(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FermentingRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FermentingRecipe.java index cba7f5222..2c5d6632e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FermentingRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FermentingRecipe.java @@ -3,17 +3,17 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import de.ellpeck.actuallyadditions.mod.inventory.gui.FluidDisplay; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.fluid.Fluid; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.IRecipeSerializer; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.network.PacketBuffer; -import net.minecraft.util.JSONUtils; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.GsonHelper; +import net.minecraft.world.Container; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.material.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistryEntry; @@ -22,7 +22,7 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Optional; -public class FermentingRecipe implements IRecipe { +public class FermentingRecipe implements Recipe { public static final String NAME = "fermenting"; private final ResourceLocation ID; private final FluidStack input; @@ -76,7 +76,7 @@ public class FermentingRecipe implements IRecipe { } @Override - public boolean matches(IInventory pInv, World pLevel) { + public boolean matches(Container pInv, Level pLevel) { return false; } @@ -87,7 +87,7 @@ public class FermentingRecipe implements IRecipe { @Nonnull @Override - public ItemStack assemble(IInventory pInv) { + public ItemStack assemble(Container pInv) { return ItemStack.EMPTY; } @@ -110,45 +110,45 @@ public class FermentingRecipe implements IRecipe { @Nonnull @Override - public IRecipeSerializer getSerializer() { + public RecipeSerializer getSerializer() { return ActuallyRecipes.FERMENTING_RECIPE.get(); } @Nonnull @Override - public IRecipeType getType() { + public RecipeType getType() { return ActuallyRecipes.Types.FERMENTING; } - public static class Serializer extends ForgeRegistryEntry> implements IRecipeSerializer { + public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { @Nonnull @Override public FermentingRecipe fromJson(@Nonnull ResourceLocation pRecipeId, @Nonnull JsonObject pJson) { JsonObject ingredient = pJson.getAsJsonObject("ingredient"); - ResourceLocation fluidRes = new ResourceLocation(JSONUtils.getAsString(ingredient, "fluid")); + ResourceLocation fluidRes = new ResourceLocation(GsonHelper.getAsString(ingredient, "fluid")); Fluid fluid = ForgeRegistries.FLUIDS.getValue(fluidRes); if (fluid == null) throw new JsonParseException("Unknown fluid '" + fluidRes + "'"); - int inputAmount = JSONUtils.getAsInt(ingredient, "amount", 80); + int inputAmount = GsonHelper.getAsInt(ingredient, "amount", 80); FluidStack input = new FluidStack(fluid, inputAmount); JsonObject result = pJson.getAsJsonObject("result"); - ResourceLocation fluidOutputRes = new ResourceLocation(JSONUtils.getAsString(result, "fluid")); - int outputAmount = JSONUtils.getAsInt(result, "amount"); + ResourceLocation fluidOutputRes = new ResourceLocation(GsonHelper.getAsString(result, "fluid")); + int outputAmount = GsonHelper.getAsInt(result, "amount"); Fluid fluidOutput = ForgeRegistries.FLUIDS.getValue(fluidOutputRes); if(fluidOutput == null) throw new JsonParseException("Unknown fluid '" + fluidRes + "'"); FluidStack output = new FluidStack(fluidOutput, outputAmount); - int time = JSONUtils.getAsInt(pJson, "time", 100); + int time = GsonHelper.getAsInt(pJson, "time", 100); return new FermentingRecipe(pRecipeId, input, output, time); } @Nullable @Override - public FermentingRecipe fromNetwork(@Nonnull ResourceLocation pRecipeId, @Nonnull PacketBuffer pBuffer) { + public FermentingRecipe fromNetwork(@Nonnull ResourceLocation pRecipeId, @Nonnull FriendlyByteBuf pBuffer) { ResourceLocation inputRes = new ResourceLocation(pBuffer.readUtf()); int inputAmount = pBuffer.readInt(); Fluid inputFluid = ForgeRegistries.FLUIDS.getValue(inputRes); @@ -169,7 +169,7 @@ public class FermentingRecipe implements IRecipe { } @Override - public void toNetwork(@Nonnull PacketBuffer pBuffer, @Nonnull FermentingRecipe pRecipe) { + public void toNetwork(@Nonnull FriendlyByteBuf pBuffer, @Nonnull FermentingRecipe pRecipe) { pBuffer.writeUtf(pRecipe.input.getFluid().getRegistryName().toString()); pBuffer.writeInt(pRecipe.input.getAmount()); pBuffer.writeUtf(pRecipe.output.getFluid().getRegistryName().toString()); @@ -177,13 +177,13 @@ public class FermentingRecipe implements IRecipe { pBuffer.writeInt(pRecipe.time); } } - public static class FinishedRecipe implements IFinishedRecipe { + public static class Result implements FinishedRecipe { private final ResourceLocation ID; private final FluidStack input; private final FluidStack output; private final int time; - public FinishedRecipe(ResourceLocation ID, FluidStack input, FluidStack output, int timeIn) { + public Result(ResourceLocation ID, FluidStack input, FluidStack output, int timeIn) { this.ID = ID; this.input = input; this.output = output; @@ -211,7 +211,7 @@ public class FermentingRecipe implements IRecipe { } @Override - public IRecipeSerializer getType() { + public RecipeSerializer getType() { return ActuallyRecipes.FERMENTING_RECIPE.get(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/InitCrafting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/InitCrafting.java index f080dd966..2b42b51e2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/InitCrafting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/InitCrafting.java @@ -12,9 +12,11 @@ package de.ellpeck.actuallyadditions.mod.crafting; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntListValues; -import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; -import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.*; +import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.CactusFarmerBehavior; +import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.DefaultFarmerBehavior; +import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.MelonPumpkinFarmerBehavior; +import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.NetherWartFarmerBehavior; +import de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer.ReedFarmerBehavior; // TODO: [port] MOVE TO DATA_GENERATOR @Deprecated diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LaserRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LaserRecipe.java index b4a03e6ea..c665d2f20 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LaserRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LaserRecipe.java @@ -2,18 +2,18 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.IRecipeSerializer; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.network.PacketBuffer; -import net.minecraft.util.IItemProvider; -import net.minecraft.util.JSONUtils; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.GsonHelper; +import net.minecraft.world.Container; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.ItemLike; +import net.minecraft.world.level.Level; import net.minecraftforge.registries.ForgeRegistryEntry; import javax.annotation.Nonnull; @@ -21,7 +21,7 @@ import javax.annotation.Nullable; import java.util.Optional; -public class LaserRecipe implements IRecipe { +public class LaserRecipe implements Recipe { public static String NAME = "laser"; private ItemStack result; private Ingredient itemIngredient; @@ -53,7 +53,7 @@ public class LaserRecipe implements IRecipe { //nah @Override - public boolean matches(IInventory pInv, World pLevel) { + public boolean matches(Container pInv, Level pLevel) { return false; } @@ -63,7 +63,7 @@ public class LaserRecipe implements IRecipe { } @Override - public ItemStack assemble(IInventory pInv) { + public ItemStack assemble(Container pInv) { return result.copy(); } @@ -83,12 +83,12 @@ public class LaserRecipe implements IRecipe { } @Override - public IRecipeSerializer getSerializer() { + public RecipeSerializer getSerializer() { return ActuallyRecipes.LASER_RECIPE.get(); } @Override - public IRecipeType getType() { + public RecipeType getType() { return ActuallyRecipes.Types.LASER; } @@ -100,20 +100,20 @@ public class LaserRecipe implements IRecipe { return getRecipeForStack(stack).isPresent(); } - public static class Serializer extends ForgeRegistryEntry> implements IRecipeSerializer { + public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { @Override public LaserRecipe fromJson(@Nonnull ResourceLocation pRecipeId, @Nonnull JsonObject pJson) { - Ingredient ingredient = Ingredient.fromJson(JSONUtils.getAsJsonObject(pJson, "ingredient")); - int energy = JSONUtils.getAsInt(pJson, "energy"); - JsonObject resultObject = JSONUtils.getAsJsonObject(pJson, "result"); - ItemStack result = new ItemStack(JSONUtils.getAsItem(resultObject, "item")); + Ingredient ingredient = Ingredient.fromJson(GsonHelper.getAsJsonObject(pJson, "ingredient")); + int energy = GsonHelper.getAsInt(pJson, "energy"); + JsonObject resultObject = GsonHelper.getAsJsonObject(pJson, "result"); + ItemStack result = new ItemStack(GsonHelper.getAsItem(resultObject, "item")); return new LaserRecipe(pRecipeId, result, ingredient, energy); } @Nullable @Override - public LaserRecipe fromNetwork(@Nonnull ResourceLocation pRecipeId, @Nonnull PacketBuffer pBuffer) { + public LaserRecipe fromNetwork(@Nonnull ResourceLocation pRecipeId, @Nonnull FriendlyByteBuf pBuffer) { Ingredient ingredient = Ingredient.fromNetwork(pBuffer); int energy = pBuffer.readInt(); ItemStack result = pBuffer.readItem(); @@ -121,20 +121,20 @@ public class LaserRecipe implements IRecipe { } @Override - public void toNetwork(@Nonnull PacketBuffer pBuffer, LaserRecipe pRecipe) { + public void toNetwork(@Nonnull FriendlyByteBuf pBuffer, LaserRecipe pRecipe) { pRecipe.itemIngredient.toNetwork(pBuffer); pBuffer.writeInt(pRecipe.energy); pBuffer.writeItem(pRecipe.result); } } - public static class FinishedRecipe implements IFinishedRecipe { + public static class Result implements FinishedRecipe { private ResourceLocation id; private Ingredient itemIngredient; private int energy; - private IItemProvider output; + private ItemLike output; - public FinishedRecipe(ResourceLocation id, Ingredient itemIngredient, int energy, IItemProvider output) { + public Result(ResourceLocation id, Ingredient itemIngredient, int energy, ItemLike output) { this.id = id; this.itemIngredient = itemIngredient; this.energy = energy; @@ -158,7 +158,7 @@ public class LaserRecipe implements IRecipe { } @Override - public IRecipeSerializer getType() { + public RecipeSerializer getType() { return ActuallyRecipes.LASER_RECIPE.get(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LiquidFuelRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LiquidFuelRecipe.java index 5270d5ea3..bbaeb5bfa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LiquidFuelRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LiquidFuelRecipe.java @@ -2,18 +2,17 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.fluid.Fluid; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.IRecipeSerializer; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.network.PacketBuffer; -import net.minecraft.util.JSONUtils; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.GsonHelper; +import net.minecraft.world.Container; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.material.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistryEntry; @@ -21,7 +20,7 @@ import net.minecraftforge.registries.ForgeRegistryEntry; import javax.annotation.Nonnull; import javax.annotation.Nullable; -public class LiquidFuelRecipe implements IRecipe { +public class LiquidFuelRecipe implements Recipe { public static String NAME = "liquid_fuel"; private FluidStack fuel; private int burnTime; @@ -51,7 +50,7 @@ public class LiquidFuelRecipe implements IRecipe { } @Override - public boolean matches(@Nonnull IInventory pInv,@Nonnull World pLevel) { + public boolean matches(@Nonnull Container pInv,@Nonnull Level pLevel) { return false; } @@ -74,7 +73,7 @@ public class LiquidFuelRecipe implements IRecipe { @Nonnull @Override - public ItemStack assemble(@Nonnull IInventory pInv) { + public ItemStack assemble(@Nonnull Container pInv) { return ItemStack.EMPTY; } @@ -97,27 +96,27 @@ public class LiquidFuelRecipe implements IRecipe { @Nonnull @Override - public IRecipeSerializer getSerializer() { + public RecipeSerializer getSerializer() { return ActuallyRecipes.LIQUID_FUEL_RECIPE.get(); } @Nonnull @Override - public IRecipeType getType() { + public RecipeType getType() { return ActuallyRecipes.Types.LIQUID_FUEL; } - public static class Serializer extends ForgeRegistryEntry> implements IRecipeSerializer { + public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { @Nonnull @Override public LiquidFuelRecipe fromJson(@Nonnull ResourceLocation pId, JsonObject pJson) { JsonObject ingredient = pJson.getAsJsonObject("ingredient"); - ResourceLocation fluidRes = new ResourceLocation(JSONUtils.getAsString(ingredient, "fluid")); + ResourceLocation fluidRes = new ResourceLocation(GsonHelper.getAsString(ingredient, "fluid")); Fluid fluid = ForgeRegistries.FLUIDS.getValue(fluidRes); if (fluid == null) throw new JsonParseException("Unknown fluid '" + fluidRes + "'"); - int inputAmount = JSONUtils.getAsInt(ingredient, "amount", 50); + int inputAmount = GsonHelper.getAsInt(ingredient, "amount", 50); FluidStack input = new FluidStack(fluid, inputAmount); JsonObject result = pJson.getAsJsonObject("result"); @@ -127,7 +126,7 @@ public class LiquidFuelRecipe implements IRecipe { } @Override - public LiquidFuelRecipe fromNetwork(@Nonnull ResourceLocation pId, @Nonnull PacketBuffer pBuffer) { + public LiquidFuelRecipe fromNetwork(@Nonnull ResourceLocation pId, @Nonnull FriendlyByteBuf pBuffer) { ResourceLocation inputRes = new ResourceLocation(pBuffer.readUtf()); int inputAmount = pBuffer.readInt(); Fluid inputFluid = ForgeRegistries.FLUIDS.getValue(inputRes); @@ -141,7 +140,7 @@ public class LiquidFuelRecipe implements IRecipe { } @Override - public void toNetwork(@Nonnull PacketBuffer pBuffer, LiquidFuelRecipe pRecipe) { + public void toNetwork(@Nonnull FriendlyByteBuf pBuffer, LiquidFuelRecipe pRecipe) { pBuffer.writeUtf(pRecipe.fuel.getFluid().getRegistryName().toString()); pBuffer.writeInt(pRecipe.fuel.getAmount()); pBuffer.writeInt(pRecipe.totalEnergy); @@ -149,13 +148,13 @@ public class LiquidFuelRecipe implements IRecipe { } } - public static class FinishedRecipe implements IFinishedRecipe { + public static class Result implements FinishedRecipe { private FluidStack fuel; private int burnTime; private int totalEnergy; private ResourceLocation id; - public FinishedRecipe(ResourceLocation id, FluidStack fuel, int totalEnergy, int burnTime) { + public Result(ResourceLocation id, FluidStack fuel, int totalEnergy, int burnTime) { this.fuel = fuel; this.burnTime = burnTime; this.totalEnergy = totalEnergy; @@ -184,7 +183,7 @@ public class LiquidFuelRecipe implements IRecipe { @Nonnull @Override - public IRecipeSerializer getType() { + public RecipeSerializer getType() { return ActuallyRecipes.LIQUID_FUEL_RECIPE.get(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/MiningLensRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/MiningLensRecipe.java index cfff269de..b8f846f78 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/MiningLensRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/MiningLensRecipe.java @@ -1,42 +1,45 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.IRecipeSerializer; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.network.PacketBuffer; -import net.minecraft.util.IItemProvider; -import net.minecraft.util.JSONUtils; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.WeightedRandom; -import net.minecraft.world.World; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.GsonHelper; +import net.minecraft.util.random.Weight; +import net.minecraft.util.random.WeightedEntry; +import net.minecraft.world.Container; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.ItemLike; +import net.minecraft.world.level.Level; import net.minecraftforge.registries.ForgeRegistryEntry; import javax.annotation.Nonnull; import javax.annotation.Nullable; -public class MiningLensRecipe extends WeightedRandom.Item implements IRecipe { +public class MiningLensRecipe implements Recipe, WeightedEntry { public static final String NAME = "mining_lens"; private final ResourceLocation id; + private final int weight; private final Ingredient input; //private final int weight; private final ItemStack output; public MiningLensRecipe(ResourceLocation id, Ingredient input, int weight, ItemStack output) { - super(weight); + super(); + this.weight = weight; this.input = input; //this.weight = weight; this.output = output; this.id = id; } - public int getWeight() { - return weight; + public Weight getWeight() { + return Weight.of(weight); } public Ingredient getInput() { @@ -48,7 +51,7 @@ public class MiningLensRecipe extends WeightedRandom.Item implements IRecipe getSerializer() { + public RecipeSerializer getSerializer() { return ActuallyRecipes.MINING_LENS_RECIPE.get(); } @Override - public IRecipeType getType() { + public RecipeType getType() { return ActuallyRecipes.Types.MINING_LENS; } - public static class Serializer extends ForgeRegistryEntry> implements IRecipeSerializer { + public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { @Override public MiningLensRecipe fromJson(@Nonnull ResourceLocation pRecipeId, @Nonnull JsonObject pJson) { - Ingredient ingredient = Ingredient.fromJson(JSONUtils.getAsJsonObject(pJson, "ingredient")); - int weight = JSONUtils.getAsInt(pJson, "weight"); - JsonObject resultObject = JSONUtils.getAsJsonObject(pJson, "result"); - ItemStack result = new ItemStack(JSONUtils.getAsItem(resultObject, "item")); + Ingredient ingredient = Ingredient.fromJson(GsonHelper.getAsJsonObject(pJson, "ingredient")); + int weight = GsonHelper.getAsInt(pJson, "weight"); + JsonObject resultObject = GsonHelper.getAsJsonObject(pJson, "result"); + ItemStack result = new ItemStack(GsonHelper.getAsItem(resultObject, "item")); return new MiningLensRecipe(pRecipeId, ingredient, weight, result); } @Nullable @Override - public MiningLensRecipe fromNetwork(@Nonnull ResourceLocation pRecipeId, @Nonnull PacketBuffer pBuffer) { + public MiningLensRecipe fromNetwork(@Nonnull ResourceLocation pRecipeId, @Nonnull FriendlyByteBuf pBuffer) { Ingredient ingredient = Ingredient.fromNetwork(pBuffer); int weight = pBuffer.readInt(); ItemStack result = pBuffer.readItem(); @@ -109,20 +112,20 @@ public class MiningLensRecipe extends WeightedRandom.Item implements IRecipe getType() { + public RecipeSerializer getType() { return ActuallyRecipes.MINING_LENS_RECIPE.get(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/PressingRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/PressingRecipe.java index 8e4916684..b162f7056 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/PressingRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/PressingRecipe.java @@ -2,18 +2,18 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.fluid.Fluid; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.IRecipeSerializer; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.network.PacketBuffer; -import net.minecraft.util.JSONUtils; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.util.GsonHelper; +import net.minecraft.world.Container; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.material.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.ForgeRegistryEntry; @@ -21,7 +21,7 @@ import net.minecraftforge.registries.ForgeRegistryEntry; import javax.annotation.Nonnull; import javax.annotation.Nullable; -public class PressingRecipe implements IRecipe { +public class PressingRecipe implements Recipe { public static final String NAME = "pressing"; private final ResourceLocation ID; private final Ingredient input; @@ -34,7 +34,7 @@ public class PressingRecipe implements IRecipe { } @Override - public boolean matches(@Nonnull IInventory pInv, @Nullable World pLevel) { + public boolean matches(@Nonnull Container pInv, @Nullable Level pLevel) { return input.test(pInv.getItem(0)); } @@ -44,7 +44,7 @@ public class PressingRecipe implements IRecipe { } @Override - public ItemStack assemble(IInventory pInv) { + public ItemStack assemble(Container pInv) { return ItemStack.EMPTY; } @@ -68,23 +68,23 @@ public class PressingRecipe implements IRecipe { } @Override - public IRecipeSerializer getSerializer() { + public RecipeSerializer getSerializer() { return ActuallyRecipes.PRESSING_RECIPE.get(); } @Override - public IRecipeType getType() { + public RecipeType getType() { return ActuallyRecipes.Types.PRESSING; } - public static class Serializer extends ForgeRegistryEntry> implements IRecipeSerializer { + public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { @Nonnull @Override public PressingRecipe fromJson(@Nonnull ResourceLocation pRecipeId, @Nonnull JsonObject pJson) { - Ingredient ingredient = Ingredient.fromJson(JSONUtils.getAsJsonObject(pJson, "ingredient")); + Ingredient ingredient = Ingredient.fromJson(GsonHelper.getAsJsonObject(pJson, "ingredient")); JsonObject result = pJson.getAsJsonObject("result"); - ResourceLocation fluidRes = new ResourceLocation(JSONUtils.getAsString(result, "fluid")); - int fluidAmount = JSONUtils.getAsInt(result, "amount"); + ResourceLocation fluidRes = new ResourceLocation(GsonHelper.getAsString(result, "fluid")); + int fluidAmount = GsonHelper.getAsInt(result, "amount"); Fluid fluid = ForgeRegistries.FLUIDS.getValue(fluidRes); if(fluid == null) throw new JsonParseException("Unknown fluid '" + fluidRes + "'"); @@ -95,7 +95,7 @@ public class PressingRecipe implements IRecipe { @Nullable @Override - public PressingRecipe fromNetwork(@Nonnull ResourceLocation pRecipeId, @Nonnull PacketBuffer pBuffer) { + public PressingRecipe fromNetwork(@Nonnull ResourceLocation pRecipeId, @Nonnull FriendlyByteBuf pBuffer) { Ingredient ingredient = Ingredient.fromNetwork(pBuffer); ResourceLocation fluidRes = new ResourceLocation(pBuffer.readUtf()); int fluidAmount = pBuffer.readInt(); @@ -108,18 +108,18 @@ public class PressingRecipe implements IRecipe { } @Override - public void toNetwork(@Nonnull PacketBuffer pBuffer, @Nonnull PressingRecipe pRecipe) { + public void toNetwork(@Nonnull FriendlyByteBuf pBuffer, @Nonnull PressingRecipe pRecipe) { pRecipe.input.toNetwork(pBuffer); pBuffer.writeUtf(pRecipe.output.getFluid().getRegistryName().toString()); pBuffer.writeInt(pRecipe.output.getAmount()); } } - public static class FinishedRecipe implements IFinishedRecipe { + public static class Result implements FinishedRecipe { private final ResourceLocation ID; private final Ingredient input; private final FluidStack output; - public FinishedRecipe(ResourceLocation ID, Ingredient input, FluidStack output) { + public Result(ResourceLocation ID, Ingredient input, FluidStack output) { this.ID = ID; this.input = input; this.output = output; @@ -140,7 +140,7 @@ public class PressingRecipe implements IRecipe { } @Override - public IRecipeSerializer getType() { + public RecipeSerializer getType() { return ActuallyRecipes.PRESSING_RECIPE.get(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/RecipeKeepDataShaped.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/RecipeKeepDataShaped.java index 7cab1cc79..e9c86bcbe 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/RecipeKeepDataShaped.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/RecipeKeepDataShaped.java @@ -1,14 +1,14 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; -import net.minecraft.inventory.CraftingInventory; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipeSerializer; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.item.crafting.ShapedRecipe; -import net.minecraft.network.PacketBuffer; -import net.minecraft.util.NonNullList; -import net.minecraft.util.ResourceLocation; +import net.minecraft.core.NonNullList; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.inventory.CraftingContainer; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.ShapedRecipe; import net.minecraftforge.registries.ForgeRegistryEntry; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -27,7 +27,7 @@ public class RecipeKeepDataShaped extends ShapedRecipe { } @Override - public ItemStack assemble(CraftingInventory inv) { + public ItemStack assemble(CraftingContainer inv) { final ItemStack craftingResult = super.assemble(inv); TargetNBTIngredient donorIngredient = null; ItemStack datasource = ItemStack.EMPTY; @@ -56,21 +56,21 @@ public class RecipeKeepDataShaped extends ShapedRecipe { @Override - public IRecipeSerializer getSerializer() { + public RecipeSerializer getSerializer() { return ActuallyRecipes.KEEP_DATA_SHAPED_RECIPE.get(); } - public static class Serializer extends ForgeRegistryEntry> implements IRecipeSerializer { + public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { @Nullable @Override - public RecipeKeepDataShaped fromNetwork(ResourceLocation recipeId, PacketBuffer buffer) { - return new RecipeKeepDataShaped(IRecipeSerializer.SHAPED_RECIPE.fromNetwork(recipeId, buffer)); + public RecipeKeepDataShaped fromNetwork(ResourceLocation recipeId, FriendlyByteBuf buffer) { + return new RecipeKeepDataShaped(RecipeSerializer.SHAPED_RECIPE.fromNetwork(recipeId, buffer)); } @Override public RecipeKeepDataShaped fromJson(ResourceLocation recipeId, JsonObject json) { try { - return new RecipeKeepDataShaped(IRecipeSerializer.SHAPED_RECIPE.fromJson(recipeId, json)); + return new RecipeKeepDataShaped(RecipeSerializer.SHAPED_RECIPE.fromJson(recipeId, json)); } catch (Exception exception) { LOGGER.info("Error reading "+ NAME +" Recipe from packet: ", exception); @@ -79,9 +79,9 @@ public class RecipeKeepDataShaped extends ShapedRecipe { } @Override - public void toNetwork(PacketBuffer buffer, RecipeKeepDataShaped recipe) { + public void toNetwork(FriendlyByteBuf buffer, RecipeKeepDataShaped recipe) { try { - IRecipeSerializer.SHAPED_RECIPE.toNetwork(buffer, recipe); + RecipeSerializer.SHAPED_RECIPE.toNetwork(buffer, recipe); } catch (Exception exception) { LOGGER.info("Error writing "+ NAME +" Recipe to packet: ", exception); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/SingleItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/SingleItem.java index 8e2f88232..14430dec4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/SingleItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/SingleItem.java @@ -1,10 +1,10 @@ package de.ellpeck.actuallyadditions.mod.crafting; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.inventory.IInventory; -import net.minecraft.item.ItemStack; +import net.minecraft.world.Container; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; -public class SingleItem implements IInventory { +public class SingleItem implements Container { private final ItemStack itemStack; public SingleItem(ItemStack itemStack) { @@ -52,7 +52,7 @@ public class SingleItem implements IInventory { } @Override - public boolean stillValid(PlayerEntity pPlayer) { + public boolean stillValid(Player pPlayer) { return false; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/SolidFuelRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/SolidFuelRecipe.java index ab02fdd78..849ddacb2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/SolidFuelRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/SolidFuelRecipe.java @@ -1,20 +1,20 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.IRecipeSerializer; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.network.PacketBuffer; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.level.Level; import net.minecraftforge.registries.ForgeRegistryEntry; import javax.annotation.Nullable; -public class SolidFuelRecipe implements IRecipe { +public class SolidFuelRecipe implements Recipe { public static String NAME = "solid_fuel"; private Ingredient itemIngredient; private int burnTime; @@ -37,7 +37,7 @@ public class SolidFuelRecipe implements IRecipe { } @Override - public boolean matches(SingleItem pInv, World pLevel) { + public boolean matches(SingleItem pInv, Level pLevel) { return itemIngredient.test(pInv.getItem()); } @@ -71,16 +71,16 @@ public class SolidFuelRecipe implements IRecipe { } @Override - public IRecipeSerializer getSerializer() { + public RecipeSerializer getSerializer() { return ActuallyRecipes.SOLID_FUEL_RECIPE.get(); } @Override - public IRecipeType getType() { + public RecipeType getType() { return ActuallyRecipes.Types.SOLID_FUEL; } - public static class Serializer extends ForgeRegistryEntry> implements IRecipeSerializer { + public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { @Override public SolidFuelRecipe fromJson(ResourceLocation pId, JsonObject pJson) { Ingredient itemIngredient = Ingredient.fromJson(pJson.get("item")); @@ -90,7 +90,7 @@ public class SolidFuelRecipe implements IRecipe { } @Override - public SolidFuelRecipe fromNetwork(ResourceLocation pId, PacketBuffer pBuffer) { + public SolidFuelRecipe fromNetwork(ResourceLocation pId, FriendlyByteBuf pBuffer) { Ingredient itemIngredient = Ingredient.fromNetwork(pBuffer); int totalEnergy = pBuffer.readInt(); int burnTime = pBuffer.readInt(); @@ -98,20 +98,20 @@ public class SolidFuelRecipe implements IRecipe { } @Override - public void toNetwork(PacketBuffer pBuffer, SolidFuelRecipe pRecipe) { + public void toNetwork(FriendlyByteBuf pBuffer, SolidFuelRecipe pRecipe) { pRecipe.itemIngredient.toNetwork(pBuffer); pBuffer.writeInt(pRecipe.totalEnergy); pBuffer.writeInt(pRecipe.burnTime); } } - public static class FinishedRecipe implements IFinishedRecipe { + public static class Result implements FinishedRecipe { private Ingredient itemIngredient; private int burnTime; private int totalEnergy; private ResourceLocation id; - public FinishedRecipe(ResourceLocation id, Ingredient itemIngredient, int totalEnergy, int burnTime) { + public Result(ResourceLocation id, Ingredient itemIngredient, int totalEnergy, int burnTime) { this.itemIngredient = itemIngredient; this.burnTime = burnTime; this.totalEnergy = totalEnergy; @@ -131,7 +131,7 @@ public class SolidFuelRecipe implements IRecipe { } @Override - public IRecipeSerializer getType() { + public RecipeSerializer getType() { return ActuallyRecipes.SOLID_FUEL_RECIPE.get(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/TargetNBTIngredient.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/TargetNBTIngredient.java index ff1965418..4c3cd32db 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/TargetNBTIngredient.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/TargetNBTIngredient.java @@ -3,19 +3,19 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonElement; import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.network.PacketBuffer; -import net.minecraft.tags.ITag; -import net.minecraft.util.IItemProvider; -import net.minecraft.util.ResourceLocation; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.level.ItemLike; import net.minecraftforge.common.crafting.IIngredientSerializer; import javax.annotation.Nonnull; import java.util.stream.Stream; public class TargetNBTIngredient extends Ingredient { - public TargetNBTIngredient(Stream itemLists) { + public TargetNBTIngredient(Stream itemLists) { super(itemLists); } @@ -25,15 +25,15 @@ public class TargetNBTIngredient extends Ingredient { return SERIALIZER; } - public static TargetNBTIngredient of(IItemProvider itemProvider) { - return new TargetNBTIngredient(Stream.of(new SingleItemList(new ItemStack(itemProvider)))); + public static TargetNBTIngredient of(ItemLike itemProvider) { + return new TargetNBTIngredient(Stream.of(new ItemValue(new ItemStack(itemProvider)))); } public static TargetNBTIngredient of(ItemStack itemStack) { - return new TargetNBTIngredient(Stream.of(new SingleItemList(itemStack))); + return new TargetNBTIngredient(Stream.of(new ItemValue(itemStack))); } @Nonnull - public static TargetNBTIngredient of(@Nonnull ITag tag) { - return new TargetNBTIngredient(Stream.of(new TagList(tag))); + public static TargetNBTIngredient of(@Nonnull TagKey tag) { + return new TargetNBTIngredient(Stream.of(new TagValue(tag))); } @@ -53,8 +53,8 @@ public class TargetNBTIngredient extends Ingredient { @Override @Nonnull - public TargetNBTIngredient parse(PacketBuffer buffer) { - return new TargetNBTIngredient(Stream.generate(() -> new SingleItemList(buffer.readItem())).limit(buffer.readVarInt())); + public TargetNBTIngredient parse(FriendlyByteBuf buffer) { + return new TargetNBTIngredient(Stream.generate(() -> new ItemValue(buffer.readItem())).limit(buffer.readVarInt())); } @Override @@ -64,7 +64,7 @@ public class TargetNBTIngredient extends Ingredient { } @Override - public void write(PacketBuffer buffer, TargetNBTIngredient ingredient) { + public void write(FriendlyByteBuf buffer, TargetNBTIngredient ingredient) { ItemStack[] items = ingredient.getItems(); buffer.writeVarInt(items.length); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/WrappedRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/WrappedRecipe.java index e9b01f66b..b1d126cda 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/WrappedRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/WrappedRecipe.java @@ -1,27 +1,27 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; -import net.minecraft.data.IFinishedRecipe; -import net.minecraft.item.crafting.IRecipeSerializer; -import net.minecraft.util.ResourceLocation; +import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.crafting.RecipeSerializer; import javax.annotation.Nullable; import java.util.function.Consumer; -public class WrappedRecipe implements IFinishedRecipe { - IFinishedRecipe inner; - IRecipeSerializer serializerOverride; +public class WrappedRecipe implements FinishedRecipe { + FinishedRecipe inner; + RecipeSerializer serializerOverride; - public WrappedRecipe(IFinishedRecipe innerIn) { + public WrappedRecipe(FinishedRecipe innerIn) { inner = innerIn; } - public WrappedRecipe(IFinishedRecipe innerIn, IRecipeSerializer serializerOverrideIn) { + public WrappedRecipe(FinishedRecipe innerIn, RecipeSerializer serializerOverrideIn) { inner = innerIn; serializerOverride = serializerOverrideIn; } - public static Consumer Inject(Consumer consumer, IRecipeSerializer serializer) { + public static Consumer Inject(Consumer consumer, RecipeSerializer serializer) { return iFinishedRecipe -> consumer.accept(new WrappedRecipe(iFinishedRecipe, serializer)); } @@ -48,7 +48,7 @@ public class WrappedRecipe implements IFinishedRecipe { } @Override - public IRecipeSerializer getType () { + public RecipeSerializer getType () { return serializerOverride != null? serializerOverride:inner.getType(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/data/PlayerData.java b/src/main/java/de/ellpeck/actuallyadditions/mod/data/PlayerData.java index 91550cead..c52d434c2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/data/PlayerData.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/data/PlayerData.java @@ -11,11 +11,11 @@ package de.ellpeck.actuallyadditions.mod.data; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.nbt.ListNBT; -import net.minecraft.nbt.StringNBT; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.nbt.StringTag; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.player.Player; import java.util.ArrayList; import java.util.List; @@ -24,8 +24,8 @@ import java.util.concurrent.ConcurrentHashMap; public final class PlayerData { - public static PlayerSave getDataFromPlayer(PlayerEntity player) { - WorldData worldData = WorldData.get((ServerWorld) player.getCommandSenderWorld()); + public static PlayerSave getDataFromPlayer(Player player) { + WorldData worldData = WorldData.get((ServerLevel) player.getCommandSenderWorld()); ConcurrentHashMap data = worldData.playerSaveData; UUID id = player.getUUID(); @@ -63,17 +63,17 @@ public final class PlayerData { this.id = id; } - public void readFromNBT(CompoundNBT compound, boolean savingToFile) { + public void readFromNBT(CompoundTag compound, boolean savingToFile) { this.bookGottenAlready = compound.getBoolean("BookGotten"); this.didBookTutorial = compound.getBoolean("DidTutorial"); this.hasBatWings = compound.getBoolean("HasBatWings"); this.batWingsFlyTime = compound.getInt("BatWingsFlyTime"); - ListNBT bookmarks = compound.getList("Bookmarks", 8); + ListTag bookmarks = compound.getList("Bookmarks", 8); this.loadBookmarks(bookmarks); - ListNBT trials = compound.getList("Trials", 8); + ListTag trials = compound.getList("Trials", 8); this.loadTrials(trials); if (!savingToFile) { @@ -81,7 +81,7 @@ public final class PlayerData { } } - public void writeToNBT(CompoundNBT compound, boolean savingToFile) { + public void writeToNBT(CompoundTag compound, boolean savingToFile) { compound.putBoolean("BookGotten", this.bookGottenAlready); compound.putBoolean("DidTutorial", this.didBookTutorial); @@ -96,17 +96,17 @@ public final class PlayerData { } } - public ListNBT saveBookmarks() { - ListNBT bookmarks = new ListNBT(); + public ListTag saveBookmarks() { + ListTag bookmarks = new ListTag(); for (IBookletPage bookmark : this.bookmarks) { - bookmarks.add(StringNBT.valueOf(bookmark == null + bookmarks.add(StringTag.valueOf(bookmark == null ? "" : bookmark.getIdentifier())); } return bookmarks; } - public void loadBookmarks(ListNBT bookmarks) { + public void loadBookmarks(ListTag bookmarks) { for (int i = 0; i < bookmarks.size(); i++) { String strg = bookmarks.getString(i); if (!strg.isEmpty()) { @@ -118,15 +118,15 @@ public final class PlayerData { } } - public ListNBT saveTrials() { - ListNBT trials = new ListNBT(); + public ListTag saveTrials() { + ListTag trials = new ListTag(); for (String trial : this.completedTrials) { - trials.add(StringNBT.valueOf(trial)); + trials.add(StringTag.valueOf(trial)); } return trials; } - public void loadTrials(ListNBT trials) { + public void loadTrials(ListTag trials) { this.completedTrials.clear(); for (int i = 0; i < trials.size(); i++) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/data/WorldData.java b/src/main/java/de/ellpeck/actuallyadditions/mod/data/WorldData.java index e0c6ec943..f23e42f36 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/data/WorldData.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/data/WorldData.java @@ -15,17 +15,17 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.data.PlayerData.PlayerSave; import de.ellpeck.actuallyadditions.mod.misc.apiimpl.LaserRelayConnectionHandler; import io.netty.util.internal.ConcurrentSet; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.nbt.ListNBT; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; -import net.minecraft.world.storage.WorldSavedData; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.saveddata.SavedData; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; // TODO: [port] validate this still works -public class WorldData extends WorldSavedData { +public class WorldData extends SavedData { public static final String DATA_TAG = ActuallyAdditions.MODID + "data"; public static final String SAVE_NAME = ActuallyAdditions.MODID + "_worldsave"; @@ -34,19 +34,11 @@ public class WorldData extends WorldSavedData { public final ConcurrentHashMap playerSaveData = new ConcurrentHashMap<>(); public WorldData() { - super(SAVE_NAME); + super(); } - public static WorldData get(World world) { - WorldData storage = ((ServerWorld) world).getDataStorage().get(WorldData::new, SAVE_NAME); - - if (storage == null) { - storage = new WorldData(); - storage.setDirty(); - ((ServerWorld) world).getDataStorage().set(storage); - } - - return storage; + public static WorldData get(Level level) { + return ((ServerLevel) level).getDataStorage().computeIfAbsent(WorldData::load, WorldData::new, SAVE_NAME); } //TODO what in the world is this? @@ -57,45 +49,46 @@ public class WorldData extends WorldSavedData { } } - @Override - public void load(CompoundNBT compound) { - this.laserRelayNetworks.clear(); - ListNBT networkList = compound.getList("Networks", 10); + public static WorldData load(CompoundTag compound) { + WorldData worldData = new WorldData(); + worldData.laserRelayNetworks.clear(); + ListTag networkList = compound.getList("Networks", 10); for (int i = 0; i < networkList.size(); i++) { Network network = LaserRelayConnectionHandler.readNetworkFromNBT(networkList.getCompound(i)); - this.laserRelayNetworks.add(network); + worldData.laserRelayNetworks.add(network); } - this.playerSaveData.clear(); - ListNBT playerList = compound.getList("PlayerData", 10); + worldData.playerSaveData.clear(); + ListTag playerList = compound.getList("PlayerData", 10); for (int i = 0; i < playerList.size(); i++) { - CompoundNBT player = playerList.getCompound(i); + CompoundTag player = playerList.getCompound(i); UUID id = player.getUUID("UUID"); - CompoundNBT data = player.getCompound("Data"); + CompoundTag data = player.getCompound("Data"); PlayerSave save = new PlayerSave(id); save.readFromNBT(data, true); - this.playerSaveData.put(id, save); + worldData.playerSaveData.put(id, save); } + return worldData; } @Override - public CompoundNBT save(CompoundNBT compound) { + public CompoundTag save(CompoundTag compound) { //Laser World Data - ListNBT networkList = new ListNBT(); + ListTag networkList = new ListTag(); for (Network network : this.laserRelayNetworks) { networkList.add(LaserRelayConnectionHandler.writeNetworkToNBT(network)); } compound.put("Networks", networkList); //Player Data - ListNBT playerList = new ListNBT(); + ListTag playerList = new ListTag(); for (PlayerSave save : this.playerSaveData.values()) { - CompoundNBT player = new CompoundNBT(); + CompoundTag player = new CompoundTag(); player.putUUID("UUID", save.id); - CompoundNBT data = new CompoundNBT(); + CompoundTag data = new CompoundTag(); save.writeToNBT(data, true); player.put("Data", data); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java b/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java index f4b1f57c1..563178eb3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java @@ -11,33 +11,39 @@ package de.ellpeck.actuallyadditions.mod.entity; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; -import net.minecraft.block.*; -import net.minecraft.entity.Entity; -import net.minecraft.entity.EntityType; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.network.IPacket; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.protocol.Packet; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.BonemealableBlock; +import net.minecraft.world.level.block.BushBlock; +import net.minecraft.world.level.block.FarmBlock; +import net.minecraft.world.level.block.GrassBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.AABB; import net.minecraftforge.common.FarmlandWaterManager; import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.ticket.AABBTicket; -import net.minecraftforge.fml.network.NetworkHooks; +import net.minecraftforge.network.NetworkHooks; public class EntityWorm extends Entity { public int timer; private AABBTicket waterTicket; - public EntityWorm(EntityType type, World world) { + public EntityWorm(EntityType type, Level world) { super(type, world); - this.setBoundingBox(new AxisAlignedBB(0, 0, 0, 0, 0, 0)); + this.setBoundingBox(new AABB(0, 0, 0, 0, 0, 0)); } - public static boolean canWormify(World world, BlockPos pos, BlockState state) { + public static boolean canWormify(Level world, BlockPos pos, BlockState state) { Block block = state.getBlock(); - boolean rightBlock = block instanceof FarmlandBlock || block == Blocks.DIRT || block instanceof GrassBlock; + boolean rightBlock = block instanceof FarmBlock || block == Blocks.DIRT || block instanceof GrassBlock; if (rightBlock) { BlockPos posUp = pos.above(); BlockState stateUp = world.getBlockState(posUp); @@ -49,11 +55,11 @@ public class EntityWorm extends Entity { } @Override - public void remove() { + public void remove(RemovalReason reason) { if (waterTicket != null) waterTicket.invalidate(); - super.remove(); + super.remove(reason); } @Override @@ -74,7 +80,7 @@ public class EntityWorm extends Entity { if (waterTicket != null) waterTicket.invalidate(); - waterTicket = FarmlandWaterManager.addAABBTicket(level, new AxisAlignedBB(getX() - 2, getY() - 1.5, getZ() - 2, getX() + 2, getY(), getZ() + 2)); + waterTicket = FarmlandWaterManager.addAABBTicket(level, new AABB(getX() - 2, getY() - 1.5, getZ() - 2, getX() + 2, getY(), getZ() + 2)); } @Override @@ -96,7 +102,7 @@ public class EntityWorm extends Entity { boolean isMiddlePose = x == 0 && z == 0; if (canWormify(this.level, pos, state)) { - boolean isFarmland = block instanceof FarmlandBlock; + boolean isFarmland = block instanceof FarmBlock; /* if (!isFarmland || state.getValue(FarmlandBlock.MOISTURE) < 7) { if (isMiddlePose || this.level.random.nextFloat() >= 0.45F) { @@ -119,8 +125,8 @@ public class EntityWorm extends Entity { BlockState plantState = this.level.getBlockState(plant); Block plantBlock = plantState.getBlock(); - if ((plantBlock instanceof IGrowable || plantBlock instanceof IPlantable) && !(plantBlock instanceof GrassBlock)) { - plantBlock.randomTick(plantState, (ServerWorld) this.level, plant, this.level.random); + if ((plantBlock instanceof BonemealableBlock || plantBlock instanceof IPlantable) && !(plantBlock instanceof GrassBlock)) { + plantBlock.randomTick(plantState, (ServerLevel) this.level, plant, this.level.random); BlockState newState = this.level.getBlockState(plant); if (newState != plantState) { @@ -149,17 +155,17 @@ public class EntityWorm extends Entity { } @Override - protected void readAdditionalSaveData(CompoundNBT compound) { + protected void readAdditionalSaveData(CompoundTag compound) { this.timer = compound.getInt("Timer"); } @Override - protected void addAdditionalSaveData(CompoundNBT compound) { + protected void addAdditionalSaveData(CompoundTag compound) { compound.putInt("Timer", this.timer); } @Override - public IPacket getAddEntityPacket() { + public Packet getAddEntityPacket() { return NetworkHooks.getEntitySpawningPacket(this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/entity/RenderWorm.java b/src/main/java/de/ellpeck/actuallyadditions/mod/entity/RenderWorm.java index 8b90ac996..1f82c8094 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/entity/RenderWorm.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/entity/RenderWorm.java @@ -10,21 +10,20 @@ package de.ellpeck.actuallyadditions.mod.entity; -import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.math.Vector3f; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; +import net.minecraft.Util; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.block.model.ItemTransforms; import net.minecraft.client.renderer.entity.EntityRenderer; -import net.minecraft.client.renderer.entity.EntityRendererManager; -import net.minecraft.client.renderer.model.ItemCameraTransforms; +import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.inventory.container.PlayerContainer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.Util; -import net.minecraft.util.math.vector.Quaternion; -import net.minecraft.util.math.vector.Vector3f; -import net.minecraft.util.text.StringTextComponent; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.inventory.InventoryMenu; +import net.minecraft.world.item.ItemStack; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -35,16 +34,16 @@ public class RenderWorm extends EntityRenderer { private ItemStack stack; private ItemStack snailStack; - public RenderWorm(EntityRendererManager p_i46179_1_) { - super(p_i46179_1_); + public RenderWorm(EntityRendererProvider.Context context) { + super(context); stack = new ItemStack(ActuallyItems.WORM.get()); snailStack = new ItemStack(ActuallyItems.WORM.get()); - snailStack.setHoverName(new StringTextComponent("Snail Mail")); + snailStack.setHoverName(new TextComponent("Snail Mail")); } @Override - public void render(EntityWorm entity, float partialTicks, float p_225623_3_, MatrixStack matrix, IRenderTypeBuffer buffer, int light) { + public void render(EntityWorm entity, float partialTicks, float p_225623_3_, PoseStack matrix, MultiBufferSource buffer, int light) { boolean isSnail = entity.getCustomName().getString().equalsIgnoreCase("snail mail"); matrix.pushPose(); matrix.translate(0, 0.7F, 0); @@ -52,7 +51,7 @@ public class RenderWorm extends EntityRenderer { matrix.mulPose(Vector3f.YP.rotationDegrees(-(float) (boop % 360))); matrix.translate(0,0,0.4); Minecraft.getInstance().getItemRenderer().renderStatic( - isSnail? snailStack:stack, ItemCameraTransforms.TransformType.FIXED, light, OverlayTexture.NO_OVERLAY, matrix, buffer + isSnail? snailStack:stack, ItemTransforms.TransformType.FIXED, light, OverlayTexture.NO_OVERLAY, matrix, buffer, 0 ); matrix.popPose(); @@ -60,6 +59,6 @@ public class RenderWorm extends EntityRenderer { @Override public ResourceLocation getTextureLocation(EntityWorm pEntity) { - return PlayerContainer.BLOCK_ATLAS; + return InventoryMenu.BLOCK_ATLAS; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java index dd7ad04fc..ee95d9c38 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java @@ -10,7 +10,8 @@ package de.ellpeck.actuallyadditions.mod.event; -import com.mojang.blaze3d.platform.GlStateManager; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.IHudDisplay; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; @@ -19,18 +20,18 @@ import de.ellpeck.actuallyadditions.mod.inventory.gui.EnergyDisplay; import de.ellpeck.actuallyadditions.mod.tile.IEnergyDisplay; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.Block; +import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TextFormatting; +import net.minecraft.client.gui.Font; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.client.event.RenderGameOverlayEvent; @@ -41,8 +42,8 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; @OnlyIn(Dist.CLIENT) public class ClientEvents { - private static final ITextComponent ADVANCED_INFO_TEXT_PRE = new StringTextComponent(" -").withStyle(TextFormatting.DARK_GRAY); - private static final ITextComponent ADVANCED_INFO_HEADER_PRE = new StringTextComponent(" -").withStyle(TextFormatting.GRAY); + private static final Component ADVANCED_INFO_TEXT_PRE = new TextComponent(" -").withStyle(ChatFormatting.DARK_GRAY); + private static final Component ADVANCED_INFO_HEADER_PRE = new TextComponent(" -").withStyle(ChatFormatting.GRAY); private static EnergyDisplay energyDisplay; @@ -163,45 +164,46 @@ public class ClientEvents { public void onGameOverlay(RenderGameOverlayEvent.Post event) { Minecraft minecraft = Minecraft.getInstance(); if (event.getType() == RenderGameOverlayEvent.ElementType.ALL && minecraft.screen == null) { - PlayerEntity player = minecraft.player; + PoseStack matrices = event.getMatrixStack(); + Player player = minecraft.player; if (player == null) { return; } - RayTraceResult posHit = minecraft.hitResult; - FontRenderer font = minecraft.font; + HitResult posHit = minecraft.hitResult; + Font font = minecraft.font; ItemStack stack = player.getMainHandItem(); if (StackUtil.isValid(stack)) { if (stack.getItem() instanceof IHudDisplay) { - ((IHudDisplay) stack.getItem()).displayHud(event.getMatrixStack(), minecraft, player, stack, posHit, event.getWindow()); + ((IHudDisplay) stack.getItem()).displayHud(matrices, minecraft, player, stack, posHit, event.getWindow()); } } - if (posHit != null && posHit.getType() == RayTraceResult.Type.BLOCK) { - BlockRayTraceResult rayCast = (BlockRayTraceResult) posHit; + if (posHit != null && posHit.getType() == HitResult.Type.BLOCK) { + BlockHitResult rayCast = (BlockHitResult) posHit; Block blockHit = minecraft.level.getBlockState(rayCast.getBlockPos()).getBlock(); - TileEntity tileHit = minecraft.level.getBlockEntity(rayCast.getBlockPos()); + BlockEntity tileHit = minecraft.level.getBlockEntity(rayCast.getBlockPos()); if (blockHit instanceof IHudDisplay) { - ((IHudDisplay) blockHit).displayHud(event.getMatrixStack(), minecraft, player, stack, posHit, event.getWindow()); + ((IHudDisplay) blockHit).displayHud(matrices, minecraft, player, stack, posHit, event.getWindow()); } if (tileHit instanceof TileEntityBase) { TileEntityBase base = (TileEntityBase) tileHit; if (base.isRedstoneToggle()) { - String strg = String.format("%s: %s", I18n.get("info." + ActuallyAdditions.MODID + ".redstoneMode"), TextFormatting.DARK_RED + I18n.get("info." + ActuallyAdditions.MODID + ".redstoneMode." + (base.isPulseMode + String strg = String.format("%s: %s", I18n.get("info." + ActuallyAdditions.MODID + ".redstoneMode"), ChatFormatting.DARK_RED + I18n.get("info." + ActuallyAdditions.MODID + ".redstoneMode." + (base.isPulseMode ? "pulse" - : "deactivation")) + TextFormatting.RESET); - font.drawShadow(event.getMatrixStack(), strg, event.getWindow().getGuiScaledWidth() / 2f + 5, event.getWindow().getGuiScaledHeight() / 2f + 5, 0xFFFFFF); + : "deactivation")) + ChatFormatting.RESET); + font.drawShadow(matrices, strg, event.getWindow().getGuiScaledWidth() / 2f + 5, event.getWindow().getGuiScaledHeight() / 2f + 5, 0xFFFFFF); String expl; if (!stack.isEmpty() && stack.getItem() == CommonConfig.Other.redstoneConfigureItem) { - expl = TextFormatting.GREEN + I18n.get("info." + ActuallyAdditions.MODID + ".redstoneMode.validItem"); + expl = ChatFormatting.GREEN + I18n.get("info." + ActuallyAdditions.MODID + ".redstoneMode.validItem"); } else { - expl = TextFormatting.GRAY.toString() + TextFormatting.ITALIC + I18n.get("info." + ActuallyAdditions.MODID + ".redstoneMode.invalidItem", I18n.get(CommonConfig.Other.redstoneConfigureItem.asItem().getDescriptionId())); + expl = ChatFormatting.GRAY.toString() + ChatFormatting.ITALIC + I18n.get("info." + ActuallyAdditions.MODID + ".redstoneMode.invalidItem", I18n.get(CommonConfig.Other.redstoneConfigureItem.asItem().getDescriptionId())); } - font.drawShadow(event.getMatrixStack(), expl, event.getWindow().getGuiScaledWidth() / 2f + 5, event.getWindow().getGuiScaledHeight() / 2f + 15, 0xFFFFFF); + font.drawShadow(matrices, expl, event.getWindow().getGuiScaledWidth() / 2f + 5, event.getWindow().getGuiScaledHeight() / 2f + 15, 0xFFFFFF); } } @@ -213,10 +215,11 @@ public class ClientEvents { } energyDisplay.setData(2, event.getWindow().getGuiScaledHeight() - 96, display.getEnergyStorage(), true, true); - GlStateManager._pushMatrix(); - GlStateManager._color4f(1F, 1F, 1F, 1F); - energyDisplay.draw(event.getMatrixStack()); - GlStateManager._popMatrix(); + matrices.pushPose(); +// GlStateManager._color4f(1F, 1F, 1F, 1F); + RenderSystem.setShaderColor(1F, 1F, 1F, 1F); + energyDisplay.draw(matrices); + matrices.popPose(); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java index 8a50d4ada..c629c5fdc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java @@ -23,13 +23,13 @@ import de.ellpeck.actuallyadditions.mod.tile.FilterSettings; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.entity.monster.SpiderEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.item.ItemStack; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.entity.monster.Spider; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.event.entity.player.EntityItemPickupEvent; import net.minecraftforge.event.entity.player.PlayerEvent; @@ -57,15 +57,15 @@ public class CommonEvents { return; } - PlayerEntity player = event.getPlayer(); + Player player = event.getPlayer(); ItemEntity item = event.getItem(); if (item != null && item.isAlive()) { ItemStack stack = item.getItem(); if (StackUtil.isValid(stack)) { - for (int i = 0; i < player.inventory.getContainerSize(); i++) { - if (i != player.inventory.selected) { + for (int i = 0; i < player.getInventory().getContainerSize(); i++) { + if (i != player.getInventory().selected) { - ItemStack invStack = player.inventory.getItem(i); + ItemStack invStack = player.getInventory().getItem(i); if (StackUtil.isValid(invStack) && invStack.getItem() instanceof Sack && invStack.hasTag()) { if (invStack.getOrCreateTag().getBoolean("AutoInsert")) { boolean changed = false; @@ -141,9 +141,9 @@ public class CommonEvents { //TODO this isnt how this should be done im pretty sure... @SubscribeEvent public void onEntityDropEvent(LivingDropsEvent event) { - if (event.getEntityLiving().level != null && !event.getEntityLiving().level.isClientSide && event.getSource().getEntity() instanceof PlayerEntity) { + if (event.getEntityLiving().level != null && !event.getEntityLiving().level.isClientSide && event.getSource().getEntity() instanceof Player) { //Drop Cobwebs from Spiders - if (ConfigBoolValues.DO_SPIDER_DROPS.isEnabled() && event.getEntityLiving() instanceof SpiderEntity) { + if (ConfigBoolValues.DO_SPIDER_DROPS.isEnabled() && event.getEntityLiving() instanceof Spider) { if (event.getEntityLiving().level.random.nextInt(20) <= event.getLootingLevel() * 2) { event.getDrops().add(new ItemEntity(event.getEntityLiving().level, event.getEntityLiving().getX(), event.getEntityLiving().getY(), event.getEntityLiving().getZ(), new ItemStack(Blocks.COBWEB, event.getEntityLiving().level.random.nextInt(2 + event.getLootingLevel()) + 1))); } @@ -153,8 +153,8 @@ public class CommonEvents { @SubscribeEvent public void onLogInEvent(PlayerEvent.PlayerLoggedInEvent event) { - if (!event.getPlayer().level.isClientSide && event.getPlayer() instanceof ServerPlayerEntity) { - ServerPlayerEntity player = (ServerPlayerEntity) event.getPlayer(); + if (!event.getPlayer().level.isClientSide && event.getPlayer() instanceof ServerPlayer) { + ServerPlayer player = (ServerPlayer) event.getPlayer(); PacketHandlerHelper.syncPlayerData(player, true); ActuallyAdditions.LOGGER.info("Sending Player Data to player " + player.getName() + " with UUID " + player.getUUID() + "."); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/FluidAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/FluidAA.java index 93cb2ccc1..ccfb87174 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/FluidAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/FluidAA.java @@ -13,19 +13,19 @@ package de.ellpeck.actuallyadditions.mod.fluids; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.block.AbstractBlock; -import net.minecraft.block.Block; -import net.minecraft.block.FlowingFluidBlock; -import net.minecraft.block.material.Material; -import net.minecraft.fluid.FlowingFluid; -import net.minecraft.fluid.Fluid; -import net.minecraft.item.BucketItem; -import net.minecraft.item.Item; -import net.minecraft.item.Items; -import net.minecraft.util.ResourceLocation; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.BucketItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.LiquidBlock; +import net.minecraft.world.level.block.state.BlockBehaviour; +import net.minecraft.world.level.material.FlowingFluid; +import net.minecraft.world.level.material.Fluid; +import net.minecraft.world.level.material.Material; import net.minecraftforge.fluids.FluidAttributes; import net.minecraftforge.fluids.ForgeFlowingFluid; -import net.minecraftforge.fml.RegistryObject; +import net.minecraftforge.registries.RegistryObject; import java.util.function.Supplier; @@ -33,7 +33,7 @@ public class FluidAA implements Supplier { private String name; private RegistryObject source; private RegistryObject flowing; - private RegistryObject fluidBlock; + private RegistryObject fluidBlock; private RegistryObject bucket; public String getName() { @@ -45,11 +45,11 @@ public class FluidAA implements Supplier { ForgeFlowingFluid.Properties props = makeProperties(textureName, () -> fluidBlock.get(), () -> source.get(), () -> flowing.get(), () -> bucket.get()); source = InitFluids.FLUIDS.register(name, () -> new ForgeFlowingFluid.Source(props)); flowing = InitFluids.FLUIDS.register(name + "_flowing", () -> new ForgeFlowingFluid.Flowing(props)); - fluidBlock = ActuallyBlocks.BLOCKS.register(name, () -> new FlowingFluidBlock(source, AbstractBlock.Properties.of(Material.WATER))); + fluidBlock = ActuallyBlocks.BLOCKS.register(name, () -> new LiquidBlock(source, BlockBehaviour.Properties.of(Material.WATER))); bucket = ActuallyItems.ITEMS.register(name + "_bucket", () -> new BucketItem(source, new Item.Properties().craftRemainder(Items.BUCKET).tab(ActuallyAdditions.GROUP).stacksTo(1))); } - public static ForgeFlowingFluid.Properties makeProperties(String texture, Supplier blockSupplier, Supplier stillSupplier, Supplier flowingSupplier, Supplier bucketSupplier) { + public static ForgeFlowingFluid.Properties makeProperties(String texture, Supplier blockSupplier, Supplier stillSupplier, Supplier flowingSupplier, Supplier bucketSupplier) { return new ForgeFlowingFluid.Properties(stillSupplier, flowingSupplier, FluidAttributes.builder(new ResourceLocation(ActuallyAdditions.MODID,texture + "_still"), new ResourceLocation(ActuallyAdditions.MODID, texture + "_flowing"))).bucket(bucketSupplier).block(blockSupplier); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/InitFluids.java b/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/InitFluids.java index 032142b5b..ae52302ae 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/InitFluids.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/InitFluids.java @@ -11,8 +11,8 @@ package de.ellpeck.actuallyadditions.mod.fluids; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.block.Block; -import net.minecraft.fluid.Fluid; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.material.Fluid; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ActuallyContainers.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ActuallyContainers.java index 474dcb5d7..2783aeee2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ActuallyContainers.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ActuallyContainers.java @@ -1,41 +1,41 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.inventory.container.ContainerType; -import net.minecraftforge.common.extensions.IForgeContainerType; -import net.minecraftforge.fml.RegistryObject; +import net.minecraft.world.inventory.MenuType; +import net.minecraftforge.common.extensions.IForgeMenuType; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; public class ActuallyContainers { - public static final DeferredRegister> CONTAINERS = DeferredRegister.create(ForgeRegistries.CONTAINERS, ActuallyAdditions.MODID); + public static final DeferredRegister> CONTAINERS = DeferredRegister.create(ForgeRegistries.CONTAINERS, ActuallyAdditions.MODID); - public static final RegistryObject> BAG_CONTAINER = CONTAINERS.register("bag_container", () -> IForgeContainerType.create(SackContainer::fromNetwork)); - public static final RegistryObject> BIO_REACTOR_CONTAINER = CONTAINERS.register("bioreactor_container", () -> IForgeContainerType.create(ContainerBioReactor::fromNetwork)); - public static final RegistryObject> BREAKER_CONTAINER = CONTAINERS.register("breaker_container", () -> IForgeContainerType.create(ContainerBreaker::fromNetwork)); - public static final RegistryObject> CANOLA_PRESS_CONTAINER = CONTAINERS.register("canola_press_container", () -> IForgeContainerType.create(ContainerCanolaPress::fromNetwork)); - public static final RegistryObject> COAL_GENERATOR_CONTAINER = CONTAINERS.register("coal_generator_container", () -> IForgeContainerType.create(ContainerCoalGenerator::fromNetwork)); - public static final RegistryObject> COFFEE_MACHINE_CONTAINER = CONTAINERS.register("coffee_machine_container", () -> IForgeContainerType.create(ContainerCoffeeMachine::fromNetwork)); - public static final RegistryObject> DIRECTIONAL_BREAKER_CONTAINER = CONTAINERS.register("directional_breaker_container", () -> IForgeContainerType.create(ContainerDirectionalBreaker::fromNetwork)); - public static final RegistryObject> DRILL_CONTAINER = CONTAINERS.register("drill_container", () -> IForgeContainerType.create(ContainerDrill::fromNetwork)); - public static final RegistryObject> DROPPER_CONTAINER = CONTAINERS.register("dropper_container", () -> IForgeContainerType.create(ContainerDropper::fromNetwork)); - public static final RegistryObject> ENERVATOR_CONTAINER = CONTAINERS.register("enervator_container", () -> IForgeContainerType.create(ContainerEnervator::fromNetwork)); - public static final RegistryObject> ENERGIZER_CONTAINER = CONTAINERS.register("energizer_container", () -> IForgeContainerType.create(ContainerEnergizer::fromNetwork)); + public static final RegistryObject> BAG_CONTAINER = CONTAINERS.register("bag_container", () -> IForgeMenuType.create(SackContainer::fromNetwork)); + public static final RegistryObject> BIO_REACTOR_CONTAINER = CONTAINERS.register("bioreactor_container", () -> IForgeMenuType.create(ContainerBioReactor::fromNetwork)); + public static final RegistryObject> BREAKER_CONTAINER = CONTAINERS.register("breaker_container", () -> IForgeMenuType.create(ContainerBreaker::fromNetwork)); + public static final RegistryObject> CANOLA_PRESS_CONTAINER = CONTAINERS.register("canola_press_container", () -> IForgeMenuType.create(ContainerCanolaPress::fromNetwork)); + public static final RegistryObject> COAL_GENERATOR_CONTAINER = CONTAINERS.register("coal_generator_container", () -> IForgeMenuType.create(ContainerCoalGenerator::fromNetwork)); + public static final RegistryObject> COFFEE_MACHINE_CONTAINER = CONTAINERS.register("coffee_machine_container", () -> IForgeMenuType.create(ContainerCoffeeMachine::fromNetwork)); + public static final RegistryObject> DIRECTIONAL_BREAKER_CONTAINER = CONTAINERS.register("directional_breaker_container", () -> IForgeMenuType.create(ContainerDirectionalBreaker::fromNetwork)); + public static final RegistryObject> DRILL_CONTAINER = CONTAINERS.register("drill_container", () -> IForgeMenuType.create(ContainerDrill::fromNetwork)); + public static final RegistryObject> DROPPER_CONTAINER = CONTAINERS.register("dropper_container", () -> IForgeMenuType.create(ContainerDropper::fromNetwork)); + public static final RegistryObject> ENERVATOR_CONTAINER = CONTAINERS.register("enervator_container", () -> IForgeMenuType.create(ContainerEnervator::fromNetwork)); + public static final RegistryObject> ENERGIZER_CONTAINER = CONTAINERS.register("energizer_container", () -> IForgeMenuType.create(ContainerEnergizer::fromNetwork)); - public static final RegistryObject> FARMER_CONTAINER = CONTAINERS.register("farmer_container", () -> IForgeContainerType.create(ContainerFarmer::fromNetwork)); - public static final RegistryObject> FEEDER_CONTAINER = CONTAINERS.register("feeder_container", () -> IForgeContainerType.create(ContainerFeeder::fromNetwork)); - public static final RegistryObject> FERMENTING_BARREL_CONTAINER = CONTAINERS.register("fermenting_barrel_container", () -> IForgeContainerType.create(ContainerFermentingBarrel::fromNetwork)); - public static final RegistryObject> FILTER_CONTAINER = CONTAINERS.register("filter_container", () -> IForgeContainerType.create(ContainerFilter::fromNetwork)); - public static final RegistryObject> FIREWORK_BOX_CONTAINER = CONTAINERS.register("firework_box_container", () -> IForgeContainerType.create(ContainerFireworkBox::fromNetwork)); - public static final RegistryObject> FLUID_COLLECTOR_CONTAINER = CONTAINERS.register("fluid_collector_container", () -> IForgeContainerType.create(ContainerFluidCollector::fromNetwork)); - public static final RegistryObject> FURNACE_DOUBLE_CONTAINER = CONTAINERS.register("furnace_double_container", () -> IForgeContainerType.create(ContainerFurnaceDouble::fromNetwork)); - public static final RegistryObject> GRINDER_CONTAINER = CONTAINERS.register("grinder_container", () -> IForgeContainerType.create(CrusherContainer::fromNetwork)); - public static final RegistryObject> LASER_RELAY_ITEM_WHITELIST_CONTAINER = CONTAINERS.register("laser_relay_item_whitelist_container", () -> IForgeContainerType.create(ContainerLaserRelayItemWhitelist::fromNetwork)); - public static final RegistryObject> MINER_CONTAINER = CONTAINERS.register("miner_container", () -> IForgeContainerType.create(ContainerMiner::fromNetwork)); - public static final RegistryObject> OIL_GENERATOR_CONTAINER = CONTAINERS.register("oil_generator_container", () -> IForgeContainerType.create(ContainerOilGenerator::fromNetwork)); - public static final RegistryObject> PHANTOM_PLACER_CONTAINER = CONTAINERS.register("phantom_placer_container", () -> IForgeContainerType.create(ContainerPhantomPlacer::fromNetwork)); - public static final RegistryObject> RANGED_COLLECTOR_CONTAINER = CONTAINERS.register("ranged_collector_container", () -> IForgeContainerType.create(ContainerRangedCollector::fromNetwork)); - public static final RegistryObject> XPSOLIDIFIER_CONTAINER = CONTAINERS.register("xpsolidifier_container", () -> IForgeContainerType.create(ContainerXPSolidifier::fromNetwork)); + public static final RegistryObject> FARMER_CONTAINER = CONTAINERS.register("farmer_container", () -> IForgeMenuType.create(ContainerFarmer::fromNetwork)); + public static final RegistryObject> FEEDER_CONTAINER = CONTAINERS.register("feeder_container", () -> IForgeMenuType.create(ContainerFeeder::fromNetwork)); + public static final RegistryObject> FERMENTING_BARREL_CONTAINER = CONTAINERS.register("fermenting_barrel_container", () -> IForgeMenuType.create(ContainerFermentingBarrel::fromNetwork)); + public static final RegistryObject> FILTER_CONTAINER = CONTAINERS.register("filter_container", () -> IForgeMenuType.create(ContainerFilter::fromNetwork)); + public static final RegistryObject> FIREWORK_BOX_CONTAINER = CONTAINERS.register("firework_box_container", () -> IForgeMenuType.create(ContainerFireworkBox::fromNetwork)); + public static final RegistryObject> FLUID_COLLECTOR_CONTAINER = CONTAINERS.register("fluid_collector_container", () -> IForgeMenuType.create(ContainerFluidCollector::fromNetwork)); + public static final RegistryObject> FURNACE_DOUBLE_CONTAINER = CONTAINERS.register("furnace_double_container", () -> IForgeMenuType.create(ContainerFurnaceDouble::fromNetwork)); + public static final RegistryObject> GRINDER_CONTAINER = CONTAINERS.register("grinder_container", () -> IForgeMenuType.create(CrusherContainer::fromNetwork)); + public static final RegistryObject> LASER_RELAY_ITEM_WHITELIST_CONTAINER = CONTAINERS.register("laser_relay_item_whitelist_container", () -> IForgeMenuType.create(ContainerLaserRelayItemWhitelist::fromNetwork)); + public static final RegistryObject> MINER_CONTAINER = CONTAINERS.register("miner_container", () -> IForgeMenuType.create(ContainerMiner::fromNetwork)); + public static final RegistryObject> OIL_GENERATOR_CONTAINER = CONTAINERS.register("oil_generator_container", () -> IForgeMenuType.create(ContainerOilGenerator::fromNetwork)); + public static final RegistryObject> PHANTOM_PLACER_CONTAINER = CONTAINERS.register("phantom_placer_container", () -> IForgeMenuType.create(ContainerPhantomPlacer::fromNetwork)); + public static final RegistryObject> RANGED_COLLECTOR_CONTAINER = CONTAINERS.register("ranged_collector_container", () -> IForgeMenuType.create(ContainerRangedCollector::fromNetwork)); + public static final RegistryObject> XPSOLIDIFIER_CONTAINER = CONTAINERS.register("xpsolidifier_container", () -> IForgeMenuType.create(ContainerXPSolidifier::fromNetwork)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBioReactor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBioReactor.java index bb9462128..95e00c9ee 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBioReactor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBioReactor.java @@ -13,23 +13,23 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerBioReactor extends Container { +public class ContainerBioReactor extends AbstractContainerMenu { public final TileEntityBioReactor tile; - public static ContainerBioReactor fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerBioReactor fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerBioReactor(windowId, inv, (TileEntityBioReactor) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerBioReactor(int windowId, PlayerInventory inventory, TileEntityBioReactor tile) { + public ContainerBioReactor(int windowId, Inventory inventory, TileEntityBioReactor tile) { super(ActuallyContainers.BIO_REACTOR_CONTAINER.get(), windowId); this.tile = tile; @@ -51,7 +51,7 @@ public class ContainerBioReactor extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 8; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -101,7 +101,7 @@ public class ContainerBioReactor extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.tile.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBreaker.java index 653f4026a..9a4a5a4bf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBreaker.java @@ -13,24 +13,24 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerBreaker extends Container { +public class ContainerBreaker extends AbstractContainerMenu { public final TileEntityBreaker breaker; - public static ContainerBreaker fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerBreaker fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerBreaker(windowId, inv, (TileEntityBreaker) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerBreaker(int windowId, PlayerInventory inventory, TileEntityBreaker tile) { + public ContainerBreaker(int windowId, Inventory inventory, TileEntityBreaker tile) { super(ActuallyContainers.BREAKER_CONTAINER.get(), windowId); this.breaker = tile; @@ -52,7 +52,7 @@ public class ContainerBreaker extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 9; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -98,7 +98,7 @@ public class ContainerBreaker extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.breaker.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCanolaPress.java index 0b79171f5..7918eddf0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCanolaPress.java @@ -14,21 +14,21 @@ import de.ellpeck.actuallyadditions.mod.crafting.PressingRecipe; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; import java.util.Optional; -public class ContainerCanolaPress extends Container { +public class ContainerCanolaPress extends AbstractContainerMenu { public final TileEntityCanolaPress press; - public ContainerCanolaPress(int windowId, PlayerInventory inventory, TileEntityCanolaPress tile) { + public ContainerCanolaPress(int windowId, Inventory inventory, TileEntityCanolaPress tile) { super(ActuallyContainers.CANOLA_PRESS_CONTAINER.get(), windowId); this.press = tile; @@ -44,12 +44,12 @@ public class ContainerCanolaPress extends Container { } } - public static ContainerCanolaPress fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerCanolaPress fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerCanolaPress(windowId, inv, (TileEntityCanolaPress) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 1; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -100,7 +100,7 @@ public class ContainerCanolaPress extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.press.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoalGenerator.java index 9ae565843..d4e16d2e8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoalGenerator.java @@ -13,25 +13,25 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import net.minecraftforge.common.ForgeHooks; import java.util.Objects; -public class ContainerCoalGenerator extends Container { +public class ContainerCoalGenerator extends AbstractContainerMenu { public final TileEntityCoalGenerator generator; - public static ContainerCoalGenerator fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerCoalGenerator fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerCoalGenerator(windowId, inv, (TileEntityCoalGenerator) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerCoalGenerator(int windowId, PlayerInventory inventory, TileEntityCoalGenerator tile) { + public ContainerCoalGenerator(int windowId, Inventory inventory, TileEntityCoalGenerator tile) { super(ActuallyContainers.COAL_GENERATOR_CONTAINER.get(), windowId); this.generator = tile; @@ -48,7 +48,7 @@ public class ContainerCoalGenerator extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 1; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -63,7 +63,7 @@ public class ContainerCoalGenerator extends Container { //Other Slots in Inventory excluded if (slot >= inventoryStart) { //Shift from Inventory - if (ForgeHooks.getBurnTime(newStack) > 0) { + if (ForgeHooks.getBurnTime(newStack, null) > 0) { if (!this.moveItemStackTo(newStack, 0, 1, false)) { return ItemStack.EMPTY; } @@ -98,7 +98,7 @@ public class ContainerCoalGenerator extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.generator.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoffeeMachine.java index e44eb92b0..ff500a5ef 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoffeeMachine.java @@ -17,24 +17,24 @@ import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import de.ellpeck.actuallyadditions.mod.items.ItemCoffee; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerCoffeeMachine extends Container { +public class ContainerCoffeeMachine extends AbstractContainerMenu { public final TileEntityCoffeeMachine machine; - public static ContainerCoffeeMachine fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerCoffeeMachine fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerCoffeeMachine(windowId, inv, (TileEntityCoffeeMachine) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerCoffeeMachine(int windowId, PlayerInventory inventory, TileEntityCoffeeMachine tile) { + public ContainerCoffeeMachine(int windowId, Inventory inventory, TileEntityCoffeeMachine tile) { super(ActuallyContainers.COFFEE_MACHINE_CONTAINER.get(), windowId); this.machine = tile; @@ -59,7 +59,7 @@ public class ContainerCoffeeMachine extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 11; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -89,7 +89,7 @@ public class ContainerCoffeeMachine extends Container { if (!this.moveItemStackTo(newStack, 3, 11, false)) { return ItemStack.EMPTY; } - } else if (ActuallyTags.Items.COFFEE_BEANS.contains(newStack.getItem())) { + } else if (newStack.is(ActuallyTags.Items.COFFEE_BEANS)) { if (!this.moveItemStackTo(newStack, TileEntityCoffeeMachine.SLOT_COFFEE_BEANS, TileEntityCoffeeMachine.SLOT_COFFEE_BEANS + 1, false)) { return ItemStack.EMPTY; } @@ -124,7 +124,7 @@ public class ContainerCoffeeMachine extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.machine.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDirectionalBreaker.java index b020e3d1d..d44ce34f3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDirectionalBreaker.java @@ -13,20 +13,20 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLongRangeBreaker; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerDirectionalBreaker extends Container { +public class ContainerDirectionalBreaker extends AbstractContainerMenu { public final TileEntityLongRangeBreaker breaker; - public ContainerDirectionalBreaker(int windowId, PlayerInventory inventory, TileEntityLongRangeBreaker tile) { + public ContainerDirectionalBreaker(int windowId, Inventory inventory, TileEntityLongRangeBreaker tile) { super(ActuallyContainers.DIRECTIONAL_BREAKER_CONTAINER.get(), windowId); this.breaker = tile; @@ -46,12 +46,12 @@ public class ContainerDirectionalBreaker extends Container { } } - public static ContainerDirectionalBreaker fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerDirectionalBreaker fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerDirectionalBreaker(windowId, inv, (TileEntityLongRangeBreaker) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 9; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -97,7 +97,7 @@ public class ContainerDirectionalBreaker extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.breaker.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDrill.java index 6bc1a8e7f..875f8a9dc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDrill.java @@ -16,26 +16,26 @@ import de.ellpeck.actuallyadditions.mod.items.DrillItem; import de.ellpeck.actuallyadditions.mod.items.ItemDrillUpgrade; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.ClickType; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.ClickType; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; -public class ContainerDrill extends Container { +public class ContainerDrill extends AbstractContainerMenu { public static final int SLOT_AMOUNT = 5; private final ItemStackHandlerAA drillInventory = new ItemStackHandlerAA(SLOT_AMOUNT); - private final PlayerInventory inventory; + private final Inventory inventory; - public static ContainerDrill fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerDrill fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerDrill(windowId, inv); } - public ContainerDrill(int windowId, PlayerInventory inventory) { + public ContainerDrill(int windowId, Inventory inventory) { super(ActuallyContainers.DRILL_CONTAINER.get(), windowId); this.inventory = inventory; @@ -68,7 +68,7 @@ public class ContainerDrill extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 5; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -118,16 +118,16 @@ public class ContainerDrill extends Container { } @Override - public ItemStack clicked(int slotId, int dragType, ClickType clickTypeIn, PlayerEntity player) { + public void clicked(int slotId, int dragType, ClickType clickTypeIn, Player player) { if (clickTypeIn == ClickType.SWAP && dragType == this.inventory.selected) { - return ItemStack.EMPTY; + return; //TODO: Check if this is correct, used to return ItemStack.EMPTY } else { - return super.clicked(slotId, dragType, clickTypeIn, player); + super.clicked(slotId, dragType, clickTypeIn, player); } } @Override - public void removed(PlayerEntity player) { + public void removed(Player player) { ItemStack stack = this.inventory.getSelected(); if (StackUtil.isValid(stack) && stack.getItem() instanceof DrillItem) { DrillItem.writeSlotsToNBT(this.drillInventory, this.inventory.getSelected()); @@ -136,7 +136,7 @@ public class ContainerDrill extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return true; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDropper.java index 681db3f2a..93c56a98c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDropper.java @@ -14,25 +14,25 @@ import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerDropper extends Container { +public class ContainerDropper extends AbstractContainerMenu { public final TileEntityDropper dropper; - PlayerEntity player; + Player player; - public static ContainerDropper fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerDropper fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerDropper(windowId, inv, (TileEntityDropper) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerDropper(int windowId, PlayerInventory inventory, TileEntityDropper tile) { + public ContainerDropper(int windowId, Inventory inventory, TileEntityDropper tile) { super(ActuallyContainers.DROPPER_CONTAINER.get(), windowId); this.dropper = tile; this.player = inventory.player; @@ -54,7 +54,7 @@ public class ContainerDropper extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 9; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -100,12 +100,12 @@ public class ContainerDropper extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.dropper.canPlayerUse(player); } @Override - public void removed(PlayerEntity playerIn) { + public void removed(Player playerIn) { super.removed(playerIn); if (!this.player.isSpectator()) { this.dropper.getLevel().updateNeighborsAt(this.dropper.getBlockPos(), ActuallyBlocks.DROPPER.get()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java index d3134706c..f69778042 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java @@ -14,29 +14,29 @@ import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditio import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotOutput; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.EquipmentSlotType; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ArmorItem; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ArmorItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.enchantment.EnchantmentHelper; import net.minecraftforge.energy.CapabilityEnergy; import java.util.Objects; -public class ContainerEnergizer extends Container { +public class ContainerEnergizer extends AbstractContainerMenu { - public static final EquipmentSlotType[] VALID_EQUIPMENT_SLOTS = new EquipmentSlotType[]{EquipmentSlotType.HEAD, EquipmentSlotType.CHEST, EquipmentSlotType.LEGS, EquipmentSlotType.FEET}; + public static final EquipmentSlot[] VALID_EQUIPMENT_SLOTS = new EquipmentSlot[]{EquipmentSlot.HEAD, EquipmentSlot.CHEST, EquipmentSlot.LEGS, EquipmentSlot.FEET}; public final TileEntityEnergizer energizer; - public static ContainerEnergizer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerEnergizer fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerEnergizer(windowId, inv, (TileEntityEnergizer) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerEnergizer(int windowId, PlayerInventory inventory, TileEntityEnergizer tile) { + public ContainerEnergizer(int windowId, Inventory inventory, TileEntityEnergizer tile) { super(ActuallyContainers.ENERGIZER_CONTAINER.get(), windowId); this.energizer = tile; @@ -58,7 +58,7 @@ public class ContainerEnergizer extends Container { } for (int k = 0; k < 4; ++k) { - EquipmentSlotType slot = VALID_EQUIPMENT_SLOTS[k]; + EquipmentSlot slot = VALID_EQUIPMENT_SLOTS[k]; this.addSlot(new Slot(inventory, 36 + 3 - k, 102, 19 + k * 18) { @Override public int getMaxStackSize() { @@ -71,7 +71,7 @@ public class ContainerEnergizer extends Container { } @Override - public boolean mayPickup(PlayerEntity player) { + public boolean mayPickup(Player player) { ItemStack itemstack = this.getItem(); return (itemstack.isEmpty() || player.isCreative() || !EnchantmentHelper.hasBindingCurse(itemstack)) && super.mayPickup(player); } @@ -88,7 +88,7 @@ public class ContainerEnergizer extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 2; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -145,7 +145,7 @@ public class ContainerEnergizer extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.energizer.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java index a4e6f56ca..c5ae10a29 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java @@ -14,27 +14,27 @@ import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditio import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotOutput; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.EquipmentSlotType; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ArmorItem; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ArmorItem; +import net.minecraft.world.item.ItemStack; import net.minecraftforge.energy.CapabilityEnergy; import java.util.Objects; -public class ContainerEnervator extends Container { +public class ContainerEnervator extends AbstractContainerMenu { public final TileEntityEnervator enervator; - public static ContainerEnervator fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerEnervator fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerEnervator(windowId, inv, (TileEntityEnervator) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerEnervator(int windowId, PlayerInventory inventory, TileEntityEnervator tile) { + public ContainerEnervator(int windowId, Inventory inventory, TileEntityEnervator tile) { super(ActuallyContainers.ENERVATOR_CONTAINER.get(), windowId); this.enervator = tile; @@ -51,7 +51,7 @@ public class ContainerEnervator extends Container { } for (int k = 0; k < 4; ++k) { - EquipmentSlotType slot = ContainerEnergizer.VALID_EQUIPMENT_SLOTS[k]; + EquipmentSlot slot = ContainerEnergizer.VALID_EQUIPMENT_SLOTS[k]; this.addSlot(new Slot(inventory, 36 + 3 - k, 102, 19 + k * 18) { @Override public int getMaxStackSize() { @@ -76,7 +76,7 @@ public class ContainerEnervator extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 2; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -133,7 +133,7 @@ public class ContainerEnervator extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.enervator.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFarmer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFarmer.java index 80983757b..3b9369bed 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFarmer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFarmer.java @@ -13,24 +13,24 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerFarmer extends Container { +public class ContainerFarmer extends AbstractContainerMenu { public final TileEntityFarmer farmer; - public static ContainerFarmer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerFarmer fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerFarmer(windowId, inv, (TileEntityFarmer) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerFarmer(int windowId, PlayerInventory inventory, TileEntityFarmer tile) { + public ContainerFarmer(int windowId, Inventory inventory, TileEntityFarmer tile) { super(ActuallyContainers.FARMER_CONTAINER.get(), windowId); this.farmer = tile; @@ -56,7 +56,7 @@ public class ContainerFarmer extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 12; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -102,7 +102,7 @@ public class ContainerFarmer extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.farmer.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFeeder.java index 15f13cb2d..71c5802d7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFeeder.java @@ -13,24 +13,24 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerFeeder extends Container { +public class ContainerFeeder extends AbstractContainerMenu { public final TileEntityFeeder feeder; - public static ContainerFeeder fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerFeeder fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerFeeder(windowId, inv, (TileEntityFeeder) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerFeeder(int windowId, PlayerInventory inventory, TileEntityFeeder tile) { + public ContainerFeeder(int windowId, Inventory inventory, TileEntityFeeder tile) { super(ActuallyContainers.FEEDER_CONTAINER.get(), windowId); this.feeder = tile; this.addSlot(new SlotItemHandlerUnconditioned(this.feeder.inv, 0, 80, 45)); @@ -46,7 +46,7 @@ public class ContainerFeeder extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 1; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -92,7 +92,7 @@ public class ContainerFeeder extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.feeder.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFermentingBarrel.java index 9da6e4f93..054f99a8f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFermentingBarrel.java @@ -12,24 +12,24 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerFermentingBarrel extends Container { +public class ContainerFermentingBarrel extends AbstractContainerMenu { public final TileEntityFermentingBarrel barrel; - public static ContainerFermentingBarrel fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerFermentingBarrel fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerFermentingBarrel(windowId, inv, (TileEntityFermentingBarrel) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerFermentingBarrel(int windowId, PlayerInventory inventory, TileEntityFermentingBarrel tile) { + public ContainerFermentingBarrel(int windowId, Inventory inventory, TileEntityFermentingBarrel tile) { super(ActuallyContainers.FERMENTING_BARREL_CONTAINER.get(), windowId); this.barrel = tile; @@ -44,7 +44,7 @@ public class ContainerFermentingBarrel extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 0; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -86,7 +86,7 @@ public class ContainerFermentingBarrel extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.barrel.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFilter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFilter.java index 3bca3c380..ecc839e29 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFilter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFilter.java @@ -15,26 +15,26 @@ import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotImmovable; import de.ellpeck.actuallyadditions.mod.items.DrillItem; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.ClickType; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.ClickType; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; -public class ContainerFilter extends Container { +public class ContainerFilter extends AbstractContainerMenu { public static final int SLOT_AMOUNT = 24; private final ItemStackHandlerAA filterInventory = new ItemStackHandlerAA(SLOT_AMOUNT); - private final PlayerInventory inventory; + private final Inventory inventory; - public static ContainerFilter fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerFilter fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerFilter(windowId, inv); } - public ContainerFilter(int windowId, PlayerInventory inventory) { + public ContainerFilter(int windowId, Inventory inventory) { super(ActuallyContainers.FILTER_CONTAINER.get(), windowId); this.inventory = inventory; @@ -64,7 +64,7 @@ public class ContainerFilter extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = SLOT_AMOUNT; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -108,18 +108,18 @@ public class ContainerFilter extends Container { } @Override - public ItemStack clicked(int slotId, int dragType, ClickType clickTypeIn, PlayerEntity player) { + public void clicked(int slotId, int dragType, ClickType clickTypeIn, Player player) { if (SlotFilter.checkFilter(this, slotId, player)) { - return ItemStack.EMPTY; + return; //TODO: Check if this is correct, used to return ItemStack.EMPTY } else if (clickTypeIn == ClickType.SWAP && dragType == this.inventory.selected) { - return ItemStack.EMPTY; + return; //TODO: Check if this is correct, used to return ItemStack.EMPTY } else { - return super.clicked(slotId, dragType, clickTypeIn, player); + super.clicked(slotId, dragType, clickTypeIn, player); } } @Override - public void removed(PlayerEntity player) { + public void removed(Player player) { ItemStack stack = this.inventory.getSelected(); if (SlotFilter.isFilter(stack)) { DrillItem.writeSlotsToNBT(this.filterInventory, this.inventory.getSelected()); @@ -128,7 +128,7 @@ public class ContainerFilter extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return true; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFireworkBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFireworkBox.java index 6786b3c39..f207ecb65 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFireworkBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFireworkBox.java @@ -10,29 +10,29 @@ package de.ellpeck.actuallyadditions.mod.inventory; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; -public class ContainerFireworkBox extends Container { +public class ContainerFireworkBox extends AbstractContainerMenu { - public static ContainerFireworkBox fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerFireworkBox fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerFireworkBox(windowId, inv); } - public ContainerFireworkBox(int windowId, PlayerInventory inventory) { + public ContainerFireworkBox(int windowId, Inventory inventory) { super(ActuallyContainers.FIREWORK_BOX_CONTAINER.get(), windowId); } @Override - public ItemStack quickMoveStack(PlayerEntity playerIn, int index) { + public ItemStack quickMoveStack(Player playerIn, int index) { return ItemStack.EMPTY; } @Override - public boolean stillValid(PlayerEntity playerIn) { + public boolean stillValid(Player playerIn) { return true; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFluidCollector.java index 09901a8ab..c87f463a7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFluidCollector.java @@ -12,24 +12,24 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerFluidCollector extends Container { +public class ContainerFluidCollector extends AbstractContainerMenu { public final TileEntityFluidCollector collector; - public static ContainerFluidCollector fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerFluidCollector fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerFluidCollector(windowId, inv, (TileEntityFluidCollector) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerFluidCollector(int windowId, PlayerInventory inventory, TileEntityFluidCollector tile) { + public ContainerFluidCollector(int windowId, Inventory inventory, TileEntityFluidCollector tile) { super(ActuallyContainers.FLUID_COLLECTOR_CONTAINER.get(), windowId); this.collector = tile; @@ -44,7 +44,7 @@ public class ContainerFluidCollector extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 0; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -93,7 +93,7 @@ public class ContainerFluidCollector extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.collector.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFurnaceDouble.java index fccce9edd..51233a427 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFurnaceDouble.java @@ -15,23 +15,23 @@ import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditio import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotOutput; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPoweredFurnace; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.IRecipe; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.Recipe; +import net.minecraft.world.item.crafting.RecipeType; import javax.annotation.Nonnull; import java.util.Objects; -public class ContainerFurnaceDouble extends Container { +public class ContainerFurnaceDouble extends AbstractContainerMenu { public final TileEntityPoweredFurnace furnace; - public ContainerFurnaceDouble(int windowId, PlayerInventory inventory, TileEntityPoweredFurnace tile) { + public ContainerFurnaceDouble(int windowId, Inventory inventory, TileEntityPoweredFurnace tile) { super(ActuallyContainers.FURNACE_DOUBLE_CONTAINER.get(), windowId); this.furnace = tile; @@ -50,13 +50,13 @@ public class ContainerFurnaceDouble extends Container { } } - public static ContainerFurnaceDouble fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerFurnaceDouble fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerFurnaceDouble(windowId, inv, (TileEntityPoweredFurnace) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } @Nonnull @Override - public ItemStack quickMoveStack(@Nonnull PlayerEntity player, int slot) { + public ItemStack quickMoveStack(@Nonnull Player player, int slot) { int inventoryStart = 4; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -78,7 +78,7 @@ public class ContainerFurnaceDouble extends Container { //Other Slots in Inventory excluded else if (slot >= inventoryStart) { // TODO: VALIDATE - IRecipe irecipe = this.furnace.getLevel().getRecipeManager().getRecipeFor(IRecipeType.SMELTING, new SingleItem(newStack), this.furnace.getLevel()).orElse(null); + Recipe irecipe = this.furnace.getLevel().getRecipeManager().getRecipeFor(RecipeType.SMELTING, new SingleItem(newStack), this.furnace.getLevel()).orElse(null); if (irecipe == null) { return ItemStack.EMPTY; } @@ -123,7 +123,7 @@ public class ContainerFurnaceDouble extends Container { } @Override - public boolean stillValid(@Nonnull PlayerEntity player) { + public boolean stillValid(@Nonnull Player player) { return this.furnace.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerLaserRelayItemWhitelist.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerLaserRelayItemWhitelist.java index 152670d59..31d262db2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerLaserRelayItemWhitelist.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerLaserRelayItemWhitelist.java @@ -13,21 +13,21 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotFilter; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItemAdvanced; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.ClickType; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.ClickType; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerLaserRelayItemWhitelist extends Container { +public class ContainerLaserRelayItemWhitelist extends AbstractContainerMenu { public final TileEntityLaserRelayItemAdvanced tile; - public ContainerLaserRelayItemWhitelist(int windowId, PlayerInventory inventory, TileEntityLaserRelayItemAdvanced tile) { + public ContainerLaserRelayItemWhitelist(int windowId, Inventory inventory, TileEntityLaserRelayItemAdvanced tile) { super(ActuallyContainers.LASER_RELAY_ITEM_WHITELIST_CONTAINER.get(), windowId); this.tile = tile; @@ -51,12 +51,12 @@ public class ContainerLaserRelayItemWhitelist extends Container { } } - public static ContainerLaserRelayItemWhitelist fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerLaserRelayItemWhitelist fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerLaserRelayItemWhitelist(windowId, inv, (TileEntityLaserRelayItemAdvanced) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 24; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -98,16 +98,16 @@ public class ContainerLaserRelayItemWhitelist extends Container { } @Override - public ItemStack clicked(int slotId, int dragType, ClickType clickTypeIn, PlayerEntity player) { + public void clicked(int slotId, int dragType, ClickType clickTypeIn, Player player) { if (SlotFilter.checkFilter(this, slotId, player)) { - return ItemStack.EMPTY; + return; //TODO: Check if this is correct, used to return ItemStack.EMPTY } else { - return super.clicked(slotId, dragType, clickTypeIn, player); + super.clicked(slotId, dragType, clickTypeIn, player); } } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.tile.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerMiner.java index c06a058b6..f8525b13a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerMiner.java @@ -13,20 +13,20 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned; import de.ellpeck.actuallyadditions.mod.tile.TileEntityVerticalDigger; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerMiner extends Container { +public class ContainerMiner extends AbstractContainerMenu { public final TileEntityVerticalDigger miner; - public ContainerMiner(int windowId, PlayerInventory inventory, TileEntityVerticalDigger tile) { + public ContainerMiner(int windowId, Inventory inventory, TileEntityVerticalDigger tile) { super(ActuallyContainers.MINER_CONTAINER.get(), windowId); this.miner = tile; @@ -46,12 +46,12 @@ public class ContainerMiner extends Container { } } - public static ContainerMiner fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerMiner fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerMiner(windowId, inv, (TileEntityVerticalDigger) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 9; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -97,7 +97,7 @@ public class ContainerMiner extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.miner.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerOilGenerator.java index f3a89623d..c37916906 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerOilGenerator.java @@ -12,24 +12,24 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerOilGenerator extends Container { +public class ContainerOilGenerator extends AbstractContainerMenu { public final TileEntityOilGenerator generator; - public static ContainerOilGenerator fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerOilGenerator fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerOilGenerator(windowId, inv, (TileEntityOilGenerator) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerOilGenerator(int windowId, PlayerInventory inventory, TileEntityOilGenerator tile) { + public ContainerOilGenerator(int windowId, Inventory inventory, TileEntityOilGenerator tile) { super(ActuallyContainers.OIL_GENERATOR_CONTAINER.get(), windowId); this.generator = tile; @@ -44,7 +44,7 @@ public class ContainerOilGenerator extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 0; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -86,7 +86,7 @@ public class ContainerOilGenerator extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.generator.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerPhantomPlacer.java index 2d1714f2d..bb453d78b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerPhantomPlacer.java @@ -13,24 +13,24 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomPlacer; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerPhantomPlacer extends Container { +public class ContainerPhantomPlacer extends AbstractContainerMenu { public final TileEntityPhantomPlacer placer; - public static ContainerPhantomPlacer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerPhantomPlacer fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerPhantomPlacer(windowId, inv, (TileEntityPhantomPlacer) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerPhantomPlacer(int windowId, PlayerInventory inventory, TileEntityPhantomPlacer tile) { + public ContainerPhantomPlacer(int windowId, Inventory inventory, TileEntityPhantomPlacer tile) { super(ActuallyContainers.PHANTOM_PLACER_CONTAINER.get(), windowId); this.placer = tile; @@ -51,7 +51,7 @@ public class ContainerPhantomPlacer extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 9; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -97,7 +97,7 @@ public class ContainerPhantomPlacer extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.placer.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerRangedCollector.java index 19c933fb0..b6efdfb10 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerRangedCollector.java @@ -14,25 +14,25 @@ import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotFilter; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned; import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.ClickType; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.ClickType; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerRangedCollector extends Container { +public class ContainerRangedCollector extends AbstractContainerMenu { public final TileEntityRangedCollector collector; - public static ContainerRangedCollector fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerRangedCollector fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerRangedCollector(windowId, inv, (TileEntityRangedCollector) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerRangedCollector(int windowId, PlayerInventory inventory, TileEntityRangedCollector tile) { + public ContainerRangedCollector(int windowId, Inventory inventory, TileEntityRangedCollector tile) { super(ActuallyContainers.RANGED_COLLECTOR_CONTAINER.get(), windowId); this.collector = tile; @@ -58,7 +58,7 @@ public class ContainerRangedCollector extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 18; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -104,16 +104,16 @@ public class ContainerRangedCollector extends Container { } @Override - public ItemStack clicked(int slotId, int dragType, ClickType clickTypeIn, PlayerEntity player) { + public void clicked(int slotId, int dragType, ClickType clickTypeIn, Player player) { if (SlotFilter.checkFilter(this, slotId, player)) { - return ItemStack.EMPTY; + return; //TODO: Check if this is correct, used to return ItemStack.EMPTY } else { - return super.clicked(slotId, dragType, clickTypeIn, player); + super.clicked(slotId, dragType, clickTypeIn, player); } } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.collector.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerXPSolidifier.java index 6e67171e0..911108e3f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerXPSolidifier.java @@ -15,24 +15,24 @@ import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotOutput; import de.ellpeck.actuallyadditions.mod.items.ItemSolidifiedExperience; import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class ContainerXPSolidifier extends Container { +public class ContainerXPSolidifier extends AbstractContainerMenu { public final TileEntityXPSolidifier solidifier; - public static ContainerXPSolidifier fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static ContainerXPSolidifier fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new ContainerXPSolidifier(windowId, inv, (TileEntityXPSolidifier) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } - public ContainerXPSolidifier(int windowId, PlayerInventory inventory, TileEntityXPSolidifier tile) { + public ContainerXPSolidifier(int windowId, Inventory inventory, TileEntityXPSolidifier tile) { super(ActuallyContainers.XPSOLIDIFIER_CONTAINER.get(), windowId); this.solidifier = tile; @@ -50,7 +50,7 @@ public class ContainerXPSolidifier extends Container { } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { int inventoryStart = 2; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -96,7 +96,7 @@ public class ContainerXPSolidifier extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.solidifier.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/CrusherContainer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/CrusherContainer.java index 5572d7678..b70296245 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/CrusherContainer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/CrusherContainer.java @@ -13,20 +13,20 @@ package de.ellpeck.actuallyadditions.mod.inventory; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotItemHandlerUnconditioned; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotOutput; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCrusher; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import java.util.Objects; -public class CrusherContainer extends Container { +public class CrusherContainer extends AbstractContainerMenu { public final TileEntityCrusher tileGrinder; public final boolean isDouble; - public CrusherContainer(int windowId, PlayerInventory inventory, TileEntityCrusher tile) { + public CrusherContainer(int windowId, Inventory inventory, TileEntityCrusher tile) { super(ActuallyContainers.GRINDER_CONTAINER.get(), windowId); this.tileGrinder = tile; this.isDouble = tile.isDouble; @@ -56,12 +56,12 @@ public class CrusherContainer extends Container { } } - public static CrusherContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static CrusherContainer fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new CrusherContainer(windowId, inv, (TileEntityCrusher) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); } @Override - public ItemStack quickMoveStack(PlayerEntity player, int slot) { + public ItemStack quickMoveStack(Player player, int slot) { /* int inventoryStart = this.isDouble ? 6 @@ -129,7 +129,7 @@ public class CrusherContainer extends Container { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return this.tileGrinder.canPlayerUse(player); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java index 41117f3d4..84f092935 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/GuiHandler.java @@ -15,8 +15,8 @@ package de.ellpeck.actuallyadditions.mod.inventory; //import de.ellpeck.actuallyadditions.mod.booklet.misc.BookletUtils; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.world.World; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; @Deprecated enum GuiTypes { @@ -71,7 +71,7 @@ enum GuiTypes { public class GuiHandler { @Deprecated - public Object getServerGuiElement(int id, PlayerEntity player, World world, int x, int y, int z) { + public Object getServerGuiElement(int id, Player player, Level world, int x, int y, int z) { TileEntityBase tile = null; // if (GuiTypes.values()[id].checkTileEntity) { // tile = (TileEntityBase) world.getBlockEntity(new BlockPos(x, y, z)); @@ -155,7 +155,7 @@ public class GuiHandler { } @Deprecated - public Object getClientGuiElement(int id, PlayerEntity player, World world, int x, int y, int z) { + public Object getClientGuiElement(int id, Player player, Level world, int x, int y, int z) { // TileEntityBase tile = null; // if (GuiTypes.values()[id].checkTileEntity) { // tile = (TileEntityBase) world.getBlockEntity(new BlockPos(x, y, z)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/SackContainer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/SackContainer.java index 1f5eaa810..111521b85 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/SackContainer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/SackContainer.java @@ -19,35 +19,35 @@ import de.ellpeck.actuallyadditions.mod.items.Sack; import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; import de.ellpeck.actuallyadditions.mod.tile.FilterSettings; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.ClickType; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.network.PacketBuffer; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.ClickType; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import javax.annotation.Nonnull; import java.util.UUID; -public class SackContainer extends Container implements IButtonReactor { +public class SackContainer extends AbstractContainerMenu implements IButtonReactor { public final FilterSettings filter = new FilterSettings(4, false, false, false); private final ItemStackHandlerAA bagInventory; - private final PlayerInventory inventory; + private final Inventory inventory; public boolean autoInsert; private boolean oldAutoInsert; public static final int SIZE = 28; - public static SackContainer fromNetwork(int windowId, PlayerInventory inv, PacketBuffer data) { + public static SackContainer fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { return new SackContainer(windowId, inv, data.readUUID(), new ItemStackHandlerAA(28)); } - public SackContainer(int windowId, PlayerInventory playerInventory, UUID uuid, ItemStackHandlerAA handler) { + public SackContainer(int windowId, Inventory playerInventory, UUID uuid, ItemStackHandlerAA handler) { super(ActuallyContainers.BAG_CONTAINER.get(), windowId); this.inventory = playerInventory; @@ -72,7 +72,7 @@ public class SackContainer extends Container implements IButtonReactor { this.addSlot(new SlotItemHandlerUnconditioned(this.bagInventory, col + row * 7, 10 + col * 18, 10 + row * 18) { @Override public boolean mayPlace(ItemStack stack) { - return !stack.getItem().is(ActuallyTags.Items.HOLDS_ITEMS) && SackContainer.this.filter.check(stack); + return !stack.is(ActuallyTags.Items.HOLDS_ITEMS) && SackContainer.this.filter.check(stack); } }); } @@ -98,7 +98,7 @@ public class SackContainer extends Container implements IButtonReactor { if (!stack.isEmpty() && stack.getItem() instanceof Sack) { //DrillItem.loadSlotsFromNBT(this.bagInventory, playerInventory.getSelected()); if (stack.hasTag()) { - CompoundNBT compound = stack.getOrCreateTag(); + CompoundTag compound = stack.getOrCreateTag(); this.filter.readFromNBT(compound, "Filter"); this.autoInsert = compound.getBoolean("AutoInsert"); } @@ -150,7 +150,7 @@ public class SackContainer extends Container implements IButtonReactor { } @Override - public ItemStack quickMoveStack(@Nonnull PlayerEntity player, int slot) { + public ItemStack quickMoveStack(@Nonnull Player player, int slot) { int inventoryStart = this.bagInventory.getSlots() + 4; int inventoryEnd = inventoryStart + 26; int hotbarStart = inventoryEnd + 1; @@ -197,22 +197,22 @@ public class SackContainer extends Container implements IButtonReactor { } @Override - public ItemStack clicked(int slotId, int dragType, ClickType clickTypeIn, PlayerEntity player) { + public void clicked(int slotId, int dragType, ClickType clickTypeIn, Player player) { if (SlotFilter.checkFilter(this, slotId, player)) { - return ItemStack.EMPTY; + return; //TODO: Check if this is correct, used to return ItemStack.EMPTY } else if (clickTypeIn == ClickType.SWAP && dragType == this.inventory.selected) { - return ItemStack.EMPTY; + return; //TODO: Check if this is correct, used to return ItemStack.EMPTY } else { - return super.clicked(slotId, dragType, clickTypeIn, player); + super.clicked(slotId, dragType, clickTypeIn, player); } } @Override - public void removed(PlayerEntity player) { + public void removed(Player player) { ItemStack stack = this.inventory.getSelected(); if (!stack.isEmpty() && stack.getItem() instanceof Sack) { //DrillItem.writeSlotsToNBT(this.bagInventory, this.inventory.getSelected()); - CompoundNBT compound = stack.getOrCreateTag(); + CompoundTag compound = stack.getOrCreateTag(); this.filter.writeToNBT(compound, "Filter"); compound.putBoolean("AutoInsert", this.autoInsert); } @@ -220,12 +220,12 @@ public class SackContainer extends Container implements IButtonReactor { } @Override - public boolean stillValid(PlayerEntity player) { + public boolean stillValid(Player player) { return true; } @Override - public void onButtonPressed(int buttonID, PlayerEntity player) { + public void onButtonPressed(int buttonID, Player player) { if (buttonID == 0) { this.autoInsert = !this.autoInsert; } else { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/AAScreen.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/AAScreen.java index 25fc98faf..aa74bff26 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/AAScreen.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/AAScreen.java @@ -10,30 +10,29 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; -import net.minecraft.client.gui.screen.inventory.ContainerScreen; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; +import com.mojang.blaze3d.vertex.PoseStack; +import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; +import net.minecraft.network.chat.Component; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.inventory.AbstractContainerMenu; import javax.annotation.Nonnull; -public abstract class AAScreen extends ContainerScreen { +public abstract class AAScreen extends AbstractContainerScreen { - public AAScreen(T container, PlayerInventory inventory, ITextComponent pTitle) { + public AAScreen(T container, Inventory inventory, Component pTitle) { super(container, inventory, pTitle); } @Override - public void render(@Nonnull MatrixStack matrixStack, int mouseX, int mouseY, float partialTicks) { + public void render(@Nonnull PoseStack matrixStack, int mouseX, int mouseY, float partialTicks) { this.renderBackground(matrixStack); super.render(matrixStack, mouseX, mouseY, partialTicks); this.renderTooltip(matrixStack, mouseX, mouseY); } @Override - public void renderLabels(@Nonnull MatrixStack matrices, int x, int y) { + public void renderLabels(@Nonnull PoseStack matrices, int x, int y) { font.draw(matrices, this.title, titleLabelX, titleLabelY, 0xFFFFFF); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/Buttons.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/Buttons.java index f5d161d39..581c3ff3b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/Buttons.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/Buttons.java @@ -1,14 +1,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.widget.button.Button; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; +import net.minecraft.client.gui.components.Button; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.resources.ResourceLocation; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -19,11 +19,11 @@ public class Buttons { public final ResourceLocation resLoc = AssetUtil.getGuiLocation("gui_inputter"); private final boolean smaller; - public SmallerButton(int x, int y, ITextComponent display, IPressable pressable) { + public SmallerButton(int x, int y, Component display, OnPress pressable) { this(x, y, display, false, pressable); } - public SmallerButton(int x, int y, ITextComponent display, boolean smaller, IPressable pressable) { + public SmallerButton(int x, int y, Component display, boolean smaller, OnPress pressable) { super(x, y, 16, smaller ? 12 : 16, display, pressable); @@ -31,10 +31,10 @@ public class Buttons { } @Override - public void render(MatrixStack matrixStack, int x, int y, float f) { + public void render(PoseStack matrixStack, int x, int y, float f) { if (this.visible) { - Minecraft.getInstance().getTextureManager().bind(this.resLoc); - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.setShaderTexture(0, this.resLoc); this.isHovered = x >= this.x && y >= this.y && x < this.x + this.width && y < this.y + this.height; int k = this.getYImage(this.isHovered); GlStateManager._enableBlend(); @@ -66,14 +66,14 @@ public class Buttons { public final ResourceLocation resLoc = AssetUtil.getGuiLocation("gui_inputter"); public TinyButton(int id, int x, int y) { - super(x, y, 8, 8, new StringTextComponent(""), Button::onPress); + super(x, y, 8, 8, new TextComponent(""), Button::onPress); } @Override - public void render(MatrixStack matrixStack, int x, int y, float f) { + public void render(PoseStack matrixStack, int x, int y, float f) { if (this.visible) { - Minecraft.getInstance().getTextureManager().bind(this.resLoc); - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.setShaderTexture(0, this.resLoc); this.isHovered = x >= this.x && y >= this.y && x < this.x + this.width && y < this.y + this.height; int k = this.getYImage(this.isHovered); GlStateManager._enableBlend(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/CrusherScreen.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/CrusherScreen.java index 24e83a490..805b04375 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/CrusherScreen.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/CrusherScreen.java @@ -10,19 +10,19 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.CrusherContainer; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCrusher; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.client.gui.widget.button.Button; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.ChatFormatting; +import net.minecraft.client.gui.components.Button; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -39,7 +39,7 @@ public class CrusherScreen extends AAScreen { private Button buttonAutoSplit; - public CrusherScreen(CrusherContainer container, PlayerInventory inventory, ITextComponent title) { + public CrusherScreen(CrusherContainer container, Inventory inventory, Component title) { super(container, inventory, title); this.tileGrinder = container.tileGrinder; this.isDouble = container.isDouble; @@ -55,8 +55,8 @@ public class CrusherScreen extends AAScreen { : 42), this.topPos + 5, this.tileGrinder.storage); if (this.isDouble) { - this.buttonAutoSplit = new Buttons.SmallerButton( this.leftPos - 10, this.topPos, new StringTextComponent("S"), (button) -> actionPerformed(0)); - this.addButton(this.buttonAutoSplit); + this.buttonAutoSplit = new Buttons.SmallerButton( this.leftPos - 10, this.topPos, new TextComponent("S"), (button) -> actionPerformed(0)); + this.addRenderableWidget(this.buttonAutoSplit); } titleLabelX = (int) (imageWidth / 2.0f - font.width(title) / 2.0f); @@ -70,35 +70,35 @@ public class CrusherScreen extends AAScreen { } @Override - public void tick() { - super.tick(); + public void containerTick() { + super.containerTick(); if (this.isDouble) { - this.buttonAutoSplit.setMessage(new StringTextComponent("S").withStyle(this.tileGrinder.isAutoSplit - ? TextFormatting.DARK_GREEN - : TextFormatting.RED)); + this.buttonAutoSplit.setMessage(new TextComponent("S").withStyle(this.tileGrinder.isAutoSplit + ? ChatFormatting.DARK_GREEN + : ChatFormatting.RED)); } } @Override - public void render(@Nonnull MatrixStack matrixStack, int x, int y, float f) { + public void render(@Nonnull PoseStack matrixStack, int x, int y, float f) { super.render(matrixStack, x, y, f); this.energy.render(matrixStack, x, y); if (this.isDouble && this.buttonAutoSplit.isMouseOver(x,y)) { - drawString(matrixStack, font, new TranslationTextComponent("info.actuallyadditions.gui.autosplititems." + (tileGrinder.isAutoSplit?"on":"off")).withStyle(TextFormatting.BOLD), x , y, 0xffffff); + drawString(matrixStack, font, new TranslatableComponent("info.actuallyadditions.gui.autosplititems." + (tileGrinder.isAutoSplit?"on":"off")).withStyle(ChatFormatting.BOLD), x , y, 0xffffff); } } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(this.isDouble + RenderSystem.setShaderTexture(0, this.isDouble ? RES_LOC_DOUBLE : RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); @@ -121,7 +121,7 @@ public class CrusherScreen extends AAScreen { public static class CrusherDoubleScreen extends CrusherScreen { - public CrusherDoubleScreen(CrusherContainer crusherContainer, PlayerInventory inventory, ITextComponent tile) { + public CrusherDoubleScreen(CrusherContainer crusherContainer, Inventory inventory, Component tile) { super(crusherContainer, inventory, tile); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java index a0a16f08a..a70bb6289 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java @@ -10,25 +10,24 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.tile.CustomEnergyStorage; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.AbstractGui; -import net.minecraft.client.resources.I18n; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.client.gui.GuiComponent; +import net.minecraft.client.renderer.GameRenderer; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.TranslatableComponent; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.fml.client.gui.GuiUtils; import java.text.NumberFormat; import java.util.ArrayList; import java.util.List; @OnlyIn(Dist.CLIENT) -public class EnergyDisplay extends AbstractGui { +public class EnergyDisplay extends GuiComponent { private CustomEnergyStorage rfReference; private int x; @@ -52,9 +51,10 @@ public class EnergyDisplay extends AbstractGui { this.drawTextNextTo = drawTextNextTo; } - public void draw(MatrixStack matrices) { + public void draw(PoseStack matrices) { Minecraft mc = Minecraft.getInstance(); - mc.getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShader(GameRenderer::getPositionTexShader); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); //bind? int barX = this.x; int barY = this.y; @@ -71,9 +71,9 @@ public class EnergyDisplay extends AbstractGui { int i = this.rfReference.getEnergyStored() * 83 / this.rfReference.getMaxEnergyStored(); float[] color = AssetUtil.getWheelColor(mc.level.getGameTime() % 256); - RenderSystem.color3f(color[0] / 255F, color[1] / 255F, color[2] / 255F); + RenderSystem.setShaderColor(color[0] / 255F, color[1] / 255F, color[2] / 255F, 1F); //color3f this.blit(matrices, barX + 1, barY + 84 - i, 36, 172, 16, i); - RenderSystem.color3f(1F, 1F, 1F); + RenderSystem.setShaderColor(1F, 1F, 1F, 1F); //color3f } if (this.drawTextNextTo) { @@ -81,13 +81,14 @@ public class EnergyDisplay extends AbstractGui { } } - public void render(MatrixStack matrices, int mouseX, int mouseY) { + public void render(PoseStack matrices, int mouseX, int mouseY) { if (this.isMouseOver(mouseX, mouseY)) { Minecraft mc = Minecraft.getInstance(); - List text = new ArrayList<>(); - text.add(new StringTextComponent(this.getOverlayText())); - GuiUtils.drawHoveringText(matrices, text, mouseX, mouseY, mc.getWindow().getWidth(), mc.getWindow().getHeight(), -1, mc.font); + List text = new ArrayList<>(); + text.add(new TextComponent(this.getOverlayText())); + if(mc.screen != null) + mc.screen.renderComponentTooltip(matrices, text, mouseX, mouseY, mc.font); //TODO: Check if this is correct, used to call GuiUtils.drawHoveringText } } @@ -101,7 +102,7 @@ public class EnergyDisplay extends AbstractGui { private String getOverlayText() { NumberFormat format = NumberFormat.getInstance(); - return new TranslationTextComponent("misc.actuallyadditions.power_long", + return new TranslatableComponent("misc.actuallyadditions.power_long", format.format(this.rfReference.getEnergyStored()), format.format(this.rfReference.getMaxEnergyStored())) .getString(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java index 714e08ca6..761dce0e8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java @@ -10,26 +10,26 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.tile.FilterSettings; +import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.AbstractGui; -import net.minecraft.client.gui.widget.Widget; -import net.minecraft.client.gui.widget.button.Button; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.client.gui.GuiComponent; +import net.minecraft.client.gui.components.AbstractWidget; +import net.minecraft.client.gui.components.Button; +import net.minecraft.client.gui.components.Widget; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.TranslatableComponent; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.fml.client.gui.GuiUtils; import java.util.ArrayList; import java.util.List; @OnlyIn(Dist.CLIENT) -public class FilterSettingsGui extends AbstractGui { +public class FilterSettingsGui extends GuiComponent { private final FilterSettings theSettings; @@ -40,52 +40,53 @@ public class FilterSettingsGui extends AbstractGui { public FilterSettingsGui(FilterSettings settings, int x, int y, List buttonList) { this.theSettings = settings; - this.whitelistButton = new Buttons.SmallerButton( x, y, new StringTextComponent("WH"), true, Button::onPress); //TODO these need translation keys + this.whitelistButton = new Buttons.SmallerButton( x, y, new TextComponent("WH"), true, Button::onPress); //TODO these need translation keys buttonList.add(this.whitelistButton); y += 14; - this.nbtButton = new Buttons.SmallerButton( x, y, new StringTextComponent("NB"), true, Button::onPress);//TODO also button actions + this.nbtButton = new Buttons.SmallerButton( x, y, new TextComponent("NB"), true, Button::onPress);//TODO also button actions buttonList.add(this.nbtButton); y += 14; - this.modButton = new Buttons.SmallerButton( x, y, new StringTextComponent("MO"), true, Button::onPress); + this.modButton = new Buttons.SmallerButton( x, y, new TextComponent("MO"), true, Button::onPress); buttonList.add(this.modButton); this.tick(); } public void tick() { - this.whitelistButton.setMessage(new StringTextComponent("WH").withStyle(this.theSettings.isWhitelist - ? TextFormatting.DARK_GREEN - : TextFormatting.RED)); - this.whitelistButton.setMessage(new StringTextComponent("NB").withStyle(this.theSettings.respectNBT - ? TextFormatting.DARK_GREEN - : TextFormatting.RED)); - this.whitelistButton.setMessage(new StringTextComponent("MO").withStyle(this.theSettings.respectMod - ? TextFormatting.DARK_GREEN - : TextFormatting.RED)); + this.whitelistButton.setMessage(new TextComponent("WH").withStyle(this.theSettings.isWhitelist + ? ChatFormatting.DARK_GREEN + : ChatFormatting.RED)); + this.whitelistButton.setMessage(new TextComponent("NB").withStyle(this.theSettings.respectNBT + ? ChatFormatting.DARK_GREEN + : ChatFormatting.RED)); + this.whitelistButton.setMessage(new TextComponent("MO").withStyle(this.theSettings.respectMod + ? ChatFormatting.DARK_GREEN + : ChatFormatting.RED)); } - public void drawHover(MatrixStack stack, int mouseX, int mouseY) { + public void drawHover(PoseStack stack, int mouseX, int mouseY) { Minecraft mc = Minecraft.getInstance(); - List list = new ArrayList<>(); + List list = new ArrayList<>(); if (this.whitelistButton.isMouseOver(mouseX, mouseY)) { list.add((this.theSettings.isWhitelist - ? new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".gui.whitelist") - : new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".gui.blacklist")).withStyle(TextFormatting.BOLD)); - list.add(new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".gui.whitelistInfo")); + ? new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.whitelist") + : new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.blacklist")).withStyle(ChatFormatting.BOLD)); + list.add(new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.whitelistInfo")); } else if (this.nbtButton.isMouseOver(mouseX, mouseY)) { list.add((this.theSettings.respectNBT - ? new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".gui.respectNBT") - : new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".gui.ignoreNBT")).withStyle(TextFormatting.BOLD)); + ? new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.respectNBT") + : new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.ignoreNBT")).withStyle(ChatFormatting.BOLD)); } else if (this.modButton.isMouseOver(mouseX, mouseY)) { list.add((this.theSettings.respectMod - ? new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".gui.respectMod") - : new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".gui.ignoreMod")).withStyle(TextFormatting.BOLD)); - list.add(new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".gui.respectModInfo")); + ? new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.respectMod") + : new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.ignoreMod")).withStyle(ChatFormatting.BOLD)); + list.add(new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.respectModInfo")); } //TODO tooltips still jank - if (!list.isEmpty()) - GuiUtils.drawHoveringText(stack, list, mouseX, mouseY, mc.getWindow().getGuiScaledWidth(), mc.getWindow().getGuiScaledHeight(), 200, mc.font); + if (!list.isEmpty() && mc.screen != null) { + mc.screen.renderComponentTooltip(stack, list, mouseX, mouseY, mc.font); //TODO: Check if this is correct, used to call GuiUtils.drawHoveringText + } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FluidDisplay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FluidDisplay.java index b8a964d5a..1d97a35be 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FluidDisplay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FluidDisplay.java @@ -10,29 +10,28 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.platform.GlStateManager; +import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.AbstractGui; -import net.minecraft.fluid.Fluid; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.StringTextComponent; +import net.minecraft.client.gui.GuiComponent; +import net.minecraft.client.renderer.GameRenderer; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.level.material.Fluid; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidTank; import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.fluids.capability.templates.FluidTank; -import net.minecraftforge.fml.client.gui.GuiUtils; import javax.annotation.Nonnull; import java.text.NumberFormat; import java.util.Collections; @OnlyIn(Dist.CLIENT) -public class FluidDisplay extends AbstractGui { +public class FluidDisplay extends GuiComponent { private IFluidTank fluidReference; private Fluid oldFluid; @@ -74,9 +73,10 @@ public class FluidDisplay extends AbstractGui { this.drawTextNextTo = drawTextNextTo; } - public void draw(MatrixStack matrices) { + public void draw(PoseStack matrices) { Minecraft mc = Minecraft.getInstance(); - mc.getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShader(GameRenderer::getPositionTexShader); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); //bind? int barX = this.x; int barY = this.y; @@ -101,33 +101,34 @@ public class FluidDisplay extends AbstractGui { } if (stack != null && fluid != null && this.resLoc != null) { - mc.getTextureManager().bind(this.resLoc); + RenderSystem.setShaderTexture(0, this.resLoc); - GlStateManager._pushMatrix(); +// GlStateManager._pushMatrix(); GlStateManager._enableBlend(); - GlStateManager._disableAlphaTest(); +// GlStateManager._disableAlphaTest(); GlStateManager._blendFuncSeparate(770, 771, 1, 0); int i = this.fluidReference.getFluid().getAmount() * 83 / this.fluidReference.getCapacity(); - this.blit(matrices, barX + 1, barY + 84 - i, 0, 0, 16, i, 16, 512); + blit(matrices, barX + 1, barY + 84 - i, 0, 0, 16, i, 16, 512); //drawModalRectWithCustomSizedTexture(barX + 1, barY + 84 - i, 36, 172, 16, i, 16, 512); GlStateManager._disableBlend(); - GlStateManager._enableAlphaTest(); - GlStateManager._popMatrix(); +// GlStateManager._enableAlphaTest(); +// GlStateManager._popMatrix(); } if (this.drawTextNextTo) { - mc.font.draw(matrices, new StringTextComponent(this.getOverlayText()), barX + 25, barY + 78, 0xFFFFFF); + mc.font.draw(matrices, new TextComponent(this.getOverlayText()), barX + 25, barY + 78, 0xFFFFFF); } } - public void render(MatrixStack matrices, int mouseX, int mouseY) { + public void render(PoseStack matrices, int mouseX, int mouseY) { if (mouseX >= this.x && mouseY >= this.y && mouseX < this.x + (this.outline ? 26 : 18) && mouseY < this.y + (this.outline ? 93 : 85)) { Minecraft mc = Minecraft.getInstance(); - GuiUtils.drawHoveringText(matrices, Collections.singletonList(new StringTextComponent(this.getOverlayText())), mouseX, mouseY, mc.getWindow().getWidth(), mc.getWindow().getHeight(), -1, mc.font); + if(mc.screen != null) + mc.screen.renderComponentTooltip(matrices, Collections.singletonList(new TextComponent(this.getOverlayText())), mouseX, mouseY, mc.font); //TODO: Check if this is correct, used to call GuiUtils.drawHoveringText } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBioReactor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBioReactor.java index 893a90270..e2ed33e8f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBioReactor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBioReactor.java @@ -10,15 +10,15 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerBioReactor; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import javax.annotation.Nonnull; @@ -28,7 +28,7 @@ public class GuiBioReactor extends AAScreen { private final TileEntityBioReactor tile; private EnergyDisplay energy; - public GuiBioReactor(ContainerBioReactor container, PlayerInventory inventory, ITextComponent title) { + public GuiBioReactor(ContainerBioReactor container, Inventory inventory, Component title) { super(container, inventory, title); this.tile = container.tile; this.imageWidth = 176; @@ -42,19 +42,19 @@ public class GuiBioReactor extends AAScreen { } @Override - public void render(@Nonnull MatrixStack matrices, int mouseX, int mouseY, float partialTicks) { + public void render(@Nonnull PoseStack matrices, int mouseX, int mouseY, float partialTicks) { super.render(matrices, mouseX, mouseY, partialTicks); //this.energy.render(mouseX, mouseY); } @Override - public void renderBg(MatrixStack matrices, float partialTicks, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float partialTicks, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.tile.burnTime > 0) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java index ff4e59d9e..284e186f9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java @@ -10,15 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerBreaker; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -30,7 +29,7 @@ public class GuiBreaker extends AAScreen { private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker"); private final TileEntityBreaker breaker; - public GuiBreaker(ContainerBreaker container, PlayerInventory inventory, ITextComponent title) { + public GuiBreaker(ContainerBreaker container, Inventory inventory, Component title) { super(container, inventory, title); this.breaker = container.breaker; this.imageWidth = 176; @@ -38,18 +37,13 @@ public class GuiBreaker extends AAScreen { } @Override - public void init(Minecraft pMinecraft, int pWidth, int pHeight) { - super.init(pMinecraft, pWidth, pHeight); - } + protected void renderBg(@Nonnull PoseStack matrices, float partialTicks, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - @Override - protected void renderBg(@Nonnull MatrixStack matrices, float partialTicks, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); - - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java index df17d0fca..6fe4b6bbc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCanolaPress; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -31,7 +31,7 @@ public class GuiCanolaPress extends AAScreen { private EnergyDisplay energy; private FluidDisplay fluid; - public GuiCanolaPress(ContainerCanolaPress container, PlayerInventory inventory, ITextComponent title) { + public GuiCanolaPress(ContainerCanolaPress container, Inventory inventory, Component title) { super(container, inventory, title); this.press = container.press; this.imageWidth = 176; @@ -46,7 +46,7 @@ public class GuiCanolaPress extends AAScreen { } @Override - public void render(@Nonnull MatrixStack matrices, int x, int y, float f) { + public void render(@Nonnull PoseStack matrices, int x, int y, float f) { super.render(matrices, x, y, f); this.energy.render(matrices, x, y); @@ -54,13 +54,13 @@ public class GuiCanolaPress extends AAScreen { } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.press.currentProcessTime > 0) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java index 36b7e2434..da2ab42fe 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java @@ -10,16 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCoalGenerator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.client.gui.screen.inventory.ContainerScreen; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -32,7 +30,7 @@ public class GuiCoalGenerator extends AAScreen { private final TileEntityCoalGenerator generator; private EnergyDisplay energy; - public GuiCoalGenerator(ContainerCoalGenerator container, PlayerInventory inventory, ITextComponent title) { + public GuiCoalGenerator(ContainerCoalGenerator container, Inventory inventory, Component title) { super(container, inventory, title); this.generator = container.generator; this.imageWidth = 176; @@ -46,7 +44,7 @@ public class GuiCoalGenerator extends AAScreen { } @Override - public void render(@Nonnull MatrixStack matrices, int x, int y, float f) { + public void render(@Nonnull PoseStack matrices, int x, int y, float f) { renderBackground(matrices); super.render(matrices, x, y, f); this.energy.render(matrices, x, y); @@ -54,13 +52,13 @@ public class GuiCoalGenerator extends AAScreen { } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.generator.currentBurnTime > 0) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java index 1496ea3cf..a95be4821 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java @@ -10,27 +10,23 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCoffeeMachine; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine; -import de.ellpeck.actuallyadditions.mod.util.*; +import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.widget.button.Button; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TextComponent; -import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.client.gui.components.Button; +import net.minecraft.network.chat.BaseComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.fml.client.gui.GuiUtils; import javax.annotation.Nonnull; -import java.util.Arrays; import java.util.Collections; @OnlyIn(Dist.CLIENT) @@ -42,7 +38,7 @@ public class GuiCoffeeMachine extends AAScreen { private EnergyDisplay energy; private FluidDisplay fluid; - public GuiCoffeeMachine(ContainerCoffeeMachine container, PlayerInventory inventory, ITextComponent title) { + public GuiCoffeeMachine(ContainerCoffeeMachine container, Inventory inventory, Component title) { super(container, inventory, title); this.machine = container.machine; this.imageWidth = 176; @@ -53,22 +49,21 @@ public class GuiCoffeeMachine extends AAScreen { public void init() { super.init(); - this.addButton(new Button(this.leftPos + 60, this.topPos + 11, 58, 20, new TranslationTextComponent("info.actuallyadditions.gui.ok"), - (b) -> PacketHandlerHelper.sendButtonPacket(this.machine, 0))); + this.addRenderableWidget(new Button(this.leftPos + 60, this.topPos + 11, 58, 20, new TranslatableComponent("info.actuallyadditions.gui.ok"), + (b) -> PacketHandlerHelper.sendButtonPacket(this.machine, 0))); this.energy = new EnergyDisplay(this.leftPos + 16, this.topPos + 5, this.machine.storage); this.fluid = new FluidDisplay(this.leftPos - 30, this.topPos + 1, this.machine.tank, true, false); } @Override - public void render(@Nonnull MatrixStack matrices, int x, int y, float f) { + public void render(@Nonnull PoseStack matrices, int x, int y, float f) { super.render(matrices, x, y, f); Minecraft mc = Minecraft.getInstance(); - TextComponent text = new TranslationTextComponent("info.actuallyadditions.gui.coffee_amount", this.machine.coffeeCacheAmount, TileEntityCoffeeMachine.COFFEE_CACHE_MAX_AMOUNT); + BaseComponent text = new TranslatableComponent("info.actuallyadditions.gui.coffee_amount", this.machine.coffeeCacheAmount, TileEntityCoffeeMachine.COFFEE_CACHE_MAX_AMOUNT); if (x >= this.leftPos + 40 && y >= this.topPos + 25 && x <= this.leftPos + 49 && y <= this.topPos + 56) { - GuiUtils.drawHoveringText(matrices, Collections.singletonList(text), x, y, mc.getWindow().getWidth(), mc.getWindow().getWidth(), -1, font); - + renderComponentTooltip(matrices, Collections.singletonList(text), x, y, font); } this.energy.render(matrices, x, y); @@ -76,13 +71,13 @@ public class GuiCoffeeMachine extends AAScreen { } @Override - public void renderBg(@Nonnull MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(@Nonnull PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.machine.coffeeCacheAmount > 0) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java index 14d230c03..a51732337 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerDirectionalBreaker; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLongRangeBreaker; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -30,7 +30,7 @@ public class GuiDirectionalBreaker extends AAScreen private final TileEntityLongRangeBreaker breaker; private EnergyDisplay energy; - public GuiDirectionalBreaker(ContainerDirectionalBreaker container, PlayerInventory inventory, ITextComponent title) { + public GuiDirectionalBreaker(ContainerDirectionalBreaker container, Inventory inventory, Component title) { super(container, inventory, title); this.breaker = container.breaker; this.imageWidth = 176; @@ -44,19 +44,19 @@ public class GuiDirectionalBreaker extends AAScreen } @Override - public void render(@Nonnull MatrixStack matrices, int x, int y, float f) { + public void render(@Nonnull PoseStack matrices, int x, int y, float f) { super.render(matrices, x, y, f); this.energy.render(matrices, x, y); } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); this.energy.draw(matrices); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java index 06ded003c..0e5eab215 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java @@ -10,15 +10,15 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.inventory.ContainerDrill; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -30,25 +30,25 @@ public class GuiDrill extends AAScreen { private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_drill"); - public GuiDrill(ContainerDrill container, PlayerInventory inventory, ITextComponent title) { + public GuiDrill(ContainerDrill container, Inventory inventory, Component title) { super(container, inventory, title); this.imageWidth = 176; this.imageHeight = 54 + 86; } @Override - public void renderLabels(@Nonnull MatrixStack matrices, int x, int y) { + public void renderLabels(@Nonnull PoseStack matrices, int x, int y) { AssetUtil.displayNameString(matrices, this.font, this.imageWidth, -10, I18n.get("container." + ActuallyAdditions.MODID + ".drill.name")); } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 54, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 54); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java index 6b9208c19..d714df7ed 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java @@ -10,19 +10,17 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerDropper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import javax.annotation.Nonnull; - @OnlyIn(Dist.CLIENT) public class GuiDropper extends AAScreen { @@ -30,7 +28,7 @@ public class GuiDropper extends AAScreen { private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker"); private final TileEntityDropper dropper; - public GuiDropper(ContainerDropper container, PlayerInventory inventory, ITextComponent title) { + public GuiDropper(ContainerDropper container, Inventory inventory, Component title) { super(container, inventory, title); this.dropper = container.dropper; this.imageWidth = 176; @@ -45,13 +43,13 @@ public class GuiDropper extends AAScreen { } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java index 4f37034ab..8ec8b3eaf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerEnergizer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -30,7 +30,7 @@ public class GuiEnergizer extends AAScreen { private final TileEntityEnergizer energizer; private EnergyDisplay energy; - public GuiEnergizer(ContainerEnergizer container, PlayerInventory inventory, ITextComponent title) { + public GuiEnergizer(ContainerEnergizer container, Inventory inventory, Component title) { super(container, inventory, title); this.energizer = container.energizer; this.imageWidth = 176; @@ -44,19 +44,19 @@ public class GuiEnergizer extends AAScreen { } @Override - public void render(@Nonnull MatrixStack matrices, int x, int y, float f) { + public void render(@Nonnull PoseStack matrices, int x, int y, float f) { super.render(matrices, x, y, f); this.energy.render(matrices, x, y); } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); this.energy.draw(matrices); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java index 02a354e9c..63f8060b8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerEnervator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -31,7 +31,7 @@ public class GuiEnervator extends AAScreen { private final TileEntityEnervator enervator; private EnergyDisplay energy; - public GuiEnervator(ContainerEnervator container, PlayerInventory inventory, ITextComponent title) { + public GuiEnervator(ContainerEnervator container, Inventory inventory, Component title) { super(container, inventory, title); this.enervator = container.enervator; this.imageWidth = 176; @@ -45,19 +45,19 @@ public class GuiEnervator extends AAScreen { } @Override - public void render(@Nonnull MatrixStack matrices, int x, int y, float f) { + public void render(@Nonnull PoseStack matrices, int x, int y, float f) { super.render(matrices, x, y, f); this.energy.render(matrices, x, y); } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); this.energy.draw(matrices); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFarmer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFarmer.java index f14c2a883..729f2382c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFarmer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFarmer.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFarmer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -32,7 +32,7 @@ public class GuiFarmer extends AAScreen { private EnergyDisplay energy; - public GuiFarmer(ContainerFarmer container, PlayerInventory inventory, ITextComponent title) { + public GuiFarmer(ContainerFarmer container, Inventory inventory, Component title) { super(container, inventory, title); this.farmer = container.farmer; this.imageWidth = 176; @@ -47,20 +47,20 @@ public class GuiFarmer extends AAScreen { } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); this.energy.draw(matrices); } @Override - public void render(@Nonnull MatrixStack matrices, int x, int y, float f) { + public void render(@Nonnull PoseStack matrices, int x, int y, float f) { super.render(matrices, x, y, f); this.energy.render(matrices, x, y); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java index 00b2b36cf..04672fcb7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java @@ -10,16 +10,16 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFeeder; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -31,7 +31,7 @@ public class GuiFeeder extends AAScreen { private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_feeder"); public final TileEntityFeeder tileFeeder; - public GuiFeeder(ContainerFeeder container, PlayerInventory inventory, ITextComponent title) { + public GuiFeeder(ContainerFeeder container, Inventory inventory, Component title) { super(container, inventory, title); this.tileFeeder = container.feeder; this.imageWidth = 176; @@ -39,7 +39,7 @@ public class GuiFeeder extends AAScreen { } @Override - public void render(@Nonnull MatrixStack matrices, int x, int y, float f) { + public void render(@Nonnull PoseStack matrices, int x, int y, float f) { super.render(matrices, x, y, f); if (x >= this.leftPos + 69 && y >= this.topPos + 30 && x <= this.leftPos + 69 + 10 && y <= this.topPos + 30 + 10) { String[] array = new String[]{this.tileFeeder.currentAnimalAmount + " " + I18n.get("info." + ActuallyAdditions.MODID + ".gui.animals"), this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < TileEntityFeeder.THRESHOLD @@ -52,11 +52,12 @@ public class GuiFeeder extends AAScreen { } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); + + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 70, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 70); if (this.tileFeeder.currentTimer > 0) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java index 98f1a8efa..95337c7c7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFermentingBarrel; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -32,7 +32,7 @@ public class GuiFermentingBarrel extends AAScreen { private FluidDisplay input; private FluidDisplay output; - public GuiFermentingBarrel(ContainerFermentingBarrel container, PlayerInventory inventory, ITextComponent title) { + public GuiFermentingBarrel(ContainerFermentingBarrel container, Inventory inventory, Component title) { super(container, inventory, title); this.press = container.barrel; this.imageWidth = 176; @@ -40,7 +40,7 @@ public class GuiFermentingBarrel extends AAScreen { } @Override - public void render(@Nonnull MatrixStack matrices, int x, int y, float f) { + public void render(@Nonnull PoseStack matrices, int x, int y, float f) { super.render(matrices, x, y, f); this.input.render(matrices, x, y); this.output.render(matrices, x, y); @@ -54,13 +54,13 @@ public class GuiFermentingBarrel extends AAScreen { } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.press.currentProcessTime > 0) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFilter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFilter.java index 44635cc4b..f057a9b5b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFilter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFilter.java @@ -10,15 +10,15 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFilter; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -29,25 +29,25 @@ public class GuiFilter extends AAScreen { private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_filter"); - public GuiFilter(ContainerFilter container, PlayerInventory inventory, ITextComponent title) { + public GuiFilter(ContainerFilter container, Inventory inventory, Component title) { super(container, inventory, title); this.imageWidth = 176; this.imageHeight = 90 + 86; } @Override - public void renderLabels(@Nonnull MatrixStack matrices, int x, int y) { + public void renderLabels(@Nonnull PoseStack matrices, int x, int y) { AssetUtil.displayNameString(matrices, this.font, this.imageWidth, -10, I18n.get("container." + ActuallyAdditions.MODID + ".filter.name")); } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 90, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 90); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFireworkBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFireworkBox.java index 24fad9374..d4b81ba57 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFireworkBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFireworkBox.java @@ -10,22 +10,22 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFireworkBox; -import net.minecraft.client.gui.screen.inventory.ContainerScreen; -import net.minecraft.client.gui.widget.AbstractSlider; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.client.gui.components.AbstractSliderButton; +import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; +import net.minecraft.network.chat.Component; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; // TODO: FIX ME @OnlyIn(Dist.CLIENT) -public class GuiFireworkBox extends ContainerScreen { +public class GuiFireworkBox extends AbstractContainerScreen { // private final TileEntityFireworkBox tile; - public GuiFireworkBox(ContainerFireworkBox screenContainer, PlayerInventory inv, ITextComponent titleIn) { + public GuiFireworkBox(ContainerFireworkBox screenContainer, Inventory inv, Component titleIn) { super(screenContainer, inv, titleIn); // this.tile = tile.; this.imageWidth = 300; @@ -53,7 +53,7 @@ public class GuiFireworkBox extends ContainerScreen { } @Override - protected void renderBg(MatrixStack matrixStack, float partialTicks, int x, int y) { + protected void renderBg(PoseStack matrixStack, float partialTicks, int x, int y) { } @@ -90,8 +90,8 @@ public class GuiFireworkBox extends ContainerScreen { // } // TODO: FIX - private static class CustomSlider extends AbstractSlider { - public CustomSlider(int x, int y, int width, int height, ITextComponent message, double defaultValue) { + private static class CustomSlider extends AbstractSliderButton { + public CustomSlider(int x, int y, int width, int height, Component message, double defaultValue) { super(x, y, width, height, message, defaultValue); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java index 179f5384a..ce92b6b5f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFluidCollector.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFluidCollector; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFluidCollector; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -31,7 +31,7 @@ public class GuiFluidCollector extends AAScreen { private final TileEntityFluidCollector collector; private FluidDisplay fluid; - public GuiFluidCollector(ContainerFluidCollector container, PlayerInventory inventory, ITextComponent title) { + public GuiFluidCollector(ContainerFluidCollector container, Inventory inventory, Component title) { super(container, inventory, title); this.collector = container.collector; this.imageWidth = 176; @@ -39,7 +39,7 @@ public class GuiFluidCollector extends AAScreen { } @Override - public void render(@Nonnull MatrixStack matrices, int x, int y, float f) { + public void render(@Nonnull PoseStack matrices, int x, int y, float f) { super.render(matrices, x, y, f); this.fluid.render(matrices, x, y); @@ -52,13 +52,13 @@ public class GuiFluidCollector extends AAScreen { } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); this.fluid.draw(matrices); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java index d8f3740fd..3d0487075 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java @@ -10,27 +10,24 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFurnaceDouble; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPoweredFurnace; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.gui.widget.button.Button; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.ChatFormatting; +import net.minecraft.client.gui.components.Button; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.fml.client.gui.GuiUtils; import javax.annotation.Nonnull; -import javax.xml.soap.Text; import java.util.Collections; @OnlyIn(Dist.CLIENT) @@ -42,7 +39,7 @@ public class GuiFurnaceDouble extends AAScreen { private Button buttonAutoSplit; - public GuiFurnaceDouble(ContainerFurnaceDouble container, PlayerInventory inventory, ITextComponent title) { + public GuiFurnaceDouble(ContainerFurnaceDouble container, Inventory inventory, Component title) { super(container, inventory, title); this.tileFurnace = container.furnace; this.imageWidth = 176; @@ -50,14 +47,14 @@ public class GuiFurnaceDouble extends AAScreen { } @Override - public void render(@Nonnull MatrixStack matrices, int x, int y, float f) { + public void render(@Nonnull PoseStack matrices, int x, int y, float f) { super.render(matrices, x, y, f); this.energy.render(matrices, x, y); if (this.buttonAutoSplit.isMouseOver(x, y)) { - GuiUtils.drawHoveringText(matrices, Collections.singletonList(this.tileFurnace.isAutoSplit - ? new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.on").withStyle(TextFormatting.BOLD) - : new TranslationTextComponent("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.off").withStyle(TextFormatting.BOLD)), x, y, this.width, this.height, 64, font); + renderComponentTooltip(matrices, Collections.singletonList(this.tileFurnace.isAutoSplit + ? new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.on").withStyle(ChatFormatting.BOLD) + : new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.off").withStyle(ChatFormatting.BOLD)), x, y); } } @@ -65,26 +62,26 @@ public class GuiFurnaceDouble extends AAScreen { public void init() { super.init(); this.energy = new EnergyDisplay(this.leftPos + 27, this.topPos + 5, this.tileFurnace.storage); - this.buttonAutoSplit = new Buttons.SmallerButton(this.leftPos, this.topPos, new StringTextComponent("S"), (button) -> PacketHandlerHelper.sendButtonPacket(this.tileFurnace, 0)); - buttonAutoSplit.setFGColor(this.tileFurnace.isAutoSplit ? TextFormatting.DARK_GREEN.getColor() : TextFormatting.RED.getColor()); - this.addButton(this.buttonAutoSplit); + this.buttonAutoSplit = new Buttons.SmallerButton(this.leftPos, this.topPos, new TextComponent("S"), (button) -> PacketHandlerHelper.sendButtonPacket(this.tileFurnace, 0)); + buttonAutoSplit.setFGColor(this.tileFurnace.isAutoSplit ? ChatFormatting.DARK_GREEN.getColor() : ChatFormatting.RED.getColor()); + this.addRenderableWidget(this.buttonAutoSplit); } @Override - public void tick() { - super.tick(); - buttonAutoSplit.setFGColor(this.tileFurnace.isAutoSplit ? TextFormatting.DARK_GREEN.getColor() : TextFormatting.RED.getColor()); + public void containerTick() { + super.containerTick(); + buttonAutoSplit.setFGColor(this.tileFurnace.isAutoSplit ? ChatFormatting.DARK_GREEN.getColor() : ChatFormatting.RED.getColor()); } @Override - public void renderBg(@Nonnull MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(@Nonnull PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.tileFurnace.firstSmeltTime > 0) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiLaserRelayItemWhitelist.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiLaserRelayItemWhitelist.java index b4d955e25..ac0b42c07 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiLaserRelayItemWhitelist.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiLaserRelayItemWhitelist.java @@ -10,17 +10,17 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.inventory.ContainerLaserRelayItemWhitelist; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItemAdvanced; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.client.gui.widget.button.Button; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.client.gui.components.Button; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -38,7 +38,7 @@ public class GuiLaserRelayItemWhitelist extends AAScreen { @@ -31,7 +28,7 @@ public class GuiMiner extends AAScreen { private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker"); private final TileEntityVerticalDigger miner; - public GuiMiner(ContainerMiner container, PlayerInventory inventory, ITextComponent title) { + public GuiMiner(ContainerMiner container, Inventory inventory, Component title) { super(container, inventory, title); this.miner = container.miner; this.imageWidth = 176; @@ -51,13 +48,13 @@ public class GuiMiner extends AAScreen { // this.addButton(buttonReset); } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); String mining = this.miner.onlyMineOres diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java index 5fc2dac25..9dd1bc680 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java @@ -10,16 +10,15 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerOilGenerator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -35,7 +34,7 @@ public class GuiOilGenerator extends AAScreen { private EnergyDisplay energy; private FluidDisplay fluid; - public GuiOilGenerator(ContainerOilGenerator container, PlayerInventory inventory, ITextComponent title) { + public GuiOilGenerator(ContainerOilGenerator container, Inventory inventory, Component title) { super(container, inventory, title); this.generator = container.generator; this.imageWidth = 176; @@ -50,20 +49,20 @@ public class GuiOilGenerator extends AAScreen { } @Override - public void render(@Nonnull MatrixStack matrices, int x, int y, float f) { + public void render(@Nonnull PoseStack matrices, int x, int y, float f) { super.render(matrices, x, y, f); this.energy.render(matrices, x, y); this.fluid.render(matrices, x, y); } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.generator.currentBurnTime > 0 && this.generator.maxBurnTime > 0) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java index fabac7710..05fa8b2cd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerPhantomPlacer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomPlacer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -29,7 +29,7 @@ public class GuiPhantomPlacer extends AAScreen { private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_breaker"); private final TileEntityPhantomPlacer placer; - public GuiPhantomPlacer(ContainerPhantomPlacer container, PlayerInventory inventory, ITextComponent title) { + public GuiPhantomPlacer(ContainerPhantomPlacer container, Inventory inventory, Component title) { super(container, inventory, title); this.placer = container.placer; this.imageWidth = 176; @@ -46,8 +46,8 @@ public class GuiPhantomPlacer extends AAScreen { } @Override - public void tick() { - super.tick(); + protected void containerTick() { + super.containerTick(); // if (!this.placer.isBreaker) { // this.buttonList.get(0).displayString = this.getSide(); @@ -55,7 +55,7 @@ public class GuiPhantomPlacer extends AAScreen { } @Override - public void render(@Nonnull MatrixStack matrices, int mouseX, int mouseY, float partialTicks) { + public void render(@Nonnull PoseStack matrices, int mouseX, int mouseY, float partialTicks) { super.render(matrices, mouseX, mouseY, partialTicks); // if (!this.placer.isBreaker && this.buttonList.get(0).isMouseOver()) { @@ -79,13 +79,13 @@ public class GuiPhantomPlacer extends AAScreen { // return GuiInputter.SIDES[this.placer.side + 1]; // } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java index bd6b5d960..4880998f1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerRangedCollector; import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -32,7 +32,7 @@ public class GuiRangedCollector extends AAScreen { private FilterSettingsGui filter; - public GuiRangedCollector(ContainerRangedCollector container, PlayerInventory inventory, ITextComponent title) { + public GuiRangedCollector(ContainerRangedCollector container, Inventory inventory, Component title) { super(container, inventory, title); this.collector = container.collector; this.imageWidth = 176; @@ -47,27 +47,27 @@ public class GuiRangedCollector extends AAScreen { } @Override - public void render(@Nonnull MatrixStack matrices, int x, int y, float f) { + public void render(@Nonnull PoseStack matrices, int x, int y, float f) { super.render(matrices, x, y, f); //this.filter.drawHover(matrices, x, y); } @Override - public void tick() { - super.tick(); + public void containerTick() { + super.containerTick(); this.filter.tick(); } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1F, 1F, 1F, 1F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 86, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 86); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java index 834d908d0..58d5c3a72 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java @@ -10,20 +10,17 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerXPSolidifier; import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import de.ellpeck.actuallyadditions.mod.util.StringUtil; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import javax.annotation.Nonnull; - @OnlyIn(Dist.CLIENT) public class GuiXPSolidifier extends AAScreen { @@ -31,7 +28,7 @@ public class GuiXPSolidifier extends AAScreen { private static final ResourceLocation RES_LOC = AssetUtil.getGuiLocation("gui_xp_solidifier"); private final TileEntityXPSolidifier solidifier; - public GuiXPSolidifier(ContainerXPSolidifier container, PlayerInventory inventory, ITextComponent title) { + public GuiXPSolidifier(ContainerXPSolidifier container, Inventory inventory, Component title) { super(container, inventory, title); this.solidifier = container.solidifier; this.imageWidth = 176; @@ -73,13 +70,13 @@ public class GuiXPSolidifier extends AAScreen { } @Override - public void renderBg(MatrixStack matrices, float f, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(PoseStack matrices, float f, int x, int y) { + RenderSystem.setShaderColor(1F, 1F, 1F, 1F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(RES_LOC); + RenderSystem.setShaderTexture(0, RES_LOC); this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); drawCenteredString(matrices, this.font, Integer.toString(this.solidifier.amount), this.leftPos + 88, this.topPos + 30, 0xFFFFFF); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/SackGui.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/SackGui.java index 208a44f25..800440ea7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/SackGui.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/SackGui.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.SackContainer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.client.gui.widget.button.Button; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.client.gui.components.Button; +import net.minecraft.network.chat.Component; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.entity.player.Inventory; import javax.annotation.Nonnull; @@ -30,7 +30,7 @@ public class SackGui extends AAScreen { private FilterSettingsGui filter; private Button buttonAutoInsert; - public SackGui(SackContainer container, PlayerInventory inventory, ITextComponent title) { + public SackGui(SackContainer container, Inventory inventory, Component title) { super(container, inventory, title); this.imageWidth = 176; this.imageHeight = 90 + 86; @@ -42,7 +42,7 @@ public class SackGui extends AAScreen { public void init() { super.init(); - this.filter = new FilterSettingsGui(this.container.filter, this.leftPos + 138, this.topPos + 10, this.buttons); + this.filter = new FilterSettingsGui(this.container.filter, this.leftPos + 138, this.topPos + 10, this.renderables); // // this.buttonAutoInsert = new Button(0, this.leftPos - 21, this.topPos + 8, 20, 20, (this.container.autoInsert // ? TextFormatting.DARK_GREEN @@ -60,8 +60,8 @@ public class SackGui extends AAScreen { // } @Override - public void tick() { - super.tick(); + public void containerTick() { + super.containerTick(); this.filter.tick(); //this.buttonAutoInsert.displayString = (this.container.autoInsert @@ -77,7 +77,7 @@ public class SackGui extends AAScreen { }*/ @Override - public void render(@Nonnull MatrixStack stack, int mouseX, int mouseY, float partialTicks) { + public void render(@Nonnull PoseStack stack, int mouseX, int mouseY, float partialTicks) { super.render(stack, mouseX, mouseY, partialTicks); this.filter.drawHover(stack, mouseX, mouseY); @@ -93,13 +93,13 @@ public class SackGui extends AAScreen { } @Override - protected void renderBg(MatrixStack matrixStack, float partialTicks, int x, int y) { - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + protected void renderBg(PoseStack matrixStack, float partialTicks, int x, int y) { + RenderSystem.setShaderColor(1F, 1F, 1F, 1F); - this.getMinecraft().getTextureManager().bind(AssetUtil.GUI_INVENTORY_LOCATION); + RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); this.blit(matrixStack, this.leftPos, this.topPos + 90, 0, 0, 176, 86); - this.getMinecraft().getTextureManager().bind(this.isVoid + RenderSystem.setShaderTexture(0, this.isVoid ? RES_LOC_VOID : RES_LOC); this.blit(matrixStack, this.leftPos, this.topPos, 0, 0, 176, 90); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/TexturedButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/TexturedButton.java index a972365b4..7d9159dee 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/TexturedButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/TexturedButton.java @@ -10,23 +10,20 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; +import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.widget.button.Button; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.StringTextComponent; +import net.minecraft.client.gui.components.Button; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.resources.ResourceLocation; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.fml.client.gui.GuiUtils; import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; -import net.minecraft.client.gui.widget.button.Button.IPressable; - @OnlyIn(Dist.CLIENT) public class TexturedButton extends Button { @@ -35,12 +32,12 @@ public class TexturedButton extends Button { public int texturePosX; public int texturePosY; - public TexturedButton(ResourceLocation resLoc, int x, int y, int texturePosX, int texturePosY, int width, int height, IPressable pressable) { + public TexturedButton(ResourceLocation resLoc, int x, int y, int texturePosX, int texturePosY, int width, int height, OnPress pressable) { this(resLoc, x, y, texturePosX, texturePosY, width, height, new ArrayList<>(), pressable); } - public TexturedButton(ResourceLocation resLoc, int x, int y, int texturePosX, int texturePosY, int width, int height, List hoverTextList, IPressable pressable) { - super(x, y, width, height, StringTextComponent.EMPTY, pressable); + public TexturedButton(ResourceLocation resLoc, int x, int y, int texturePosX, int texturePosY, int width, int height, List hoverTextList, OnPress pressable) { + super(x, y, width, height, TextComponent.EMPTY, pressable); this.texturePosX = texturePosX; this.texturePosY = texturePosY; this.resLoc = resLoc; @@ -48,10 +45,10 @@ public class TexturedButton extends Button { } @Override - public void render(MatrixStack matrices, int mouseX, int mouseY, float partialTicks) { + public void render(PoseStack matrices, int mouseX, int mouseY, float partialTicks) { if (this.visible) { - Minecraft.getInstance().getTextureManager().bind(this.resLoc); - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); + RenderSystem.setShaderTexture(0, this.resLoc); this.isHovered = mouseX >= this.x && mouseY >= this.y && this.x < this.x + this.width && this.y < this.y + this.height; int k = this.isHovered ? 1 @@ -65,10 +62,11 @@ public class TexturedButton extends Button { } } - public void drawHover(MatrixStack matrices, int x, int y) { + public void drawHover(PoseStack matrices, int x, int y) { if (this.isMouseOver(x, y)) { Minecraft mc = Minecraft.getInstance(); - GuiUtils.drawHoveringText(matrices, this.textList.stream().map(StringTextComponent::new).collect(Collectors.toList()), x, y, mc.screen.width, mc.screen.height, -1, mc.font); + if(mc.screen != null) + mc.screen.renderComponentTooltip(matrices, this.textList.stream().map(TextComponent::new).collect(Collectors.toList()), x, y, mc.font); //TODO: Check if this is correct, used to call GuiUtils.drawHoveringText } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotDeletion.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotDeletion.java index d721fd1f9..e4f419272 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotDeletion.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotDeletion.java @@ -11,7 +11,7 @@ package de.ellpeck.actuallyadditions.mod.inventory.slot; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; -import net.minecraft.item.ItemStack; +import net.minecraft.world.item.ItemStack; public class SlotDeletion extends SlotItemHandlerUnconditioned { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotFilter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotFilter.java index 228eac0c7..cc00b25eb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotFilter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotFilter.java @@ -14,10 +14,10 @@ import de.ellpeck.actuallyadditions.mod.items.ItemFilter; import de.ellpeck.actuallyadditions.mod.tile.FilterSettings; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; public class SlotFilter extends SlotItemHandlerUnconditioned { @@ -29,7 +29,7 @@ public class SlotFilter extends SlotItemHandlerUnconditioned { this(inv.filterInventory, slot, x, y); } - public static boolean checkFilter(Container container, int slotId, PlayerEntity player) { + public static boolean checkFilter(AbstractContainerMenu container, int slotId, Player player) { if (slotId >= 0 && slotId < container.slots.size()) { Slot slot = container.getSlot(slotId); if (slot instanceof SlotFilter) { @@ -44,13 +44,13 @@ public class SlotFilter extends SlotItemHandlerUnconditioned { return StackUtil.isValid(stack) && stack.getItem() instanceof ItemFilter; } - private void slotClick(PlayerEntity player) { - ItemStack heldStack = player.inventory.getCarried(); + private void slotClick(Player player) { + ItemStack heldStack = player.getInventory().getSelected(); ItemStack stackInSlot = this.getItem(); if (StackUtil.isValid(stackInSlot) && !StackUtil.isValid(heldStack)) { if (isFilter(stackInSlot)) { - player.inventory.setCarried(stackInSlot); + player.getInventory().setPickedItem(stackInSlot); } this.set(ItemStack.EMPTY); @@ -78,7 +78,7 @@ public class SlotFilter extends SlotItemHandlerUnconditioned { } @Override - public boolean mayPickup(PlayerEntity player) { + public boolean mayPickup(Player player) { return false; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotImmovable.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotImmovable.java index 1031968ce..21248caf4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotImmovable.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotImmovable.java @@ -10,14 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.slot; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.inventory.IInventory; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; +import net.minecraft.world.Container; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.Slot; +import net.minecraft.world.item.ItemStack; public class SlotImmovable extends Slot { - public SlotImmovable(IInventory inventory, int id, int x, int y) { + public SlotImmovable(Container inventory, int id, int x, int y) { super(inventory, id, x, y); } @@ -37,7 +37,7 @@ public class SlotImmovable extends Slot { } @Override - public boolean mayPickup(PlayerEntity player) { + public boolean mayPickup(Player player) { return false; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotItemHandlerUnconditioned.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotItemHandlerUnconditioned.java index 1fc736267..8b8f67c53 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotItemHandlerUnconditioned.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotItemHandlerUnconditioned.java @@ -10,13 +10,13 @@ package de.ellpeck.actuallyadditions.mod.inventory.slot; -import javax.annotation.Nonnull; - import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; import net.minecraftforge.items.SlotItemHandler; +import javax.annotation.Nonnull; + public class SlotItemHandlerUnconditioned extends SlotItemHandler { private final ItemStackHandlerAA inv; @@ -64,7 +64,7 @@ public class SlotItemHandlerUnconditioned extends SlotItemHandler { } @Override - public boolean mayPickup(PlayerEntity playerIn) { + public boolean mayPickup(Player playerIn) { return !this.inv.extractItem(this.getSlotIndex(), 1, true, false).isEmpty(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotOutput.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotOutput.java index 7b05345f8..26e9ef037 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotOutput.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/slot/SlotOutput.java @@ -11,7 +11,7 @@ package de.ellpeck.actuallyadditions.mod.inventory.slot; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; -import net.minecraft.item.ItemStack; +import net.minecraft.world.item.ItemStack; public class SlotOutput extends SlotItemHandlerUnconditioned { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ActuallyItems.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ActuallyItems.java index f5acc849c..9ca4d8071 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ActuallyItems.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ActuallyItems.java @@ -17,13 +17,15 @@ import de.ellpeck.actuallyadditions.mod.blocks.AABlockItem; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.items.lens.ItemLens; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemTier; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Tiers; +import net.minecraft.world.item.crafting.RecipeType; import net.minecraftforge.eventbus.api.IEventBus; -import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; +import org.jetbrains.annotations.Nullable; import javax.annotation.Nonnull; import java.util.Set; @@ -44,13 +46,13 @@ public final class ActuallyItems { public static final RegistryObject RICE_DOUGH = ITEMS.register("rice_dough", ItemBase::new); public static final RegistryObject TINY_COAL = ITEMS.register("tiny_coal", () -> new ItemBase() { @Override - public int getBurnTime(ItemStack stack) { + public int getBurnTime(ItemStack itemStack, @Nullable RecipeType recipeType) { return 200; } }); public static final RegistryObject TINY_CHARCOAL = ITEMS.register("tiny_charcoal", () -> new ItemBase() { @Override - public int getBurnTime(ItemStack stack) { + public int getBurnTime(ItemStack itemStack, @Nullable RecipeType recipeType) { return 200; } }); @@ -169,12 +171,12 @@ public final class ActuallyItems { public static final RegistryObject FLAX_SEEDS = ITEMS.register("flax_seeds", () -> new AABlockItem.AASeedItem(ActuallyBlocks.FLAX.get(), ActuallyItems.defaultProps())); //() -> new ItemSeed("seedFlax", ActuallyBlocks.FLAX, Items.STRING, 0)); // TOOLS & ARMOR - public static final RegistryObject WOODEN_AIOT = ITEMS.register("wooden_aiot", () -> new AllInOneTool(ItemTier.WOOD)); - public static final RegistryObject STONE_AIOT = ITEMS.register("stone_aiot", () -> new AllInOneTool(ItemTier.STONE)); - public static final RegistryObject IRON_AIOT = ITEMS.register("iron_aiot", () -> new AllInOneTool(ItemTier.IRON)); - public static final RegistryObject GOLD_AIOT = ITEMS.register("gold_aiot", () -> new AllInOneTool(ItemTier.GOLD)); - public static final RegistryObject DIAMOND_AIOT = ITEMS.register("diamond_aiot", () -> new AllInOneTool(ItemTier.DIAMOND)); - public static final RegistryObject NETHERITE_AIOT = ITEMS.register("netherite_aiot", () -> new AllInOneTool(ItemTier.NETHERITE)); + public static final RegistryObject WOODEN_AIOT = ITEMS.register("wooden_aiot", () -> new AllInOneTool(Tiers.WOOD)); + public static final RegistryObject STONE_AIOT = ITEMS.register("stone_aiot", () -> new AllInOneTool(Tiers.STONE)); + public static final RegistryObject IRON_AIOT = ITEMS.register("iron_aiot", () -> new AllInOneTool(Tiers.IRON)); + public static final RegistryObject GOLD_AIOT = ITEMS.register("gold_aiot", () -> new AllInOneTool(Tiers.GOLD)); + public static final RegistryObject DIAMOND_AIOT = ITEMS.register("diamond_aiot", () -> new AllInOneTool(Tiers.DIAMOND)); + public static final RegistryObject NETHERITE_AIOT = ITEMS.register("netherite_aiot", () -> new AllInOneTool(Tiers.NETHERITE)); public static final Set> SIMPLE_ITEMS = ImmutableSet.of( // Crystals diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java index 0102fcbb0..b9ee7439a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java @@ -1,27 +1,28 @@ package de.ellpeck.actuallyadditions.mod.items; -import com.google.common.collect.ImmutableSet; +import de.ellpeck.actuallyadditions.api.ActuallyTags; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.base.IActuallyItem; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.item.*; -import net.minecraft.util.ActionResultType; -import net.minecraftforge.common.ToolType; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.DiggerItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.Tier; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraftforge.common.ToolAction; +import net.minecraftforge.common.ToolActions; -public class AllInOneTool extends ToolItem implements IActuallyItem { - private final IItemTier tier; +public class AllInOneTool extends DiggerItem implements IActuallyItem { + private final Tier tier; - public AllInOneTool(IItemTier tier) { + public AllInOneTool(Tier tier) { super( 4.0f, -2f, tier, - ImmutableSet.of(), + ActuallyTags.Blocks.MINEABLE_WITH_AIO, new Properties() - .addToolType(ToolType.AXE, tier.getLevel()) - .addToolType(ToolType.HOE, tier.getLevel()) - .addToolType(ToolType.SHOVEL, tier.getLevel()) - .addToolType(ToolType.PICKAXE, tier.getLevel()) .durability(tier.getUses() * 4) .tab(ActuallyAdditions.GROUP) ); @@ -30,10 +31,17 @@ public class AllInOneTool extends ToolItem implements IActuallyItem { } @Override - public ActionResultType useOn(ItemUseContext context) { + public boolean canPerformAction(ItemStack stack, ToolAction toolAction) { + if (toolAction == ToolActions.AXE_DIG || toolAction == ToolActions.HOE_DIG || toolAction == ToolActions.PICKAXE_DIG || toolAction == ToolActions.SHOVEL_DIG) + return true; + return super.canPerformAction(stack, toolAction); + } + + @Override + public InteractionResult useOn(UseOnContext context) { // How, no idea, possible, most likely :cry: if (context.getPlayer() == null) { - return ActionResultType.FAIL; + return InteractionResult.FAIL; } // Player not sneaking? Act as a Hoe to the block, else, Act as a shovel diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/CanolaSeed.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/CanolaSeed.java index eb849511f..0cbe19040 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/CanolaSeed.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/CanolaSeed.java @@ -2,13 +2,13 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.FlowingFluidBlock; -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.fluid.Fluid; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.LiquidBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluid; public class CanolaSeed extends ItemBase { public boolean empowered; @@ -29,8 +29,8 @@ public class CanolaSeed extends ItemBase { BlockState state = entity.level.getBlockState(pos); Block block = state.getBlock(); - if (block instanceof FlowingFluidBlock && state.getFluidState().isSource()) { - Fluid fluid = ((FlowingFluidBlock) block).getFluid(); + if (block instanceof LiquidBlock && state.getFluidState().isSource()) { + Fluid fluid = ((LiquidBlock) block).getFluid(); if (fluid != null && fluid == (empowered ? InitFluids.CRYSTALLIZED_OIL.get() : InitFluids.REFINED_CANOLA_OIL.get())) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java index 766691b86..e6770fd4a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java @@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.items; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.Multimap; +import de.ellpeck.actuallyadditions.api.ActuallyTags; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; import de.ellpeck.actuallyadditions.mod.inventory.ContainerDrill; @@ -21,41 +22,69 @@ import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.block.material.Material; -import net.minecraft.enchantment.Enchantments; -import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.ai.attributes.Attribute; -import net.minecraft.entity.ai.attributes.AttributeModifier; -import net.minecraft.entity.ai.attributes.Attributes; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.inventory.EquipmentSlotType; -import net.minecraft.inventory.container.SimpleNamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemUseContext; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.*; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.tags.BlockTags; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.SimpleMenuProvider; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.ai.attributes.Attribute; +import net.minecraft.world.entity.ai.attributes.AttributeModifier; +import net.minecraft.world.entity.ai.attributes.Attributes; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Tier; +import net.minecraft.world.item.Tiers; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.item.enchantment.Enchantments; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; import net.minecraftforge.common.ForgeHooks; -import net.minecraftforge.common.ToolType; +import net.minecraftforge.common.ToolAction; +import net.minecraftforge.common.ToolActions; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandlerModifiable; -import javax.annotation.Nullable; - public class DrillItem extends ItemEnergy { public static final int HARVEST_LEVEL = 4; private static final int ENERGY_USE = 100; public DrillItem() { - super(ActuallyItems.defaultProps().defaultDurability(0).stacksTo(1).addToolType(ToolType.SHOVEL, HARVEST_LEVEL).addToolType(ToolType.PICKAXE, HARVEST_LEVEL), 250000, 1000); + super(ActuallyItems.defaultProps().defaultDurability(0).stacksTo(1), 250000, 1000); + } + + @Override + public boolean canPerformAction(ItemStack stack, ToolAction toolAction) { + if (toolAction == ToolActions.SHOVEL_DIG || toolAction == ToolActions.PICKAXE_DIG) + return true; + return super.canPerformAction(stack, toolAction); + } + + @Override + public boolean isCorrectToolForDrops(BlockState pBlock) { + Tier tier = Tiers.NETHERITE; //Use Nettherite as the tier as it has the same harvest level as the drill + if (net.minecraftforge.common.TierSortingRegistry.isTierSorted(tier)) { + return net.minecraftforge.common.TierSortingRegistry.isCorrectTierForDrops(tier, pBlock) && pBlock.is(ActuallyTags.Blocks.MINEABLE_WITH_DRILL); + } + if (HARVEST_LEVEL < 3 && pBlock.is(BlockTags.NEEDS_DIAMOND_TOOL)) { + return false; + } else if (HARVEST_LEVEL < 2 && pBlock.is(BlockTags.NEEDS_IRON_TOOL)) { + return false; + } else { + return HARVEST_LEVEL < 1 && pBlock.is(BlockTags.NEEDS_STONE_TOOL) ? false : pBlock.is(ActuallyTags.Blocks.MINEABLE_WITH_DRILL); + } } /** @@ -64,7 +93,7 @@ public class DrillItem extends ItemEnergy { * @param stack The Drill */ public static void loadSlotsFromNBT(IItemHandlerModifiable slots, ItemStack stack) { - CompoundNBT compound = stack.getOrCreateTag(); + CompoundTag compound = stack.getOrCreateTag(); TileEntityInventoryBase.loadSlots(slots, compound); } @@ -75,23 +104,23 @@ public class DrillItem extends ItemEnergy { * @param stack The Drill */ public static void writeSlotsToNBT(IItemHandler slots, ItemStack stack) { - CompoundNBT compound = stack.getOrCreateTag(); + CompoundTag compound = stack.getOrCreateTag(); TileEntityInventoryBase.saveSlots(slots, compound); stack.setTag(compound); } @Override - public ActionResultType useOn(ItemUseContext context) { - PlayerEntity player = context.getPlayer(); - Hand hand = context.getHand(); + public InteractionResult useOn(UseOnContext context) { + Player player = context.getPlayer(); + InteractionHand hand = context.getHand(); ItemStack stack = player.getItemInHand(hand); ItemStack upgrade = this.getHasUpgradeAsStack(stack, ItemDrillUpgrade.UpgradeType.PLACER); if (StackUtil.isValid(upgrade)) { int slot = ItemDrillUpgrade.getSlotToPlaceFrom(upgrade); if (slot >= 0 && slot < 9) { // TODO: validate... old = PlayerInventory.getHotbarSize(); new = 9 - ItemStack equip = player.inventory.getItem(slot); + ItemStack equip = player.getInventory().getItem(slot); if (StackUtil.isValid(equip) && equip != stack) { ItemStack toPlaceStack = equip.copy(); @@ -100,7 +129,7 @@ public class DrillItem extends ItemEnergy { //tryPlaceItemIntoWorld could throw an Exception try { //Places the Block into the World - if (toPlaceStack.useOn(context) != ActionResultType.FAIL) { + if (toPlaceStack.useOn(context) != InteractionResult.FAIL) { if (!player.isCreative()) { WorldUtil.setHandItemWithoutAnnoyingSound(player, hand, toPlaceStack.copy()); } @@ -111,10 +140,10 @@ public class DrillItem extends ItemEnergy { ActuallyAdditions.LOGGER.error("Player " + player.getName() + " who should place a Block using a Drill at " + player.getX() + ", " + player.getY() + ", " + player.getZ() + " in World " + context.getLevel().dimension() + " threw an Exception! Don't let that happen again!"); } - player.inventory.setItem(slot, player.getItemInHand(hand)); + player.getInventory().setItem(slot, player.getItemInHand(hand)); WorldUtil.setHandItemWithoutAnnoyingSound(player, hand, stack); - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } } } @@ -130,7 +159,7 @@ public class DrillItem extends ItemEnergy { * @return The Upgrade, if it's installed */ public ItemStack getHasUpgradeAsStack(ItemStack stack, ItemDrillUpgrade.UpgradeType upgrade) { - CompoundNBT compound = stack.getOrCreateTag(); + CompoundTag compound = stack.getOrCreateTag(); ItemStackHandlerAA inv = new ItemStackHandlerAA(ContainerDrill.SLOT_AMOUNT); loadSlotsFromNBT(inv, stack); @@ -146,30 +175,30 @@ public class DrillItem extends ItemEnergy { } @Override - public ActionResult use(World world, PlayerEntity player, Hand hand) { - if (!world.isClientSide && player.isShiftKeyDown() && hand == Hand.MAIN_HAND) { - player.openMenu(new SimpleNamedContainerProvider((id, inv, p) -> new ContainerDrill(id, inv), new StringTextComponent(""))); + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) { + if (!world.isClientSide && player.isShiftKeyDown() && hand == InteractionHand.MAIN_HAND) { + player.openMenu(new SimpleMenuProvider((id, inv, p) -> new ContainerDrill(id, inv), new TextComponent(""))); // player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.DRILL.ordinal(), world, (int) player.posX, (int) player.posY, (int) player.posZ); } - return new ActionResult<>(ActionResultType.PASS, player.getItemInHand(hand)); + return new InteractionResultHolder<>(InteractionResult.PASS, player.getItemInHand(hand)); } @Override - public ActionResultType interactLivingEntity(ItemStack stack, PlayerEntity player, LivingEntity entityHit, Hand hand) { + public InteractionResult interactLivingEntity(ItemStack stack, Player player, LivingEntity entityHit, InteractionHand hand) { int use = this.getEnergyUsePerBlock(stack); - if (!(entityHit instanceof PlayerEntity) || !((PlayerEntity) entityHit).isCreative()) { + if (!(entityHit instanceof Player) || !((Player) entityHit).isCreative()) { if (this.getEnergyStored(stack) >= use) { this.extractEnergyInternal(stack, use, false); } } - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } @Override - public Multimap getAttributeModifiers(EquipmentSlotType slot, ItemStack stack) { + public Multimap getAttributeModifiers(EquipmentSlot slot, ItemStack stack) { Multimap map = ArrayListMultimap.create(); - if (slot == EquipmentSlotType.MAINHAND) { + if (slot == EquipmentSlot.MAINHAND) { map.put(Attributes.ATTACK_DAMAGE, new AttributeModifier("Drill Modifier", this.getEnergyStored(stack) >= ENERGY_USE ? 8.0F : 0.1F, AttributeModifier.Operation.ADDITION)); @@ -182,15 +211,18 @@ public class DrillItem extends ItemEnergy { @Override public float getDestroySpeed(ItemStack stack, BlockState state) { + if(!state.is(ActuallyTags.Blocks.MINEABLE_WITH_DRILL)) + return 1.0F; + return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) - ? (this.hasExtraWhitelist(state.getBlock()) || state.getBlock().getHarvestTool(state) == null || state.getBlock().getHarvestTool(state) == ToolType.PICKAXE || state.getBlock().getHarvestTool(state) == ToolType.SHOVEL) + ? (this.hasExtraWhitelist(state.getBlock())) ? this.getEfficiencyFromUpgrade(stack) : 1.0F : 0.1F; } @Override - public boolean onBlockStartBreak(ItemStack stack, BlockPos pos, PlayerEntity player) { + public boolean onBlockStartBreak(ItemStack stack, BlockPos pos, Player player) { boolean toReturn = false; int use = this.getEnergyUsePerBlock(stack); if (this.getEnergyStored(stack) >= use) { @@ -206,9 +238,9 @@ public class DrillItem extends ItemEnergy { } //Block hit - RayTraceResult ray = WorldUtil.getNearestBlockWithDefaultReachDistance(player.level, player); - if (ray != null && ray.getType() == RayTraceResult.Type.BLOCK) { - BlockRayTraceResult trace = (BlockRayTraceResult) ray; + HitResult ray = WorldUtil.getNearestBlockWithDefaultReachDistance(player.level, player); + if (ray != null && ray.getType() == HitResult.Type.BLOCK) { + BlockHitResult trace = (BlockHitResult) ray; //Breaks the Blocks if (!player.isShiftKeyDown() && this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.THREE_BY_THREE)) { if (this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.FIVE_BY_FIVE)) { @@ -229,7 +261,7 @@ public class DrillItem extends ItemEnergy { } @Override - public boolean canHarvestBlock(ItemStack stack, BlockState state) { + public boolean isCorrectToolForDrops(ItemStack stack, BlockState state) { Block block = state.getBlock(); return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) && (this.hasExtraWhitelist(block) || state.getMaterial().isReplaceable() || block == Blocks.SNOW_BLOCK || block == Blocks.SNOW || (block == Blocks.OBSIDIAN ? HARVEST_LEVEL >= 3 @@ -248,10 +280,10 @@ public class DrillItem extends ItemEnergy { : HARVEST_LEVEL >= 2)); } - @Override - public int getHarvestLevel(ItemStack stack, ToolType p_getHarvestLevel_2_, @Nullable PlayerEntity p_getHarvestLevel_3_, @Nullable BlockState p_getHarvestLevel_4_) { - return HARVEST_LEVEL; - } +// @Override +// public int getHarvestLevel(ItemStack stack, ToolType p_getHarvestLevel_2_, @Nullable Player p_getHarvestLevel_3_, @Nullable BlockState p_getHarvestLevel_4_) { +// return HARVEST_LEVEL; +// } /** * Gets the Energy that is used per Block broken @@ -365,7 +397,7 @@ public class DrillItem extends ItemEnergy { * @param world The World * @param player The Player who breaks the Blocks */ - public boolean breakBlocks(ItemStack stack, int radius, World world, BlockPos aPos, Direction side, PlayerEntity player) { + public boolean breakBlocks(ItemStack stack, int radius, Level world, BlockPos aPos, Direction side, Player player) { int xRange = radius; int yRange = radius; int zRange = 0; @@ -437,12 +469,13 @@ public class DrillItem extends ItemEnergy { * @param player The Player breaking the Blocks * @param use The Energy that should be extracted per Block */ - private boolean tryHarvestBlock(World world, BlockPos pos, boolean isExtra, ItemStack stack, PlayerEntity player, int use) { + private boolean tryHarvestBlock(Level world, BlockPos pos, boolean isExtra, ItemStack stack, Player player, int use) { BlockState state = world.getBlockState(pos); Block block = state.getBlock(); float hardness = state.getDestroySpeed(world, pos); - boolean canHarvest = (ForgeHooks.canHarvestBlock(state, player, world, pos) || this.canHarvestBlock(stack, state)) && (!isExtra || this.getDestroySpeed(stack, world.getBlockState(pos)) > 1.0F); - if (hardness >= 0.0F && (!isExtra || canHarvest && !block.hasTileEntity(world.getBlockState(pos)))) { + + boolean canHarvest = (ForgeHooks.isCorrectToolForDrops(state, player) || this.isCorrectToolForDrops(stack, state)) && (!isExtra || this.getDestroySpeed(stack, world.getBlockState(pos)) > 1.0F); + if (hardness >= 0.0F && (!isExtra || canHarvest && !state.hasBlockEntity())) { if (!player.isCreative()) { this.extractEnergyInternal(stack, use, false); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java index 8fb3ba4fe..3c8abd813 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java @@ -12,23 +12,22 @@ package de.ellpeck.actuallyadditions.mod.items; import com.google.common.collect.ImmutableSet; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.item.IItemTier; -import net.minecraft.item.ToolItem; -import net.minecraftforge.common.ToolType; +import net.minecraft.world.item.DiggerItem; +import net.minecraft.world.item.Tier; -public class ItemAxeAA extends ToolItem { - private IItemTier tier; - public ItemAxeAA(IItemTier tier) { +public class ItemAxeAA extends DiggerItem { + private Tier tier; + public ItemAxeAA(Tier tier) { super( 4.0f, -2f, tier, - ImmutableSet.of(), + null, //Feed block tags here new Properties() - .addToolType(ToolType.AXE, tier.getLevel()) - .addToolType(ToolType.HOE, tier.getLevel()) - .addToolType(ToolType.SHOVEL, tier.getLevel()) - .addToolType(ToolType.PICKAXE, tier.getLevel()) +// .addToolType(ToolType.AXE, tier.getLevel()) +// .addToolType(ToolType.HOE, tier.getLevel()) +// .addToolType(ToolType.SHOVEL, tier.getLevel()) +// .addToolType(ToolType.PICKAXE, tier.getLevel()) .durability(tier.getUses() * 4) .tab(ActuallyAdditions.GROUP) ); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java index 991885a40..6ff3c9541 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java @@ -12,15 +12,15 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; -import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.Hand; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.World; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.level.Level; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.LazyOptional; @@ -43,11 +43,11 @@ public class ItemBattery extends ItemEnergy { } @Override - public void inventoryTick(@Nonnull ItemStack stack, World world, @Nonnull Entity entity, int itemSlot, boolean isSelected) { - if (!world.isClientSide && entity instanceof PlayerEntity && ItemUtil.isEnabled(stack) && !isSelected) { - PlayerEntity player = (PlayerEntity) entity; - for (int i = 0; i < player.inventory.getContainerSize(); i++) { - ItemStack slot = player.inventory.getItem(i); + public void inventoryTick(@Nonnull ItemStack stack, Level world, @Nonnull Entity entity, int itemSlot, boolean isSelected) { + if (!world.isClientSide && entity instanceof Player && ItemUtil.isEnabled(stack) && !isSelected) { + Player player = (Player) entity; + for (int i = 0; i < player.getInventory().getContainerSize(); i++) { + ItemStack slot = player.getInventory().getItem(i); if (!slot.isEmpty() && slot.getCount() == 1) { LazyOptional energy = slot.getCapability(CapabilityEnergy.ENERGY); energy.ifPresent(cap -> { @@ -65,21 +65,21 @@ public class ItemBattery extends ItemEnergy { @Nonnull @Override - public ActionResult use(World worldIn, @Nonnull PlayerEntity player, @Nonnull Hand hand) { + public InteractionResultHolder use(Level worldIn, @Nonnull Player player, @Nonnull InteractionHand hand) { if (!worldIn.isClientSide && player.isShiftKeyDown()) { ItemUtil.changeEnabled(player, hand); - return ActionResult.success(player.getItemInHand(hand)); + return InteractionResultHolder.success(player.getItemInHand(hand)); } return super.use(worldIn, player, hand); } @OnlyIn(Dist.CLIENT) @Override - public void appendHoverText(ItemStack stack, @Nullable World playerIn, List list, ITooltipFlag advanced) { + public void appendHoverText(ItemStack stack, @Nullable Level playerIn, List list, TooltipFlag advanced) { super.appendHoverText(stack, playerIn, list, advanced); - list.add(new TranslationTextComponent("tooltip.actuallyadditions.battery." + (ItemUtil.isEnabled(stack) + list.add(new TranslatableComponent("tooltip.actuallyadditions.battery." + (ItemUtil.isEnabled(stack) ? "discharge" : "noDischarge"))); - list.add(new TranslationTextComponent("tooltip.actuallyadditions.battery.changeMode")); + list.add(new TranslatableComponent("tooltip.actuallyadditions.battery.changeMode")); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java index 60db40c14..f999e1063 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java @@ -10,30 +10,30 @@ package de.ellpeck.actuallyadditions.mod.items; -import com.mojang.blaze3d.matrix.MatrixStack; +import com.mojang.blaze3d.platform.Window; +import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.IHudDisplay; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; +import net.minecraft.ChatFormatting; import net.minecraft.advancements.Advancement; -import net.minecraft.advancements.AdvancementManager; -import net.minecraft.advancements.PlayerAdvancements; -import net.minecraft.client.MainWindow; import net.minecraft.client.Minecraft; -import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemUseContext; -import net.minecraft.util.ActionResult; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.World; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.PlayerAdvancements; +import net.minecraft.server.ServerAdvancementManager; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.phys.HitResult; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -50,7 +50,7 @@ public class ItemBooklet extends ItemBase implements IHudDisplay { } @Override - public ActionResultType useOn(ItemUseContext context) { + public InteractionResult useOn(UseOnContext context) { // if (context.getPlayer().isShiftKeyDown()) { // BlockState state = context.getLevel().getBlockState(context.getClickedPos()); // Block block = state.getBlock(); @@ -64,15 +64,15 @@ public class ItemBooklet extends ItemBase implements IHudDisplay { // return ActionResultType.SUCCESS; // } // } - return ActionResultType.FAIL; + return InteractionResult.FAIL; } @Override - public ActionResult use(World world, PlayerEntity player, Hand hand) { + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) { if (!world.isClientSide) { - ServerPlayerEntity serverPlayer = (ServerPlayerEntity) player; + ServerPlayer serverPlayer = (ServerPlayer) player; PlayerAdvancements advancements = serverPlayer.getAdvancements(); - AdvancementManager manager = player.getServer().getAdvancements(); + ServerAdvancementManager manager = player.getServer().getAdvancements(); Advancement advancement = manager.getAdvancement(new ResourceLocation(ActuallyAdditions.MODID, "root")); if (advancement != null && !advancements.getOrStartProgress(advancement).isDone()) { advancements.award(advancement, "right_click"); @@ -84,27 +84,27 @@ public class ItemBooklet extends ItemBase implements IHudDisplay { // //TheAchievements.OPEN_BOOKLET.get(player); // //TheAchievements.OPEN_BOOKLET_MILESTONE.get(player); // } - return ActionResult.success(player.getItemInHand(hand)); + return InteractionResultHolder.success(player.getItemInHand(hand)); } @OnlyIn(Dist.CLIENT) @Override - public void appendHoverText(ItemStack stack, @Nullable World playerIn, List tooltip, ITooltipFlag advanced) { - tooltip.add(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + "." + this.getDescription().getString() + ".desc")); + public void appendHoverText(ItemStack stack, @Nullable Level playerIn, List tooltip, TooltipFlag advanced) { + tooltip.add(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + "." + this.getDescription().getString() + ".desc")); // TODO: this is bad for (int i = 1; i <= 4; i++) { - tooltip.add(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + "." + this.getDescription().getString() + ".sub." + i).withStyle(i == 4 - ? TextFormatting.GOLD - : TextFormatting.RESET).withStyle(i == 4 - ? TextFormatting.ITALIC - : TextFormatting.RESET)); + tooltip.add(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + "." + this.getDescription().getString() + ".sub." + i).withStyle(i == 4 + ? ChatFormatting.GOLD + : ChatFormatting.RESET).withStyle(i == 4 + ? ChatFormatting.ITALIC + : ChatFormatting.RESET)); } } @Override @OnlyIn(Dist.CLIENT) - public void displayHud(MatrixStack matrices, Minecraft minecraft, PlayerEntity player, ItemStack stack, RayTraceResult rayCast, MainWindow resolution) { + public void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { // if (rayCast != null && rayCast.getBlockPos() != null) { // BlockState state = minecraft.level.getBlockState(rayCast.getBlockPos()); // Block block = state.getBlock(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java index d928c7a88..4327b72ba 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCoffee.java @@ -15,17 +15,17 @@ import de.ellpeck.actuallyadditions.api.recipe.CoffeeIngredient; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.base.ItemFoodBase; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; -import net.minecraft.client.resources.I18n; -import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.entity.LivingEntity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.world.World; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.level.Level; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.ModList; @@ -83,7 +83,7 @@ public class ItemCoffee extends ItemFoodBase { } //@Override - public ItemStack onItemUseFinish(ItemStack stack, World world, LivingEntity player) { + public ItemStack onItemUseFinish(ItemStack stack, Level world, LivingEntity player) { ItemStack theStack = stack.copy(); super.finishUsingItem(stack, world, player); applyPotionEffectsFromStack(stack, player); @@ -103,13 +103,13 @@ public class ItemCoffee extends ItemFoodBase { @Nullable @Override - public CompoundNBT getShareTag(ItemStack stack) { + public CompoundTag getShareTag(ItemStack stack) { return super.getShareTag(stack); } @OnlyIn(Dist.CLIENT) @Override - public void appendHoverText(ItemStack stack, @Nullable World playerIn, List tooltip, ITooltipFlag advanced) { + public void appendHoverText(ItemStack stack, @Nullable Level playerIn, List tooltip, TooltipFlag advanced) { //PotionEffect[] effects = ActuallyAdditionsAPI.methodHandler.getEffectsFromStack(stack); //if (effects != null) { // for (PotionEffect effect : effects) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java index af73bd707..698e271b1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java @@ -11,23 +11,23 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.inventory.container.SimpleNamedContainerProvider; -import net.minecraft.inventory.container.WorkbenchContainer; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.World; -import net.minecraftforge.fml.network.NetworkHooks; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.SimpleMenuProvider; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.CraftingMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraftforge.network.NetworkHooks; import javax.annotation.Nonnull; public class ItemCrafterOnAStick extends ItemBase { - private static final ITextComponent CONTAINER_TITLE = new TranslationTextComponent("container.crafting"); + private static final Component CONTAINER_TITLE = new TranslatableComponent("container.crafting"); public ItemCrafterOnAStick() { super(ActuallyItems.defaultNonStacking()); @@ -35,10 +35,10 @@ public class ItemCrafterOnAStick extends ItemBase { @Nonnull @Override - public ActionResult use(World world, @Nonnull PlayerEntity player, @Nonnull Hand hand) { + public InteractionResultHolder use(Level world, @Nonnull Player player, @Nonnull InteractionHand hand) { if (!world.isClientSide) { - NetworkHooks.openGui((ServerPlayerEntity) player, new SimpleNamedContainerProvider((windowId, playerInventory, playerEntity) -> new WorkbenchContainer(windowId, playerInventory), CONTAINER_TITLE)); + NetworkHooks.openGui((ServerPlayer) player, new SimpleMenuProvider((windowId, playerInventory, playerEntity) -> new CraftingMenu(windowId, playerInventory), CONTAINER_TITLE)); } - return new ActionResult<>(ActionResultType.SUCCESS, player.getItemInHand(hand)); + return new InteractionResultHolder<>(InteractionResult.SUCCESS, player.getItemInHand(hand)); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java index 32deb7557..34871348b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrystal.java @@ -11,7 +11,7 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import net.minecraft.item.ItemStack; +import net.minecraft.world.item.ItemStack; public class ItemCrystal extends ItemBase { private final boolean isEmpowered; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrillUpgrade.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrillUpgrade.java index 3a54306b0..872ef13f4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrillUpgrade.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemDrillUpgrade.java @@ -11,13 +11,13 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.ActionResult; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.world.World; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; public class ItemDrillUpgrade extends ItemBase { @@ -29,7 +29,7 @@ public class ItemDrillUpgrade extends ItemBase { } public static int getSlotToPlaceFrom(ItemStack stack) { - CompoundNBT compound = stack.getTag(); + CompoundTag compound = stack.getTag(); if (compound != null) { return compound.getInt("SlotToPlaceFrom") - 1; } @@ -37,17 +37,17 @@ public class ItemDrillUpgrade extends ItemBase { } @Override - public ActionResult use(World world, PlayerEntity player, Hand hand) { + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) { ItemStack stack = player.getItemInHand(hand); if (!world.isClientSide && this.type == UpgradeType.PLACER) { - this.setSlotToPlaceFrom(stack, player.inventory.selected); - return new ActionResult<>(ActionResultType.SUCCESS, stack); + this.setSlotToPlaceFrom(stack, player.getInventory().selected); + return new InteractionResultHolder<>(InteractionResult.SUCCESS, stack); } - return new ActionResult<>(ActionResultType.FAIL, stack); + return new InteractionResultHolder<>(InteractionResult.FAIL, stack); } public void setSlotToPlaceFrom(ItemStack stack, int slot) { - CompoundNBT compound = stack.getOrCreateTag(); + CompoundTag compound = stack.getOrCreateTag(); compound.putInt("SlotToPlaceFrom", slot + 1); stack.setTag(compound); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemEngineerGoggles.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemEngineerGoggles.java index da9c7121d..d80338dc7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemEngineerGoggles.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemEngineerGoggles.java @@ -13,15 +13,14 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.api.misc.IGoggles; import de.ellpeck.actuallyadditions.mod.items.base.ItemArmorAA; import de.ellpeck.actuallyadditions.mod.material.ArmorMaterials; -import de.ellpeck.actuallyadditions.mod.proxy.ClientProxy; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import io.netty.util.internal.ConcurrentSet; import net.minecraft.client.Minecraft; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.inventory.EquipmentSlotType; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.phys.AABB; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.MinecraftForge; @@ -39,27 +38,27 @@ public class ItemEngineerGoggles extends ItemArmorAA implements IGoggles { private final boolean displayMobs; public ItemEngineerGoggles(boolean displayMobs) { - super(ArmorMaterials.GOGGLES, EquipmentSlotType.HEAD, ActuallyItems.defaultProps().setNoRepair().durability(0)); + super(ArmorMaterials.GOGGLES, EquipmentSlot.HEAD, ActuallyItems.defaultProps().setNoRepair().durability(0)); this.displayMobs = displayMobs; DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> MinecraftForge.EVENT_BUS.register(this)); } - public static boolean isWearing(PlayerEntity player) { - ItemStack face = player.inventory.armor.get(3); + public static boolean isWearing(Player player) { + ItemStack face = player.getInventory().armor.get(3); return StackUtil.isValid(face) && face.getItem() instanceof IGoggles; } @OnlyIn(Dist.CLIENT) @SubscribeEvent public void onClientTick(TickEvent.ClientTickEvent event) { - PlayerEntity player = Minecraft.getInstance().player; + Player player = Minecraft.getInstance().player; if (player != null && isWearing(player)) { - ItemStack face = player.inventory.armor.get(3); + ItemStack face = player.getInventory().armor.get(3); if (((IGoggles) face.getItem()).displaySpectralMobs()) { double range = 8; - AxisAlignedBB aabb = new AxisAlignedBB(player.getX() - range, player.getY() - range, player.getZ() - range, player.getX() + range, player.getY() + range, player.getZ() + range); + AABB aabb = new AABB(player.getX() - range, player.getY() - range, player.getZ() - range, player.getX() + range, player.getY() + range, player.getZ() + range); List entities = player.level.getEntitiesOfClass(Entity.class, aabb); if (entities != null && !entities.isEmpty()) { this.cachedGlowingEntities.addAll(entities); @@ -68,11 +67,11 @@ public class ItemEngineerGoggles extends ItemArmorAA implements IGoggles { if (!this.cachedGlowingEntities.isEmpty()) { for (Entity entity : this.cachedGlowingEntities) { if (!entity.isAlive() || entity.distanceToSqr(player.getX(), player.getY(), player.getZ()) > range * range) { - entity.setGlowing(false); + entity.setGlowingTag(false); this.cachedGlowingEntities.remove(entity); } else { - entity.setGlowing(true); + entity.setGlowingTag(true); } } } @@ -84,7 +83,7 @@ public class ItemEngineerGoggles extends ItemArmorAA implements IGoggles { if (!this.cachedGlowingEntities.isEmpty()) { for (Entity entity : this.cachedGlowingEntities) { if (entity.isAlive()) { - entity.setGlowing(false); + entity.setGlowingTag(false); } } this.cachedGlowingEntities.clear(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFertilizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFertilizer.java index 83bf67843..6930e2802 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFertilizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFertilizer.java @@ -12,11 +12,11 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.misc.DispenserHandlerFertilize; -import net.minecraft.block.DispenserBlock; -import net.minecraft.item.BoneMealItem; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemUseContext; -import net.minecraft.util.ActionResultType; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.BoneMealItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.block.DispenserBlock; public class ItemFertilizer extends ItemBase { @@ -27,13 +27,13 @@ public class ItemFertilizer extends ItemBase { } @Override - public ActionResultType useOn(ItemUseContext context) { + public InteractionResult useOn(UseOnContext context) { ItemStack stack = context.getPlayer().getItemInHand(context.getHand()); if (BoneMealItem.applyBonemeal(stack, context.getLevel(), context.getClickedPos(), context.getPlayer())) { if (!context.getLevel().isClientSide) { context.getLevel().levelEvent(2005, context.getClickedPos(), 0); } - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } return super.useOn(context); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFillingWand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFillingWand.java index ee795af67..f6f6eb2ed 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFillingWand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFillingWand.java @@ -13,26 +13,26 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.SoundType; -import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.entity.Entity; -import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemUseContext; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.nbt.NBTUtil; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.text.IFormattableTextComponent; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.NbtUtils; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.MutableComponent; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.SoundType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -46,17 +46,17 @@ public class ItemFillingWand extends ItemEnergy { super(500000, 1000); } - private static boolean removeFittingItem(BlockState state, PlayerEntity player) { + private static boolean removeFittingItem(BlockState state, Player player) { Block block = state.getBlock(); ItemStack stack = new ItemStack(block, 1); if (StackUtil.isValid(stack)) { - for (int i = 0; i < player.inventory.getContainerSize(); i++) { - ItemStack slot = player.inventory.getItem(i); + for (int i = 0; i < player.getInventory().getContainerSize(); i++) { + ItemStack slot = player.getInventory().getItem(i); if (StackUtil.isValid(slot) && slot.sameItem(stack)) { slot.shrink(1); if (!StackUtil.isValid(slot)) { - player.inventory.setItem(i, ItemStack.EMPTY); + player.getInventory().setItem(i, ItemStack.EMPTY); } return true; @@ -68,21 +68,21 @@ public class ItemFillingWand extends ItemEnergy { } private static void saveData(BlockState state, ItemStack wand) { - wand.getOrCreateTag().put("state", NBTUtil.writeBlockState(state)); + wand.getOrCreateTag().put("state", NbtUtils.writeBlockState(state)); } private static Optional loadData(ItemStack stack) { if (stack.getOrCreateTag().contains("state")) { - return Optional.of(NBTUtil.readBlockState(stack.getOrCreateTag().getCompound("state"))); + return Optional.of(NbtUtils.readBlockState(stack.getOrCreateTag().getCompound("state"))); } return Optional.empty(); } @Override - public ActionResultType useOn(ItemUseContext context) { + public InteractionResult useOn(UseOnContext context) { if (context.getPlayer() == null) { - return ActionResultType.PASS; + return InteractionResult.PASS; } ItemStack stack = context.getPlayer().getItemInHand(context.getHand()); @@ -90,9 +90,9 @@ public class ItemFillingWand extends ItemEnergy { if (context.getPlayer().isCrouching()) { BlockState state = context.getLevel().getBlockState(context.getClickedPos()); saveData(state, stack); - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } else if (loadData(stack).isPresent()) { - CompoundNBT compound = stack.getOrCreateTag(); + CompoundTag compound = stack.getOrCreateTag(); if (compound.getInt("CurrX") == 0 && compound.getInt("CurrY") == 0 && compound.getInt("CurrZ") == 0) { compound.putInt("FirstX", context.getClickedPos().getX()); @@ -100,7 +100,7 @@ public class ItemFillingWand extends ItemEnergy { compound.putInt("FirstZ", context.getClickedPos().getZ()); context.getPlayer().startUsingItem(context.getHand()); - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } } } @@ -108,15 +108,15 @@ public class ItemFillingWand extends ItemEnergy { } @Override - public void releaseUsing(ItemStack stack, World world, LivingEntity entity, int timeLeft) { + public void releaseUsing(ItemStack stack, Level world, LivingEntity entity, int timeLeft) { if (!world.isClientSide) { boolean clear = true; - if (entity instanceof PlayerEntity) { - RayTraceResult result = WorldUtil.getNearestBlockWithDefaultReachDistance(world, (PlayerEntity) entity); - if (result instanceof BlockRayTraceResult) { - CompoundNBT compound = stack.getOrCreateTag(); + if (entity instanceof Player) { + HitResult result = WorldUtil.getNearestBlockWithDefaultReachDistance(world, (Player) entity); + if (result instanceof BlockHitResult) { + CompoundTag compound = stack.getOrCreateTag(); - BlockPos pos = ((BlockRayTraceResult) result).getBlockPos(); + BlockPos pos = ((BlockHitResult) result).getBlockPos(); compound.putInt("SecondX", pos.getX()); compound.putInt("SecondY", pos.getY()); compound.putInt("SecondZ", pos.getZ()); @@ -134,7 +134,7 @@ public class ItemFillingWand extends ItemEnergy { } @Override - public void inventoryTick(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) { + public void inventoryTick(ItemStack stack, Level world, Entity entity, int itemSlot, boolean isSelected) { super.inventoryTick(stack, world, entity, itemSlot, isSelected); @@ -142,11 +142,11 @@ public class ItemFillingWand extends ItemEnergy { boolean shouldClear = false; if (isSelected) { - if (entity instanceof PlayerEntity && stack.hasTag()) { - PlayerEntity player = (PlayerEntity) entity; + if (entity instanceof Player && stack.hasTag()) { + Player player = (Player) entity; boolean creative = player.isCreative(); - CompoundNBT compound = stack.getOrCreateTag(); + CompoundTag compound = stack.getOrCreateTag(); BlockPos firstPos = new BlockPos(compound.getInt("FirstX"), compound.getInt("FirstY"), compound.getInt("FirstZ")); BlockPos secondPos = new BlockPos(compound.getInt("SecondX"), compound.getInt("SecondY"), compound.getInt("SecondZ")); @@ -173,7 +173,7 @@ public class ItemFillingWand extends ItemEnergy { world.setBlock(pos, replaceState, 2); SoundType sound = replaceState.getBlock().getSoundType(replaceState, world, pos, player); - world.playSound(null, pos, sound.getPlaceSound(), SoundCategory.BLOCKS, sound.getVolume() / 2F + .5F, sound.getPitch() * 0.8F); + world.playSound(null, pos, sound.getPlaceSound(), SoundSource.BLOCKS, sound.getVolume() / 2F + .5F, sound.getPitch() * 0.8F); if (!creative) { this.extractEnergyInternal(stack, energyUse, false); @@ -222,14 +222,14 @@ public class ItemFillingWand extends ItemEnergy { @OnlyIn(Dist.CLIENT) @Override - public void appendHoverText(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) { + public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List tooltip, TooltipFlag flagIn) { super.appendHoverText(stack, worldIn, tooltip, flagIn); - IFormattableTextComponent display = loadData(stack) + MutableComponent display = loadData(stack) .map(state -> state.getBlock().getName()) - .orElse(new TranslationTextComponent("tooltip.actuallyadditions.item_filling_wand.selected_block.none")); + .orElse(new TranslatableComponent("tooltip.actuallyadditions.item_filling_wand.selected_block.none")); - tooltip.add(new TranslationTextComponent("tooltip.actuallyadditions.item_filling_wand.selected_block", display.getString())); + tooltip.add(new TranslatableComponent("tooltip.actuallyadditions.item_filling_wand.selected_block", display.getString())); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFilter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFilter.java index 83c82d927..80f40ce8f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFilter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFilter.java @@ -14,19 +14,19 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerFilter; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.inventory.container.SimpleNamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.Hand; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.world.World; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.SimpleMenuProvider; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.level.Level; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.fml.network.NetworkHooks; +import net.minecraftforge.network.NetworkHooks; import javax.annotation.Nullable; import java.util.List; @@ -38,17 +38,17 @@ public class ItemFilter extends ItemBase { } @Override - public ActionResult use(World world, PlayerEntity player, Hand hand) { - if (!world.isClientSide && hand == Hand.MAIN_HAND) { - NetworkHooks.openGui((ServerPlayerEntity) player, new SimpleNamedContainerProvider((windowId, inv, playerEnt) -> new ContainerFilter(windowId, inv), StringTextComponent.EMPTY)); + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) { + if (!world.isClientSide && hand == InteractionHand.MAIN_HAND) { + NetworkHooks.openGui((ServerPlayer) player, new SimpleMenuProvider((windowId, inv, playerEnt) -> new ContainerFilter(windowId, inv), TextComponent.EMPTY)); // player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.FILTER.ordinal(), world, (int) player.posX, (int) player.posY, (int) player.posZ); } - return ActionResult.pass(player.getItemInHand(hand)); + return InteractionResultHolder.pass(player.getItemInHand(hand)); } @OnlyIn(Dist.CLIENT) @Override - public void appendHoverText(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) { + public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List tooltip, TooltipFlag flagIn) { super.appendHoverText(stack, worldIn, tooltip, flagIn); ItemStackHandlerAA inv = new ItemStackHandlerAA(ContainerFilter.SLOT_AMOUNT); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGeneric.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGeneric.java index a09850bd2..0c181f518 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGeneric.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGeneric.java @@ -12,8 +12,6 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import net.minecraft.item.Item.Properties; - public class ItemGeneric extends ItemBase { public ItemGeneric(Properties props) { super(props.durability(0)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java index 2154d9ed3..e898f5524 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java @@ -12,17 +12,17 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.GrassBlock; -import net.minecraft.block.IGrowable; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.Mth; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.BonemealableBlock; +import net.minecraft.world.level.block.GrassBlock; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.IPlantable; import java.util.ArrayList; @@ -35,12 +35,12 @@ public class ItemGrowthRing extends ItemEnergy { } @Override - public void inventoryTick(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) { - if (!(entity instanceof PlayerEntity) || world.isClientSide || entity.isShiftKeyDown()) { + public void inventoryTick(ItemStack stack, Level world, Entity entity, int itemSlot, boolean isSelected) { + if (!(entity instanceof Player) || world.isClientSide || entity.isShiftKeyDown()) { return; } - PlayerEntity player = (PlayerEntity) entity; + Player player = (Player) entity; ItemStack equipped = player.getMainHandItem(); int energyUse = 300; @@ -53,12 +53,12 @@ public class ItemGrowthRing extends ItemEnergy { for (int x = -range; x < range + 1; x++) { for (int z = -range; z < range + 1; z++) { for (int y = -range; y < range + 1; y++) { - int theX = MathHelper.floor(player.getX() + x); - int theY = MathHelper.floor(player.getY() + y); - int theZ = MathHelper.floor(player.getZ() + z); + int theX = Mth.floor(player.getX() + x); + int theY = Mth.floor(player.getY() + y); + int theZ = Mth.floor(player.getZ() + z); BlockPos posInQuestion = new BlockPos(theX, theY, theZ); Block theBlock = world.getBlockState(posInQuestion).getBlock(); - if ((theBlock instanceof IGrowable || theBlock instanceof IPlantable) && !(theBlock instanceof GrassBlock)) { + if ((theBlock instanceof BonemealableBlock || theBlock instanceof IPlantable) && !(theBlock instanceof GrassBlock)) { blocks.add(posInQuestion); } } @@ -72,7 +72,7 @@ public class ItemGrowthRing extends ItemEnergy { BlockPos pos = blocks.get(world.random.nextInt(blocks.size())); BlockState state = world.getBlockState(pos); - state.randomTick((ServerWorld) world, pos, world.random); + state.randomTick((ServerLevel) world, pos, world.random); //Show Particles if Metadata changed BlockState newState = world.getBlockState(pos); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java index 0f7b45293..e1048a25e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java @@ -14,18 +14,18 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; -import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemUseContext; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.World; +import net.minecraft.ChatFormatting; +import net.minecraft.core.BlockPos; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -38,23 +38,23 @@ public class ItemLaserWrench extends ItemBase { } @Override - public ActionResultType useOn(ItemUseContext context) { + public InteractionResult useOn(UseOnContext context) { BlockPos pos = context.getClickedPos(); - World world = context.getLevel(); - PlayerEntity player = context.getPlayer(); + Level world = context.getLevel(); + Player player = context.getPlayer(); ItemStack stack = player.getItemInHand(context.getHand()); - TileEntity tile = world.getBlockEntity(pos); + BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityLaserRelay) { TileEntityLaserRelay relay = (TileEntityLaserRelay) tile; if (!world.isClientSide) { if (ItemPhantomConnector.getStoredPosition(stack) == null) { ItemPhantomConnector.storeConnection(stack, pos.getX(), pos.getY(), pos.getZ(), world); - player.displayClientMessage(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + ".laser.stored.desc"), true); + player.displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".laser.stored.desc"), true); } else { BlockPos savedPos = ItemPhantomConnector.getStoredPosition(stack); if (savedPos != null) { - TileEntity savedTile = world.getBlockEntity(savedPos); + BlockEntity savedTile = world.getBlockEntity(savedPos); if (savedTile instanceof TileEntityLaserRelay) { int distanceSq = (int) savedPos.distSqr(pos); TileEntityLaserRelay savedRelay = (TileEntityLaserRelay) savedTile; @@ -67,20 +67,20 @@ public class ItemLaserWrench extends ItemBase { ((TileEntityLaserRelay) savedTile).sendUpdate(); relay.sendUpdate(); - player.displayClientMessage(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + ".laser.connected.desc"), true); + player.displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".laser.connected.desc"), true); - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } } - player.displayClientMessage(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + ".laser.cantConnect.desc"), false); + player.displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".laser.cantConnect.desc"), false); ItemPhantomConnector.clearStorage(stack, "XCoordOfTileStored", "YCoordOfTileStored", "ZCoordOfTileStored", "WorldOfTileStored"); } } } - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } - return ActionResultType.FAIL; + return InteractionResult.FAIL; } // // TODO: [port] ensure this is correct @@ -92,14 +92,14 @@ public class ItemLaserWrench extends ItemBase { @OnlyIn(Dist.CLIENT) @Override - public void appendHoverText(ItemStack stack, World playerIn, List list, ITooltipFlag advanced) { + public void appendHoverText(ItemStack stack, Level playerIn, List list, TooltipFlag advanced) { BlockPos coords = ItemPhantomConnector.getStoredPosition(stack); if (coords != null) { - list.add(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + ".boundTo.desc").append(":")); - list.add(new StringTextComponent("X: " + coords.getX())); - list.add(new StringTextComponent("Y: " + coords.getY())); - list.add(new StringTextComponent("Z: " + coords.getZ())); - list.add(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + ".clearStorage.desc").withStyle(TextFormatting.ITALIC)); + list.add(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".boundTo.desc").append(":")); + list.add(new TextComponent("X: " + coords.getX())); + list.add(new TextComponent("Y: " + coords.getY())); + list.add(new TextComponent("Z: " + coords.getZ())); + list.add(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".clearStorage.desc").withStyle(ChatFormatting.ITALIC)); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java index efa530814..519ee179c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java @@ -12,19 +12,23 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.api.misc.IDisplayStandItem; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import net.minecraft.block.*; -import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.item.UseAction; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResult; -import net.minecraft.util.Hand; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.SoundEvents; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.util.Mth; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.UseAnim; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.BushBlock; +import net.minecraft.world.level.block.LeavesBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.IForgeShearable; import javax.annotation.Nonnull; @@ -42,15 +46,15 @@ public class ItemLeafBlower extends ItemBase implements IDisplayStandItem { @Nonnull @Override - public ActionResult use(@Nonnull World world, PlayerEntity player, @Nonnull Hand hand) { + public InteractionResultHolder use(@Nonnull Level world, Player player, @Nonnull InteractionHand hand) { player.startUsingItem(hand); - return ActionResult.success(player.getItemInHand(hand)); + return InteractionResultHolder.success(player.getItemInHand(hand)); } @Nonnull @Override - public UseAction getUseAnimation(@Nonnull ItemStack stack) { - return UseAction.BOW; + public UseAnim getUseAnimation(@Nonnull ItemStack stack) { + return UseAnim.BOW; } @Override @@ -60,16 +64,16 @@ public class ItemLeafBlower extends ItemBase implements IDisplayStandItem { @Override public void onUsingTick(ItemStack stack, LivingEntity player, int count) { - this.doUpdate(player.level, MathHelper.floor(player.getX()), MathHelper.floor(player.getY()), MathHelper.floor(player.getZ()), count, stack); + this.doUpdate(player.level, Mth.floor(player.getX()), Mth.floor(player.getY()), Mth.floor(player.getZ()), count, stack); } - private boolean doUpdate(World world, int x, int y, int z, int time, ItemStack stack) { + private boolean doUpdate(Level world, int x, int y, int z, int time, ItemStack stack) { if (!world.isClientSide) { if (time <= this.getUseDuration(stack) && (this.isAdvanced || time % 3 == 0)) { //Breaks the Blocks boolean broke = this.breakStuff(world, x, y, z); //Plays a Minecart sounds (It really sounds like a Leaf Blower!) - world.playSound(null, x, y, z, SoundEvents.MINECART_RIDING, SoundCategory.PLAYERS, 0.2F, 0.001F); + world.playSound(null, x, y, z, SoundEvents.MINECART_RIDING, SoundSource.PLAYERS, 0.2F, 0.001F); return broke; } } @@ -84,7 +88,7 @@ public class ItemLeafBlower extends ItemBase implements IDisplayStandItem { * @param y The Y Position of the Player * @param z The Z Position of the Player */ - public boolean breakStuff(World world, int x, int y, int z) { + public boolean breakStuff(Level world, int x, int y, int z) { ArrayList breakPositions = new ArrayList<>(); int rangeSides = 5; @@ -127,12 +131,12 @@ public class ItemLeafBlower extends ItemBase implements IDisplayStandItem { } @Override - public boolean update(ItemStack stack, TileEntity tile, int elapsedTicks) { + public boolean update(ItemStack stack, BlockEntity tile, int elapsedTicks) { return this.doUpdate(tile.getLevel(), tile.getBlockPos().getX(), tile.getBlockPos().getY(), tile.getBlockPos().getZ(), elapsedTicks, stack); } @Override - public int getUsePerTick(ItemStack stack, TileEntity tile, int elapsedTicks) { + public int getUsePerTick(ItemStack stack, BlockEntity tile, int elapsedTicks) { return 60; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java index 4da45e4ee..ff87229e2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java @@ -12,14 +12,14 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.Hand; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.world.World; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.phys.AABB; import javax.annotation.Nonnull; import java.util.List; @@ -36,16 +36,16 @@ public class ItemMagnetRing extends ItemEnergy { } @Override - public void inventoryTick(@Nonnull ItemStack stack, @Nonnull World world, @Nonnull Entity entity, int itemSlot, boolean isSelected) { - if (entity instanceof PlayerEntity && !world.isClientSide && !ItemUtil.isEnabled(stack)) { - PlayerEntity player = (PlayerEntity) entity; + public void inventoryTick(@Nonnull ItemStack stack, @Nonnull Level world, @Nonnull Entity entity, int itemSlot, boolean isSelected) { + if (entity instanceof Player && !world.isClientSide && !ItemUtil.isEnabled(stack)) { + Player player = (Player) entity; if (player.isCreative() || player.isSpectator()) { return; } if (!entity.isShiftKeyDown()) { //Get all the Items in the area int range = 5; - List items = world.getEntitiesOfClass(ItemEntity.class, new AxisAlignedBB(entity.getX() - range, entity.getY() - range, entity.getZ() - range, entity.getX() + range, entity.getY() + range, entity.getZ() + range)); + List items = world.getEntitiesOfClass(ItemEntity.class, new AABB(entity.getX() - range, entity.getY() - range, entity.getZ() - range, entity.getX() + range, entity.getY() + range, entity.getZ() + range)); if (!items.isEmpty()) { for (ItemEntity item : items) { if (item.getPersistentData().getBoolean("PreventRemoteMovement")) { @@ -74,10 +74,10 @@ public class ItemMagnetRing extends ItemEnergy { @Nonnull @Override - public ActionResult use(World worldIn, @Nonnull PlayerEntity player, @Nonnull Hand hand) { + public InteractionResultHolder use(Level worldIn, @Nonnull Player player, @Nonnull InteractionHand hand) { if (!worldIn.isClientSide && player.isShiftKeyDown()) { ItemUtil.changeEnabled(player, hand); - return ActionResult.success(player.getItemInHand(hand)); + return InteractionResultHolder.success(player.getItemInHand(hand)); } return super.use(worldIn, player, hand); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java index 7607025e6..4d4d09649 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java @@ -14,21 +14,21 @@ import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; -import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemUseContext; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.RegistryKey; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.registry.Registry; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TextFormatting; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.World; +import net.minecraft.ChatFormatting; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Registry; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -41,17 +41,17 @@ public class ItemPhantomConnector extends ItemBase { super(ActuallyItems.defaultNonStacking()); } - public static RegistryKey getStoredWorld(ItemStack stack) { - CompoundNBT tag = stack.getOrCreateTag(); + public static ResourceKey getStoredWorld(ItemStack stack) { + CompoundTag tag = stack.getOrCreateTag(); if (!tag.contains("WorldOfTileStored")) { return null; } - return RegistryKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(tag.getString("WorldOfTileStored"))); + return ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(tag.getString("WorldOfTileStored"))); } public static BlockPos getStoredPosition(ItemStack stack) { - CompoundNBT tag = stack.getOrCreateTag(); + CompoundTag tag = stack.getOrCreateTag(); int x = tag.getInt("XCoordOfTileStored"); int y = tag.getInt("YCoordOfTileStored"); int z = tag.getInt("ZCoordOfTileStored"); @@ -63,14 +63,14 @@ public class ItemPhantomConnector extends ItemBase { } public static void clearStorage(ItemStack stack, String... keys) { - CompoundNBT compound = stack.getOrCreateTag(); + CompoundTag compound = stack.getOrCreateTag(); for (String key : keys) { compound.remove(key); } } - public static void storeConnection(ItemStack stack, int x, int y, int z, World world) { - CompoundNBT tag = stack.getOrCreateTag(); + public static void storeConnection(ItemStack stack, int x, int y, int z, Level world) { + CompoundTag tag = stack.getOrCreateTag(); tag.putInt("XCoordOfTileStored", x); tag.putInt("YCoordOfTileStored", y); @@ -79,12 +79,12 @@ public class ItemPhantomConnector extends ItemBase { } @Override - public ActionResultType useOn(ItemUseContext context) { + public InteractionResult useOn(UseOnContext context) { ItemStack stack = context.getPlayer().getItemInHand(context.getHand()); if (!context.getLevel().isClientSide) { //Passing Data to Phantoms BlockPos pos = context.getClickedPos(); - TileEntity tile = context.getLevel().getBlockEntity(pos); + BlockEntity tile = context.getLevel().getBlockEntity(pos); if (tile != null) { //Passing to Phantom if (tile instanceof IPhantomTile) { @@ -95,35 +95,35 @@ public class ItemPhantomConnector extends ItemBase { ((TileEntityBase) tile).sendUpdate(); } clearStorage(stack, "XCoordOfTileStored", "YCoordOfTileStored", "ZCoordOfTileStored", "WorldOfTileStored"); - context.getPlayer().displayClientMessage(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + ".phantom.connected.desc"), true); - return ActionResultType.SUCCESS; + context.getPlayer().displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".phantom.connected.desc"), true); + return InteractionResult.SUCCESS; } - return ActionResultType.FAIL; + return InteractionResult.FAIL; } } //Storing Connections storeConnection(stack, pos.getX(), pos.getY(), pos.getZ(), context.getLevel()); - context.getPlayer().displayClientMessage(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + ".phantom.stored.desc"), true); + context.getPlayer().displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".phantom.stored.desc"), true); } - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } @Nullable @Override - public CompoundNBT getShareTag(ItemStack stack) { - return new CompoundNBT(); + public CompoundTag getShareTag(ItemStack stack) { + return new CompoundTag(); } @OnlyIn(Dist.CLIENT) @Override - public void appendHoverText(ItemStack stack, @Nullable World playerIn, List list, ITooltipFlag advanced) { + public void appendHoverText(ItemStack stack, @Nullable Level playerIn, List list, TooltipFlag advanced) { BlockPos coords = getStoredPosition(stack); if (coords != null) { - list.add(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + ".boundTo.desc").append(":")); - list.add(new StringTextComponent("X: " + coords.getX())); - list.add(new StringTextComponent("Y: " + coords.getY())); - list.add(new StringTextComponent("Z: " + coords.getZ())); - list.add(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + ".clearStorage.desc").withStyle(TextFormatting.ITALIC)); + list.add(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".boundTo.desc").append(":")); + list.add(new TextComponent("X: " + coords.getX())); + list.add(new TextComponent("Y: " + coords.getY())); + list.add(new TextComponent("Z: " + coords.getZ())); + list.add(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".clearStorage.desc").withStyle(ChatFormatting.ITALIC)); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java index 853a93339..bebe68b32 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java @@ -10,25 +10,23 @@ package de.ellpeck.actuallyadditions.mod.items; -import com.google.common.collect.ImmutableSet; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.item.IItemTier; -import net.minecraft.item.ToolItem; -import net.minecraftforge.common.ToolType; +import net.minecraft.world.item.DiggerItem; +import net.minecraft.world.item.Tier; -public class ItemPickaxeAA extends ToolItem { - private final IItemTier tier; - public ItemPickaxeAA(IItemTier tier) { +public class ItemPickaxeAA extends DiggerItem { + private final Tier tier; + public ItemPickaxeAA(Tier tier) { super( 4.0f, -2f, tier, - ImmutableSet.of(), - new Properties() - .addToolType(ToolType.AXE, tier.getLevel()) - .addToolType(ToolType.HOE, tier.getLevel()) - .addToolType(ToolType.SHOVEL, tier.getLevel()) - .addToolType(ToolType.PICKAXE, tier.getLevel()) + null, //Feed block tags here + new Properties() +// .addToolType(ToolType.AXE, tier.getLevel()) +// .addToolType(ToolType.HOE, tier.getLevel()) +// .addToolType(ToolType.SHOVEL, tier.getLevel()) +// .addToolType(ToolType.PICKAXE, tier.getLevel()) .durability(tier.getUses() * 4) .tab(ActuallyAdditions.GROUP) ); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPlayerProbe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPlayerProbe.java index c33fb8855..ba12b77d7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPlayerProbe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPlayerProbe.java @@ -14,19 +14,19 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.entity.Entity; -import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemUseContext; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.World; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -42,38 +42,38 @@ public class ItemPlayerProbe extends ItemBase { // TODO: [port] might be the wrong event @Override - public void inventoryTick(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) { + public void inventoryTick(ItemStack stack, Level world, Entity entity, int itemSlot, boolean isSelected) { if (!world.isClientSide) { - CompoundNBT compound = stack.getOrCreateTag(); + CompoundTag compound = stack.getOrCreateTag(); if (compound.contains("UUIDMost")) { UUID id = compound.getUUID("UUID"); - PlayerEntity player = world.getPlayerByUUID(id); + Player player = world.getPlayerByUUID(id); if (player != null) { if (player.isShiftKeyDown()) { ItemPhantomConnector.clearStorage(stack, "UUIDLeast", "UUIDMost", "Name"); - ((PlayerEntity) entity).displayClientMessage(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + ".playerProbe.disconnect.1"), false); - player.displayClientMessage(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + ".playerProbe.notice"), false); + ((Player) entity).displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".playerProbe.disconnect.1"), false); + player.displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".playerProbe.notice"), false); //TheAchievements.GET_UNPROBED.get(player); } } else { ItemPhantomConnector.clearStorage(stack, "UUIDLeast", "UUIDMost", "Name"); - ((PlayerEntity) entity).displayClientMessage(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + ".playerProbe.disconnect.2"), false); + ((Player) entity).displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".playerProbe.disconnect.2"), false); } } } } @Override - public ActionResultType useOn(ItemUseContext context) { - PlayerEntity player = context.getPlayer(); + public InteractionResult useOn(UseOnContext context) { + Player player = context.getPlayer(); if (player == null) { - return ActionResultType.FAIL; + return InteractionResult.FAIL; } ItemStack stack = player.getItemInHand(context.getHand()); - TileEntity tile = context.getLevel().getBlockEntity(context.getClickedPos()); + BlockEntity tile = context.getLevel().getBlockEntity(context.getClickedPos()); if (tile instanceof TileEntityPlayerInterface) { - CompoundNBT compound = stack.getOrCreateTag(); + CompoundTag compound = stack.getOrCreateTag(); if (compound.contains("UUIDMost")) { if (!context.getLevel().isClientSide) { TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile; @@ -84,38 +84,38 @@ public class ItemPlayerProbe extends ItemBase { ItemPhantomConnector.clearStorage(stack, "UUIDLeast", "UUIDMost", "Name"); } - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } } - return ActionResultType.FAIL; + return InteractionResult.FAIL; } @Override - public ActionResultType interactLivingEntity(ItemStack aStack, PlayerEntity player, LivingEntity entity, Hand hand) { + public InteractionResult interactLivingEntity(ItemStack aStack, Player player, LivingEntity entity, InteractionHand hand) { if (!player.level.isClientSide) { ItemStack stack = player.getMainHandItem(); if (StackUtil.isValid(stack) && stack.getItem() == this) { - if (entity instanceof PlayerEntity) { - PlayerEntity playerHit = (PlayerEntity) entity; + if (entity instanceof Player) { + Player playerHit = (Player) entity; if (!playerHit.isShiftKeyDown()) { - CompoundNBT compound = stack.getOrCreateTag(); + CompoundTag compound = stack.getOrCreateTag(); compound.putString("Name", playerHit.getName().getString()); compound.putUUID("UUID", playerHit.getUUID()); - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } } } } - return ActionResultType.FAIL; + return InteractionResult.FAIL; } @OnlyIn(Dist.CLIENT) @Override - public void appendHoverText(ItemStack stack, @Nullable World playerIn, List tooltip, ITooltipFlag advanced) { + public void appendHoverText(ItemStack stack, @Nullable Level playerIn, List tooltip, TooltipFlag advanced) { if (stack.getOrCreateTag().contains("Name")) { String name = stack.getOrCreateTag().getString("Name"); - tooltip.add(new TranslationTextComponent("tooltip." + ActuallyAdditions.MODID + ".playerProbe.probing").append(": " + name)); + tooltip.add(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".playerProbe.probing").append(": " + name)); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java index 1aca91d91..8db14011d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java @@ -11,12 +11,12 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.Hand; -import net.minecraft.world.Explosion; -import net.minecraft.world.World; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.Level; public class ItemResonantRice extends ItemBase { @@ -25,12 +25,12 @@ public class ItemResonantRice extends ItemBase { } @Override - public ActionResult use(World world, PlayerEntity player, Hand hand) { + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) { ItemStack stack = player.getItemInHand(hand); if (!world.isClientSide) { stack.shrink(1); - world.explode(null, player.getX(), player.getY(), player.getZ(), 0.5F, Explosion.Mode.DESTROY); + world.explode(null, player.getX(), player.getY(), player.getZ(), 0.5F, Explosion.BlockInteraction.DESTROY); } - return ActionResult.success(stack); + return InteractionResultHolder.success(stack); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemShovelAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemShovelAA.java index 0f94c048c..284741836 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemShovelAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemShovelAA.java @@ -12,12 +12,17 @@ package de.ellpeck.actuallyadditions.mod.items; import com.google.common.collect.Sets; import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.item.*; -import net.minecraft.tags.ITag; -import net.minecraft.util.ActionResultType; +import net.minecraft.tags.Tag; +import net.minecraft.tags.TagKey; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.Tier; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; import javax.annotation.Nonnull; import java.util.Collections; @@ -25,9 +30,9 @@ import java.util.Set; public class ItemShovelAA extends ItemToolAA { - private static final Set EFFECTIVE_ON = Sets.newHashSet(Blocks.CLAY, Blocks.DIRT, Blocks.FARMLAND, Blocks.GRASS, Blocks.GRAVEL, Blocks.MYCELIUM, Blocks.SAND, Blocks.SNOW, Blocks.SNOW_BLOCK, Blocks.SOUL_SAND, Blocks.GRASS_PATH); + private static final Set EFFECTIVE_ON = Sets.newHashSet(Blocks.CLAY, Blocks.DIRT, Blocks.FARMLAND, Blocks.GRASS, Blocks.GRAVEL, Blocks.MYCELIUM, Blocks.SAND, Blocks.SNOW, Blocks.SNOW_BLOCK, Blocks.SOUL_SAND, Blocks.DIRT_PATH); - public ItemShovelAA(float p_i48512_1_, float p_i48512_2_, IItemTier p_i48512_3_, Set p_i48512_4_, Properties p_i48512_5_, String name, ItemStack repairItem, ITag repairTag) { + public ItemShovelAA(float p_i48512_1_, float p_i48512_2_, Tier p_i48512_3_, TagKey p_i48512_4_, Properties p_i48512_5_, String name, ItemStack repairItem, TagKey repairTag) { super(p_i48512_1_, p_i48512_2_, p_i48512_3_, p_i48512_4_, p_i48512_5_, name, repairItem, repairTag); } @@ -44,7 +49,7 @@ public class ItemShovelAA extends ItemToolAA { @Nonnull @Override - public ActionResultType useOn(ItemUseContext useContext) { + public InteractionResult useOn(UseOnContext useContext) { return Items.IRON_SHOVEL.useOn(useContext); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java index d54187459..54ab6d4b4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemSolidifiedExperience.java @@ -12,20 +12,14 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; -import de.ellpeck.actuallyadditions.mod.config.values.ConfigBoolValues; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import net.minecraft.entity.CreatureEntity; -import net.minecraft.entity.item.ExperienceOrbEntity; -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.Hand; -import net.minecraft.world.GameRules; -import net.minecraft.world.World; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.ExperienceOrb; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; import net.minecraftforge.common.util.FakePlayer; -import net.minecraftforge.event.entity.living.LivingDropsEvent; -import net.minecraftforge.eventbus.api.SubscribeEvent; public class ItemSolidifiedExperience extends ItemBase { @@ -36,7 +30,7 @@ public class ItemSolidifiedExperience extends ItemBase { } @Override - public ActionResult use(World world, PlayerEntity player, Hand hand) { + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) { ItemStack stack = player.getItemInHand(hand); if (!world.isClientSide) { int amount; @@ -53,13 +47,13 @@ public class ItemSolidifiedExperience extends ItemBase { } if (CommonConfig.Other.SOLID_XP_ALWAYS_ORBS.get() || player instanceof FakePlayer) { - ExperienceOrbEntity orb = new ExperienceOrbEntity(world, player.getX() + 0.5, player.getY() + 0.5, player.getZ() + 0.5, amount); + ExperienceOrb orb = new ExperienceOrb(world, player.getX() + 0.5, player.getY() + 0.5, player.getZ() + 0.5, amount); orb.getPersistentData().putBoolean(ActuallyAdditions.MODID + "FromSolidified", true); world.addFreshEntity(orb); } else { player.giveExperiencePoints(amount); } } - return ActionResult.success(stack); + return InteractionResultHolder.success(stack); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleportStaff.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleportStaff.java index db93c4815..91e06d0c2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleportStaff.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleportStaff.java @@ -11,17 +11,17 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ActionResult; -import net.minecraft.util.Hand; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.SoundEvents; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.util.math.vector.Vector3i; -import net.minecraft.world.World; +import net.minecraft.core.Vec3i; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.phys.HitResult; +import net.minecraft.world.phys.Vec3; public class ItemTeleportStaff extends ItemEnergy { @@ -30,28 +30,28 @@ public class ItemTeleportStaff extends ItemEnergy { } @Override - public ActionResult use(World world, PlayerEntity player, Hand hand) { + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) { ItemStack stack = player.getItemInHand(hand); if (!world.isClientSide) { - RayTraceResult rayTraceResult = player.pick(100,1F,false); - if (rayTraceResult.getType() == RayTraceResult.Type.BLOCK || player.xRot >= -5) { - Vector3d location = rayTraceResult.getLocation(); - Vector3d pos = Vector3d.atBottomCenterOf(new Vector3i(location.x, location.y, location.z)); + HitResult rayTraceResult = player.pick(100,1F,false); + if (rayTraceResult.getType() == HitResult.Type.BLOCK || player.getXRot() >= -5) { + Vec3 location = rayTraceResult.getLocation(); + Vec3 pos = Vec3.atBottomCenterOf(new Vec3i(location.x, location.y, location.z)); int baseUse = 200; - int use = baseUse + (int) (baseUse * player.blockPosition().distSqr(new Vector3i(pos.x, pos.y, pos.z))); + int use = baseUse + (int) (baseUse * player.blockPosition().distSqr(new Vec3i(pos.x, pos.y, pos.z))); if (this.getEnergyStored(stack) >= use) { - ((ServerPlayerEntity) player).connection.teleport(pos.x, pos.y + 1F, pos.z, player.yRot, player.xRot); + ((ServerPlayer) player).connection.teleport(pos.x, pos.y + 1F, pos.z, player.getYRot(), player.getXRot()); player.removeVehicle(); - world.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.ENDERMAN_TELEPORT, SoundCategory.PLAYERS, 1.0F, 1.0F); + world.playSound(null, player.getX(), player.getY(), player.getZ(), SoundEvents.ENDERMAN_TELEPORT, SoundSource.PLAYERS, 1.0F, 1.0F); if (!player.isCreative()) { this.extractEnergyInternal(stack, use, false); player.getCooldowns().addCooldown(this, 50); } - return ActionResult.success(stack); + return InteractionResultHolder.success(stack); } } } player.swing(hand); - return ActionResult.fail(stack); + return InteractionResultHolder.fail(stack); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterBowl.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterBowl.java index 483267f5c..93f82f98f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterBowl.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterBowl.java @@ -14,23 +14,27 @@ import de.ellpeck.actuallyadditions.mod.config.CommonConfig; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.block.material.Material; -import net.minecraft.entity.Entity; -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.particles.ParticleTypes; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.*; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; import net.minecraftforge.event.ForgeEventFactory; import net.minecraftforge.event.entity.player.PlayerInteractEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -47,13 +51,13 @@ public class ItemWaterBowl extends ItemBase { if (event.getWorld() != null) { if (CommonConfig.Other.WATER_BOWL.get()) { if (StackUtil.isValid(event.getItemStack()) && event.getItemStack().getItem() == Items.BOWL) { - RayTraceResult rayTrace = WorldUtil.getNearestBlockWithDefaultReachDistance(event.getWorld(), event.getPlayer(), true, false, false); - if (rayTrace.getType() != RayTraceResult.Type.BLOCK) { + HitResult rayTrace = WorldUtil.getNearestBlockWithDefaultReachDistance(event.getWorld(), event.getPlayer(), true, false, false); + if (rayTrace.getType() != HitResult.Type.BLOCK) { return; } - BlockRayTraceResult trace = (BlockRayTraceResult) rayTrace; - ActionResult result = ForgeEventFactory.onBucketUse(event.getPlayer(), event.getWorld(), event.getItemStack(), trace); + BlockHitResult trace = (BlockHitResult) rayTrace; + InteractionResultHolder result = ForgeEventFactory.onBucketUse(event.getPlayer(), event.getWorld(), event.getItemStack(), trace); if (result == null) { if (event.getPlayer().mayUseItemAt(trace.getBlockPos().relative(trace.getDirection()), trace.getDirection(), event.getItemStack())) { BlockState state = event.getWorld().getBlockState(trace.getBlockPos()); @@ -70,7 +74,7 @@ public class ItemWaterBowl extends ItemBase { ItemStack bowl = new ItemStack(ActuallyItems.WATER_BOWL.get()); if (!StackUtil.isValid(reduced)) { event.getPlayer().setItemInHand(event.getHand(), bowl); - } else if (!event.getPlayer().inventory.add(bowl.copy())) { + } else if (!event.getPlayer().getInventory().add(bowl.copy())) { ItemEntity entityItem = new ItemEntity(event.getWorld(), event.getPlayer().getX(), event.getPlayer().getY(), event.getPlayer().getZ(), bowl.copy()); entityItem.setPickUpDelay(0); event.getWorld().addFreshEntity(entityItem); @@ -85,45 +89,45 @@ public class ItemWaterBowl extends ItemBase { } @Override - public ActionResult use(World world, PlayerEntity player, Hand hand) { + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) { ItemStack stack = player.getItemInHand(hand); - RayTraceResult trace = WorldUtil.getNearestBlockWithDefaultReachDistance(world, player); - ActionResult result = ForgeEventFactory.onBucketUse(player, world, stack, trace); + HitResult trace = WorldUtil.getNearestBlockWithDefaultReachDistance(world, player); + InteractionResultHolder result = ForgeEventFactory.onBucketUse(player, world, stack, trace); if (result != null) { return result; } if (trace == null) { - return ActionResult.pass(stack); - } else if (trace.getType() != RayTraceResult.Type.BLOCK) { - return ActionResult.pass(stack); + return InteractionResultHolder.pass(stack); + } else if (trace.getType() != HitResult.Type.BLOCK) { + return InteractionResultHolder.pass(stack); } else { - BlockRayTraceResult blockTrace = (BlockRayTraceResult) trace; + BlockHitResult blockTrace = (BlockHitResult) trace; BlockPos pos = blockTrace.getBlockPos(); if (!world.mayInteract(player, pos)) { - return ActionResult.fail(stack); + return InteractionResultHolder.fail(stack); } else { BlockPos pos1 = world.getBlockState(pos).getMaterial().isReplaceable() && blockTrace.getDirection() == Direction.UP ? pos : pos.relative(blockTrace.getDirection()); if (!player.mayUseItemAt(pos1, blockTrace.getDirection(), stack)) { - return ActionResult.fail(stack); + return InteractionResultHolder.fail(stack); } else if (this.tryPlaceContainedLiquid(player, world, pos1, false)) { return !player.isCreative() - ? ActionResult.success(new ItemStack(Items.BOWL)) - : ActionResult.success(stack); + ? InteractionResultHolder.success(new ItemStack(Items.BOWL)) + : InteractionResultHolder.success(stack); } else { - return ActionResult.fail(stack); + return InteractionResultHolder.fail(stack); } } } } @Override - public void inventoryTick(ItemStack stack, World world, Entity entity, int itemSlot, boolean isSelected) { + public void inventoryTick(ItemStack stack, Level world, Entity entity, int itemSlot, boolean isSelected) { if (!world.isClientSide) { if (CommonConfig.Other.WATER_BOWL_LOSS.get()) { if (world.getGameTime() % 10 == 0 && world.random.nextFloat() >= 0.5F) { @@ -131,7 +135,7 @@ public class ItemWaterBowl extends ItemBase { int lastY = 0; if (stack.hasTag()) { - CompoundNBT compound = stack.getOrCreateTag(); + CompoundTag compound = stack.getOrCreateTag(); lastX = compound.getInt("lastX"); lastY = compound.getInt("lastY"); } @@ -139,8 +143,8 @@ public class ItemWaterBowl extends ItemBase { boolean change = false; if (lastX != 0 && lastX != (int) entity.getX() || lastY != 0 && lastY != (int) entity.getY()) { if (!entity.isShiftKeyDown()) { - if (entity instanceof PlayerEntity) { - PlayerEntity player = (PlayerEntity) entity; + if (entity instanceof Player) { + Player player = (Player) entity; if (this.tryPlaceContainedLiquid(player, world, player.blockPosition(), true)) { this.checkReplace(player, stack, new ItemStack(Items.BOWL), itemSlot); } @@ -150,7 +154,7 @@ public class ItemWaterBowl extends ItemBase { } if (change || lastX == 0 || lastY == 0) { - CompoundNBT compound = stack.getOrCreateTag(); + CompoundTag compound = stack.getOrCreateTag(); compound.putInt("lastX", (int) entity.getX()); compound.putInt("lastY", (int) entity.getY()); } @@ -159,11 +163,11 @@ public class ItemWaterBowl extends ItemBase { } } - private void checkReplace(PlayerEntity player, ItemStack old, ItemStack stack, int slot) { - if (player.inventory.getItem(slot) == old) { - player.inventory.setItem(slot, stack); - } else if (player.inventory.offhand.get(slot) == old) { - player.inventory.offhand.set(slot, stack); + private void checkReplace(Player player, ItemStack old, ItemStack stack, int slot) { + if (player.getInventory().getItem(slot) == old) { + player.getInventory().setItem(slot, stack); + } else if (player.getInventory().offhand.get(slot) == old) { + player.getInventory().offhand.set(slot, stack); } } @@ -172,7 +176,7 @@ public class ItemWaterBowl extends ItemBase { return !ItemStack.isSame(oldStack, newStack); } - public boolean tryPlaceContainedLiquid(PlayerEntity player, World world, BlockPos pos, boolean finite) { + public boolean tryPlaceContainedLiquid(Player player, Level world, BlockPos pos, boolean finite) { BlockState state = world.getBlockState(pos); Material material = state.getMaterial(); boolean nonSolid = !material.isSolid(); @@ -182,7 +186,7 @@ public class ItemWaterBowl extends ItemBase { return false; } else { if (world.dimensionType().ultraWarm()) { - world.playSound(player, pos, SoundEvents.FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F); + world.playSound(player, pos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F); for (int k = 0; k < 8; k++) { world.addParticle(ParticleTypes.LARGE_SMOKE, pos.getX() + Math.random(), pos.getY() + Math.random(), pos.getZ() + Math.random(), 0.0D, 0.0D, 0.0D); @@ -192,7 +196,7 @@ public class ItemWaterBowl extends ItemBase { world.destroyBlock(pos, true); } - world.playSound(player, pos, SoundEvents.BUCKET_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F); + world.playSound(player, pos, SoundEvents.BUCKET_EMPTY, SoundSource.BLOCKS, 1.0F, 1.0F); BlockState placeState = Blocks.WATER.defaultBlockState(); world.setBlock(pos, placeState, 3); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java index a344b4e91..d6fb60359 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java @@ -12,14 +12,14 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.block.Blocks; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.util.Mth; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; public class ItemWaterRemovalRing extends ItemEnergy { @@ -28,12 +28,12 @@ public class ItemWaterRemovalRing extends ItemEnergy { } @Override - public void inventoryTick(ItemStack stack, World world, Entity player, int itemSlot, boolean isSelected) { - if (!(player instanceof PlayerEntity) || player.level.isClientSide || player.isShiftKeyDown()) { + public void inventoryTick(ItemStack stack, Level world, Entity player, int itemSlot, boolean isSelected) { + if (!(player instanceof Player) || player.level.isClientSide || player.isShiftKeyDown()) { return; } - ItemStack equipped = ((PlayerEntity) player).getMainHandItem(); + ItemStack equipped = ((Player) player).getMainHandItem(); int energyUse = 150; if (StackUtil.isValid(equipped) && equipped == stack && this.getEnergyStored(stack) >= energyUse) { @@ -43,9 +43,9 @@ public class ItemWaterRemovalRing extends ItemEnergy { for (int x = -range; x < range + 1; x++) { for (int z = -range; z < range + 1; z++) { for (int y = -range; y < range + 1; y++) { - int theX = MathHelper.floor(player.getX() + x); - int theY = MathHelper.floor(player.getY() + y); - int theZ = MathHelper.floor(player.getZ() + z); + int theX = Mth.floor(player.getX() + x); + int theY = Mth.floor(player.getY() + y); + int theZ = Mth.floor(player.getZ() + z); //Remove Water BlockPos pos = new BlockPos(theX, theY, theZ); @@ -54,7 +54,7 @@ public class ItemWaterRemovalRing extends ItemEnergy { if ((block == Blocks.WATER) && this.getEnergyStored(stack) >= energyUse) { world.setBlockAndUpdate(pos, Blocks.AIR.defaultBlockState()); - if (!((PlayerEntity) player).isCreative()) { + if (!((Player) player).isCreative()) { this.extractEnergyInternal(stack, energyUse, false); } } @@ -63,7 +63,7 @@ public class ItemWaterRemovalRing extends ItemEnergy { else if ((block == Blocks.LAVA) && this.getEnergyStored(stack) >= energyUse * 2) { world.setBlockAndUpdate(pos, Blocks.AIR.defaultBlockState()); - if (!((PlayerEntity) player).isCreative()) { + if (!((Player) player).isCreative()) { this.extractEnergyInternal(stack, energyUse * 2, false); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java index b9d92fa05..10d7d56ef 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java @@ -15,16 +15,16 @@ import de.ellpeck.actuallyadditions.mod.data.PlayerData; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.BlockState; -import net.minecraft.entity.Entity; -import net.minecraft.entity.LivingEntity; -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.entity.passive.BatEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.item.SwordItem; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.entity.ambient.Bat; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.SwordItem; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.event.entity.living.LivingEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -48,49 +48,49 @@ public class ItemWingsOfTheBats extends ItemBase { * * @return The Wings */ - public static ItemStack getWingItem(PlayerEntity player) { - for (int i = 0; i < player.inventory.getContainerSize(); i++) { - if (StackUtil.isValid(player.inventory.getItem(i)) && player.inventory.getItem(i).getItem() instanceof ItemWingsOfTheBats) { - return player.inventory.getItem(i); + public static ItemStack getWingItem(Player player) { + for (int i = 0; i < player.getInventory().getContainerSize(); i++) { + if (StackUtil.isValid(player.getInventory().getItem(i)) && player.getInventory().getItem(i).getItem() instanceof ItemWingsOfTheBats) { + return player.getInventory().getItem(i); } } return ItemStack.EMPTY; } @Override - public boolean showDurabilityBar(ItemStack stack) { + public boolean isBarVisible(ItemStack stack) { return true; } @Override - public double getDurabilityForDisplay(ItemStack stack) { + public int getBarWidth(ItemStack stack) { /* PlayerEntity player = ClientProxy.getCurrentPlayer(); if (player != null) { // PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player); double diff = MAX_FLY_TIME - 1;//data.batWingsFlyTime; // TODO: fix me return 1 - diff / MAX_FLY_TIME; }*/ //TODO - return super.getDurabilityForDisplay(stack); + return super.getBarWidth(stack); } @Override - public int getRGBDurabilityForDisplay(ItemStack stack) { + public int getBarColor(ItemStack stack) { /* PlayerEntity player = ClientProxy.getCurrentPlayer(); if (player != null) { // PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player); int curr = 1;//data.batWingsFlyTime; // TODO: fix me return MathHelper.hsvToRgb(Math.max(0.0F, 1 - (float) curr / MAX_FLY_TIME) / 3.0F, 1.0F, 1.0F); }*/ - return super.getRGBDurabilityForDisplay(stack); + return super.getBarColor(stack); } @SubscribeEvent public void onEntityDropEvent(LivingDropsEvent event) { Entity source = event.getSource().getEntity(); - if (event.getEntityLiving().level != null && !event.getEntityLiving().level.isClientSide && source instanceof PlayerEntity) { + if (event.getEntityLiving().level != null && !event.getEntityLiving().level.isClientSide && source instanceof Player) { //Drop Wings from Bats - if (ConfigBoolValues.DO_BAT_DROPS.isEnabled() && event.getEntityLiving() instanceof BatEntity) { + if (ConfigBoolValues.DO_BAT_DROPS.isEnabled() && event.getEntityLiving() instanceof Bat) { int looting = event.getLootingLevel(); Iterable equip = source.getHandSlots(); @@ -112,8 +112,8 @@ public class ItemWingsOfTheBats extends ItemBase { @SubscribeEvent public void livingUpdateEvent(LivingEvent.LivingUpdateEvent event) { - if (event.getEntityLiving() instanceof PlayerEntity) { - PlayerEntity player = (PlayerEntity) event.getEntityLiving(); + if (event.getEntityLiving() instanceof Player) { + Player player = (Player) event.getEntityLiving(); if (false &&!player.isCreative() && !player.isSpectator()) { //TODO disabled for now. PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player); @@ -134,9 +134,9 @@ public class ItemWingsOfTheBats extends ItemBase { } } else { if (wingsEquipped && data.batWingsFlyTime < MAX_FLY_TIME) { - player.abilities.mayfly = true; + player.getAbilities().mayfly = true; - if (player.abilities.flying) { + if (player.getAbilities().flying) { data.batWingsFlyTime++; if (player.level.getLevelData().getGameTime() % 10 == 0) { @@ -150,16 +150,16 @@ public class ItemWingsOfTheBats extends ItemBase { data.shouldDisableBatWings = true; shouldSend = true; - player.abilities.mayfly = false; - player.abilities.flying = false; - player.abilities.invulnerable = false; + player.getAbilities().mayfly = false; + player.getAbilities().flying = false; + player.getAbilities().invulnerable = false; } } if (tryDeduct && data.batWingsFlyTime > 0) { int deductTime = 0; - if (!player.abilities.flying) { + if (!player.getAbilities().flying) { deductTime = 2; } else { BlockPos pos = new BlockPos(player.getX(), player.getY() + player.getBbHeight(), player.getZ()); @@ -184,13 +184,13 @@ public class ItemWingsOfTheBats extends ItemBase { } } else { if (data.hasBatWings) { - player.abilities.mayfly = true; + player.getAbilities().mayfly = true; } else if (data.shouldDisableBatWings) { //so that other modded flying won't be disabled data.shouldDisableBatWings = false; - player.abilities.mayfly = false; - player.abilities.flying = false; - player.abilities.invulnerable = false; + player.getAbilities().mayfly = false; + player.getAbilities().flying = false; + player.getAbilities().invulnerable = false; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/Sack.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/Sack.java index a9cfdc28b..ba268c8ee 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/Sack.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/Sack.java @@ -16,19 +16,19 @@ import de.ellpeck.actuallyadditions.mod.sack.SackData; import de.ellpeck.actuallyadditions.mod.sack.SackManager; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.inventory.container.SimpleNamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemUseContext; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ActionResult; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.Hand; -import net.minecraft.world.World; -import net.minecraftforge.fml.network.NetworkHooks; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.InteractionResultHolder; +import net.minecraft.world.SimpleMenuProvider; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.network.NetworkHooks; import java.util.UUID; @@ -41,10 +41,10 @@ public class Sack extends ItemBase { } @Override - public ActionResultType useOn(ItemUseContext context) { + public InteractionResult useOn(UseOnContext context) { ItemStack stack = context.getPlayer().getItemInHand(context.getHand()); if (!this.isVoid) { - TileEntity tile = context.getLevel().getBlockEntity(context.getClickedPos()); + BlockEntity tile = context.getLevel().getBlockEntity(context.getClickedPos()); if (tile != null) { if (!context.getLevel().isClientSide) { ItemStackHandlerAA inv = new ItemStackHandlerAA(28); @@ -78,28 +78,28 @@ public class Sack extends ItemBase { DrillItem.writeSlotsToNBT(inv, stack); } } - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } } - return ActionResultType.PASS; + return InteractionResult.PASS; } @Override - public ActionResult use(World world, PlayerEntity player, Hand hand) { + public InteractionResultHolder use(Level world, Player player, InteractionHand hand) { ItemStack sackStack = player.getItemInHand(hand); - if (!world.isClientSide && hand == Hand.MAIN_HAND && sackStack.getItem() instanceof Sack && player instanceof ServerPlayerEntity) { + if (!world.isClientSide && hand == InteractionHand.MAIN_HAND && sackStack.getItem() instanceof Sack && player instanceof ServerPlayer) { if (!isVoid) { SackData data = getData(sackStack); if (data == null) - return ActionResult.fail(sackStack); + return InteractionResultHolder.fail(sackStack); UUID uuid = data.getUuid(); data.updateAccessRecords(player.getName().getString(), System.currentTimeMillis()); - NetworkHooks.openGui((ServerPlayerEntity) player, new SimpleNamedContainerProvider((id, inv, entity) -> + NetworkHooks.openGui((ServerPlayer) player, new SimpleMenuProvider((id, inv, entity) -> new SackContainer(id, inv, uuid, data.getSpecialHandler()), sackStack.getHoverName()), (buffer -> buffer.writeUUID(uuid))); } @@ -108,14 +108,14 @@ public class Sack extends ItemBase { new SimpleNamedContainerProvider((windowId, playerInventory, playerEntity) -> new ContainerBag(windowId, playerInventory, playerEntity.getItemInHand(hand), this.isVoid), StringTextComponent.EMPTY));*/ } - return ActionResult.pass(player.getItemInHand(hand)); + return InteractionResultHolder.pass(player.getItemInHand(hand)); } public static SackData getData(ItemStack stack) { if (!(stack.getItem() instanceof Sack)) return null; UUID uuid; - CompoundNBT tag = stack.getOrCreateTag(); + CompoundTag tag = stack.getOrCreateTag(); if (!tag.contains("UUID")) { uuid = UUID.randomUUID(); tag.putUUID("UUID", uuid); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/Worm.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/Worm.java index 525990ba2..5047ecdc9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/Worm.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/Worm.java @@ -14,15 +14,15 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; import de.ellpeck.actuallyadditions.mod.entity.EntityWorm; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ItemUseContext; -import net.minecraft.util.ActionResultType; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.AABB; import net.minecraftforge.event.entity.player.UseHoeEvent; import net.minecraftforge.eventbus.api.Event; @@ -35,16 +35,16 @@ public class Worm extends ItemBase { } @Override - public ActionResultType useOn(ItemUseContext context) { + public InteractionResult useOn(UseOnContext context) { BlockPos pos = context.getClickedPos(); ItemStack stack = context.getPlayer().getItemInHand(context.getHand()); - World level = context.getLevel(); + Level level = context.getLevel(); BlockState state = level.getBlockState(pos); if (level.isClientSide || !EntityWorm.canWormify(level, context.getClickedPos(), state)) return super.useOn(context); - List worms = level.getEntitiesOfClass(EntityWorm.class, new AxisAlignedBB(pos.getX() - 1, pos.getY(), pos.getZ() - 1, pos.getX() + 2, pos.getY() + 1, pos.getZ() + 2)); + List worms = level.getEntitiesOfClass(EntityWorm.class, new AABB(pos.getX() - 1, pos.getY(), pos.getZ() - 1, pos.getX() + 2, pos.getY() + 1, pos.getZ() + 2)); if (!worms.isEmpty()) return super.useOn(context); @@ -55,11 +55,11 @@ public class Worm extends ItemBase { if (!context.getPlayer().isCreative()) stack.shrink(1); - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } public static void onHoe(UseHoeEvent event) { - World level = event.getEntity().level; + Level level = event.getEntity().level; if (level.isClientSide || !CommonConfig.Other.WORMS.get() || event.getResult() == Event.Result.DENY) return; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ActuallyItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ActuallyItem.java index 8a27bcfe4..ff1ab2cd4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ActuallyItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ActuallyItem.java @@ -1,7 +1,7 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.item.Item; +import net.minecraft.world.item.Item; /** * I'm using a custom class here as I'm sure we'll need a unified way of declaring rules diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java index cc6533b1f..9714abed2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java @@ -12,20 +12,18 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.api.misc.IDisableableItem; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.inventory.EquipmentSlotType; -import net.minecraft.item.ArmorItem; -import net.minecraft.item.IArmorMaterial; - -import net.minecraft.item.Item.Properties; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.item.ArmorItem; +import net.minecraft.world.item.ArmorMaterial; public class ItemArmorAA extends ArmorItem implements IDisableableItem { private final boolean disabled; - public ItemArmorAA(IArmorMaterial material, EquipmentSlotType type) { + public ItemArmorAA(ArmorMaterial material, EquipmentSlot type) { this(material, type, ActuallyItems.defaultProps()); } - public ItemArmorAA(IArmorMaterial material, EquipmentSlotType type, Properties properties) { + public ItemArmorAA(ArmorMaterial material, EquipmentSlot type, Properties properties) { super(material, type, properties); this.disabled = false; // this.disabled = ConfigurationHandler.config.getBoolean("Disable: " + StringUtil.badTranslate(this.name), "Tool Control", false, "This will disable the " + StringUtil.badTranslate(this.name) + ". It will not be registered."); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java index 3ef106511..8b674b41d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemBase.java @@ -11,9 +11,7 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.item.Item; - -import net.minecraft.item.Item.Properties; +import net.minecraft.world.item.Item; public class ItemBase extends Item { public ItemBase(Properties props) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java index 83f0261e2..b179150ee 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java @@ -12,15 +12,15 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import de.ellpeck.actuallyadditions.mod.tile.CustomEnergyStorage; -import net.minecraft.client.util.ITooltipFlag; -import net.minecraft.item.ItemGroup; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.NonNullList; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.World; +import net.minecraft.core.Direction; +import net.minecraft.core.NonNullList; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.TooltipFlag; +import net.minecraft.world.level.Level; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.capabilities.Capability; @@ -34,7 +34,6 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.text.NumberFormat; import java.util.List; -import java.util.concurrent.atomic.AtomicInteger; public abstract class ItemEnergy extends ItemBase { @@ -54,14 +53,14 @@ public abstract class ItemEnergy extends ItemBase { @OnlyIn(Dist.CLIENT) @Override - public void appendHoverText(ItemStack stack, @Nullable World worldIn, List tooltip, ITooltipFlag flagIn) { + public void appendHoverText(ItemStack stack, @Nullable Level worldIn, List tooltip, TooltipFlag flagIn) { super.appendHoverText(stack, worldIn, tooltip, flagIn); int energy = 0; if (stack.hasTag() && stack.getTag().contains("Energy")) { energy = stack.getTag().getInt("Energy"); } NumberFormat format = NumberFormat.getInstance(); - tooltip.add(new TranslationTextComponent("misc.actuallyadditions.power_long", format.format(energy), format.format(this.maxPower))); + tooltip.add(new TranslatableComponent("misc.actuallyadditions.power_long", format.format(energy), format.format(this.maxPower))); } @Override @@ -70,7 +69,7 @@ public abstract class ItemEnergy extends ItemBase { } @Override - public void fillItemCategory(ItemGroup group, NonNullList items) { + public void fillItemCategory(CreativeModeTab group, NonNullList items) { super.fillItemCategory(group, items); if (!this.allowdedIn(group)) { return; @@ -82,23 +81,23 @@ public abstract class ItemEnergy extends ItemBase { } @Override - public boolean showDurabilityBar(ItemStack itemStack) { + public boolean isBarVisible(ItemStack itemStack) { return true; } @Override - public double getDurabilityForDisplay(ItemStack stack) { + public int getBarWidth(ItemStack stack) { if (stack.hasTag() && stack.getTag().contains("Energy")) { - return 1 - (stack.getTag().getDouble("Energy") / this.maxPower); + return (int)(1 - (stack.getTag().getDouble("Energy") / this.maxPower)); } return 1; } @Override - public int getRGBDurabilityForDisplay(ItemStack stack) { + public int getBarColor(ItemStack stack) { //float[] color = AssetUtil.getWheelColor(player.level.getGameTime() % 256); //return MathHelper.color(color[0] / 255F, color[1] / 255F, color[2] / 255F); - return super.getRGBDurabilityForDisplay(stack); + return super.getBarColor(stack); } public void setEnergy(ItemStack stack, int energy) { @@ -150,11 +149,11 @@ public abstract class ItemEnergy extends ItemBase { } @Override - public ICapabilityProvider initCapabilities(ItemStack stack, CompoundNBT nbt) { + public ICapabilityProvider initCapabilities(ItemStack stack, CompoundTag nbt) { return new EnergyCapabilityProvider(stack, this); } - private static class EnergyCapabilityProvider implements ICapabilitySerializable { + private static class EnergyCapabilityProvider implements ICapabilitySerializable { public final CustomEnergyStorage storage; private final LazyOptional energyCapability; @@ -177,15 +176,15 @@ public abstract class ItemEnergy extends ItemBase { } @Override - public CompoundNBT serializeNBT() { + public CompoundTag serializeNBT() { if (this.storage.isDirty()) stack.getOrCreateTag().putInt("Energy", this.storage.getEnergyStored()); this.storage.clearDirty(); - return new CompoundNBT(); + return new CompoundTag(); } @Override - public void deserializeNBT(CompoundNBT nbt) { + public void deserializeNBT(CompoundTag nbt) { if (stack.getOrCreateTag().contains("Energy")) this.storage.setEnergyStored(stack.getOrCreateTag().getInt("Energy")); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodSeed.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodSeed.java index 117d40b8a..5f8503b9c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodSeed.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemFoodSeed.java @@ -11,12 +11,12 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockReader; +import net.minecraft.core.BlockPos; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; public class ItemFoodSeed /*extends ItemSeedFood */{ //TODO what is this?! @@ -43,7 +43,7 @@ public class ItemFoodSeed /*extends ItemSeedFood */{ //TODO what is this?! } //@Override - public BlockState getPlant(IBlockReader world, BlockPos pos) { + public BlockState getPlant(BlockGetter world, BlockPos pos) { return this.plant.defaultBlockState(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java index 59460ba1c..89d0d5770 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java @@ -11,21 +11,20 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.item.HoeItem; -import net.minecraft.item.IItemTier; -import net.minecraftforge.common.ToolType; +import net.minecraft.world.item.HoeItem; +import net.minecraft.world.item.Tier; public class ItemHoeAA extends HoeItem { - private IItemTier tier; - public ItemHoeAA(IItemTier tier) { + private Tier tier; + public ItemHoeAA(Tier tier) { super(tier, 4, -2f, new Properties() - .addToolType(ToolType.AXE, tier.getLevel()) - .addToolType(ToolType.HOE, tier.getLevel()) - .addToolType(ToolType.SHOVEL, tier.getLevel()) - .addToolType(ToolType.PICKAXE, tier.getLevel()) +// .addToolType(ToolType.AXE, tier.getLevel()) +// .addToolType(ToolType.HOE, tier.getLevel()) +// .addToolType(ToolType.SHOVEL, tier.getLevel()) +// .addToolType(ToolType.PICKAXE, tier.getLevel()) .durability(tier.getUses() * 4) .tab(ActuallyAdditions.GROUP) ); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSeed.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSeed.java index 5242d4608..93d8fa5e6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSeed.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSeed.java @@ -11,11 +11,11 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockPlant; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.item.Item; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.IBlockReader; +import net.minecraft.core.BlockPos; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.BlockGetter; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; public class ItemSeed /* extends ItemSeeds*/ { @@ -33,7 +33,7 @@ public class ItemSeed /* extends ItemSeeds*/ { } //@Override - public BlockState getPlant(IBlockReader world, BlockPos pos) { + public BlockState getPlant(BlockGetter world, BlockPos pos) { return this.plant.defaultBlockState(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java index 8fb8fe588..cdd1caee5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java @@ -11,21 +11,20 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.item.IItemTier; -import net.minecraft.item.SwordItem; -import net.minecraftforge.common.ToolType; +import net.minecraft.world.item.SwordItem; +import net.minecraft.world.item.Tier; public class ItemSwordAA extends SwordItem { - private IItemTier tier; - public ItemSwordAA(IItemTier tier) { + private Tier tier; + public ItemSwordAA(Tier tier) { super(tier, (int) tier.getAttackDamageBonus(), tier.getSpeed(), new Properties() - .addToolType(ToolType.AXE, tier.getLevel()) - .addToolType(ToolType.HOE, tier.getLevel()) - .addToolType(ToolType.SHOVEL, tier.getLevel()) - .addToolType(ToolType.PICKAXE, tier.getLevel()) +// .addToolType(ToolType.AXE, tier.getLevel()) +// .addToolType(ToolType.HOE, tier.getLevel()) +// .addToolType(ToolType.SHOVEL, tier.getLevel()) +// .addToolType(ToolType.PICKAXE, tier.getLevel()) .durability(tier.getUses() * 4) .tab(ActuallyAdditions.GROUP) ); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemToolAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemToolAA.java index 55fe22001..2ea59d686 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemToolAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemToolAA.java @@ -13,23 +13,24 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.api.misc.IDisableableItem; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.item.IItemTier; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.ToolItem; -import net.minecraft.tags.ITag; +import net.minecraft.tags.Tag; +import net.minecraft.tags.TagKey; +import net.minecraft.world.item.DiggerItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Tier; +import net.minecraft.world.level.block.Block; import java.util.Set; -public class ItemToolAA extends ToolItem implements IDisableableItem { +public class ItemToolAA extends DiggerItem implements IDisableableItem { private final String name; private final ItemStack repairItem; - private final ITag repairTag; + private final TagKey repairTag; private final boolean disabled; - public ItemToolAA(float p_i48512_1_, float p_i48512_2_, IItemTier p_i48512_3_, Set p_i48512_4_, Properties p_i48512_5_, String name, ItemStack repairItem, ITag repairTag) { + public ItemToolAA(float p_i48512_1_, float p_i48512_2_, Tier p_i48512_3_, TagKey p_i48512_4_, Properties p_i48512_5_, String name, ItemStack repairItem, TagKey repairTag) { super(p_i48512_1_, p_i48512_2_, p_i48512_3_, p_i48512_4_, p_i48512_5_); this.name = name; @@ -63,7 +64,7 @@ public class ItemToolAA extends ToolItem implements IDisableableItem { if (StackUtil.isValid(this.repairItem)) { return ItemUtil.areItemsEqual(this.repairItem, stack, false); } else if (this.repairTag != null) { - return repairTag.contains(stack.getItem()); + return stack.is(repairTag); } return false; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java index 9b0267e30..f93d77faf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java @@ -14,14 +14,14 @@ import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.mod.crafting.ColorChangeRecipe; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.item.BlockItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Direction; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.AABB; import java.util.List; import java.util.Random; @@ -62,12 +62,12 @@ public class LensColor extends Lens { } } - List items = tile.getWorldObject().getEntitiesOfClass(ItemEntity.class, new AxisAlignedBB(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX() + 1, hitBlock.getY() + 1, hitBlock.getZ() + 1)); + List items = tile.getWorldObject().getEntitiesOfClass(ItemEntity.class, new AABB(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX() + 1, hitBlock.getY() + 1, hitBlock.getZ() + 1)); for (ItemEntity item : items) { if (item.isAlive() && !item.getItem().isEmpty() && tile.getEnergy() >= ENERGY_USE) { ItemStack newStack = this.tryConvert(item.getItem()); if (StackUtil.isValid(newStack)) { - item.remove(); + item.discard(); ItemEntity newItem = new ItemEntity(tile.getWorldObject(), item.getX(), item.getY(), item.getZ(), newStack); tile.getWorldObject().addFreshEntity(newItem); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java index af7e07a96..f38985e0c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java @@ -13,10 +13,10 @@ package de.ellpeck.actuallyadditions.mod.items.lens; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.mod.misc.DamageSources; -import net.minecraft.block.BlockState; -import net.minecraft.entity.LivingEntity; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.world.entity.LivingEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.AABB; import java.util.List; @@ -24,7 +24,7 @@ public class LensDeath extends Lens { @Override public boolean invoke(BlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile) { - List entities = tile.getWorldObject().getEntitiesOfClass(LivingEntity.class, new AxisAlignedBB(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX() + 1, hitBlock.getY() + 1, hitBlock.getZ() + 1)); + List entities = tile.getWorldObject().getEntitiesOfClass(LivingEntity.class, new AABB(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX() + 1, hitBlock.getY() + 1, hitBlock.getZ() + 1)); for (LivingEntity entity : entities) { int use = this.getUsePerEntity(); if (tile.getEnergy() >= use) { @@ -34,7 +34,7 @@ public class LensDeath extends Lens { } } - return !hitState.getBlock().isAir(hitState, tile.getWorldObject(), hitBlock); + return !hitState.isAir(); } protected void onAttacked(LivingEntity entity, IAtomicReconstructor tile) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java index 044db3344..336fa5596 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java @@ -12,10 +12,10 @@ package de.ellpeck.actuallyadditions.mod.items.lens; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.lens.Lens; -import net.minecraft.block.BlockState; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.Explosion; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.block.state.BlockState; public class LensDetonation extends Lens { @@ -23,9 +23,9 @@ public class LensDetonation extends Lens { @Override public boolean invoke(BlockState state, BlockPos hitBlock, IAtomicReconstructor tile) { - if (hitBlock != null && !state.getBlock().isAir(state, tile.getWorldObject(), hitBlock)) { + if (hitBlock != null && !state.isAir()) { if (tile.getEnergy() >= ENERGY_USE) { - tile.getWorldObject().explode(null, hitBlock.getX() + 0.5, hitBlock.getY() + 0.5, hitBlock.getZ() + 0.5, 10F, true, Explosion.Mode.NONE); // TODO: [port][test] make sure this is the right explosion mode + tile.getWorldObject().explode(null, hitBlock.getX() + 0.5, hitBlock.getY() + 0.5, hitBlock.getZ() + 0.5, 10F, true, Explosion.BlockInteraction.NONE); // TODO: [port][test] make sure this is the right explosion mode tile.extractEnergy(ENERGY_USE); } return true; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisenchanting.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisenchanting.java index b4d5ad260..a20cb421b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisenchanting.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDisenchanting.java @@ -14,18 +14,18 @@ import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.lens.Lens; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.BlockState; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentData; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.item.EnchantedBookItem; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.util.Direction; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.item.EnchantedBookItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.item.enchantment.EnchantmentHelper; +import net.minecraft.world.item.enchantment.EnchantmentInstance; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.AABB; import java.util.List; import java.util.Map; @@ -37,7 +37,7 @@ public class LensDisenchanting extends Lens { @Override public boolean invoke(BlockState hitState, BlockPos hitBlock, IAtomicReconstructor tile) { if (tile.getEnergy() >= ENERGY_USE) { - List items = tile.getWorldObject().getEntitiesOfClass(ItemEntity.class, new AxisAlignedBB(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX() + 1, hitBlock.getY() + 1, hitBlock.getZ() + 1)); + List items = tile.getWorldObject().getEntitiesOfClass(ItemEntity.class, new AABB(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX() + 1, hitBlock.getY() + 1, hitBlock.getZ() + 1)); if (items != null && !items.isEmpty()) { ItemEntity book = null; ItemEntity toDisenchant = null; @@ -84,12 +84,12 @@ public class LensDisenchanting extends Lens { } ItemUtil.removeEnchantment(newDisenchantStack, enchant); - EnchantedBookItem.addEnchantment(newBookStack, new EnchantmentData(enchant, level)); + EnchantedBookItem.addEnchantment(newBookStack, new EnchantmentInstance(enchant, level)); ItemEntity disenchanted = new ItemEntity(toDisenchant.getCommandSenderWorld(), toDisenchant.getX(), toDisenchant.getY(), toDisenchant.getZ(), newDisenchantStack); ItemEntity newBook = new ItemEntity(book.getCommandSenderWorld(), book.getX(), book.getY(), book.getZ(), newBookStack); - toDisenchant.remove(); - book.remove(); + toDisenchant.discard(); + book.discard(); tile.getWorldObject().addFreshEntity(newBook); tile.getWorldObject().addFreshEntity(disenchanted); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensKiller.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensKiller.java index f763a94ef..9e5178cd2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensKiller.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensKiller.java @@ -11,9 +11,9 @@ package de.ellpeck.actuallyadditions.mod.items.lens; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; -import net.minecraft.entity.LivingEntity; -import net.minecraft.util.DamageSource; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.entity.LivingEntity; import net.minecraftforge.common.util.FakePlayerFactory; public class LensKiller extends LensDeath { @@ -21,7 +21,7 @@ public class LensKiller extends LensDeath { @Override protected void onAttacked(LivingEntity entity, IAtomicReconstructor tile) { if (!tile.getWorldObject().isClientSide) { - entity.hurt(DamageSource.playerAttack(FakePlayerFactory.getMinecraft((ServerWorld) tile.getWorldObject())), 20); + entity.hurt(DamageSource.playerAttack(FakePlayerFactory.getMinecraft((ServerLevel) tile.getWorldObject())), 20); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensMining.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensMining.java index d43fedef4..b235f1596 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensMining.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensMining.java @@ -13,24 +13,18 @@ package de.ellpeck.actuallyadditions.mod.items.lens; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.lens.Lens; -import de.ellpeck.actuallyadditions.api.recipe.WeightedOre; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; -import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.crafting.MiningLensRecipe; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.NetherrackBlock; -import net.minecraft.item.BlockItem; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.WeightedRandom; -import net.minecraft.util.math.BlockPos; -import net.minecraftforge.common.Tags; +import net.minecraft.core.BlockPos; +import net.minecraft.util.random.WeightedRandom; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.state.BlockState; import java.util.ArrayList; -import java.util.Collections; import java.util.List; -import java.util.stream.Collectors; +import java.util.Optional; public class LensMining extends Lens { @@ -104,11 +98,11 @@ public class LensMining extends Lens { if (!ores.isEmpty()) { int totalWeight = WeightedRandom.getTotalWeight(ores); - MiningLensRecipe ore = WeightedRandom.getRandomItem(tile.getWorldObject().random, ores); + Optional ore = WeightedRandom.getRandomItem(tile.getWorldObject().random, ores); - ItemStack stack = ore.getResultItem().copy(); + ItemStack stack = ore.map(recipe -> recipe.getResultItem().copy()).orElse(ItemStack.EMPTY); - if (stack.getItem() instanceof BlockItem) { + if (!stack.isEmpty() && stack.getItem() instanceof BlockItem) { Block toPlace = Block.byItem(stack.getItem()); BlockState state2Place = toPlace.defaultBlockState(); tile.getWorldObject().setBlock(hitPos, state2Place, 2); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/Crystals.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/Crystals.java index 5fe15bc8b..01d8f97d0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/Crystals.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/Crystals.java @@ -10,9 +10,9 @@ package de.ellpeck.actuallyadditions.mod.items.metalists; -import net.minecraft.util.IStringSerializable; +import net.minecraft.util.StringRepresentable; -public enum Crystals implements IStringSerializable { +public enum Crystals implements StringRepresentable { REDSTONE("red", 0xFF2F21, 0x9e2b27), LAPIS("blue", 0x5171FF, 0x253293), DIAMOND("light_blue", 0x35F1FF, 0x6387d2), diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheDusts.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheDusts.java index 77d43a763..78ecc7bc0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheDusts.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheDusts.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.items.metalists; -import net.minecraft.item.Rarity; +import net.minecraft.world.item.Rarity; @Deprecated public enum TheDusts { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheFoods.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheFoods.java index 0ff958bcd..cc130cca3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheFoods.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheFoods.java @@ -11,9 +11,9 @@ package de.ellpeck.actuallyadditions.mod.items.metalists; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.item.Rarity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.Rarity; @Deprecated public enum TheFoods { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheJams.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheJams.java index efff4a1e3..350879b62 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheJams.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/TheJams.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.items.metalists; -import net.minecraft.item.Rarity; +import net.minecraft.world.item.Rarity; @Deprecated public enum TheJams { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/ThePotionRings.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/ThePotionRings.java index 633763961..e44d51bf8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/ThePotionRings.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/metalists/ThePotionRings.java @@ -10,19 +10,19 @@ package de.ellpeck.actuallyadditions.mod.items.metalists; -import net.minecraft.block.Blocks; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.item.Rarity; -import net.minecraft.potion.Effect; -import net.minecraft.potion.Effects; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.effect.MobEffects; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.Rarity; +import net.minecraft.world.level.block.Blocks; @Deprecated public enum ThePotionRings { SPEED( 8171462, - Effects.MOVEMENT_SPEED, + MobEffects.MOVEMENT_SPEED, 0, 1, 10, @@ -32,7 +32,7 @@ public enum ThePotionRings { ), HASTE( 14270531, - Effects.DIG_SPEED, + MobEffects.DIG_SPEED, 0, 1, 10, @@ -42,7 +42,7 @@ public enum ThePotionRings { ), STRENGTH( 9643043, - Effects.DAMAGE_BOOST, + MobEffects.DAMAGE_BOOST, 0, 1, 10, @@ -52,7 +52,7 @@ public enum ThePotionRings { ), JUMP_BOOST( 7889559, - Effects.JUMP, + MobEffects.JUMP, 0, 1, 10, @@ -62,7 +62,7 @@ public enum ThePotionRings { ), REGEN( 13458603, - Effects.REGENERATION, + MobEffects.REGENERATION, 0, 1, 50, @@ -72,7 +72,7 @@ public enum ThePotionRings { ), RESISTANCE( 10044730, - Effects.DAMAGE_RESISTANCE, + MobEffects.DAMAGE_RESISTANCE, 0, 1, 10, @@ -82,7 +82,7 @@ public enum ThePotionRings { ), FIRE_RESISTANCE( 14981690, - Effects.FIRE_RESISTANCE, + MobEffects.FIRE_RESISTANCE, 0, 0, 10, @@ -92,7 +92,7 @@ public enum ThePotionRings { ), WATER_BREATHING( 3035801, - Effects.WATER_BREATHING, + MobEffects.WATER_BREATHING, 0, 0, 10, @@ -102,7 +102,7 @@ public enum ThePotionRings { ), INVISIBILITY( 8356754, - Effects.INVISIBILITY, + MobEffects.INVISIBILITY, 0, 0, 10, @@ -112,7 +112,7 @@ public enum ThePotionRings { ), NIGHT_VISION( 2039713, - Effects.NIGHT_VISION, + MobEffects.NIGHT_VISION, 0, 0, 300, @@ -124,14 +124,14 @@ public enum ThePotionRings { public final String name; public final int color; public final Rarity rarity; - public final Effect effect; + public final MobEffect effect; public final int normalAmplifier; public final int advancedAmplifier; public final int activeTime; public final boolean needsWaitBeforeActivating; public final ItemStack craftingItem; - ThePotionRings(int color, Effect effect, int normalAmplifier, int advancedAmplifier, int activeTime, boolean needsWaitBeforeActivating, Rarity rarity, ItemStack craftingItem) { + ThePotionRings(int color, MobEffect effect, int normalAmplifier, int advancedAmplifier, int activeTime, boolean needsWaitBeforeActivating, Rarity rarity, ItemStack craftingItem) { this.name = effect.getDisplayName().getString(); this.color = color; this.rarity = rarity; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/misc/YummyItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/misc/YummyItem.java index 2640d26b9..c85444e2a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/misc/YummyItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/misc/YummyItem.java @@ -3,9 +3,9 @@ package de.ellpeck.actuallyadditions.mod.items.misc; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import de.ellpeck.actuallyadditions.mod.items.base.ActuallyItem; -import net.minecraft.item.Food; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; +import net.minecraft.world.food.FoodProperties; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; public class YummyItem extends ActuallyItem { private final Foods food; @@ -17,45 +17,45 @@ public class YummyItem extends ActuallyItem { } public enum Foods { - CHEESE(new Food.Builder().nutrition(1).saturationMod(0.05F), 3), - PUMPKIN_STEW(new Food.Builder().nutrition(6).saturationMod(0.3F), 30, true, new ItemStack(Items.BOWL)), - CARROT_JUICE(new Food.Builder().nutrition(4).saturationMod(0.2F), 20, true, new ItemStack(Items.GLASS_BOTTLE)), - FISH_N_CHIPS(new Food.Builder().nutrition(14).saturationMod(0.65F), 40, new ItemStack(ActuallyItems.PAPER_CONE.get())), - FRENCH_FRIES(new Food.Builder().nutrition(10).saturationMod(0.6F), 32, new ItemStack(ActuallyItems.PAPER_CONE.get())), - FRENCH_FRY(new Food.Builder().nutrition(2).saturationMod(0.025F), 3), - SPAGHETTI(new Food.Builder().nutrition(7).saturationMod(0.4F), 38, new ItemStack(Items.BOWL)), - NOODLE(new Food.Builder().nutrition(1).saturationMod(0.01F), 3), - CHOCOLATE_CAKE(new Food.Builder().nutrition(16).saturationMod(0.8F), 45), - CHOCOLATE(new Food.Builder().nutrition(3).saturationMod(0.3F), 15), - TOAST(new Food.Builder().nutrition(3).saturationMod(0.08F), 25), - SUBMARINE_SANDWICH(new Food.Builder().nutrition(9).saturationMod(0.4F), 40), - BIG_COOKIE(new Food.Builder().nutrition(4).saturationMod(0.25F), 20), - HAMBURGER(new Food.Builder().nutrition(13).saturationMod(0.65F), 40), - PIZZA(new Food.Builder().nutrition(16).saturationMod(0.8F), 45), - BAGUETTE(new Food.Builder().nutrition(6).saturationMod(0.5F), 25), - RICE(new Food.Builder().nutrition(2).saturationMod(0.05F), 10), - RICE_BREAD(new Food.Builder().nutrition(6).saturationMod(0.5F), 25), - DOUGHNUT(new Food.Builder().nutrition(2).saturationMod(0.1F), 10), - CHOCOLATE_TOAST(new Food.Builder().nutrition(5).saturationMod(0.2F), 40), - BACON(new Food.Builder().nutrition(4).saturationMod(0.1F), 30); + CHEESE(new FoodProperties.Builder().nutrition(1).saturationMod(0.05F), 3), + PUMPKIN_STEW(new FoodProperties.Builder().nutrition(6).saturationMod(0.3F), 30, true, new ItemStack(Items.BOWL)), + CARROT_JUICE(new FoodProperties.Builder().nutrition(4).saturationMod(0.2F), 20, true, new ItemStack(Items.GLASS_BOTTLE)), + FISH_N_CHIPS(new FoodProperties.Builder().nutrition(14).saturationMod(0.65F), 40, new ItemStack(ActuallyItems.PAPER_CONE.get())), + FRENCH_FRIES(new FoodProperties.Builder().nutrition(10).saturationMod(0.6F), 32, new ItemStack(ActuallyItems.PAPER_CONE.get())), + FRENCH_FRY(new FoodProperties.Builder().nutrition(2).saturationMod(0.025F), 3), + SPAGHETTI(new FoodProperties.Builder().nutrition(7).saturationMod(0.4F), 38, new ItemStack(Items.BOWL)), + NOODLE(new FoodProperties.Builder().nutrition(1).saturationMod(0.01F), 3), + CHOCOLATE_CAKE(new FoodProperties.Builder().nutrition(16).saturationMod(0.8F), 45), + CHOCOLATE(new FoodProperties.Builder().nutrition(3).saturationMod(0.3F), 15), + TOAST(new FoodProperties.Builder().nutrition(3).saturationMod(0.08F), 25), + SUBMARINE_SANDWICH(new FoodProperties.Builder().nutrition(9).saturationMod(0.4F), 40), + BIG_COOKIE(new FoodProperties.Builder().nutrition(4).saturationMod(0.25F), 20), + HAMBURGER(new FoodProperties.Builder().nutrition(13).saturationMod(0.65F), 40), + PIZZA(new FoodProperties.Builder().nutrition(16).saturationMod(0.8F), 45), + BAGUETTE(new FoodProperties.Builder().nutrition(6).saturationMod(0.5F), 25), + RICE(new FoodProperties.Builder().nutrition(2).saturationMod(0.05F), 10), + RICE_BREAD(new FoodProperties.Builder().nutrition(6).saturationMod(0.5F), 25), + DOUGHNUT(new FoodProperties.Builder().nutrition(2).saturationMod(0.1F), 10), + CHOCOLATE_TOAST(new FoodProperties.Builder().nutrition(5).saturationMod(0.2F), 40), + BACON(new FoodProperties.Builder().nutrition(4).saturationMod(0.1F), 30); - Food food; + FoodProperties food; int useDuration; boolean isDrunken; ItemStack returnItem; - Foods(Food.Builder food, int useDuration, boolean isDrunken, ItemStack returnItem) { + Foods(FoodProperties.Builder food, int useDuration, boolean isDrunken, ItemStack returnItem) { this.food = food.build(); this.useDuration = useDuration; this.isDrunken = isDrunken; this.returnItem = returnItem; } - Foods(Food.Builder food, int useDuration) { + Foods(FoodProperties.Builder food, int useDuration) { this(food, useDuration, false, ItemStack.EMPTY); } - Foods(Food.Builder food, int useDuration, ItemStack returnItem) { + Foods(FoodProperties.Builder food, int useDuration, ItemStack returnItem) { this(food, useDuration, false, returnItem); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/EmpowererRecipeCategory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/EmpowererRecipeCategory.java index beae11afb..c7a3f9d8d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/EmpowererRecipeCategory.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/EmpowererRecipeCategory.java @@ -1,97 +1,97 @@ -/* - * This file ("EmpowererRecipeCategory.java") is part of the Actually Additions mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015-2017 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.jei; - -import java.util.ArrayList; -import java.util.Arrays; - -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.crafting.EmpowererRecipe; -import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; -import mezz.jei.api.gui.drawable.IDrawable; -import mezz.jei.api.gui.drawable.IDrawableStatic; -import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; -import mezz.jei.api.recipe.category.IRecipeCategory; -import net.minecraft.client.resources.I18n; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; - -public class EmpowererRecipeCategory implements IRecipeCategory { - - public static final ResourceLocation ID = new ResourceLocation(ActuallyAdditions.MODID, "empowerer_jei"); - - private final IDrawableStatic background; - - public EmpowererRecipeCategory(IGuiHelper helper) { - this.background = helper.drawableBuilder(AssetUtil.getGuiLocation("gui_nei_empowerer"), 0, 0, 135, 80).setTextureSize(256,256).build(); - } - - @Override - public ResourceLocation getUid() { - return ID; - } - - @Override - public Class getRecipeClass() { - return EmpowererRecipe.class; - } - - @Override - public String getTitle() { - return I18n.get("container.actuallyadditions.empowerer"); - } - - @Override - public IDrawable getBackground() { - return background; - } - - @Override - public IDrawable getIcon() { - return null; - } - - @Override - public void setIngredients(EmpowererRecipe empowererRecipe, IIngredients ingredients) { - ArrayList input = new ArrayList<>(); - input.addAll(Arrays.asList(empowererRecipe.getInput().getItems())); - input.addAll(Arrays.asList(empowererRecipe.getStandOne().getItems())); - input.addAll(Arrays.asList(empowererRecipe.getStandTwo().getItems())); - input.addAll(Arrays.asList(empowererRecipe.getStandThree().getItems())); - input.addAll(Arrays.asList(empowererRecipe.getStandFour().getItems())); - ingredients.setInputs(VanillaTypes.ITEM, input); - ingredients.setOutput(VanillaTypes.ITEM, empowererRecipe.getOutput()); - } - - @Override - public void setRecipe(IRecipeLayout recipeLayout, EmpowererRecipe recipe, IIngredients ingredients) { - recipeLayout.getItemStacks().init(0, true, 31, 31); - recipeLayout.getItemStacks().set(0, Arrays.asList(recipe.getInput().getItems())); - - recipeLayout.getItemStacks().init(1, true, 1, 31); - recipeLayout.getItemStacks().set(1, Arrays.asList(recipe.getStandOne().getItems())); - - recipeLayout.getItemStacks().init(2, true, 31, 1); - recipeLayout.getItemStacks().set(2, Arrays.asList(recipe.getStandTwo().getItems())); - - recipeLayout.getItemStacks().init(3, true, 61, 31); - recipeLayout.getItemStacks().set(3, Arrays.asList(recipe.getStandThree().getItems())); - - recipeLayout.getItemStacks().init(4, true, 31, 61); - recipeLayout.getItemStacks().set(4, Arrays.asList(recipe.getStandFour().getItems())); - - recipeLayout.getItemStacks().init(5, false, 112, 31); - recipeLayout.getItemStacks().set(5, recipe.getResultItem()); - } -} +///* +// * This file ("EmpowererRecipeCategory.java") is part of the Actually Additions mod for Minecraft. +// * It is created and owned by Ellpeck and distributed +// * under the Actually Additions License to be found at +// * http://ellpeck.de/actaddlicense +// * View the source code at https://github.com/Ellpeck/ActuallyAdditions +// * +// * © 2015-2017 Ellpeck +// */ +// +//package de.ellpeck.actuallyadditions.mod.jei; +// +//import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +//import de.ellpeck.actuallyadditions.mod.crafting.EmpowererRecipe; +//import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +//import mezz.jei.api.constants.VanillaTypes; +//import mezz.jei.api.gui.IRecipeLayout; +//import mezz.jei.api.gui.drawable.IDrawable; +//import mezz.jei.api.gui.drawable.IDrawableStatic; +//import mezz.jei.api.helpers.IGuiHelper; +//import mezz.jei.api.ingredients.IIngredients; +//import mezz.jei.api.recipe.category.IRecipeCategory; +//import net.minecraft.client.resources.language.I18n; +//import net.minecraft.resources.ResourceLocation; +//import net.minecraft.world.item.ItemStack; +// +//import java.util.ArrayList; +//import java.util.Arrays; +// +//public class EmpowererRecipeCategory implements IRecipeCategory { +// +// public static final ResourceLocation ID = new ResourceLocation(ActuallyAdditions.MODID, "empowerer_jei"); +// +// private final IDrawableStatic background; +// +// public EmpowererRecipeCategory(IGuiHelper helper) { +// this.background = helper.drawableBuilder(AssetUtil.getGuiLocation("gui_nei_empowerer"), 0, 0, 135, 80).setTextureSize(256,256).build(); +// } +// +// @Override +// public ResourceLocation getUid() { +// return ID; +// } +// +// @Override +// public Class getRecipeClass() { +// return EmpowererRecipe.class; +// } +// +// @Override +// public String getTitle() { +// return I18n.get("container.actuallyadditions.empowerer"); +// } +// +// @Override +// public IDrawable getBackground() { +// return background; +// } +// +// @Override +// public IDrawable getIcon() { +// return null; +// } +// +// @Override +// public void setIngredients(EmpowererRecipe empowererRecipe, IIngredients ingredients) { +// ArrayList input = new ArrayList<>(); +// input.addAll(Arrays.asList(empowererRecipe.getInput().getItems())); +// input.addAll(Arrays.asList(empowererRecipe.getStandOne().getItems())); +// input.addAll(Arrays.asList(empowererRecipe.getStandTwo().getItems())); +// input.addAll(Arrays.asList(empowererRecipe.getStandThree().getItems())); +// input.addAll(Arrays.asList(empowererRecipe.getStandFour().getItems())); +// ingredients.setInputs(VanillaTypes.ITEM, input); +// ingredients.setOutput(VanillaTypes.ITEM, empowererRecipe.getOutput()); +// } +// +// @Override +// public void setRecipe(IRecipeLayout recipeLayout, EmpowererRecipe recipe, IIngredients ingredients) { +// recipeLayout.getItemStacks().init(0, true, 31, 31); +// recipeLayout.getItemStacks().set(0, Arrays.asList(recipe.getInput().getItems())); +// +// recipeLayout.getItemStacks().init(1, true, 1, 31); +// recipeLayout.getItemStacks().set(1, Arrays.asList(recipe.getStandOne().getItems())); +// +// recipeLayout.getItemStacks().init(2, true, 31, 1); +// recipeLayout.getItemStacks().set(2, Arrays.asList(recipe.getStandTwo().getItems())); +// +// recipeLayout.getItemStacks().init(3, true, 61, 31); +// recipeLayout.getItemStacks().set(3, Arrays.asList(recipe.getStandThree().getItems())); +// +// recipeLayout.getItemStacks().init(4, true, 31, 61); +// recipeLayout.getItemStacks().set(4, Arrays.asList(recipe.getStandFour().getItems())); +// +// recipeLayout.getItemStacks().init(5, false, 112, 31); +// recipeLayout.getItemStacks().set(5, recipe.getResultItem()); +// } +//} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/FermentingCategory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/FermentingCategory.java index 8cebb0751..f334795ed 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/FermentingCategory.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/FermentingCategory.java @@ -1,84 +1,84 @@ -package de.ellpeck.actuallyadditions.mod.jei; - -import com.mojang.blaze3d.matrix.MatrixStack; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.crafting.FermentingRecipe; -import de.ellpeck.actuallyadditions.mod.inventory.gui.FluidDisplay; -import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; -import mezz.jei.api.gui.drawable.IDrawable; -import mezz.jei.api.gui.drawable.IDrawableStatic; -import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; -import mezz.jei.api.recipe.category.IRecipeCategory; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.fluids.FluidAttributes; - -import javax.annotation.Nonnull; - -public class FermentingCategory implements IRecipeCategory { - public static final ResourceLocation ID = new ResourceLocation(ActuallyAdditions.MODID, "fermenting_jei"); - - private final IDrawableStatic background; - - public FermentingCategory(IGuiHelper guiHelper) { - background = guiHelper.drawableBuilder(new ResourceLocation(ActuallyAdditions.MODID, "textures/gui/gui_fermenting_barrel.png"), 41, 4, 94, 86).setTextureSize(256,256).build(); - } - - @Override - public ResourceLocation getUid() { - return ID; - } - - @Override - public Class getRecipeClass() { - return FermentingRecipe.class; - } - - @Override - public String getTitle() { - return "Fermenting Recipe"; - } - - @Override - public IDrawable getBackground() { - return background; - } - - @Override - public IDrawable getIcon() { - return null; - } - - @Override - public void setIngredients(@Nonnull FermentingRecipe fermentingRecipe, @Nonnull IIngredients ingredients) { - ingredients.setInput(VanillaTypes.FLUID, fermentingRecipe.getInput()); - ingredients.setOutput(VanillaTypes.FLUID, fermentingRecipe.getOutput()); - } - - @Override - public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull FermentingRecipe fermentingRecipe, @Nonnull IIngredients ingredients) { - int maxFluid = Math.max(FluidAttributes.BUCKET_VOLUME, Math.max(fermentingRecipe.getInput().getAmount(), fermentingRecipe.getOutput().getAmount())); - - fermentingRecipe.setInputDisplay(new FluidDisplay(19, 1, fermentingRecipe.getInput(), maxFluid, false)); - fermentingRecipe.setOutputDisplay(new FluidDisplay(19+38, 1, fermentingRecipe.getOutput(), maxFluid, false)); - } - - @Override - public void draw(FermentingRecipe recipe, MatrixStack matrixStack, double mouseX, double mouseY) { - IRecipeCategory.super.draw(recipe, matrixStack, mouseX, mouseY); - - recipe.getInputDisplay().ifPresent(display -> { - display.draw(matrixStack); - display.render(matrixStack, (int) mouseX, (int) mouseY); - }); - - recipe.getOutputDisplay().ifPresent(display -> { - display.draw(matrixStack); - display.render(matrixStack, (int) mouseX, (int) mouseY); - }); - - - //TODO draw the progress indicator, scaled to the recipe duration. - } -} +//package de.ellpeck.actuallyadditions.mod.jei; +// +//import com.mojang.blaze3d.vertex.PoseStack; +//import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +//import de.ellpeck.actuallyadditions.mod.crafting.FermentingRecipe; +//import de.ellpeck.actuallyadditions.mod.inventory.gui.FluidDisplay; +//import mezz.jei.api.constants.VanillaTypes; +//import mezz.jei.api.gui.IRecipeLayout; +//import mezz.jei.api.gui.drawable.IDrawable; +//import mezz.jei.api.gui.drawable.IDrawableStatic; +//import mezz.jei.api.helpers.IGuiHelper; +//import mezz.jei.api.ingredients.IIngredients; +//import mezz.jei.api.recipe.category.IRecipeCategory; +//import net.minecraft.resources.ResourceLocation; +//import net.minecraftforge.fluids.FluidAttributes; +// +//import javax.annotation.Nonnull; +// +//public class FermentingCategory implements IRecipeCategory { +// public static final ResourceLocation ID = new ResourceLocation(ActuallyAdditions.MODID, "fermenting_jei"); +// +// private final IDrawableStatic background; +// +// public FermentingCategory(IGuiHelper guiHelper) { +// background = guiHelper.drawableBuilder(new ResourceLocation(ActuallyAdditions.MODID, "textures/gui/gui_fermenting_barrel.png"), 41, 4, 94, 86).setTextureSize(256,256).build(); +// } +// +// @Override +// public ResourceLocation getUid() { +// return ID; +// } +// +// @Override +// public Class getRecipeClass() { +// return FermentingRecipe.class; +// } +// +// @Override +// public String getTitle() { +// return "Fermenting Recipe"; +// } +// +// @Override +// public IDrawable getBackground() { +// return background; +// } +// +// @Override +// public IDrawable getIcon() { +// return null; +// } +// +// @Override +// public void setIngredients(@Nonnull FermentingRecipe fermentingRecipe, @Nonnull IIngredients ingredients) { +// ingredients.setInput(VanillaTypes.FLUID, fermentingRecipe.getInput()); +// ingredients.setOutput(VanillaTypes.FLUID, fermentingRecipe.getOutput()); +// } +// +// @Override +// public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull FermentingRecipe fermentingRecipe, @Nonnull IIngredients ingredients) { +// int maxFluid = Math.max(FluidAttributes.BUCKET_VOLUME, Math.max(fermentingRecipe.getInput().getAmount(), fermentingRecipe.getOutput().getAmount())); +// +// fermentingRecipe.setInputDisplay(new FluidDisplay(19, 1, fermentingRecipe.getInput(), maxFluid, false)); +// fermentingRecipe.setOutputDisplay(new FluidDisplay(19+38, 1, fermentingRecipe.getOutput(), maxFluid, false)); +// } +// +// @Override +// public void draw(FermentingRecipe recipe, PoseStack matrixStack, double mouseX, double mouseY) { +// IRecipeCategory.super.draw(recipe, matrixStack, mouseX, mouseY); +// +// recipe.getInputDisplay().ifPresent(display -> { +// display.draw(matrixStack); +// display.render(matrixStack, (int) mouseX, (int) mouseY); +// }); +// +// recipe.getOutputDisplay().ifPresent(display -> { +// display.draw(matrixStack); +// display.render(matrixStack, (int) mouseX, (int) mouseY); +// }); +// +// +// //TODO draw the progress indicator, scaled to the recipe duration. +// } +//} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/JEIActuallyAdditionsPlugin.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/JEIActuallyAdditionsPlugin.java index 98caf9a80..15da7d1cc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/JEIActuallyAdditionsPlugin.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/JEIActuallyAdditionsPlugin.java @@ -11,20 +11,18 @@ package de.ellpeck.actuallyadditions.mod.jei; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; -import de.ellpeck.actuallyadditions.mod.crafting.ActuallyRecipes; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import mezz.jei.api.IModPlugin; import mezz.jei.api.JeiPlugin; -import mezz.jei.api.constants.VanillaRecipeCategoryUid; +import mezz.jei.api.constants.RecipeTypes; import mezz.jei.api.helpers.IJeiHelpers; import mezz.jei.api.registration.IRecipeCatalystRegistration; import mezz.jei.api.registration.IRecipeCategoryRegistration; import mezz.jei.api.registration.IRecipeRegistration; import net.minecraft.client.Minecraft; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.world.World; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; @JeiPlugin public class JEIActuallyAdditionsPlugin implements IModPlugin { @@ -38,19 +36,19 @@ public class JEIActuallyAdditionsPlugin implements IModPlugin { public void registerCategories(IRecipeCategoryRegistration registry) { IJeiHelpers helpers = registry.getJeiHelpers(); - registry.addRecipeCategories(new FermentingCategory(helpers.getGuiHelper())); - registry.addRecipeCategories(new LaserRecipeCategory(helpers.getGuiHelper())); - registry.addRecipeCategories(new EmpowererRecipeCategory(helpers.getGuiHelper())); +// registry.addRecipeCategories(new FermentingCategory(helpers.getGuiHelper())); //TODO: re-enable after refactor jei compat +// registry.addRecipeCategories(new LaserRecipeCategory(helpers.getGuiHelper())); //TODO: re-enable after refactor jei compat +// registry.addRecipeCategories(new EmpowererRecipeCategory(helpers.getGuiHelper())); //TODO: re-enable after refactor jei compat //registry.addRecipeCategories(new CoffeeMachineRecipeCategory(helpers.getGuiHelper()), new CompostRecipeCategory(helpers.getGuiHelper()), new CrusherRecipeCategory(helpers.getGuiHelper()), new ReconstructorRecipeCategory(helpers.getGuiHelper()), new EmpowererRecipeCategory(helpers.getGuiHelper()), new BookletRecipeCategory(helpers.getGuiHelper())); } @Override public void registerRecipeCatalysts(IRecipeCatalystRegistration registry) { - registry.addRecipeCatalyst(new ItemStack(ActuallyItems.CRAFTER_ON_A_STICK.get()), VanillaRecipeCategoryUid.CRAFTING); - registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.FERMENTING_BARREL.getItem()), FermentingCategory.ID); - registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.getItem()), LaserRecipeCategory.ID); - registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.EMPOWERER.getItem()), EmpowererRecipeCategory.ID); + registry.addRecipeCatalyst(new ItemStack(ActuallyItems.CRAFTER_ON_A_STICK.get()), RecipeTypes.CRAFTING); +// registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.FERMENTING_BARREL.getItem()), FermentingCategory.ID); //TODO: re-enable after refactor jei compat +// registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.getItem()), LaserRecipeCategory.ID); //TODO: re-enable after refactor jei compat +// registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.EMPOWERER.getItem()), EmpowererRecipeCategory.ID); //TODO: re-enable after refactor jei compat // registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.blockFurnaceDouble.get()), VanillaRecipeCategoryUid.SMELTING); // registry.addRecipeCatalyst(new ItemStack(ActuallyBlocks.blockGrinder.get()), CrusherRecipeCategory.NAME); @@ -64,11 +62,11 @@ public class JEIActuallyAdditionsPlugin implements IModPlugin { @Override public void registerRecipes(IRecipeRegistration registry) { - World level = Minecraft.getInstance().level; + Level level = Minecraft.getInstance().level; - registry.addRecipes(level.getRecipeManager().getAllRecipesFor(ActuallyRecipes.Types.FERMENTING), FermentingCategory.ID); - registry.addRecipes(level.getRecipeManager().getAllRecipesFor(ActuallyRecipes.Types.LASER), LaserRecipeCategory.ID); - registry.addRecipes(level.getRecipeManager().getAllRecipesFor(ActuallyRecipes.Types.EMPOWERING), EmpowererRecipeCategory.ID); +// registry.addRecipes(level.getRecipeManager().getAllRecipesFor(ActuallyRecipes.Types.FERMENTING), FermentingCategory.ID); //TODO: re-enable after refactor jei compat +// registry.addRecipes(level.getRecipeManager().getAllRecipesFor(ActuallyRecipes.Types.LASER), LaserRecipeCategory.ID); //TODO: re-enable after refactor jei compat +// registry.addRecipes(level.getRecipeManager().getAllRecipesFor(ActuallyRecipes.Types.EMPOWERING), EmpowererRecipeCategory.ID); //TODO: re-enable after refactor jei compat //registry.addRecipes(ActuallyAdditionsAPI.BOOKLET_PAGES_WITH_ITEM_OR_FLUID_DATA, BookletRecipeCategory.NAME); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/LaserRecipeCategory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/LaserRecipeCategory.java index 2332b90e5..bd5a7e3fa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/LaserRecipeCategory.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/LaserRecipeCategory.java @@ -1,83 +1,83 @@ -/* - * This file ("ReconstructorRecipeCategory.java") is part of the Actually Additions mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015-2017 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.jei; - -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; -import de.ellpeck.actuallyadditions.mod.crafting.LaserRecipe; -import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import mezz.jei.api.constants.VanillaTypes; -import mezz.jei.api.gui.IRecipeLayout; -import mezz.jei.api.gui.drawable.IDrawable; -import mezz.jei.api.gui.drawable.IDrawableStatic; -import mezz.jei.api.helpers.IGuiHelper; -import mezz.jei.api.ingredients.IIngredients; -import mezz.jei.api.recipe.category.IRecipeCategory; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.TranslationTextComponent; - -import javax.annotation.Nonnull; -import java.util.Arrays; - -public class LaserRecipeCategory implements IRecipeCategory { - - public static final ResourceLocation ID = new ResourceLocation(ActuallyAdditions.MODID, "laser_jei"); - private final IDrawableStatic background; - private final ItemStack RECONSTRUCTOR = new ItemStack(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.getItem()); - - public LaserRecipeCategory(IGuiHelper helper) { - this.background = helper.drawableBuilder(AssetUtil.getGuiLocation("gui_nei_atomic_reconstructor"), 0, 0, 96, 60).setTextureSize(256,256).build(); - } - - @Override - public ResourceLocation getUid() { - return ID; - } - - @Override - public Class getRecipeClass() { - return LaserRecipe.class; - } - - @Override - public String getTitle() { - return new TranslationTextComponent("container.actuallyadditions.reconstructor").getString(); - } - - @Override - public IDrawable getBackground() { - return this.background; - } - - @Override - public IDrawable getIcon() { - return null; - } - - @Override - public void setIngredients(LaserRecipe laserRecipe, IIngredients ingredients) { - ingredients.setInputs(VanillaTypes.ITEM, Arrays.asList(laserRecipe.getInput().getItems())); - ingredients.setOutput(VanillaTypes.ITEM, laserRecipe.getResultItem()); - } - - @Override - public void setRecipe(@Nonnull IRecipeLayout layout, @Nonnull LaserRecipe laserRecipe, @Nonnull IIngredients iIngredients) { - layout.getItemStacks().init(0, true, 4, 18); - layout.getItemStacks().set(0, iIngredients.getInputs(VanillaTypes.ITEM).get(0)); - - layout.getItemStacks().init(1, false, 34, 19); - layout.getItemStacks().set(1, RECONSTRUCTOR); - - layout.getItemStacks().init(2, false, 66, 18); - layout.getItemStacks().set(2, iIngredients.getOutputs(VanillaTypes.ITEM).get(0)); - } -} +///* +// * This file ("ReconstructorRecipeCategory.java") is part of the Actually Additions mod for Minecraft. +// * It is created and owned by Ellpeck and distributed +// * under the Actually Additions License to be found at +// * http://ellpeck.de/actaddlicense +// * View the source code at https://github.com/Ellpeck/ActuallyAdditions +// * +// * © 2015-2017 Ellpeck +// */ +// +//package de.ellpeck.actuallyadditions.mod.jei; +// +//import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +//import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; +//import de.ellpeck.actuallyadditions.mod.crafting.LaserRecipe; +//import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +//import mezz.jei.api.constants.VanillaTypes; +//import mezz.jei.api.gui.IRecipeLayout; +//import mezz.jei.api.gui.drawable.IDrawable; +//import mezz.jei.api.gui.drawable.IDrawableStatic; +//import mezz.jei.api.helpers.IGuiHelper; +//import mezz.jei.api.ingredients.IIngredients; +//import mezz.jei.api.recipe.category.IRecipeCategory; +//import net.minecraft.network.chat.TranslatableComponent; +//import net.minecraft.resources.ResourceLocation; +//import net.minecraft.world.item.ItemStack; +// +//import javax.annotation.Nonnull; +//import java.util.Arrays; +// +//public class LaserRecipeCategory implements IRecipeCategory { +// +// public static final ResourceLocation ID = new ResourceLocation(ActuallyAdditions.MODID, "laser_jei"); +// private final IDrawableStatic background; +// private final ItemStack RECONSTRUCTOR = new ItemStack(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.getItem()); +// +// public LaserRecipeCategory(IGuiHelper helper) { +// this.background = helper.drawableBuilder(AssetUtil.getGuiLocation("gui_nei_atomic_reconstructor"), 0, 0, 96, 60).setTextureSize(256,256).build(); +// } +// +// @Override +// public ResourceLocation getUid() { +// return ID; +// } +// +// @Override +// public Class getRecipeClass() { +// return LaserRecipe.class; +// } +// +// @Override +// public String getTitle() { +// return new TranslatableComponent("container.actuallyadditions.reconstructor").getString(); +// } +// +// @Override +// public IDrawable getBackground() { +// return this.background; +// } +// +// @Override +// public IDrawable getIcon() { +// return null; +// } +// +// @Override +// public void setIngredients(LaserRecipe laserRecipe, IIngredients ingredients) { +// ingredients.setInputs(VanillaTypes.ITEM, Arrays.asList(laserRecipe.getInput().getItems())); +// ingredients.setOutput(VanillaTypes.ITEM, laserRecipe.getResultItem()); +// } +// +// @Override +// public void setRecipe(@Nonnull IRecipeLayout layout, @Nonnull LaserRecipe laserRecipe, @Nonnull IIngredients iIngredients) { +// layout.getItemStacks().init(0, true, 4, 18); +// layout.getItemStacks().set(0, iIngredients.getInputs(VanillaTypes.ITEM).get(0)); +// +// layout.getItemStacks().init(1, false, 34, 19); +// layout.getItemStacks().set(1, RECONSTRUCTOR); +// +// layout.getItemStacks().init(2, false, 66, 18); +// layout.getItemStacks().set(2, iIngredients.getOutputs(VanillaTypes.ITEM).get(0)); +// } +//} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/material/ArmorMaterials.java b/src/main/java/de/ellpeck/actuallyadditions/mod/material/ArmorMaterials.java index e2211df6d..eec7d1823 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/material/ArmorMaterials.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/material/ArmorMaterials.java @@ -2,23 +2,23 @@ package de.ellpeck.actuallyadditions.mod.material; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.inventory.EquipmentSlotType; -import net.minecraft.item.IArmorMaterial; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.util.LazyValue; -import net.minecraft.util.SoundEvent; -import net.minecraft.util.SoundEvents; +import net.minecraft.sounds.SoundEvent; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.util.LazyLoadedValue; +import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.item.ArmorMaterial; +import net.minecraft.world.item.crafting.Ingredient; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import java.util.function.Supplier; /** - * Complete copy paste from {@link net.minecraft.item.ArmorMaterial} + * Complete copy paste from {@link net.minecraft.world.item.ArmorMaterial} *

* todo validate all values refect correctly */ -public enum ArmorMaterials implements IArmorMaterial { +public enum ArmorMaterials implements ArmorMaterial { // EMERALD("emerald_armor_material", 30, new int[] { 5, 8, 9, 4 }, 15, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 2, 0f, () -> Ingredient.fromItems(Items.EMERALD)), // OBSIDIAN("obsidian_armor_material", 28, new int[] { 1, 3, 4, 3 }, 10, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 1, 0f, () -> Ingredient.fromItems(Items.OBSIDIAN)), @@ -40,7 +40,7 @@ public enum ArmorMaterials implements IArmorMaterial { private final SoundEvent soundEvent; private final float toughness; private final float knockbackResistance; - private final LazyValue repairMaterial; + private final LazyLoadedValue repairMaterial; ArmorMaterials(String name, int maxDamageFactor, int[] damageReductionAmountArray, int enchantability, SoundEvent soundEvent, float toughness, float knockbackResistance, Supplier repairMaterial) { this.name = String.format("%s:%s", ActuallyAdditions.MODID, name); @@ -50,16 +50,16 @@ public enum ArmorMaterials implements IArmorMaterial { this.soundEvent = soundEvent; this.toughness = toughness; this.knockbackResistance = knockbackResistance; - this.repairMaterial = new LazyValue<>(repairMaterial); + this.repairMaterial = new LazyLoadedValue<>(repairMaterial); } @Override - public int getDurabilityForSlot(EquipmentSlotType slotIn) { + public int getDurabilityForSlot(EquipmentSlot slotIn) { return MAX_DAMAGE_ARRAY[slotIn.getIndex()] * this.maxDamageFactor; } @Override - public int getDefenseForSlot(EquipmentSlotType slotIn) { + public int getDefenseForSlot(EquipmentSlot slotIn) { return this.damageReductionAmountArray[slotIn.getIndex()]; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/material/ToolMaterials.java b/src/main/java/de/ellpeck/actuallyadditions/mod/material/ToolMaterials.java index 1d53fa4dd..b3ee70b63 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/material/ToolMaterials.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/material/ToolMaterials.java @@ -1,69 +1,26 @@ package de.ellpeck.actuallyadditions.mod.material; +import de.ellpeck.actuallyadditions.api.ActuallyTags; +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.item.IItemTier; -import net.minecraft.item.crafting.Ingredient; -import net.minecraft.util.LazyValue; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Tier; +import net.minecraft.world.item.Tiers; +import net.minecraft.world.item.crafting.Ingredient; +import net.minecraftforge.common.ForgeTier; +import net.minecraftforge.common.TierSortingRegistry; -import java.util.function.Supplier; +import java.util.List; /** - * Complete copy paste from {@link net.minecraft.item.ItemTier} - *

* todo: review to ensure all values act as intended */ -public enum ToolMaterials implements IItemTier { - BLACK_QUARTZ(2, 280, 6.5f, 2.0f, 10, () -> Ingredient.of(ActuallyItems.BLACK_QUARTZ.get())), - RESTONIA(2, 300, 7.0f, 2.25f, 12, () -> Ingredient.of(ActuallyItems.RESTONIA_CRYSTAL.get())), - PALIS(2, 300, 7.0f, 2.25f, 12, () -> Ingredient.of(ActuallyItems.PALIS_CRYSTAL.get())), - DIAMATINE(3, 1600, 9.0f, 4.0f, 14, () -> Ingredient.of(ActuallyItems.DIAMATINE_CRYSTAL.get())), - VOID(2, 280, 6.0f, 2.0f, 8, () -> Ingredient.of(ActuallyItems.VOID_CRYSTAL.get())), - EMERADIC(4, 2200, 9.5f, 5.55f, 18, () -> Ingredient.of(ActuallyItems.EMERADIC_CRYSTAL.get())), - ENORI(2, 280, 6.25f, 6.25f, 15, () -> Ingredient.of(ActuallyItems.ENORI_CRYSTAL.get())); - - private final int harvestLevel; - private final int maxUses; - private final float efficiency; - private final float attackDamage; - private final int enchantability; - private final LazyValue repairMaterial; - - ToolMaterials(int harvestLevelIn, int maxUsesIn, float efficiencyIn, float attackDamageIn, int enchantabilityIn, Supplier repairMaterialIn) { - this.harvestLevel = harvestLevelIn; - this.maxUses = maxUsesIn; - this.efficiency = efficiencyIn; - this.attackDamage = attackDamageIn; - this.enchantability = enchantabilityIn; - this.repairMaterial = new LazyValue<>(repairMaterialIn); - } - - @Override - public int getUses() { - return this.maxUses; - } - - @Override - public float getSpeed() { - return this.efficiency; - } - - @Override - public float getAttackDamageBonus() { - return this.attackDamage; - } - - @Override - public int getLevel() { - return this.harvestLevel; - } - - @Override - public int getEnchantmentValue() { - return this.enchantability; - } - - @Override - public Ingredient getRepairIngredient() { - return this.repairMaterial.get(); - } +public class ToolMaterials { + public static final Tier BLACK_QUARTZ = TierSortingRegistry.registerTier(new ForgeTier(2, 280, 6.5f, 2.0f, 10, ActuallyTags.Blocks.NEEDS_BLACK_QUARTZ_TOOL, () -> Ingredient.of(ActuallyItems.BLACK_QUARTZ.get())), new ResourceLocation(ActuallyAdditions.MODID, "black_quartz"), List.of(Tiers.IRON), List.of(Tiers.DIAMOND)); + public static final Tier RESTONIA = TierSortingRegistry.registerTier(new ForgeTier(2, 300, 7.0f, 2.25f, 12, ActuallyTags.Blocks.NEEDS_RESTONIA_TOOL, () -> Ingredient.of(ActuallyItems.RESTONIA_CRYSTAL.get())), new ResourceLocation(ActuallyAdditions.MODID, "restonia"), List.of(Tiers.IRON), List.of(Tiers.DIAMOND)); + public static final Tier PALIS = TierSortingRegistry.registerTier(new ForgeTier(2, 300, 7.0f, 2.25f, 12, ActuallyTags.Blocks.NEEDS_PALIS_TOOL, () -> Ingredient.of(ActuallyItems.PALIS_CRYSTAL.get())), new ResourceLocation(ActuallyAdditions.MODID, "palis"), List.of(Tiers.IRON), List.of(Tiers.DIAMOND)); + public static final Tier DIAMATINE = TierSortingRegistry.registerTier(new ForgeTier(3, 1600, 9.0f, 4.0f, 14, ActuallyTags.Blocks.NEEDS_DIAMATINE_TOOL, () -> Ingredient.of(ActuallyItems.DIAMATINE_CRYSTAL.get())), new ResourceLocation(ActuallyAdditions.MODID, "diamatine"), List.of(Tiers.DIAMOND), List.of(Tiers.NETHERITE)); + public static final Tier VOID = TierSortingRegistry.registerTier(new ForgeTier(2, 280, 6.0f, 2.0f, 8, ActuallyTags.Blocks.NEEDS_VOID_TOOL, () -> Ingredient.of(ActuallyItems.VOID_CRYSTAL.get())), new ResourceLocation(ActuallyAdditions.MODID, "void"), List.of(Tiers.IRON), List.of(Tiers.DIAMOND)); + public static final Tier EMERADIC = TierSortingRegistry.registerTier(new ForgeTier(4, 2200, 9.5f, 5.55f, 18, ActuallyTags.Blocks.NEEDS_EMERADIC_TOOL, () -> Ingredient.of(ActuallyItems.EMERADIC_CRYSTAL.get())), new ResourceLocation(ActuallyAdditions.MODID, "emeradic"), List.of(Tiers.NETHERITE), List.of()); + public static final Tier ENORI = TierSortingRegistry.registerTier(new ForgeTier(2, 280, 6.25f, 6.25f, 15, ActuallyTags.Blocks.NEEDS_ENORI_TOOL, () -> Ingredient.of(ActuallyItems.ENORI_CRYSTAL.get())), new ResourceLocation(ActuallyAdditions.MODID, "enori"), List.of(Tiers.IRON), List.of(Tiers.DIAMOND)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/BannerHelper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/BannerHelper.java index 1b752d30d..54f1499cf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/BannerHelper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/BannerHelper.java @@ -12,7 +12,7 @@ package de.ellpeck.actuallyadditions.mod.misc; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.item.ItemStack; +import net.minecraft.world.item.ItemStack; public final class BannerHelper { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DamageSources.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DamageSources.java index e9a815d81..a59c1cc0a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DamageSources.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DamageSources.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.misc; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.entity.LivingEntity; -import net.minecraft.util.DamageSource; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.entity.LivingEntity; public class DamageSources extends DamageSource { @@ -28,8 +28,8 @@ public class DamageSources extends DamageSource { } @Override - public ITextComponent getLocalizedDeathMessage(LivingEntity entity) { + public Component getLocalizedDeathMessage(LivingEntity entity) { String locTag = "death." + ActuallyAdditions.MODID + "." + this.msgId + "." + (entity.level.random.nextInt(this.messageCount) + 1); - return new TranslationTextComponent(locTag, entity.getName()); + return new TranslatableComponent(locTag, entity.getName()); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFertilize.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFertilize.java index 835865981..d727f9ae2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFertilize.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DispenserHandlerFertilize.java @@ -10,19 +10,19 @@ package de.ellpeck.actuallyadditions.mod.misc; -import net.minecraft.dispenser.DefaultDispenseItemBehavior; -import net.minecraft.dispenser.IBlockSource; -import net.minecraft.item.BoneMealItem; -import net.minecraft.item.ItemStack; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.core.BlockSource; +import net.minecraft.core.Direction; +import net.minecraft.core.dispenser.DefaultDispenseItemBehavior; +import net.minecraft.world.item.BoneMealItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; // TODO: [port][note] might not be needed anymore public class DispenserHandlerFertilize extends DefaultDispenseItemBehavior { @Override - public ItemStack execute(IBlockSource source, ItemStack stack) { + public ItemStack execute(BlockSource source, ItemStack stack) { Direction facing = source.getBlockState().getValue(BlockStateProperties.FACING); BlockPos pos = source.getPos().relative(facing); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/ConnectionPair.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/ConnectionPair.java index 139c3d42a..c872b4f9d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/ConnectionPair.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/ConnectionPair.java @@ -12,8 +12,8 @@ package de.ellpeck.actuallyadditions.mod.misc.apiimpl; import de.ellpeck.actuallyadditions.api.laser.IConnectionPair; import de.ellpeck.actuallyadditions.api.laser.LaserType; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; public class ConnectionPair implements IConnectionPair { @@ -33,7 +33,7 @@ public class ConnectionPair implements IConnectionPair { } @Override - public void readFromNBT(CompoundNBT compound) { + public void readFromNBT(CompoundTag compound) { if (compound != null) { for (int i = 0; i < this.positions.length; i++) { int anX = compound.getInt("x" + i); @@ -85,7 +85,7 @@ public class ConnectionPair implements IConnectionPair { } @Override - public void writeToNBT(CompoundNBT compound) { + public void writeToNBT(CompoundTag compound) { for (int i = 0; i < this.positions.length; i++) { BlockPos relay = this.positions[i]; compound.putInt("x" + i, relay.getX()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/LaserRelayConnectionHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/LaserRelayConnectionHandler.java index 6be542211..693b7abcf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/LaserRelayConnectionHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/LaserRelayConnectionHandler.java @@ -17,28 +17,28 @@ import de.ellpeck.actuallyadditions.api.laser.Network; import de.ellpeck.actuallyadditions.mod.data.WorldData; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; import io.netty.util.internal.ConcurrentSet; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.nbt.ListNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; public final class LaserRelayConnectionHandler implements ILaserRelayConnectionHandler { - public static CompoundNBT writeNetworkToNBT(Network network) { - ListNBT list = new ListNBT(); + public static CompoundTag writeNetworkToNBT(Network network) { + ListTag list = new ListTag(); for (IConnectionPair pair : network.connections) { - CompoundNBT tag = new CompoundNBT(); + CompoundTag tag = new CompoundTag(); pair.writeToNBT(tag); list.add(tag); } - CompoundNBT compound = new CompoundNBT(); + CompoundTag compound = new CompoundTag(); compound.put("Network", list); return compound; } - public static Network readNetworkFromNBT(CompoundNBT tag) { - ListNBT list = tag.getList("Network", 10); + public static Network readNetworkFromNBT(CompoundTag tag) { + ListTag list = tag.getList("Network", 10); Network network = new Network(); for (int i = 0; i < list.size(); i++) { ConnectionPair pair = new ConnectionPair(); @@ -52,7 +52,7 @@ public final class LaserRelayConnectionHandler implements ILaserRelayConnectionH * Merges two laserRelayNetworks together * (Actually puts everything from the second network into the first one and removes the second one) */ - private static void mergeNetworks(Network firstNetwork, Network secondNetwork, World world) { + private static void mergeNetworks(Network firstNetwork, Network secondNetwork, Level world) { for (IConnectionPair secondPair : secondNetwork.connections) { firstNetwork.connections.add(secondPair); } @@ -68,7 +68,7 @@ public final class LaserRelayConnectionHandler implements ILaserRelayConnectionH * Gets all Connections for a Relay */ @Override - public ConcurrentSet getConnectionsFor(BlockPos relay, World world) { + public ConcurrentSet getConnectionsFor(BlockPos relay, Level world) { ConcurrentSet allPairs = new ConcurrentSet<>(); if(!world.isClientSide) { for (Network aNetwork : WorldData.get(world).laserRelayNetworks) { @@ -86,7 +86,7 @@ public final class LaserRelayConnectionHandler implements ILaserRelayConnectionH * Removes a Relay from its Network */ @Override - public void removeRelayFromNetwork(BlockPos relay, World world) { + public void removeRelayFromNetwork(BlockPos relay, Level world) { Network network = this.getNetworkFor(relay, world); if (network != null) { network.changeAmount++; @@ -108,7 +108,7 @@ public final class LaserRelayConnectionHandler implements ILaserRelayConnectionH * Gets a Network for a Relay */ @Override - public Network getNetworkFor(BlockPos relay, World world) { + public Network getNetworkFor(BlockPos relay, Level world) { if (world != null && !world.isClientSide) { for (Network aNetwork : WorldData.get(world).laserRelayNetworks) { for (IConnectionPair pair : aNetwork.connections) { @@ -122,7 +122,7 @@ public final class LaserRelayConnectionHandler implements ILaserRelayConnectionH } @Override - public boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, World world) { + public boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, Level world) { return this.addConnection(firstRelay, secondRelay, type, world, false); } @@ -131,12 +131,12 @@ public final class LaserRelayConnectionHandler implements ILaserRelayConnectionH * (Puts it into the correct network!) */ @Override - public boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, World world, boolean suppressConnectionRender) { + public boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, Level world, boolean suppressConnectionRender) { return this.addConnection(firstRelay, secondRelay, type, world, suppressConnectionRender, false); } @Override - public boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, World world, boolean suppressConnectionRender, boolean removeIfConnected) { + public boolean addConnection(BlockPos firstRelay, BlockPos secondRelay, LaserType type, Level world, boolean suppressConnectionRender, boolean removeIfConnected) { if (world.isClientSide || firstRelay == null || secondRelay == null || firstRelay == secondRelay || firstRelay.equals(secondRelay)) { return false; } @@ -185,7 +185,7 @@ public final class LaserRelayConnectionHandler implements ILaserRelayConnectionH } @Override - public void removeConnection(World world, BlockPos firstRelay, BlockPos secondRelay) { + public void removeConnection(Level world, BlockPos firstRelay, BlockPos secondRelay) { if (world != null && !world.isClientSide && firstRelay != null && secondRelay != null) { Network network = this.getNetworkFor(firstRelay, world); @@ -206,7 +206,7 @@ public final class LaserRelayConnectionHandler implements ILaserRelayConnectionH } @Override - public LaserType getTypeFromLaser(TileEntity tile) { + public LaserType getTypeFromLaser(BlockEntity tile) { if (tile instanceof TileEntityLaserRelay) { return ((TileEntityLaserRelay) tile).type; } else { @@ -215,7 +215,7 @@ public final class LaserRelayConnectionHandler implements ILaserRelayConnectionH } @Override - public LaserType getTypeFromLaser(BlockPos pos, World world) { + public LaserType getTypeFromLaser(BlockPos pos, Level world) { return this.getTypeFromLaser(world.getBlockEntity(pos)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/MethodHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/MethodHandler.java index 3e0cfb663..4cdf4070e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/MethodHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/MethodHandler.java @@ -18,19 +18,19 @@ import de.ellpeck.actuallyadditions.mod.blocks.BlockLaserRelay; import de.ellpeck.actuallyadditions.mod.crafting.LaserRecipe; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.item.BlockItem; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.potion.Effect; -import net.minecraft.potion.EffectInstance; -import net.minecraft.util.Direction; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.vector.Vector3i; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.Vec3i; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.effect.MobEffect; +import net.minecraft.world.effect.MobEffectInstance; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.AABB; import java.util.ArrayList; import java.util.List; @@ -42,10 +42,10 @@ public class MethodHandler implements IMethodHandler { public boolean addEffectToStack(ItemStack stack, CoffeeIngredient ingredient) { boolean worked = false; if (ingredient != null) { - EffectInstance[] effects = ingredient.getEffects(); + MobEffectInstance[] effects = ingredient.getEffects(); if (effects != null && effects.length > 0) { - for (EffectInstance effect : effects) { - EffectInstance effectHas = this.getSameEffectFromStack(stack, effect); + for (MobEffectInstance effect : effects) { + MobEffectInstance effectHas = this.getSameEffectFromStack(stack, effect); if (effectHas != null) { if (effectHas.getAmplifier() < ingredient.getMaxAmplifier() - 1) { this.addEffectProperties(stack, effect, false, true); @@ -62,10 +62,10 @@ public class MethodHandler implements IMethodHandler { } @Override - public EffectInstance getSameEffectFromStack(ItemStack stack, EffectInstance effect) { - EffectInstance[] effectsStack = this.getEffectsFromStack(stack); + public MobEffectInstance getSameEffectFromStack(ItemStack stack, MobEffectInstance effect) { + MobEffectInstance[] effectsStack = this.getEffectsFromStack(stack); if (effectsStack != null && effectsStack.length > 0) { - for (EffectInstance effectStack : effectsStack) { + for (MobEffectInstance effectStack : effectsStack) { if (effect.getEffect() == effectStack.getEffect()) { return effectStack; } @@ -75,12 +75,12 @@ public class MethodHandler implements IMethodHandler { } @Override - public void addEffectProperties(ItemStack stack, EffectInstance effect, boolean addDur, boolean addAmp) { - EffectInstance[] effects = this.getEffectsFromStack(stack); - stack.setTag(new CompoundNBT()); + public void addEffectProperties(ItemStack stack, MobEffectInstance effect, boolean addDur, boolean addAmp) { + MobEffectInstance[] effects = this.getEffectsFromStack(stack); + stack.setTag(new CompoundTag()); for (int i = 0; i < effects.length; i++) { if (effects[i].getEffect() == effect.getEffect()) { - effects[i] = new EffectInstance(effects[i].getEffect(), effects[i].getDuration() + (addDur + effects[i] = new MobEffectInstance(effects[i].getEffect(), effects[i].getDuration() + (addDur ? effect.getDuration() : 0), effects[i].getAmplifier() + (addAmp ? effect.getAmplifier() > 0 @@ -93,11 +93,11 @@ public class MethodHandler implements IMethodHandler { } @Override - public void addEffectToStack(ItemStack stack, EffectInstance effect) { - CompoundNBT tag = stack.getOrCreateTag(); + public void addEffectToStack(ItemStack stack, MobEffectInstance effect) { + CompoundTag tag = stack.getOrCreateTag(); int prevCounter = tag.getInt("Counter"); - CompoundNBT compound = new CompoundNBT(); + CompoundTag compound = new CompoundTag(); //compound.putInt("ID", Potion.getIdFromPotion(effect.getEffect())); //TODO ?! compound.putInt("Duration", effect.getDuration()); compound.putInt("Amplifier", effect.getAmplifier()); @@ -110,18 +110,18 @@ public class MethodHandler implements IMethodHandler { } @Override - public EffectInstance[] getEffectsFromStack(ItemStack stack) { - ArrayList effects = new ArrayList<>(); - CompoundNBT tag = stack.getOrCreateTag(); + public MobEffectInstance[] getEffectsFromStack(ItemStack stack) { + ArrayList effects = new ArrayList<>(); + CompoundTag tag = stack.getOrCreateTag(); int counter = tag.getInt("Counter"); while (counter > 0) { - CompoundNBT compound = (CompoundNBT) tag.get(counter + ""); - EffectInstance effect = new EffectInstance(Effect.byId(compound.getInt("ID")), compound.getInt("Duration"), compound.getByte("Amplifier")); + CompoundTag compound = (CompoundTag) tag.get(counter + ""); + MobEffectInstance effect = new MobEffectInstance(MobEffect.byId(compound.getInt("ID")), compound.getInt("Duration"), compound.getByte("Amplifier")); effects.add(effect); counter--; } return effects.size() > 0 - ? effects.toArray(new EffectInstance[effects.size()]) + ? effects.toArray(new MobEffectInstance[effects.size()]) : null; } @@ -182,8 +182,8 @@ public class MethodHandler implements IMethodHandler { } //Converting the Items - AxisAlignedBB aabb = new AxisAlignedBB(tile.getPosition().getX(), tile.getPosition().getY(), tile.getPosition().getZ(), hitBlock.getX() + 1, hitBlock.getY() + 1, hitBlock.getZ() + 1); - Vector3i dir = tile.getOrientation().getNormal(); + AABB aabb = new AABB(tile.getPosition().getX(), tile.getPosition().getY(), tile.getPosition().getZ(), hitBlock.getX() + 1, hitBlock.getY() + 1, hitBlock.getZ() + 1); + Vec3i dir = tile.getOrientation().getNormal(); aabb = aabb.inflate(0.02, 0.02, 0.02).expandTowards(dir.getX(), dir.getY(), dir.getZ()); List items = tile.getWorldObject().getEntitiesOfClass(ItemEntity.class, aabb); for (ItemEntity item : items) { @@ -195,7 +195,7 @@ public class MethodHandler implements IMethodHandler { if (itemsPossible > 0) { //recipe.transformHook(item.getItem(), null, item.blockPosition(), tile); //TODO empty method - item.remove(); + item.discard(); if (stack.getCount() - itemsPossible > 0) { ItemStack stackCopy = stack.copy(); @@ -218,7 +218,7 @@ public class MethodHandler implements IMethodHandler { } } } - return !hitState.getBlock().isAir(hitState, tile.getWorldObject(), hitBlock); + return !hitState.isAir(); } return false; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/CactusFarmerBehavior.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/CactusFarmerBehavior.java index 9fe45270e..988f475b2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/CactusFarmerBehavior.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/CactusFarmerBehavior.java @@ -13,26 +13,25 @@ package de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer; import de.ellpeck.actuallyadditions.api.farmer.FarmerResult; import de.ellpeck.actuallyadditions.api.farmer.IFarmerBehavior; import de.ellpeck.actuallyadditions.api.internal.IFarmer; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.item.BlockItem; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.loot.LootContext; -import net.minecraft.loot.LootParameters; -import net.minecraft.util.NonNullList; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.level.storage.loot.parameters.LootContextParams; +import net.minecraft.world.phys.Vec3; import java.util.List; public class CactusFarmerBehavior implements IFarmerBehavior { @Override - public FarmerResult tryPlantSeed(ItemStack seed, World world, BlockPos pos, IFarmer farmer) { + public FarmerResult tryPlantSeed(ItemStack seed, Level world, BlockPos pos, IFarmer farmer) { int use = 250; if (farmer.getEnergy() >= use) { Item item = seed.getItem(); @@ -55,7 +54,7 @@ public class CactusFarmerBehavior implements IFarmerBehavior { } @Override - public FarmerResult tryHarvestPlant(ServerWorld world, BlockPos pos, IFarmer farmer) { + public FarmerResult tryHarvestPlant(ServerLevel world, BlockPos pos, IFarmer farmer) { int use = 250; if (farmer.getEnergy() >= use) { BlockState state = world.getBlockState(pos); @@ -68,8 +67,8 @@ public class CactusFarmerBehavior implements IFarmerBehavior { BlockState upState = world.getBlockState(up); if (upState.getBlock() == Blocks.CACTUS) { List drops = state.getDrops(new LootContext.Builder(world) - .withParameter(LootParameters.ORIGIN, new Vector3d(pos.getX(), pos.getY(), pos.getZ())) - .withParameter(LootParameters.TOOL, ItemStack.EMPTY)); + .withParameter(LootContextParams.ORIGIN, new Vec3(pos.getX(), pos.getY(), pos.getZ())) + .withParameter(LootContextParams.TOOL, ItemStack.EMPTY)); if (!drops.isEmpty()) { if (farmer.canAddToOutput(drops)) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/DefaultFarmerBehavior.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/DefaultFarmerBehavior.java index d68db04e6..1a7c66720 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/DefaultFarmerBehavior.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/DefaultFarmerBehavior.java @@ -14,21 +14,33 @@ import de.ellpeck.actuallyadditions.api.farmer.FarmerResult; import de.ellpeck.actuallyadditions.api.farmer.IFarmerBehavior; import de.ellpeck.actuallyadditions.api.internal.IFarmer; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.*; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.*; -import net.minecraft.loot.LootContext; -import net.minecraft.loot.LootParameters; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.*; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.tags.BlockTags; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.InteractionResult; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.item.context.UseOnContext; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.BonemealableBlock; +import net.minecraft.world.level.block.CropBlock; +import net.minecraft.world.level.block.StemBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.level.storage.loot.parameters.LootContextParams; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.IPlantable; -import net.minecraftforge.common.Tags; -import net.minecraftforge.common.ToolType; import net.minecraftforge.common.util.FakePlayerFactory; import java.util.ArrayList; @@ -36,14 +48,14 @@ import java.util.List; public class DefaultFarmerBehavior implements IFarmerBehavior { - public static boolean defaultPlant(World world, BlockPos pos, BlockState toPlant, IFarmer farmer, int use) { + public static boolean defaultPlant(Level world, BlockPos pos, BlockState toPlant, IFarmer farmer, int use) { if (toPlant != null) { BlockPos farmland = pos.below(); - Block farmlandBlock = world.getBlockState(farmland).getBlock(); - if (Tags.Blocks.DIRT.contains(farmlandBlock) || farmlandBlock == Blocks.GRASS) { + BlockState farmlandState = world.getBlockState(farmland); + if (farmlandState.is(BlockTags.DIRT) || farmlandState.is(Blocks.GRASS_BLOCK)) { world.setBlockAndUpdate(pos, Blocks.AIR.defaultBlockState()); useHoeAt(world, farmland); - world.playSound(null, farmland, SoundEvents.HOE_TILL, SoundCategory.BLOCKS, 1.0F, 1.0F); + world.playSound(null, farmland, SoundEvents.HOE_TILL, SoundSource.BLOCKS, 1.0F, 1.0F); farmer.extractEnergy(use); } @@ -55,7 +67,7 @@ public class DefaultFarmerBehavior implements IFarmerBehavior { return false; } - private static boolean tryPlant(BlockState toPlant, World world, BlockPos pos) { + private static boolean tryPlant(BlockState toPlant, Level world, BlockPos pos) { if (toPlant.canSurvive(world, pos)) { world.setBlockAndUpdate(pos, toPlant); return true; @@ -64,7 +76,7 @@ public class DefaultFarmerBehavior implements IFarmerBehavior { } @Override - public FarmerResult tryPlantSeed(ItemStack seed, World world, BlockPos pos, IFarmer farmer) { + public FarmerResult tryPlantSeed(ItemStack seed, Level world, BlockPos pos, IFarmer farmer) { int use = 350; if (farmer.getEnergy() >= use * 2) { if (defaultPlant(world, pos, this.getPlantablePlantFromStack(seed, world, pos), farmer, use)) { @@ -75,14 +87,14 @@ public class DefaultFarmerBehavior implements IFarmerBehavior { } @Override - public FarmerResult tryHarvestPlant(ServerWorld world, BlockPos pos, IFarmer farmer) { + public FarmerResult tryHarvestPlant(ServerLevel world, BlockPos pos, IFarmer farmer) { int use = 250; if (farmer.getEnergy() >= use) { BlockState state = world.getBlockState(pos); Block block = state.getBlock(); - if (block instanceof CropsBlock) { - if (((CropsBlock) block).isMaxAge(state)) { + if (block instanceof CropBlock) { + if (((CropBlock) block).isMaxAge(state)) { return this.doFarmerStuff(state, world, pos, farmer); } } @@ -95,12 +107,12 @@ public class DefaultFarmerBehavior implements IFarmerBehavior { return FarmerResult.FAIL; } - private FarmerResult doFarmerStuff(BlockState state, ServerWorld world, BlockPos pos, IFarmer farmer) { + private FarmerResult doFarmerStuff(BlockState state, ServerLevel world, BlockPos pos, IFarmer farmer) { List seeds = new ArrayList<>(); List other = new ArrayList<>(); List drops = state.getDrops(new LootContext.Builder(world) - .withParameter(LootParameters.ORIGIN, new Vector3d(pos.getX(), pos.getY(), pos.getZ())) - .withParameter(LootParameters.TOOL, ItemStack.EMPTY)); + .withParameter(LootContextParams.ORIGIN, new Vec3(pos.getX(), pos.getY(), pos.getZ())) + .withParameter(LootContextParams.TOOL, ItemStack.EMPTY)); if (drops.isEmpty()) return FarmerResult.FAIL; for (ItemStack stack : drops) { @@ -138,12 +150,12 @@ public class DefaultFarmerBehavior implements IFarmerBehavior { return 0; } - private BlockState getPlantablePlantFromStack(ItemStack stack, World world, BlockPos pos) { + private BlockState getPlantablePlantFromStack(ItemStack stack, Level world, BlockPos pos) { if (StackUtil.isValid(stack)) { IPlantable plantable = this.getPlantableFromStack(stack); if (plantable != null) { BlockState state = plantable.getPlant(world, pos); - if (state != null && state.getBlock() instanceof IGrowable) { + if (state != null && state.getBlock() instanceof BonemealableBlock) { return state; } } @@ -173,36 +185,36 @@ public class DefaultFarmerBehavior implements IFarmerBehavior { return hoe; } - public static ActionResultType useHoeAt(World world, BlockPos pos) { + public static InteractionResult useHoeAt(Level world, BlockPos pos) { - PlayerEntity player = FakePlayerFactory.getMinecraft((ServerWorld) world); //TODO we need our own fakeplayer for the mod. + Player player = FakePlayerFactory.getMinecraft((ServerLevel) world); //TODO we need our own fakeplayer for the mod. ItemStack itemstack = getHoeStack(); if (!player.mayUseItemAt(pos.relative(Direction.UP), Direction.UP, itemstack)) { - return ActionResultType.FAIL; + return InteractionResult.FAIL; } else { - ItemUseContext dummyContext = new ItemUseContext(world, player, Hand.MAIN_HAND, itemstack, new BlockRayTraceResult(new Vector3d(0.5, 0.5, 0.5), Direction.UP, pos, false)); + UseOnContext dummyContext = new UseOnContext(world, player, InteractionHand.MAIN_HAND, itemstack, new BlockHitResult(new Vec3(0.5, 0.5, 0.5), Direction.UP, pos, false)); int hook = net.minecraftforge.event.ForgeEventFactory.onHoeUse(dummyContext); if (hook != 0) { return hook > 0 - ? ActionResultType.SUCCESS - : ActionResultType.FAIL; + ? InteractionResult.SUCCESS + : InteractionResult.FAIL; } if (world.isEmptyBlock(pos.above())) { - Block block = world.getBlockState(pos).getBlock(); - if (block == Blocks.GRASS || block == Blocks.GRASS_PATH) { + BlockState state = world.getBlockState(pos); + if (state.is(Blocks.GRASS_BLOCK) || state.is(Blocks.DIRT_PATH)) { world.setBlockAndUpdate(pos, Blocks.FARMLAND.defaultBlockState()); - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } - if (Tags.Blocks.DIRT.contains(block)) { + if (state.is(BlockTags.DIRT)) { world.setBlockAndUpdate(pos, Blocks.FARMLAND.defaultBlockState()); - return ActionResultType.SUCCESS; + return InteractionResult.SUCCESS; } } - return ActionResultType.PASS; + return InteractionResult.PASS; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/MelonPumpkinFarmerBehavior.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/MelonPumpkinFarmerBehavior.java index a4aa50a97..70bf1ceef 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/MelonPumpkinFarmerBehavior.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/MelonPumpkinFarmerBehavior.java @@ -14,26 +14,25 @@ import de.ellpeck.actuallyadditions.api.farmer.FarmerResult; import de.ellpeck.actuallyadditions.api.farmer.IFarmerBehavior; import de.ellpeck.actuallyadditions.api.internal.IFarmer; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.loot.LootContext; -import net.minecraft.loot.LootParameters; -import net.minecraft.util.NonNullList; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.level.storage.loot.parameters.LootContextParams; +import net.minecraft.world.phys.Vec3; import java.util.List; public class MelonPumpkinFarmerBehavior implements IFarmerBehavior { @Override - public FarmerResult tryPlantSeed(ItemStack seed, World world, BlockPos pos, IFarmer farmer) { + public FarmerResult tryPlantSeed(ItemStack seed, Level world, BlockPos pos, IFarmer farmer) { int use = 350; if (farmer.getEnergy() >= use * 2) { if (StackUtil.isValid(seed)) { @@ -57,15 +56,15 @@ public class MelonPumpkinFarmerBehavior implements IFarmerBehavior { } @Override - public FarmerResult tryHarvestPlant(ServerWorld world, BlockPos pos, IFarmer farmer) { + public FarmerResult tryHarvestPlant(ServerLevel world, BlockPos pos, IFarmer farmer) { int use = 500; if (farmer.getEnergy() >= use) { BlockState state = world.getBlockState(pos); Block block = state.getBlock(); if (block == Blocks.PUMPKIN || block == Blocks.MELON) { List drops = state.getDrops(new LootContext.Builder(world) - .withParameter(LootParameters.ORIGIN, new Vector3d(pos.getX(), pos.getY(), pos.getZ())) - .withParameter(LootParameters.TOOL, ItemStack.EMPTY)); + .withParameter(LootContextParams.ORIGIN, new Vec3(pos.getX(), pos.getY(), pos.getZ())) + .withParameter(LootContextParams.TOOL, ItemStack.EMPTY)); if (!drops.isEmpty()) { if (farmer.canAddToOutput(drops)) { world.levelEvent(2001, pos, Block.getId(state)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/NetherWartFarmerBehavior.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/NetherWartFarmerBehavior.java index 839a6744e..01bc1b0f9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/NetherWartFarmerBehavior.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/NetherWartFarmerBehavior.java @@ -13,21 +13,20 @@ package de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer; import de.ellpeck.actuallyadditions.api.farmer.FarmerResult; import de.ellpeck.actuallyadditions.api.farmer.IFarmerBehavior; import de.ellpeck.actuallyadditions.api.internal.IFarmer; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.block.NetherWartBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.loot.LootContext; -import net.minecraft.loot.LootParameters; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.Direction; -import net.minecraft.util.NonNullList; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.NetherWartBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.level.storage.loot.parameters.LootContextParams; +import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.IPlantable; import java.util.List; @@ -35,7 +34,7 @@ import java.util.List; public class NetherWartFarmerBehavior implements IFarmerBehavior { @Override - public FarmerResult tryPlantSeed(ItemStack seed, World world, BlockPos pos, IFarmer farmer) { + public FarmerResult tryPlantSeed(ItemStack seed, Level world, BlockPos pos, IFarmer farmer) { int use = 500; if (farmer.getEnergy() >= use) { if (seed.getItem() == Items.NETHER_WART) { @@ -51,15 +50,15 @@ public class NetherWartFarmerBehavior implements IFarmerBehavior { } @Override - public FarmerResult tryHarvestPlant(ServerWorld world, BlockPos pos, IFarmer farmer) { + public FarmerResult tryHarvestPlant(ServerLevel world, BlockPos pos, IFarmer farmer) { int use = 500; if (farmer.getEnergy() >= use) { BlockState state = world.getBlockState(pos); if (state.getBlock() instanceof NetherWartBlock) { if (state.getValue(BlockStateProperties.AGE_3) >= 3) { List drops = state.getDrops(new LootContext.Builder(world) - .withParameter(LootParameters.ORIGIN, new Vector3d(pos.getX(), pos.getY(), pos.getZ())) - .withParameter(LootParameters.TOOL, ItemStack.EMPTY)); + .withParameter(LootContextParams.ORIGIN, new Vec3(pos.getX(), pos.getY(), pos.getZ())) + .withParameter(LootContextParams.TOOL, ItemStack.EMPTY)); if (!drops.isEmpty()) { boolean toInput = farmer.canAddToSeeds(drops); if (toInput || farmer.canAddToOutput(drops)) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/ReedFarmerBehavior.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/ReedFarmerBehavior.java index b4b76110d..4f062c700 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/ReedFarmerBehavior.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/ReedFarmerBehavior.java @@ -13,26 +13,25 @@ package de.ellpeck.actuallyadditions.mod.misc.apiimpl.farmer; import de.ellpeck.actuallyadditions.api.farmer.FarmerResult; import de.ellpeck.actuallyadditions.api.farmer.IFarmerBehavior; import de.ellpeck.actuallyadditions.api.internal.IFarmer; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.block.SugarCaneBlock; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.loot.LootContext; -import net.minecraft.loot.LootParameters; -import net.minecraft.util.NonNullList; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.SugarCaneBlock; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.level.storage.loot.parameters.LootContextParams; +import net.minecraft.world.phys.Vec3; import java.util.List; public class ReedFarmerBehavior implements IFarmerBehavior { @Override - public FarmerResult tryPlantSeed(ItemStack seed, World world, BlockPos pos, IFarmer farmer) { + public FarmerResult tryPlantSeed(ItemStack seed, Level world, BlockPos pos, IFarmer farmer) { int use = 250; if (farmer.getEnergy() >= use) { if (seed.getItem() == Items.SUGAR_CANE) { @@ -48,7 +47,7 @@ public class ReedFarmerBehavior implements IFarmerBehavior { } @Override - public FarmerResult tryHarvestPlant(ServerWorld world, BlockPos pos, IFarmer farmer) { + public FarmerResult tryHarvestPlant(ServerLevel world, BlockPos pos, IFarmer farmer) { int use = 250; if (farmer.getEnergy() >= use) { BlockState state = world.getBlockState(pos); @@ -61,8 +60,8 @@ public class ReedFarmerBehavior implements IFarmerBehavior { BlockState upState = world.getBlockState(up); if (upState.getBlock() instanceof SugarCaneBlock) { List drops = state.getDrops(new LootContext.Builder(world) - .withParameter(LootParameters.ORIGIN, new Vector3d(pos.getX(), pos.getY(), pos.getZ())) - .withParameter(LootParameters.TOOL, ItemStack.EMPTY)); + .withParameter(LootContextParams.ORIGIN, new Vec3(pos.getX(), pos.getY(), pos.getZ())) + .withParameter(LootContextParams.TOOL, ItemStack.EMPTY)); if (!drops.isEmpty()) { if (farmer.canAddToOutput(drops)) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java index 6f31fc790..6a4829b8b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java @@ -10,19 +10,18 @@ package de.ellpeck.actuallyadditions.mod.misc.special; -import com.mojang.blaze3d.matrix.MatrixStack; -import com.mojang.blaze3d.platform.GlStateManager; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.math.Vector3f; +import net.minecraft.Util; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.IRenderTypeBuffer; -import net.minecraft.client.renderer.model.ItemCameraTransforms; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.block.model.ItemTransforms; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerModelPart; -import net.minecraft.item.BlockItem; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Util; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.util.math.vector.Vector3f; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.entity.player.PlayerModelPart; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.phys.Vec3; public class RenderSpecial { @@ -32,15 +31,15 @@ public class RenderSpecial { this.theThingToRender = stack; } - public void render(MatrixStack matrixStack, IRenderTypeBuffer buffer, int combinedLight, PlayerEntity player, float partialTicks) { + public void render(PoseStack matrixStack, MultiBufferSource buffer, int combinedLight, Player player, float partialTick) { if (this.theThingToRender.isEmpty() || player.isInvisible() || !player.isModelPartShown(PlayerModelPart.CAPE) || player.isFallFlying()) { return; } matrixStack.pushPose(); - Vector3d currentPos = Minecraft.getInstance().player.getEyePosition(partialTicks); - Vector3d playerPos = player.getEyePosition(partialTicks); + Vec3 currentPos = Minecraft.getInstance().player.getEyePosition(partialTick); + Vec3 playerPos = player.getEyePosition(partialTick); matrixStack.translate(playerPos.x - currentPos.x, playerPos.y - currentPos.y, playerPos.z - currentPos.z); matrixStack.translate(0D, 2.575D - (player.isCrouching() ? 0.125D @@ -66,17 +65,17 @@ public class RenderSpecial { matrixStack.translate(0D, Math.sin(boop % (2 * Math.PI)) * 0.25, 0D); matrixStack.mulPose(Vector3f.YP.rotationDegrees((float) (boop * 40D % 360))); - GlStateManager._disableLighting(); +// GlStateManager._disableLighting(); matrixStack.pushPose(); if (!isBlock) { matrixStack.translate(0D, 0.5D, 0D); } matrixStack.mulPose(Vector3f.XN.rotationDegrees(180F)); - Minecraft.getInstance().getItemRenderer().renderStatic(theThingToRender, ItemCameraTransforms.TransformType.FIXED, combinedLight, OverlayTexture.NO_OVERLAY, matrixStack, buffer); + Minecraft.getInstance().getItemRenderer().renderStatic(theThingToRender, ItemTransforms.TransformType.FIXED, combinedLight, OverlayTexture.NO_OVERLAY, matrixStack, buffer, 0); matrixStack.popPose(); - GlStateManager._enableLighting(); +// GlStateManager._enableLighting(); matrixStack.popPose(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java index 50bb7e46e..783b69979 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.misc.special; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.ResourceLocation; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.Block; import net.minecraftforge.client.event.RenderPlayerEvent; import net.minecraftforge.eventbus.api.EventPriority; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -94,7 +94,7 @@ public class SpecialRenderInit { if (SPECIAL_LIST.containsKey(lower)) { RenderSpecial render = SPECIAL_LIST.get(lower); if (render != null) { - render.render(event.getMatrixStack(), event.getBuffers(), event.getLight(), event.getPlayer(), event.getPartialRenderTick()); + render.render(event.getPoseStack(), event.getMultiBufferSource(), event.getPackedLight(), event.getPlayer(), event.getPartialTick()); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/IDataHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/IDataHandler.java index ccac7cf62..e6bf22348 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/IDataHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/IDataHandler.java @@ -10,11 +10,11 @@ package de.ellpeck.actuallyadditions.mod.network; -import net.minecraft.nbt.CompoundNBT; -import net.minecraftforge.fml.network.NetworkEvent; +import net.minecraft.nbt.CompoundTag; +import net.minecraftforge.network.NetworkEvent; public interface IDataHandler { - void handleData(CompoundNBT compound, NetworkEvent.Context context); + void handleData(CompoundTag compound, NetworkEvent.Context context); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketClientToServer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketClientToServer.java index 573131956..6684d2391 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketClientToServer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketClientToServer.java @@ -11,30 +11,29 @@ package de.ellpeck.actuallyadditions.mod.network; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import io.netty.buffer.ByteBuf; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.network.PacketBuffer; -import net.minecraftforge.fml.network.NetworkEvent; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class PacketClientToServer { - private CompoundNBT data; + private CompoundTag data; private IDataHandler handler; public PacketClientToServer() { } - public PacketClientToServer(CompoundNBT data, IDataHandler handler) { + public PacketClientToServer(CompoundTag data, IDataHandler handler) { this.data = data; this.handler = handler; } - public static PacketClientToServer fromBytes(PacketBuffer buffer) { + public static PacketClientToServer fromBytes(FriendlyByteBuf buffer) { try { - CompoundNBT data = buffer.readNbt(); + CompoundTag data = buffer.readNbt(); int handlerId = buffer.readInt(); if (handlerId >= 0 && handlerId < PacketHandler.DATA_HANDLERS.size()) { @@ -46,7 +45,7 @@ public class PacketClientToServer { return new PacketClientToServer(); } - public static void toBytes(PacketClientToServer message, PacketBuffer buffer) { + public static void toBytes(PacketClientToServer message, FriendlyByteBuf buffer) { buffer.writeNbt(message.data); buffer.writeInt(PacketHandler.DATA_HANDLERS.indexOf(message.handler)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java index 6ae8a06dd..d8708195d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java @@ -20,26 +20,26 @@ import de.ellpeck.actuallyadditions.mod.particle.ParticleLaserItem; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.Minecraft; -import net.minecraft.entity.Entity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.inventory.container.Container; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.RegistryKey; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.registry.Registry; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Registry; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.Entity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.FakePlayer; -import net.minecraftforge.fml.network.NetworkDirection; -import net.minecraftforge.fml.network.NetworkEvent; -import net.minecraftforge.fml.network.NetworkRegistry; -import net.minecraftforge.fml.network.PacketDistributor; -import net.minecraftforge.fml.network.simple.SimpleChannel; +import net.minecraftforge.network.NetworkDirection; +import net.minecraftforge.network.NetworkEvent; +import net.minecraftforge.network.NetworkRegistry; +import net.minecraftforge.network.PacketDistributor; +import net.minecraftforge.network.simple.SimpleChannel; import java.util.ArrayList; import java.util.List; @@ -50,17 +50,17 @@ public final class PacketHandler { public static final IDataHandler LASER_HANDLER = new IDataHandler() { @Override @OnlyIn(Dist.CLIENT) - public void handleData(CompoundNBT compound, NetworkEvent.Context context) { + public void handleData(CompoundTag compound, NetworkEvent.Context context) { AssetUtil.spawnLaserWithTimeClient(compound.getDouble("StartX"), compound.getDouble("StartY"), compound.getDouble("StartZ"), compound.getDouble("EndX"), compound.getDouble("EndY"), compound.getDouble("EndZ"), compound.getInt("Color"), compound.getInt("MaxAge"), compound.getDouble("RotationTime"), compound.getFloat("Size"), compound.getFloat("Alpha")); } }; public static final IDataHandler TILE_ENTITY_HANDLER = new IDataHandler() { @Override @OnlyIn(Dist.CLIENT) - public void handleData(CompoundNBT compound, NetworkEvent.Context context) { - World world = Minecraft.getInstance().level; + public void handleData(CompoundTag compound, NetworkEvent.Context context) { + Level world = Minecraft.getInstance().level; if (world != null) { - TileEntity tile = world.getBlockEntity(new BlockPos(compound.getInt("X"), compound.getInt("Y"), compound.getInt("Z"))); + BlockEntity tile = world.getBlockEntity(new BlockPos(compound.getInt("X"), compound.getInt("Y"), compound.getInt("Z"))); if (tile instanceof TileEntityBase) { ((TileEntityBase) tile).readSyncableNBT(compound.getCompound("Data"), TileEntityBase.NBTType.SYNC); } @@ -70,7 +70,7 @@ public final class PacketHandler { public static final IDataHandler LASER_PARTICLE_HANDLER = new IDataHandler() { @Override @OnlyIn(Dist.CLIENT) - public void handleData(CompoundNBT compound, NetworkEvent.Context context) { + public void handleData(CompoundTag compound, NetworkEvent.Context context) { Minecraft mc = Minecraft.getInstance(); ItemStack stack = ItemStack.of(compound); @@ -90,51 +90,51 @@ public final class PacketHandler { } }; public static final IDataHandler GUI_BUTTON_TO_TILE_HANDLER = (compound, context) -> { - World world = context.getSender().getServer().getLevel(RegistryKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("WorldID")))); - TileEntity tile = world.getBlockEntity(new BlockPos(compound.getInt("X"), compound.getInt("Y"), compound.getInt("Z"))); + Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("WorldID")))); + BlockEntity tile = world.getBlockEntity(new BlockPos(compound.getInt("X"), compound.getInt("Y"), compound.getInt("Z"))); if (tile instanceof IButtonReactor) { IButtonReactor reactor = (IButtonReactor) tile; Entity entity = world.getEntity(compound.getInt("PlayerID")); - if (entity instanceof PlayerEntity) { - reactor.onButtonPressed(compound.getInt("ButtonID"), (PlayerEntity) entity); + if (entity instanceof Player) { + reactor.onButtonPressed(compound.getInt("ButtonID"), (Player) entity); } } }; public static final IDataHandler GUI_BUTTON_TO_CONTAINER_HANDLER = (compound, context) -> { - World world = context.getSender().getServer().getLevel(RegistryKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("WorldID")))); + Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("WorldID")))); Entity entity = world.getEntity(compound.getInt("PlayerID")); - if (entity instanceof PlayerEntity) { - Container container = ((PlayerEntity) entity).containerMenu; + if (entity instanceof Player) { + AbstractContainerMenu container = ((Player) entity).containerMenu; if (container instanceof IButtonReactor) { - ((IButtonReactor) container).onButtonPressed(compound.getInt("ButtonID"), (PlayerEntity) entity); + ((IButtonReactor) container).onButtonPressed(compound.getInt("ButtonID"), (Player) entity); } } }; public static final IDataHandler GUI_NUMBER_TO_TILE_HANDLER = (compound, context) -> { - World world = context.getSender().getServer().getLevel(RegistryKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("WorldID")))); - TileEntity tile = world.getBlockEntity(new BlockPos(compound.getInt("X"), compound.getInt("Y"), compound.getInt("Z"))); + Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("WorldID")))); + BlockEntity tile = world.getBlockEntity(new BlockPos(compound.getInt("X"), compound.getInt("Y"), compound.getInt("Z"))); if (tile instanceof INumberReactor) { INumberReactor reactor = (INumberReactor) tile; - reactor.onNumberReceived(compound.getDouble("Number"), compound.getInt("NumberID"), (PlayerEntity) world.getEntity(compound.getInt("PlayerID"))); + reactor.onNumberReceived(compound.getDouble("Number"), compound.getInt("NumberID"), (Player) world.getEntity(compound.getInt("PlayerID"))); } }; public static final IDataHandler GUI_STRING_TO_TILE_HANDLER = (compound, context) -> { - World world = context.getSender().getServer().getLevel(RegistryKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("WorldID")))); - TileEntity tile = world.getBlockEntity(new BlockPos(compound.getInt("X"), compound.getInt("Y"), compound.getInt("Z"))); + Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("WorldID")))); + BlockEntity tile = world.getBlockEntity(new BlockPos(compound.getInt("X"), compound.getInt("Y"), compound.getInt("Z"))); if (tile instanceof IStringReactor) { IStringReactor reactor = (IStringReactor) tile; - reactor.onTextReceived(compound.getString("Text"), compound.getInt("TextID"), (PlayerEntity) world.getEntity(compound.getInt("PlayerID"))); + reactor.onTextReceived(compound.getString("Text"), compound.getInt("TextID"), (Player) world.getEntity(compound.getInt("PlayerID"))); } }; public static final IDataHandler SYNC_PLAYER_DATA = new IDataHandler() { @Override @OnlyIn(Dist.CLIENT) - public void handleData(CompoundNBT compound, NetworkEvent.Context context) { - CompoundNBT dataTag = compound.getCompound("Data"); - PlayerEntity player = context.getSender(); //ActuallyAdditions.PROXY.getCurrentPlayer(); + public void handleData(CompoundTag compound, NetworkEvent.Context context) { + CompoundTag dataTag = compound.getCompound("Data"); + Player player = context.getSender(); //ActuallyAdditions.PROXY.getCurrentPlayer(); if (player != null) { PlayerData.getDataFromPlayer(player).readFromNBT(dataTag, false); @@ -148,8 +148,8 @@ public final class PacketHandler { } }; public static final IDataHandler PLAYER_DATA_TO_SERVER = (compound, context) -> { - World world = context.getSender().getServer().getLevel(RegistryKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("World")))); - PlayerEntity player = world.getServer().getPlayerList().getPlayer(compound.getUUID("UUID")); + Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("World")))); + Player player = world.getServer().getPlayerList().getPlayer(compound.getUUID("UUID")); if (player != null) { PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player); @@ -206,7 +206,7 @@ public final class PacketHandler { DATA_HANDLERS.add(PLAYER_DATA_TO_SERVER); } - public static void sendTo(Object msg, ServerPlayerEntity player) { + public static void sendTo(Object msg, ServerPlayer player) { if (!(player instanceof FakePlayer)) { THE_NETWORK.sendTo(msg, player.connection.getConnection(), NetworkDirection.PLAY_TO_CLIENT); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandlerHelper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandlerHelper.java index e1899ddb1..c5fae13ba 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandlerHelper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandlerHelper.java @@ -15,20 +15,20 @@ import de.ellpeck.actuallyadditions.api.booklet.IBookletChapter; import de.ellpeck.actuallyadditions.mod.data.PlayerData; import de.ellpeck.actuallyadditions.mod.data.PlayerData.PlayerSave; import net.minecraft.client.Minecraft; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.fml.network.PacketDistributor; +import net.minecraftforge.network.PacketDistributor; public final class PacketHandlerHelper { @OnlyIn(Dist.CLIENT) - public static void sendButtonPacket(TileEntity tile, int buttonId) { - CompoundNBT compound = new CompoundNBT(); + public static void sendButtonPacket(BlockEntity tile, int buttonId) { + CompoundTag compound = new CompoundTag(); BlockPos pos = tile.getBlockPos(); compound.putInt("X", pos.getX()); compound.putInt("Y", pos.getY()); @@ -39,26 +39,26 @@ public final class PacketHandlerHelper { PacketHandler.THE_NETWORK.sendToServer(new PacketClientToServer(compound, PacketHandler.GUI_BUTTON_TO_TILE_HANDLER)); } - public static void syncPlayerData(PlayerEntity player, boolean log) { - CompoundNBT compound = new CompoundNBT(); + public static void syncPlayerData(Player player, boolean log) { + CompoundTag compound = new CompoundTag(); compound.putBoolean("Log", log); - CompoundNBT data = new CompoundNBT(); + CompoundTag data = new CompoundTag(); PlayerData.getDataFromPlayer(player).writeToNBT(data, false); compound.put("Data", data); - if (player instanceof ServerPlayerEntity) { - PacketHandler.THE_NETWORK.send(PacketDistributor.PLAYER.with(() -> (ServerPlayerEntity) player), new PacketServerToClient(compound, PacketHandler.SYNC_PLAYER_DATA)); + if (player instanceof ServerPlayer) { + PacketHandler.THE_NETWORK.send(PacketDistributor.PLAYER.with(() -> (ServerPlayer) player), new PacketServerToClient(compound, PacketHandler.SYNC_PLAYER_DATA)); } } @OnlyIn(Dist.CLIENT) public static void sendPlayerDataToServer(boolean log, int type) { - CompoundNBT compound = new CompoundNBT(); + CompoundTag compound = new CompoundTag(); compound.putBoolean("Log", log); compound.putInt("Type", type); - PlayerEntity player = Minecraft.getInstance().player; + Player player = Minecraft.getInstance().player; if (player != null) { compound.putString("World", player.level.dimension().getRegistryName().toString()); compound.putUUID("UUID", player.getUUID()); @@ -89,8 +89,8 @@ public final class PacketHandlerHelper { } @OnlyIn(Dist.CLIENT) - public static void sendNumberPacket(TileEntity tile, double number, int id) { - CompoundNBT compound = new CompoundNBT(); + public static void sendNumberPacket(BlockEntity tile, double number, int id) { + CompoundTag compound = new CompoundTag(); compound.putInt("X", tile.getBlockPos().getX()); compound.putInt("Y", tile.getBlockPos().getY()); compound.putInt("Z", tile.getBlockPos().getZ()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketServerToClient.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketServerToClient.java index a1a56162d..6fb5f0a86 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketServerToClient.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketServerToClient.java @@ -11,30 +11,30 @@ package de.ellpeck.actuallyadditions.mod.network; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.network.PacketBuffer; -import net.minecraftforge.fml.network.NetworkEvent; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraftforge.network.NetworkEvent; import java.util.function.Supplier; public class PacketServerToClient { - private CompoundNBT data; + private CompoundTag data; private IDataHandler handler; public PacketServerToClient() { } - public PacketServerToClient(CompoundNBT data, IDataHandler handler) { + public PacketServerToClient(CompoundTag data, IDataHandler handler) { this.data = data; this.handler = handler; } - public static PacketServerToClient fromBytes(final PacketBuffer buffer) { + public static PacketServerToClient fromBytes(final FriendlyByteBuf buffer) { try { - CompoundNBT data = buffer.readNbt(); + CompoundTag data = buffer.readNbt(); int handlerId = buffer.readInt(); if (handlerId >= 0 && handlerId < PacketHandler.DATA_HANDLERS.size()) { @@ -46,7 +46,7 @@ public class PacketServerToClient { return new PacketServerToClient(); } - public static void toBytes(final PacketServerToClient message, PacketBuffer buffer) { + public static void toBytes(final PacketServerToClient message, FriendlyByteBuf buffer) { buffer.writeNbt(message.data); buffer.writeInt(PacketHandler.DATA_HANDLERS.indexOf(message.handler)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/IButtonReactor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/IButtonReactor.java index 8cd749605..4daff3c96 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/IButtonReactor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/IButtonReactor.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.network.gui; -import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.world.entity.player.Player; public interface IButtonReactor { @@ -21,5 +21,5 @@ public interface IButtonReactor { * @param buttonID The button's ID * @param player The Player pressing it */ - void onButtonPressed(int buttonID, PlayerEntity player); + void onButtonPressed(int buttonID, Player player); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/INumberReactor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/INumberReactor.java index fe2d14d1f..ec8d5c181 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/INumberReactor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/INumberReactor.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.network.gui; -import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.world.entity.player.Player; public interface INumberReactor { @@ -21,5 +21,5 @@ public interface INumberReactor { * @param id The ID (meaning the place in the GUI) of the number typed in * @param player The Player doing it */ - void onNumberReceived(double number, int id, PlayerEntity player); + void onNumberReceived(double number, int id, Player player); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/IStringReactor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/IStringReactor.java index 6300ec13d..4ab020eb2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/IStringReactor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/gui/IStringReactor.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.network.gui; -import net.minecraft.entity.player.PlayerEntity; +import net.minecraft.world.entity.player.Player; public interface IStringReactor { @@ -21,5 +21,5 @@ public interface IStringReactor { * @param textID The ID (meaning the place in the GUI) of the text typed in * @param player The Player doing it */ - void onTextReceived(String text, int textID, PlayerEntity player); + void onTextReceived(String text, int textID, Player player); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/ore/InitOreDict.java b/src/main/java/de/ellpeck/actuallyadditions/mod/ore/InitOreDict.java index 6b4e15b85..1cb046fc8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/ore/InitOreDict.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/ore/InitOreDict.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.ore; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.block.Block; // TODO: [port][change] migrate to TAGS @Deprecated diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ActuallyParticles.java b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ActuallyParticles.java index 4fd0d68ce..e0098657f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ActuallyParticles.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ActuallyParticles.java @@ -1,11 +1,11 @@ package de.ellpeck.actuallyadditions.mod.particle; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.particles.ParticleType; +import net.minecraft.core.particles.ParticleType; import net.minecraftforge.eventbus.api.IEventBus; -import net.minecraftforge.fml.RegistryObject; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; +import net.minecraftforge.registries.RegistryObject; public class ActuallyParticles { private static final DeferredRegister> PARTICLE_TYPES = DeferredRegister.create(ForgeRegistries.PARTICLE_TYPES, ActuallyAdditions.MODID); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/BeamParticleData.java b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/BeamParticleData.java index f60d5ec5f..49651ab63 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/BeamParticleData.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/BeamParticleData.java @@ -4,13 +4,13 @@ import com.mojang.brigadier.StringReader; import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; -import net.minecraft.network.PacketBuffer; -import net.minecraft.particles.IParticleData; -import net.minecraft.particles.ParticleType; +import net.minecraft.core.particles.ParticleOptions; +import net.minecraft.core.particles.ParticleType; +import net.minecraft.network.FriendlyByteBuf; import java.util.Locale; -public class BeamParticleData extends ParticleType implements IParticleData { +public class BeamParticleData extends ParticleType implements ParticleOptions { private ParticleType type; public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( Codec.DOUBLE.fieldOf("endX").forGetter(d -> d.endX), @@ -32,7 +32,7 @@ public class BeamParticleData extends ParticleType implements protected final double rotationTime; protected final float size; @SuppressWarnings("deprecation") - static final IDeserializer DESERIALIZER = new IDeserializer() { + static final Deserializer DESERIALIZER = new Deserializer() { @Override public BeamParticleData fromCommand(ParticleType type, StringReader reader) throws CommandSyntaxException { @@ -60,7 +60,7 @@ public class BeamParticleData extends ParticleType implements } @Override - public BeamParticleData fromNetwork(ParticleType type, PacketBuffer buffer) { + public BeamParticleData fromNetwork(ParticleType type, FriendlyByteBuf buffer) { double endX = buffer.readDouble(); double endY = buffer.readDouble(); double endZ = buffer.readDouble(); @@ -109,7 +109,7 @@ public class BeamParticleData extends ParticleType implements } @Override - public void writeToNetwork(PacketBuffer buffer) { + public void writeToNetwork(FriendlyByteBuf buffer) { buffer.writeDouble(this.endX); buffer.writeDouble(this.endY); buffer.writeDouble(this.endZ); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/BeamParticleType.java b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/BeamParticleType.java index 8de37e7b5..050934fb6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/BeamParticleType.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/BeamParticleType.java @@ -1,7 +1,7 @@ package de.ellpeck.actuallyadditions.mod.particle; import com.mojang.serialization.Codec; -import net.minecraft.particles.ParticleType; +import net.minecraft.core.particles.ParticleType; public class BeamParticleType extends ParticleType { public BeamParticleType() { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/LaserItemParticleData.java b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/LaserItemParticleData.java index 30c94a181..f5b00a846 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/LaserItemParticleData.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/LaserItemParticleData.java @@ -4,17 +4,17 @@ import com.mojang.brigadier.StringReader; import com.mojang.brigadier.exceptions.CommandSyntaxException; import com.mojang.serialization.Codec; import com.mojang.serialization.codecs.RecordCodecBuilder; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.network.PacketBuffer; -import net.minecraft.particles.IParticleData; -import net.minecraft.particles.ParticleType; -import net.minecraft.util.ResourceLocation; +import net.minecraft.core.particles.ParticleOptions; +import net.minecraft.core.particles.ParticleType; +import net.minecraft.network.FriendlyByteBuf; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; import net.minecraftforge.registries.ForgeRegistries; import java.util.Locale; -public class LaserItemParticleData extends ParticleType implements IParticleData { +public class LaserItemParticleData extends ParticleType implements ParticleOptions { private ParticleType type; public static final Codec CODEC = RecordCodecBuilder.create(instance -> instance.group( ItemStack.CODEC.fieldOf("stack").forGetter(d -> d.stack), @@ -26,7 +26,7 @@ public class LaserItemParticleData extends ParticleType i protected final ItemStack stack; protected final double outputX, outputY, outputZ; @SuppressWarnings("deprecation") - static final IParticleData.IDeserializer DESERIALIZER = new IParticleData.IDeserializer() { + static final ParticleOptions.Deserializer DESERIALIZER = new ParticleOptions.Deserializer() { @Override public LaserItemParticleData fromCommand(ParticleType type, StringReader reader) throws CommandSyntaxException { @@ -45,7 +45,7 @@ public class LaserItemParticleData extends ParticleType i } @Override - public LaserItemParticleData fromNetwork(ParticleType type, PacketBuffer buffer) { + public LaserItemParticleData fromNetwork(ParticleType type, FriendlyByteBuf buffer) { ItemStack stack = buffer.readItem(); double outputX = buffer.readDouble(); double outputY = buffer.readDouble(); @@ -74,7 +74,7 @@ public class LaserItemParticleData extends ParticleType i } @Override - public void writeToNetwork(PacketBuffer buffer) { + public void writeToNetwork(FriendlyByteBuf buffer) { buffer.writeItemStack(this.stack, true); buffer.writeDouble(this.outputX); buffer.writeDouble(this.outputY); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/LaserItemParticleType.java b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/LaserItemParticleType.java index bc8a7f6ef..612ce9c9c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/LaserItemParticleType.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/LaserItemParticleType.java @@ -1,7 +1,7 @@ package de.ellpeck.actuallyadditions.mod.particle; import com.mojang.serialization.Codec; -import net.minecraft.particles.ParticleType; +import net.minecraft.core.particles.ParticleType; public class LaserItemParticleType extends ParticleType { public LaserItemParticleType() { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleBeam.java b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleBeam.java index f2f9af4af..765cde6bf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleBeam.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleBeam.java @@ -10,15 +10,15 @@ package de.ellpeck.actuallyadditions.mod.particle; -import com.mojang.blaze3d.vertex.IVertexBuilder; +import com.mojang.blaze3d.vertex.VertexConsumer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.client.particle.IAnimatedSprite; -import net.minecraft.client.particle.IParticleFactory; -import net.minecraft.client.particle.IParticleRenderType; +import net.minecraft.client.Camera; +import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.particle.Particle; -import net.minecraft.client.renderer.ActiveRenderInfo; -import net.minecraft.client.world.ClientWorld; -import net.minecraft.particles.IParticleData; +import net.minecraft.client.particle.ParticleProvider; +import net.minecraft.client.particle.ParticleRenderType; +import net.minecraft.client.particle.SpriteSet; +import net.minecraft.core.particles.ParticleOptions; public class ParticleBeam extends Particle { @@ -30,7 +30,7 @@ public class ParticleBeam extends Particle { private final float size; private final float alpha; - public ParticleBeam(ClientWorld world, double startX, double startY, double startZ, double endX, double endY, double endZ, + public ParticleBeam(ClientLevel world, double startX, double startY, double startZ, double endX, double endY, double endZ, float[] color, float alpha, int maxAge, double rotationTime, float size) { super(world, startX, startY, startZ); this.endX = endX; @@ -44,30 +44,30 @@ public class ParticleBeam extends Particle { } @Override - public void render(IVertexBuilder buffer, ActiveRenderInfo renderInfo, float partialTicks) { + public void render(VertexConsumer buffer, Camera renderInfo, float partialTicks) { float ageRatio = (float) this.age / (float) this.lifetime; float currAlpha = this.alpha - ageRatio * this.alpha; AssetUtil.renderLaser(this.x + 0.5, this.y + 0.5, this.z + 0.5, this.endX + 0.5, this.endY + 0.5, this.endZ + 0.5, this.rotationTime, currAlpha, this.size, this.color); } @Override - public IParticleRenderType getRenderType() { - return IParticleRenderType.PARTICLE_SHEET_TRANSLUCENT; + public ParticleRenderType getRenderType() { + return ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT; } - public static class Factory implements IParticleFactory { - public Factory(IAnimatedSprite sprite) { + public static class Factory implements ParticleProvider { + public Factory(SpriteSet sprite) { } @Override - public Particle createParticle(BeamParticleData data, ClientWorld worldIn, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { + public Particle createParticle(BeamParticleData data, ClientLevel worldIn, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { return new ParticleBeam(worldIn, x, y, z, data.endX, data.endY, data.endZ, data.color, data.alpha, data.maxAge, data.rotationTime, data.size); } - public static IParticleData createData(double endX, double endY, double endZ, float[] color, float alpha, + public static ParticleOptions createData(double endX, double endY, double endZ, float[] color, float alpha, int maxAge, double rotationTime, float size) { return new BeamParticleData(endX, endY, endZ, color, alpha, maxAge, rotationTime, size); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleLaserItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleLaserItem.java index e2fe83721..d0256a07a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleLaserItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleLaserItem.java @@ -10,29 +10,28 @@ package de.ellpeck.actuallyadditions.mod.particle; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.IVertexBuilder; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Vector3f; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.Util; +import net.minecraft.client.Camera; import net.minecraft.client.Minecraft; -import net.minecraft.client.particle.IAnimatedSprite; -import net.minecraft.client.particle.IParticleFactory; -import net.minecraft.client.particle.IParticleRenderType; +import net.minecraft.client.multiplayer.ClientLevel; import net.minecraft.client.particle.Particle; -import net.minecraft.client.renderer.ActiveRenderInfo; -import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.particle.ParticleProvider; +import net.minecraft.client.particle.ParticleRenderType; +import net.minecraft.client.particle.SpriteSet; import net.minecraft.client.renderer.LightTexture; -import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.client.renderer.MultiBufferSource; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.client.world.ClientWorld; -import net.minecraft.item.ItemStack; -import net.minecraft.particles.IParticleData; -import net.minecraft.util.Util; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.util.math.vector.Vector3f; -import net.minecraft.world.LightType; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleOptions; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.LightLayer; +import net.minecraft.world.phys.Vec3; public class ParticleLaserItem extends Particle { private final double otherX; @@ -41,11 +40,11 @@ public class ParticleLaserItem extends Particle { private final ItemStack stack; - private ParticleLaserItem(ClientWorld world, double posX, double posY, double posZ, ItemStack stack, double motionY) { + private ParticleLaserItem(ClientLevel world, double posX, double posY, double posZ, ItemStack stack, double motionY) { this(world, posX, posY, posZ, stack, motionY, 0, 0, 0); } - public ParticleLaserItem(ClientWorld world, double posX, double posY, double posZ, ItemStack stack, double motionY, double otherX, double otherY, double otherZ) { + public ParticleLaserItem(ClientLevel world, double posX, double posY, double posZ, ItemStack stack, double motionY, double otherX, double otherY, double otherZ) { super(world, posX + (world.random.nextDouble() - 0.5) / 8, posY, posZ + (world.random.nextDouble() - 0.5) / 8); this.stack = stack; this.otherX = otherX; @@ -71,14 +70,14 @@ public class ParticleLaserItem extends Particle { } @Override - public void render(IVertexBuilder buffer, ActiveRenderInfo renderInfo, float partialTicks) { + public void render(VertexConsumer vertexConsumer, Camera renderInfo, float partialTicks) { Minecraft mc = Minecraft.getInstance(); - IRenderTypeBuffer.Impl renderBuffer = mc.renderBuffers().bufferSource(); - Vector3d cam = renderInfo.getPosition(); + MultiBufferSource.BufferSource renderBuffer = mc.renderBuffers().bufferSource(); + Vec3 cam = renderInfo.getPosition(); - RenderSystem.pushMatrix(); - RenderHelper.turnBackOn(); - MatrixStack matrices = new MatrixStack(); +// RenderSystem.pushMatrix(); +// Lighting.turnBackOn(); + PoseStack matrices = new PoseStack(); matrices.pushPose(); matrices.translate(x - cam.x, y - cam.y, z - cam.z); @@ -87,7 +86,7 @@ public class ParticleLaserItem extends Particle { double boop = Util.getMillis() / 600D; matrices.mulPose(Vector3f.YP.rotationDegrees((float) (boop * 40D % 360))); - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); +// RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); TODO: See if this is needed RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO); @@ -95,34 +94,34 @@ public class ParticleLaserItem extends Particle { float color = this.yd < 0 ? 1F - ageRatio : ageRatio; - RenderSystem.blendColor(color, color, color, color); +// RenderSystem.blendColor(color, color, color, color); TODO: See if this is needed - int blockLight = level.getBrightness(LightType.BLOCK, new BlockPos(x, y, z)); - int skyLight = level.getBrightness(LightType.SKY, new BlockPos(x, y, z)); + int blockLight = level.getBrightness(LightLayer.BLOCK, new BlockPos(x, y, z)); + int skyLight = level.getBrightness(LightLayer.SKY, new BlockPos(x, y, z)); AssetUtil.renderItemWithoutScrewingWithColors(this.stack, matrices, LightTexture.pack(blockLight, skyLight), OverlayTexture.NO_OVERLAY); - RenderHelper.turnOff(); +// Lighting.turnOff(); matrices.popPose(); - RenderSystem.popMatrix(); +// RenderSystem.popMatrix(); renderBuffer.endBatch(); } @Override - public IParticleRenderType getRenderType() { - return IParticleRenderType.PARTICLE_SHEET_TRANSLUCENT; + public ParticleRenderType getRenderType() { + return ParticleRenderType.PARTICLE_SHEET_TRANSLUCENT; } - public static class Factory implements IParticleFactory { - public Factory(IAnimatedSprite sprite) { + public static class Factory implements ParticleProvider { + public Factory(SpriteSet sprite) { } @Override - public Particle createParticle(LaserItemParticleData data, ClientWorld worldIn, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { + public Particle createParticle(LaserItemParticleData data, ClientLevel worldIn, double x, double y, double z, double xSpeed, double ySpeed, double zSpeed) { return new ParticleLaserItem(worldIn, x, y, z, data.stack, ySpeed, data.outputX, data.outputY, data.outputZ); } - public static IParticleData createData(ItemStack stack, double outputX, double outputY, double outputZ) { + public static ParticleOptions createData(ItemStack stack, double outputX, double outputY, double outputZ) { return new LaserItemParticleData(stack, outputX, outputY, outputZ); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java index 21d95f875..f52c4c510 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/proxy/ClientProxy.java @@ -10,10 +10,8 @@ package de.ellpeck.actuallyadditions.mod.proxy; -import net.minecraft.block.Block; -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.player.ClientPlayerEntity; -import net.minecraft.item.Item; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; import java.util.ArrayList; import java.util.List; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/CrusherRecipeRegistry.java b/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/CrusherRecipeRegistry.java index 41464c20d..29555417d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/CrusherRecipeRegistry.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/recipe/CrusherRecipeRegistry.java @@ -12,7 +12,7 @@ package de.ellpeck.actuallyadditions.mod.recipe; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.mod.crafting.CrushingRecipe; -import net.minecraft.item.ItemStack; +import net.minecraft.world.item.ItemStack; public final class CrusherRecipeRegistry { // diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/sack/SackData.java b/src/main/java/de/ellpeck/actuallyadditions/mod/sack/SackData.java index d45cb9cd8..7638a8d27 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/sack/SackData.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/sack/SackData.java @@ -1,7 +1,7 @@ package de.ellpeck.actuallyadditions.mod.sack; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; -import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.CompoundTag; import net.minecraftforge.common.util.INBTSerializable; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.IItemHandler; @@ -54,7 +54,7 @@ public class SackData { optional = LazyOptional.of(() -> inventory); } - public SackData(UUID uuid, CompoundNBT incoming) { + public SackData(UUID uuid, CompoundTag incoming) { this.uuid = uuid; inventory = new ItemStackHandlerAA(SIZE){ @@ -78,7 +78,7 @@ public class SackData { return uuid; } - public static Optional fromNBT(CompoundNBT nbt) { + public static Optional fromNBT(CompoundTag nbt) { if (nbt.contains("UUID")) { UUID uuid = nbt.getUUID("UUID"); return Optional.of(new SackData(uuid, nbt)); @@ -86,8 +86,8 @@ public class SackData { return Optional.empty(); } - public CompoundNBT toNBT() { - CompoundNBT nbt = new CompoundNBT(); + public CompoundTag toNBT() { + CompoundTag nbt = new CompoundTag(); nbt.putUUID("UUID", uuid); @@ -98,7 +98,7 @@ public class SackData { return nbt; } - public static class Metadata implements INBTSerializable { + public static class Metadata implements INBTSerializable { private String firstAccessedPlayer = ""; private long firstAccessedTime = 0; @@ -129,8 +129,8 @@ public class SackData { } @Override - public CompoundNBT serializeNBT() { - CompoundNBT nbt = new CompoundNBT(); + public CompoundTag serializeNBT() { + CompoundTag nbt = new CompoundTag(); nbt.putString("firstPlayer", firstAccessedPlayer); nbt.putLong("firstTime", firstAccessedTime); @@ -141,7 +141,7 @@ public class SackData { } @Override - public void deserializeNBT(CompoundNBT nbt) { + public void deserializeNBT(CompoundTag nbt) { firstAccessedPlayer = nbt.getString("firstPlayer"); firstAccessedTime = nbt.getLong("firstTime"); lastAccessedPlayer = nbt.getString("lastPlayer"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/sack/SackManager.java b/src/main/java/de/ellpeck/actuallyadditions/mod/sack/SackManager.java index 1749c2c33..453568033 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/sack/SackManager.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/sack/SackManager.java @@ -1,23 +1,22 @@ package de.ellpeck.actuallyadditions.mod.sack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.nbt.ListNBT; -import net.minecraft.world.World; -import net.minecraft.world.storage.WorldSavedData; -import net.minecraftforge.common.util.Constants; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.saveddata.SavedData; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.fml.common.thread.SidedThreadGroups; -import net.minecraftforge.fml.server.ServerLifecycleHooks; +import net.minecraftforge.fml.util.thread.SidedThreadGroups; import net.minecraftforge.items.IItemHandler; +import net.minecraftforge.server.ServerLifecycleHooks; import javax.annotation.Nonnull; import java.util.HashMap; import java.util.Optional; import java.util.UUID; -public class SackManager extends WorldSavedData { +public class SackManager extends SavedData { private static final String NAME = ActuallyAdditions.MODID + "_sack_data"; private static final SackManager blankClient = new SackManager(); @@ -25,12 +24,12 @@ public class SackManager extends WorldSavedData { private static final HashMap data = new HashMap<>(); public SackManager() { - super(NAME); + super(); } public static SackManager get() { if (Thread.currentThread().getThreadGroup() == SidedThreadGroups.SERVER) - return ServerLifecycleHooks.getCurrentServer().getLevel(World.OVERWORLD).getDataStorage().computeIfAbsent(SackManager::new, NAME); + return ServerLifecycleHooks.getCurrentServer().getLevel(Level.OVERWORLD).getDataStorage().computeIfAbsent(SackManager::load, SackManager::new, NAME); else return blankClient; } @@ -72,18 +71,18 @@ public class SackManager extends WorldSavedData { return LazyOptional.empty(); } - @Override - public void load(CompoundNBT nbt) { + public static SackManager load(CompoundTag nbt) { if (nbt.contains("Sacks")) { - ListNBT list = nbt.getList("Sacks", Constants.NBT.TAG_COMPOUND); - list.forEach((sackNBT) -> SackData.fromNBT((CompoundNBT) sackNBT).ifPresent((sack) -> data.put(sack.getUuid(), sack))); + ListTag list = nbt.getList("Sacks", CompoundTag.TAG_COMPOUND); + list.forEach((sackNBT) -> SackData.fromNBT((CompoundTag) sackNBT).ifPresent((sack) -> data.put(sack.getUuid(), sack))); } + return new SackManager(); } @Override @Nonnull - public CompoundNBT save(CompoundNBT compound) { - ListNBT sacks = new ListNBT(); + public CompoundTag save(CompoundTag compound) { + ListTag sacks = new ListTag(); data.forEach(((uuid, sackData) -> sacks.add(sackData.toNBT()))); compound.put("Sacks", sacks); return compound; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/CustomEnergyStorage.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/CustomEnergyStorage.java index e784b4836..89d17e08c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/CustomEnergyStorage.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/CustomEnergyStorage.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.tile; -import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.CompoundTag; import net.minecraftforge.energy.EnergyStorage; public class CustomEnergyStorage extends EnergyStorage { @@ -60,12 +60,12 @@ public class CustomEnergyStorage extends EnergyStorage { dirty = false; } - public void readFromNBT(CompoundNBT compound) { + public void readFromNBT(CompoundTag compound) { if (compound.contains("Energy")) this.setEnergyStored(compound.getInt("Energy")); } - public void writeToNBT(CompoundNBT compound) { + public void writeToNBT(CompoundTag compound) { compound.putInt("Energy", this.getEnergyStored()); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/FilterSettings.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/FilterSettings.java index ccfbd43d9..3a81dfc6c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/FilterSettings.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/FilterSettings.java @@ -14,9 +14,9 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerFilter; import de.ellpeck.actuallyadditions.mod.inventory.slot.SlotFilter; import de.ellpeck.actuallyadditions.mod.items.DrillItem; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; public class FilterSettings { public final ItemStackHandlerAA filterInventory; @@ -83,8 +83,8 @@ public class FilterSettings { return false; } - public void writeToNBT(CompoundNBT tag, String name) { - CompoundNBT compound = new CompoundNBT(); + public void writeToNBT(CompoundTag tag, String name) { + CompoundTag compound = new CompoundTag(); compound.putBoolean("Whitelist", this.isWhitelist); compound.putBoolean("NBT", this.respectNBT); compound.putBoolean("Mod", this.respectMod); @@ -92,8 +92,8 @@ public class FilterSettings { tag.put(name, compound); } - public void readFromNBT(CompoundNBT tag, String name) { - CompoundNBT compound = tag.getCompound(name); + public void readFromNBT(CompoundTag tag, String name) { + CompoundTag compound = tag.getCompound(name); this.isWhitelist = compound.getBoolean("Whitelist"); this.respectNBT = compound.getBoolean("NBT"); this.respectMod = compound.getBoolean("Mod"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/ISharingEnergyProvider.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/ISharingEnergyProvider.java index 663afc30b..d91394371 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/ISharingEnergyProvider.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/ISharingEnergyProvider.java @@ -10,8 +10,8 @@ package de.ellpeck.actuallyadditions.mod.tile; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.entity.BlockEntity; public interface ISharingEnergyProvider { @@ -21,5 +21,5 @@ public interface ISharingEnergyProvider { Direction[] getEnergyShareSides(); - boolean canShareTo(TileEntity tile); + boolean canShareTo(BlockEntity tile); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/ISharingFluidHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/ISharingFluidHandler.java index 363772946..139de199a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/ISharingFluidHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/ISharingFluidHandler.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.tile; -import net.minecraft.util.Direction; +import net.minecraft.core.Direction; public interface ISharingFluidHandler { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java index 50aee0808..328e8ba1f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityAtomicReconstructor.java @@ -20,16 +20,17 @@ import de.ellpeck.actuallyadditions.mod.config.CommonConfig; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.BlockState; -import net.minecraft.item.Item; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.Direction; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.sounds.SoundSource; +import net.minecraft.util.Mth; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.phys.AABB; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; @@ -45,23 +46,23 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple private int maxAge = 0; private int beamColor = 0x1b6dff; - public TileEntityAtomicReconstructor() { - super(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.getTileEntityType(), 1); + public TileEntityAtomicReconstructor(BlockPos pos, BlockState state) { + super(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.getTileEntityType(), pos, state, 1); int power = CommonConfig.Machines.RECONSTRUCTOR_POWER.get(); - int recieve = MathHelper.ceil(power * 0.016666F); + int recieve = Mth.ceil(power * 0.016666F); this.storage = new CustomEnergyStorage(power, recieve, 0); this.lazyEnergy = LazyOptional.of(() -> this.storage); } - public static void shootLaser(IAtomicReconstructor tile, World world, double startX, double startY, double startZ, double endX, double endY, double endZ, Lens currentLens) { - world.playSound(null, startX, startY, startZ, AASounds.RECONSTRUCTOR.get(), SoundCategory.BLOCKS, 0.35F, 1.0F); + public static void shootLaser(IAtomicReconstructor tile, Level world, double startX, double startY, double startZ, double endX, double endY, double endZ, Lens currentLens) { + world.playSound(null, startX, startY, startZ, AASounds.RECONSTRUCTOR.get(), SoundSource.BLOCKS, 0.35F, 1.0F); AssetUtil.spawnLaserWithTimeServer(world, startX, startY, startZ, endX, endY, endZ, currentLens.getColor(), 25, 0, 0.2F, 0.8F); } @Override - public AxisAlignedBB getRenderBoundingBox() { + public AABB getRenderBoundingBox() { if (getProgress() > 0.0f) - return new AxisAlignedBB(getPosition(), getPosition().offset(1,1,1).relative(getBlockState().getValue(BlockStateProperties.FACING), 11)); + return new AABB(getPosition(), getPosition().offset(1,1,1).relative(getBlockState().getValue(BlockStateProperties.FACING), 11)); else return super.getRenderBoundingBox(); } @@ -100,7 +101,7 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { compound.putInt("CurrentTime", this.currentTime); @@ -115,7 +116,7 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { this.currentTime = compound.getInt("CurrentTime"); @@ -125,27 +126,32 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple this.storage.readFromNBT(compound); } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - if (!this.isRedstonePowered && !this.isPulseMode) { - if (this.currentTime > 0) { - this.currentTime--; - if (this.currentTime <= 0) { - ActuallyAdditionsAPI.methodHandler.invokeReconstructor(this); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityAtomicReconstructor tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityAtomicReconstructor tile) { + tile.serverTick(); + + if (!tile.isRedstonePowered && !tile.isPulseMode) { + if (tile.currentTime > 0) { + tile.currentTime--; + if (tile.currentTime <= 0) { + ActuallyAdditionsAPI.methodHandler.invokeReconstructor(tile); } } else { - this.currentTime = 100; + tile.currentTime = 100; } } - if (this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()) { - this.oldEnergy = this.storage.getEnergyStored(); - this.level.updateNeighbourForOutputSignal(this.worldPosition, ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get()); + if (tile.oldEnergy != tile.storage.getEnergyStored() && tile.sendUpdateWithInterval()) { + tile.oldEnergy = tile.storage.getEnergyStored(); + level.updateNeighbourForOutputSignal(pos, ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get()); } } - } @Override @@ -184,7 +190,7 @@ public class TileEntityAtomicReconstructor extends TileEntityInventoryBase imple } @Override - public World getWorldObject() { + public Level getWorldObject() { return this.getLevel(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java index a8d4c0738..ce37cc284 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java @@ -10,20 +10,17 @@ package de.ellpeck.actuallyadditions.mod.tile; -import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.util.VanillaPacketDispatcher; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.BlockState; -import net.minecraft.client.renderer.texture.ITickable; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.play.server.SUpdateTileEntityPacket; -import net.minecraft.tileentity.ITickableTileEntity; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.Connection; +import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.CapabilityEnergy; @@ -36,23 +33,23 @@ import net.minecraftforge.items.IItemHandler; import javax.annotation.Nonnull; import javax.annotation.Nullable; -public abstract class TileEntityBase extends TileEntity implements ITickableTileEntity { +public abstract class TileEntityBase extends BlockEntity { public boolean isRedstonePowered; public boolean isPulseMode; public boolean stopFromDropping; protected int ticksElapsed; - protected TileEntity[] tilesAround = new TileEntity[6]; + protected BlockEntity[] tilesAround = new BlockEntity[6]; protected boolean hasSavedDataOnChangeOrWorldStart; - public TileEntityBase(TileEntityType type) { - super(type); + public TileEntityBase(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state); } @Override - public CompoundNBT save(CompoundNBT compound) { + protected void saveAdditional(CompoundTag compound) { + super.saveAdditional(compound); this.writeSyncableNBT(compound, NBTType.SAVE_TILE); - return compound; } // TODO: [port] remove if the above is correct @@ -63,10 +60,11 @@ public abstract class TileEntityBase extends TileEntity implements ITickableTile // } @Override - public void load(BlockState state, CompoundNBT compound) { + public void load(CompoundTag compound) { this.readSyncableNBT(compound, NBTType.SAVE_TILE); } + // TODO: [port] remove if the above is correct // @Override // public final void readFromNBT(CompoundNBT compound) { @@ -75,26 +73,26 @@ public abstract class TileEntityBase extends TileEntity implements ITickableTile @Nullable @Override - public SUpdateTileEntityPacket getUpdatePacket() { - CompoundNBT compound = new CompoundNBT(); + public ClientboundBlockEntityDataPacket getUpdatePacket() { + CompoundTag compound = new CompoundTag(); this.writeSyncableNBT(compound, NBTType.SYNC); - return new SUpdateTileEntityPacket(this.worldPosition, -1, compound); + return ClientboundBlockEntityDataPacket.create(this); } @Override - public void onDataPacket(NetworkManager net, SUpdateTileEntityPacket pkt) { + public void onDataPacket(Connection net, ClientboundBlockEntityDataPacket pkt) { this.readSyncableNBT(pkt.getTag(), NBTType.SYNC); } @Override - public final CompoundNBT getUpdateTag() { - CompoundNBT compound = new CompoundNBT(); + public final CompoundTag getUpdateTag() { + CompoundTag compound = new CompoundTag(); this.writeSyncableNBT(compound, NBTType.SYNC); return compound; } @Override - public void handleUpdateTag(BlockState state, CompoundNBT tag) { + public void handleUpdateTag(CompoundTag tag) { this.readSyncableNBT(tag, NBTType.SYNC); } @@ -116,9 +114,9 @@ public abstract class TileEntityBase extends TileEntity implements ITickableTile }*/ } - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { if (type != NBTType.SAVE_BLOCK) { - super.save(compound); + super.saveAdditional(compound); } if (type == NBTType.SAVE_TILE) { @@ -134,9 +132,9 @@ public abstract class TileEntityBase extends TileEntity implements ITickableTile } } - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { if (type != NBTType.SAVE_BLOCK) { - super.load(null, compound); // FIXME: [port] flag as possible crash source + super.load(compound); // FIXME: [port] flag as possible crash source } if (type == NBTType.SAVE_TILE) { @@ -168,12 +166,6 @@ public abstract class TileEntityBase extends TileEntity implements ITickableTile // return new TranslationTextComponent(this.getNameForTranslation()); // } - - @Override - public void tick() { - this.updateEntity(); - } - public int getComparatorStrength() { return 0; } @@ -181,61 +173,63 @@ public abstract class TileEntityBase extends TileEntity implements ITickableTile private boolean shareEnergy = this instanceof ISharingEnergyProvider; private boolean shareFluid = this instanceof ISharingFluidHandler; - public void updateEntity() { + protected void clientTick() { + this.ticksElapsed++; + } + + protected void serverTick() { this.ticksElapsed++; - if (!this.level.isClientSide) { - if (this.shareEnergy) { - ISharingEnergyProvider provider = (ISharingEnergyProvider) this; - if (provider.doesShareEnergy()) { - int total = provider.getEnergyToSplitShare(); - if (total > 0) { - Direction[] sides = provider.getEnergyShareSides(); + if (this.shareEnergy) { + ISharingEnergyProvider provider = (ISharingEnergyProvider) this; + if (provider.doesShareEnergy()) { + int total = provider.getEnergyToSplitShare(); + if (total > 0) { + Direction[] sides = provider.getEnergyShareSides(); - int amount = total / sides.length; - if (amount <= 0) { - amount = total; - } + int amount = total / sides.length; + if (amount <= 0) { + amount = total; + } - for (Direction side : sides) { - TileEntity tile = this.tilesAround[side.ordinal()]; - if (tile != null && provider.canShareTo(tile)) { - WorldUtil.doEnergyInteraction(this, tile, side, amount); - } + for (Direction side : sides) { + BlockEntity tile = this.tilesAround[side.ordinal()]; + if (tile != null && provider.canShareTo(tile)) { + WorldUtil.doEnergyInteraction(this, tile, side, amount); } } } } + } - if (this.shareFluid) { - ISharingFluidHandler handler = (ISharingFluidHandler) this; - if (handler.doesShareFluid()) { - int total = handler.getMaxFluidAmountToSplitShare(); - if (total > 0) { - Direction[] sides = handler.getFluidShareSides(); + if (this.shareFluid) { + ISharingFluidHandler handler = (ISharingFluidHandler) this; + if (handler.doesShareFluid()) { + int total = handler.getMaxFluidAmountToSplitShare(); + if (total > 0) { + Direction[] sides = handler.getFluidShareSides(); - int amount = total / sides.length; - if (amount <= 0) { - amount = total; - } + int amount = total / sides.length; + if (amount <= 0) { + amount = total; + } - for (Direction side : sides) { - TileEntity tile = this.tilesAround[side.ordinal()]; - if (tile != null) { - WorldUtil.doFluidInteraction(this, tile, side, amount); - } + for (Direction side : sides) { + BlockEntity tile = this.tilesAround[side.ordinal()]; + if (tile != null) { + WorldUtil.doFluidInteraction(this, tile, side, amount); } } } } + } - if (!this.hasSavedDataOnChangeOrWorldStart) { - if (this.shouldSaveDataOnChangeOrWorldStart()) { - this.saveDataOnChangeOrWorldStart(); - } - - this.hasSavedDataOnChangeOrWorldStart = true; + if (!this.hasSavedDataOnChangeOrWorldStart) { + if (this.shouldSaveDataOnChangeOrWorldStart()) { + this.saveDataOnChangeOrWorldStart(); } + + this.hasSavedDataOnChangeOrWorldStart = true; } } @@ -257,7 +251,7 @@ public abstract class TileEntityBase extends TileEntity implements ITickableTile this.setChanged(); } - public boolean canPlayerUse(PlayerEntity player) { + public boolean canPlayerUse(Player player) { return player.distanceToSqr(this.getBlockPos().getX() + 0.5D, this.worldPosition.getY() + 0.5D, this.worldPosition.getZ() + 0.5D) <= 64 && !this.isRemoved() && this.level.getBlockEntity(this.worldPosition) == this; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBatteryBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBatteryBox.java index 603570473..3d3fa8fd4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBatteryBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBatteryBox.java @@ -14,10 +14,12 @@ import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.items.ItemBattery; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; -import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.item.ItemStack; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; @@ -30,8 +32,8 @@ public class TileEntityBatteryBox extends TileEntityInventoryBase implements ISh private int lastEnergyStored; private int lastCompare; - public TileEntityBatteryBox() { - super(ActuallyBlocks.BATTERY_BOX.getTileEntityType(), 1); + public TileEntityBatteryBox(BlockPos pos, BlockState state) { + super(ActuallyBlocks.BATTERY_BOX.getTileEntityType(), pos, state, 1); } @Override @@ -43,18 +45,23 @@ public class TileEntityBatteryBox extends TileEntityInventoryBase implements ISh return LazyOptional.empty(); } - @Override - public void updateEntity() { - super.updateEntity(); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityBatteryBox tile) { + tile.clientTick(); + } + } - if (!this.level.isClientSide) { - LazyOptional cap = this.getEnergyStorage(null); + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityBatteryBox tile) { + tile.serverTick(); + + LazyOptional cap = tile.getEnergyStorage(null); int currStorage = cap.map(storage -> { - ItemStack stack = this.inv.getStackInSlot(0); + ItemStack stack = tile.inv.getStackInSlot(0); if (!stack.isEmpty() && ItemUtil.isEnabled(stack)) { if (storage.getEnergyStored() > 0) { List tiles = new ArrayList<>(); - this.energyPushOffLoop(this, tiles); + tile.energyPushOffLoop(tile, tiles); if (!tiles.isEmpty()) { int amount = tiles.size(); @@ -65,10 +72,10 @@ public class TileEntityBatteryBox extends TileEntityInventoryBase implements ISh } int maxPer = storage.extractEnergy(energyPer, true); - for (TileEntityBatteryBox tile : tiles) { - ItemStack battery = tile.inv.getStackInSlot(0); + for (TileEntityBatteryBox te : tiles) { + ItemStack battery = te.inv.getStackInSlot(0); if (!battery.isEmpty() && !ItemUtil.isEnabled(battery)) { - int received = tile.getCapability(CapabilityEnergy.ENERGY, null).map(e -> e.receiveEnergy(maxPer, false)).orElse(0); + int received = te.getCapability(CapabilityEnergy.ENERGY, null).map(e -> e.receiveEnergy(maxPer, false)).orElse(0); storage.extractEnergy(received, false); if (storage.getEnergyStored() <= 0) { @@ -82,17 +89,24 @@ public class TileEntityBatteryBox extends TileEntityInventoryBase implements ISh return storage.getEnergyStored(); }).orElse(0); - if (this.lastCompare != this.getComparatorStrength()) { - this.lastCompare = this.getComparatorStrength(); - this.setChanged(); + if (tile.lastCompare != tile.getComparatorStrength()) { + tile.lastCompare = tile.getComparatorStrength(); + tile.setChanged(); } - if (this.lastEnergyStored != currStorage && this.sendUpdateWithInterval()) { - this.lastEnergyStored = currStorage; + if (tile.lastEnergyStored != currStorage && tile.sendUpdateWithInterval()) { + tile.lastEnergyStored = currStorage; } } } + @Override + public void serverTick() { + super.serverTick(); + + + } + @Override public int getComparatorStrength() { return this.getEnergyStorage(null) @@ -119,7 +133,7 @@ public class TileEntityBatteryBox extends TileEntityInventoryBase implements ISh return; } - for (TileEntity tile : startTile.tilesAround) { + for (BlockEntity tile : startTile.tilesAround) { if (tile instanceof TileEntityBatteryBox) { TileEntityBatteryBox box = (TileEntityBatteryBox) tile; if (!pushOffTo.contains(box)) { @@ -159,7 +173,7 @@ public class TileEntityBatteryBox extends TileEntityInventoryBase implements ISh } @Override - public boolean canShareTo(TileEntity tile) { + public boolean canShareTo(BlockEntity tile) { return !(tile instanceof TileEntityBatteryBox); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBioReactor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBioReactor.java index fafe21a99..99fbbab5d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBioReactor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBioReactor.java @@ -15,20 +15,23 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerBioReactor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.block.IGrowable; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.BlockItem; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.BonemealableBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; @@ -37,9 +40,7 @@ import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - -public class TileEntityBioReactor extends TileEntityInventoryBase implements INamedContainerProvider, ISharingEnergyProvider { +public class TileEntityBioReactor extends TileEntityInventoryBase implements MenuProvider, ISharingEnergyProvider { public final CustomEnergyStorage storage = new CustomEnergyStorage(200000, 0, 800); public final LazyOptional lazyEnergy = LazyOptional.of(() -> this.storage); @@ -51,8 +52,8 @@ public class TileEntityBioReactor extends TileEntityInventoryBase implements INa private int lastBurnTime; private int lastProducePerTick; - public TileEntityBioReactor() { - super(ActuallyBlocks.BIOREACTOR.getTileEntityType(), 8); + public TileEntityBioReactor(BlockPos pos, BlockState state) { + super(ActuallyBlocks.BIOREACTOR.getTileEntityType(), pos, state, 8); } public static boolean isValidItem(ItemStack stack) { @@ -68,59 +69,66 @@ public class TileEntityBioReactor extends TileEntityInventoryBase implements INa } private static boolean isValid(Object o) { - return o instanceof IPlantable || o instanceof IGrowable; + return o instanceof IPlantable || o instanceof BonemealableBlock; } - @Override - public void updateEntity() { - super.updateEntity(); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityBioReactor tile) { + tile.clientTick(); + } + } - if (this.burnTime <= 0) { - List types = null; + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityBioReactor tile) { + tile.serverTick(); - if (!this.isRedstonePowered && this.storage.getEnergyStored() < this.storage.getMaxEnergyStored()) { - for (int i = 0; i < this.inv.getSlots(); i++) { - ItemStack stack = this.inv.getStackInSlot(i); - if (StackUtil.isValid(stack)) { - Item item = stack.getItem(); - if (isValidItem(stack) && (types == null || !types.contains(item))) { - if (types == null) { - types = new ArrayList<>(); + if (tile.burnTime <= 0) { + List types = null; + + if (!tile.isRedstonePowered && tile.storage.getEnergyStored() < tile.storage.getMaxEnergyStored()) { + for (int i = 0; i < tile.inv.getSlots(); i++) { + ItemStack stack = tile.inv.getStackInSlot(i); + if (StackUtil.isValid(stack)) { + Item item = stack.getItem(); + if (isValidItem(stack) && (types == null || !types.contains(item))) { + if (types == null) { + types = new ArrayList<>(); + } + types.add(item); + + tile.inv.setStackInSlot(i, StackUtil.shrink(stack, 1)); } - types.add(item); - - this.inv.setStackInSlot(i, StackUtil.shrink(stack, 1)); } } + + tile.setChanged(); } - this.setChanged(); - } + if (types != null && !types.isEmpty()) { + int amount = types.size(); + tile.producePerTick = (int) Math.pow(amount * 2, 2); - if (types != null && !types.isEmpty()) { - int amount = types.size(); - this.producePerTick = (int) Math.pow(amount * 2, 2); - - this.maxBurnTime = 200 - (int) Math.pow(1.8, amount); - this.burnTime = this.maxBurnTime; + tile.maxBurnTime = 200 - (int) Math.pow(1.8, amount); + tile.burnTime = tile.maxBurnTime; + } else { + tile.burnTime = 0; + tile.maxBurnTime = 0; + tile.producePerTick = 0; + } } else { - this.burnTime = 0; - this.maxBurnTime = 0; - this.producePerTick = 0; + tile.burnTime--; + tile.storage.receiveEnergyInternal(tile.producePerTick, false); } - } else { - this.burnTime--; - this.storage.receiveEnergyInternal(this.producePerTick, false); - } - if ((this.lastBurnTime != this.burnTime || this.lastProducePerTick != this.producePerTick) && this.sendUpdateWithInterval()) { - this.lastBurnTime = this.burnTime; - this.lastProducePerTick = this.producePerTick; + if ((tile.lastBurnTime != tile.burnTime || tile.lastProducePerTick != tile.producePerTick) && tile.sendUpdateWithInterval()) { + tile.lastBurnTime = tile.burnTime; + tile.lastProducePerTick = tile.producePerTick; + } } } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); this.storage.writeToNBT(compound); @@ -130,7 +138,7 @@ public class TileEntityBioReactor extends TileEntityInventoryBase implements INa } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.storage.readFromNBT(compound); @@ -165,7 +173,7 @@ public class TileEntityBioReactor extends TileEntityInventoryBase implements INa } @Override - public boolean canShareTo(TileEntity tile) { + public boolean canShareTo(BlockEntity tile) { return true; } @@ -181,13 +189,13 @@ public class TileEntityBioReactor extends TileEntityInventoryBase implements INa } @Override - public ITextComponent getDisplayName() { - return StringTextComponent.EMPTY; + public Component getDisplayName() { + return TextComponent.EMPTY; } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity playerEntity) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player playerEntity) { return new ContainerBioReactor(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java index f8e9b8d7b..853ebee1a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java @@ -16,22 +16,23 @@ import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.NetHandlerSpaghettiServer; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.common.util.FakePlayerFactory; import net.minecraftforge.fluids.IFluidBlock; @@ -40,24 +41,22 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.List; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - -public class TileEntityBreaker extends TileEntityInventoryBase implements INamedContainerProvider { +public class TileEntityBreaker extends TileEntityInventoryBase implements MenuProvider { public boolean isPlacer; private int currentTime; - public TileEntityBreaker(TileEntityType type, int slots) { - super(type, slots); + public TileEntityBreaker(BlockEntityType type, BlockPos pos, BlockState state, int slots) { + super(type, pos, state, slots); } - public TileEntityBreaker() { - super(ActuallyBlocks.BREAKER.getTileEntityType(), 9); + public TileEntityBreaker(BlockPos pos, BlockState state) { + super(ActuallyBlocks.BREAKER.getTileEntityType(), pos, state, 9); this.isPlacer = false; } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { compound.putInt("CurrentTime", this.currentTime); @@ -65,25 +64,31 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements INamed } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { this.currentTime = compound.getInt("CurrentTime"); } } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - if (!this.isRedstonePowered && !this.isPulseMode) { - if (this.currentTime > 0) { - this.currentTime--; - if (this.currentTime <= 0) { - this.doWork(); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityBreaker tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityBreaker tile) { + tile.serverTick(); + + if (!tile.isRedstonePowered && !tile.isPulseMode) { + if (tile.currentTime > 0) { + tile.currentTime--; + if (tile.currentTime <= 0) { + tile.doWork(); } } else { - this.currentTime = 15; + tile.currentTime = 15; } } } @@ -101,8 +106,8 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements INamed Block blockToBreak = stateToBreak.getBlock(); if (!this.isPlacer && blockToBreak != Blocks.AIR && !(blockToBreak instanceof IFluidBlock) && stateToBreak.getDestroySpeed(this.level, breakCoords) >= 0.0F) { - List drops = Block.getDrops(stateToBreak, (ServerWorld) this.level, breakCoords, this.level.getBlockEntity(breakCoords)); - FakePlayer fake = FakePlayerFactory.getMinecraft((ServerWorld) this.level); + List drops = Block.getDrops(stateToBreak, (ServerLevel) this.level, breakCoords, this.level.getBlockEntity(breakCoords)); + FakePlayer fake = FakePlayerFactory.getMinecraft((ServerLevel) this.level); if (fake.connection == null) { fake.connection = new NetHandlerSpaghettiServer(fake); } @@ -134,13 +139,13 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements INamed @Nonnull @Override - public ITextComponent getDisplayName() { - return new TranslationTextComponent(isPlacer ? "container.actuallyadditions.placer" : "container.actuallyadditions.breaker"); + public Component getDisplayName() { + return new TranslatableComponent(isPlacer ? "container.actuallyadditions.placer" : "container.actuallyadditions.breaker"); } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity playerEntity) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player playerEntity) { return new ContainerBreaker(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java index a16b95b41..38c4cfe7b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java @@ -14,37 +14,36 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.crafting.PressingRecipe; import de.ellpeck.actuallyadditions.mod.crafting.SingleItem; -import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.fluids.OutputOnlyFluidTank; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCanolaPress; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; import net.minecraftforge.fluids.FluidAttributes; import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.IFluidTank; import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.fluids.capability.templates.FluidTank; import javax.annotation.Nullable; import java.util.Optional; -public class TileEntityCanolaPress extends TileEntityInventoryBase implements INamedContainerProvider, ISharingFluidHandler { +public class TileEntityCanolaPress extends TileEntityInventoryBase implements MenuProvider, ISharingFluidHandler { public static final int ENERGY_USE = 35; private static final int TIME = 30; @@ -59,8 +58,8 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IN private int lastTankAmount; private int lastProcessTime; - public TileEntityCanolaPress() { - super(ActuallyBlocks.CANOLA_PRESS.getTileEntityType(), 1); + public TileEntityCanolaPress(BlockPos pos, BlockState state) { + super(ActuallyBlocks.CANOLA_PRESS.getTileEntityType(), pos, state, 1); } @OnlyIn(Dist.CLIENT) @@ -79,7 +78,7 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IN } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { if (type != NBTType.SAVE_BLOCK) { compound.putInt("ProcessTime", this.currentProcessTime); } @@ -89,7 +88,7 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IN } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { if (type != NBTType.SAVE_BLOCK) { this.currentProcessTime = compound.getInt("ProcessTime"); } @@ -98,34 +97,40 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IN super.readSyncableNBT(compound, type); } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - Optional recipe = getRecipeForInput(this.inv.getStackInSlot(0)); - recipe.ifPresent(r -> { - if ((r.getOutput().isFluidEqual(this.tank.getFluid()) || this.tank.isEmpty()) && r.getOutput().getAmount() <= this.tank.getCapacity() - this.tank.getFluidAmount()) { - if (this.storage.getEnergyStored() >= ENERGY_USE) { - this.currentProcessTime++; - this.storage.extractEnergyInternal(ENERGY_USE, false); - if (this.currentProcessTime >= TIME) { - this.currentProcessTime = 0; + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityCanolaPress tile) { + tile.clientTick(); + } + } - this.inv.setStackInSlot(0, StackUtil.shrink(this.inv.getStackInSlot(0), 1)); + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityCanolaPress tile) { + tile.serverTick(); + + Optional recipe = getRecipeForInput(tile.inv.getStackInSlot(0)); + recipe.ifPresent(r -> { + if ((r.getOutput().isFluidEqual(tile.tank.getFluid()) || tile.tank.isEmpty()) && r.getOutput().getAmount() <= tile.tank.getCapacity() - tile.tank.getFluidAmount()) { + if (tile.storage.getEnergyStored() >= ENERGY_USE) { + tile.currentProcessTime++; + tile.storage.extractEnergyInternal(ENERGY_USE, false); + if (tile.currentProcessTime >= TIME) { + tile.currentProcessTime = 0; + + tile.inv.setStackInSlot(0, StackUtil.shrink(tile.inv.getStackInSlot(0), 1)); FluidStack produced = r.getOutput().copy(); - this.tank.fillInternal(produced, IFluidHandler.FluidAction.EXECUTE); - this.setChanged(); + tile.tank.fillInternal(produced, IFluidHandler.FluidAction.EXECUTE); + tile.setChanged(); } } } }); if (!recipe.isPresent()) - this.currentProcessTime = 0; + tile.currentProcessTime = 0; - if ((this.storage.getEnergyStored() != this.lastEnergyStored || this.tank.getFluidAmount() != this.lastTankAmount | this.currentProcessTime != this.lastProcessTime) && this.sendUpdateWithInterval()) { - this.lastEnergyStored = this.storage.getEnergyStored(); - this.lastProcessTime = this.currentProcessTime; - this.lastTankAmount = this.tank.getFluidAmount(); + if ((tile.storage.getEnergyStored() != tile.lastEnergyStored || tile.tank.getFluidAmount() != tile.lastTankAmount | tile.currentProcessTime != tile.lastProcessTime) && tile.sendUpdateWithInterval()) { + tile.lastEnergyStored = tile.storage.getEnergyStored(); + tile.lastProcessTime = tile.currentProcessTime; + tile.lastTankAmount = tile.tank.getFluidAmount(); } } } @@ -174,13 +179,13 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements IN } @Override - public ITextComponent getDisplayName() { - return new TranslationTextComponent("container.actuallyadditions.canola_press"); + public Component getDisplayName() { + return new TranslatableComponent("container.actuallyadditions.canola_press"); } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity playerEntity) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player playerEntity) { return new ContainerCanolaPress(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java index be3e1d5dc..4774b8137 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java @@ -12,38 +12,34 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; -import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; -import de.ellpeck.actuallyadditions.mod.crafting.SingleItem; import de.ellpeck.actuallyadditions.mod.crafting.SolidFuelRecipe; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCoalGenerator; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.common.util.RecipeMatcher; import net.minecraftforge.energy.IEnergyStorage; import javax.annotation.Nullable; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; -import net.minecraftforge.fml.server.ServerLifecycleHooks; - -public class TileEntityCoalGenerator extends TileEntityInventoryBase implements INamedContainerProvider, ISharingEnergyProvider, IEnergyDisplay { +public class TileEntityCoalGenerator extends TileEntityInventoryBase implements MenuProvider, ISharingEnergyProvider, IEnergyDisplay { public final CustomEnergyStorage storage = new CustomEnergyStorage(60000, 0, 80); public final LazyOptional lazyEnergy = LazyOptional.of(() -> this.storage); @@ -55,8 +51,8 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements private int lastCompare; private SolidFuelRecipe currentRecipe = null; - public TileEntityCoalGenerator() { - super(ActuallyBlocks.COAL_GENERATOR.getTileEntityType(), 1); + public TileEntityCoalGenerator(BlockPos pos, BlockState state) { + super(ActuallyBlocks.COAL_GENERATOR.getTileEntityType(), pos, state, 1); } @OnlyIn(Dist.CLIENT) @@ -70,7 +66,7 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { if (type != NBTType.SAVE_BLOCK) { compound.putInt("BurnTime", this.currentBurnTime); compound.putInt("MaxBurnTime", this.maxBurnTime); @@ -82,7 +78,7 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { if (type != NBTType.SAVE_BLOCK) { this.currentBurnTime = compound.getInt("BurnTime"); this.maxBurnTime = compound.getInt("MaxBurnTime"); @@ -100,42 +96,48 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements super.readSyncableNBT(compound, type); } - @Override - public void updateEntity() { - super.updateEntity(); - if (!level.isClientSide) { - boolean flag = this.currentBurnTime > 0; + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityCoalGenerator tile) { + tile.clientTick(); + } + } - if (this.currentBurnTime > 0 && currentRecipe != null) { - this.currentBurnTime--; - int produce = currentRecipe.getTotalEnergy() / currentRecipe.getBurnTime(); + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityCoalGenerator tile) { + tile.serverTick(); + + boolean flag = tile.currentBurnTime > 0; + + if (tile.currentBurnTime > 0 && tile.currentRecipe != null) { + tile.currentBurnTime--; + int produce = tile.currentRecipe.getTotalEnergy() / tile.currentRecipe.getBurnTime(); if (produce > 0) { - this.storage.receiveEnergyInternal(produce, false); + tile.storage.receiveEnergyInternal(produce, false); } } - if (!this.isRedstonePowered && this.currentBurnTime <= 0 && this.storage.getEnergyStored() < this.storage.getMaxEnergyStored()) { - ItemStack stack = this.inv.getStackInSlot(0); + if (!tile.isRedstonePowered && tile.currentBurnTime <= 0 && tile.storage.getEnergyStored() < tile.storage.getMaxEnergyStored()) { + ItemStack stack = tile.inv.getStackInSlot(0); if (!stack.isEmpty()) { ActuallyAdditionsAPI.SOLID_FUEL_RECIPES.stream().filter(r -> r.matches(stack)).findFirst().ifPresent(recipe -> { - this.currentRecipe = recipe; - this.maxBurnTime = recipe.getBurnTime(); - this.currentBurnTime = this.maxBurnTime; - this.inv.setStackInSlot(0, StackUtil.shrinkForContainer(stack, 1)); + tile.currentRecipe = recipe; + tile.maxBurnTime = recipe.getBurnTime(); + tile.currentBurnTime = tile.maxBurnTime; + tile.inv.setStackInSlot(0, StackUtil.shrinkForContainer(stack, 1)); }); } else - this.currentRecipe = null; + tile.currentRecipe = null; } - if (flag != this.currentBurnTime > 0 || this.lastCompare != this.getComparatorStrength()) { - this.lastCompare = this.getComparatorStrength(); - this.setChanged(); + if (flag != tile.currentBurnTime > 0 || tile.lastCompare != tile.getComparatorStrength()) { + tile.lastCompare = tile.getComparatorStrength(); + tile.setChanged(); } - if ((this.storage.getEnergyStored() != this.lastEnergy || this.currentBurnTime != this.lastCurrentBurnTime || this.lastBurnTime != this.maxBurnTime) && this.sendUpdateWithInterval()) { - this.lastEnergy = this.storage.getEnergyStored(); - this.lastCurrentBurnTime = this.currentBurnTime; - this.lastBurnTime = this.currentBurnTime; + if ((tile.storage.getEnergyStored() != tile.lastEnergy || tile.currentBurnTime != tile.lastCurrentBurnTime || tile.lastBurnTime != tile.maxBurnTime) && tile.sendUpdateWithInterval()) { + tile.lastEnergy = tile.storage.getEnergyStored(); + tile.lastCurrentBurnTime = tile.currentBurnTime; + tile.lastBurnTime = tile.currentBurnTime; } } } @@ -162,7 +164,7 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements if (!automation) { return true; } - return ForgeHooks.getBurnTime(this.inv.getStackInSlot(0)) <= 0; + return ForgeHooks.getBurnTime(this.inv.getStackInSlot(0), null) <= 0; }; } @@ -182,7 +184,7 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements } @Override - public boolean canShareTo(TileEntity tile) { + public boolean canShareTo(BlockEntity tile) { return true; } @@ -192,13 +194,13 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements } @Override - public ITextComponent getDisplayName() { - return new TranslationTextComponent("container.actuallyadditions.coalGenerator"); + public Component getDisplayName() { + return new TranslatableComponent("container.actuallyadditions.coalGenerator"); } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity player) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player player) { return new ContainerCoalGenerator(windowId, playerInventory, this); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java index ff6569633..8dcf83b4c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java @@ -21,19 +21,21 @@ import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import de.ellpeck.actuallyadditions.mod.util.Util; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.fluid.Fluids; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Fluids; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.LazyOptional; @@ -46,7 +48,7 @@ import net.minecraftforge.fluids.capability.templates.FluidTank; import javax.annotation.Nonnull; import javax.annotation.Nullable; -public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements INamedContainerProvider, IButtonReactor, ISharingFluidHandler { +public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements MenuProvider, IButtonReactor, ISharingFluidHandler { public static final int SLOT_COFFEE_BEANS = 0; public static final int SLOT_INPUT = 1; @@ -87,8 +89,8 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements private int lastCoffeeAmount; private int lastBrewTime; - public TileEntityCoffeeMachine() { - super(ActuallyBlocks.COFFEE_MACHINE.getTileEntityType(), 11); + public TileEntityCoffeeMachine(BlockPos pos, BlockState state) { + super(ActuallyBlocks.COFFEE_MACHINE.getTileEntityType(), pos, state, 11); } @OnlyIn(Dist.CLIENT) @@ -112,7 +114,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); this.storage.writeToNBT(compound); this.tank.writeToNBT(compound); @@ -123,7 +125,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.storage.readFromNBT(compound); this.tank.readFromNBT(compound); @@ -133,28 +135,34 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements } } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - this.storeCoffee(); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityCoffeeMachine tile) { + tile.clientTick(); + } + } - if (this.brewTime > 0 || this.isRedstonePowered) { - this.brew(); + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityCoffeeMachine tile) { + tile.serverTick(); + + tile.storeCoffee(); + + if (tile.brewTime > 0 || tile.isRedstonePowered) { + tile.brew(); } - if ((this.coffeeCacheAmount != this.lastCoffeeAmount || this.storage.getEnergyStored() != this.lastEnergy || this.tank.getFluidAmount() != this.lastTank || this.brewTime != this.lastBrewTime) && this.sendUpdateWithInterval()) { - this.lastCoffeeAmount = this.coffeeCacheAmount; - this.lastEnergy = this.storage.getEnergyStored(); - this.lastTank = this.tank.getFluidAmount(); - this.lastBrewTime = this.brewTime; + if ((tile.coffeeCacheAmount != tile.lastCoffeeAmount || tile.storage.getEnergyStored() != tile.lastEnergy || tile.tank.getFluidAmount() != tile.lastTank || tile.brewTime != tile.lastBrewTime) && tile.sendUpdateWithInterval()) { + tile.lastCoffeeAmount = tile.coffeeCacheAmount; + tile.lastEnergy = tile.storage.getEnergyStored(); + tile.lastTank = tile.tank.getFluidAmount(); + tile.lastBrewTime = tile.brewTime; } } } @Override public IAcceptor getAcceptor() { - return (slot, stack, automation) -> !automation || slot >= 3 && ItemCoffee.getIngredientFromStack(stack) != null || slot == SLOT_COFFEE_BEANS && ActuallyTags.Items.COFFEE_BEANS.contains(stack.getItem()) || slot == SLOT_INPUT && stack.getItem() == ActuallyItems.COFFEE_CUP.get(); + return (slot, stack, automation) -> !automation || slot >= 3 && ItemCoffee.getIngredientFromStack(stack) != null || slot == SLOT_COFFEE_BEANS && stack.is(ActuallyTags.Items.COFFEE_BEANS) || slot == SLOT_INPUT && stack.getItem() == ActuallyItems.COFFEE_CUP.get(); } @Override @@ -163,7 +171,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements } public void storeCoffee() { - if (StackUtil.isValid(this.inv.getStackInSlot(SLOT_COFFEE_BEANS)) && ActuallyTags.Items.COFFEE_BEANS.contains(this.inv.getStackInSlot(SLOT_COFFEE_BEANS).getItem())) { + if (StackUtil.isValid(this.inv.getStackInSlot(SLOT_COFFEE_BEANS)) && this.inv.getStackInSlot(SLOT_COFFEE_BEANS).is(ActuallyTags.Items.COFFEE_BEANS)) { int toAdd = 2; if (toAdd <= COFFEE_CACHE_MAX_AMOUNT - this.coffeeCacheAmount) { this.inv.setStackInSlot(SLOT_COFFEE_BEANS, StackUtil.shrink(this.inv.getStackInSlot(SLOT_COFFEE_BEANS), 1)); @@ -181,7 +189,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements if (StackUtil.isValid(input) && input.getItem() == ActuallyItems.COFFEE_CUP.get() && !StackUtil.isValid(this.inv.getStackInSlot(SLOT_OUTPUT)) && this.coffeeCacheAmount >= CACHE_USE && this.tank.getFluid().getFluid() == Fluids.WATER && this.tank.getFluidAmount() >= WATER_USE) { if (this.storage.getEnergyStored() >= ENERGY_USED) { if (this.brewTime % 30 == 0) { - this.level.playSound(null, this.getBlockPos().getX(), this.getBlockPos().getY(), this.getBlockPos().getZ(), AASounds.COFFEE_MACHINE.get(), SoundCategory.BLOCKS, 0.1F, 1.0F); + this.level.playSound(null, this.getBlockPos().getX(), this.getBlockPos().getY(), this.getBlockPos().getZ(), AASounds.COFFEE_MACHINE.get(), SoundSource.BLOCKS, 0.1F, 1.0F); } this.brewTime++; @@ -211,7 +219,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements } @Override - public void onButtonPressed(int buttonID, PlayerEntity player) { + public void onButtonPressed(int buttonID, Player player) { if (buttonID == 0 && this.brewTime <= 0) { this.brew(); } @@ -243,13 +251,13 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements } @Override - public ITextComponent getDisplayName() { - return new TranslationTextComponent("container.actuallyadditions.coffeeMachine"); + public Component getDisplayName() { + return new TranslatableComponent("container.actuallyadditions.coffeeMachine"); } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity player) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player player) { return new ContainerCoffeeMachine(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusher.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusher.java index a79254e61..b19a637bb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusher.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusher.java @@ -12,36 +12,36 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.mod.AASounds; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.crafting.CrushingRecipe; import de.ellpeck.actuallyadditions.mod.inventory.CrusherContainer; import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; -import de.ellpeck.actuallyadditions.mod.recipe.CrusherRecipeRegistry; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.util.Direction; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; import javax.annotation.Nullable; import java.util.Optional; -public class TileEntityCrusher extends TileEntityInventoryBase implements IButtonReactor, INamedContainerProvider { +public class TileEntityCrusher extends TileEntityInventoryBase implements IButtonReactor, MenuProvider { public static final int SLOT_INPUT_1 = 0; public static final int SLOT_OUTPUT_1_1 = 1; @@ -62,17 +62,17 @@ public class TileEntityCrusher extends TileEntityInventoryBase implements IButto private boolean lastAutoSplit; private boolean lastCrushed; - public TileEntityCrusher(TileEntityType type, int slots) { - super(type, slots); + public TileEntityCrusher(BlockEntityType type, BlockPos pos, BlockState state, int slots) { + super(type, pos, state, slots); } - public TileEntityCrusher() { - super(ActuallyBlocks.CRUSHER.getTileEntityType(), 3); + public TileEntityCrusher(BlockPos pos, BlockState state) { + super(ActuallyBlocks.CRUSHER.getTileEntityType(), pos, state, 3); this.isDouble = false; } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { if (type != NBTType.SAVE_BLOCK) { compound.putInt("FirstCrushTime", this.firstCrushTime); compound.putInt("SecondCrushTime", this.secondCrushTime); @@ -83,7 +83,7 @@ public class TileEntityCrusher extends TileEntityInventoryBase implements IButto } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { if (type != NBTType.SAVE_BLOCK) { this.firstCrushTime = compound.getInt("FirstCrushTime"); this.secondCrushTime = compound.getInt("SecondCrushTime"); @@ -93,88 +93,93 @@ public class TileEntityCrusher extends TileEntityInventoryBase implements IButto super.readSyncableNBT(compound, type); } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - if (this.isDouble && this.isAutoSplit) { - TileEntityPoweredFurnace.autoSplit(this.inv, SLOT_INPUT_1, SLOT_INPUT_2); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityCrusher tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityCrusher tile) { + tile.serverTick(); + + if (tile.isDouble && tile.isAutoSplit) { + TileEntityPoweredFurnace.autoSplit(tile.inv, SLOT_INPUT_1, SLOT_INPUT_2); } boolean crushed = false; - boolean canCrushOnFirst = this.canCrushOn(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2); + boolean canCrushOnFirst = tile.canCrushOn(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2); boolean canCrushOnSecond = false; - if (this.isDouble) { - canCrushOnSecond = this.canCrushOn(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2); + if (tile.isDouble) { + canCrushOnSecond = tile.canCrushOn(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2); } boolean shouldPlaySound = false; if (canCrushOnFirst) { - if (this.storage.getEnergyStored() >= ENERGY_USE) { - if (this.firstCrushTime % 20 == 0) { + if (tile.storage.getEnergyStored() >= ENERGY_USE) { + if (tile.firstCrushTime % 20 == 0) { shouldPlaySound = true; } - this.firstCrushTime++; - if (this.firstCrushTime >= this.getMaxCrushTime()) { - this.finishCrushing(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2); - this.firstCrushTime = 0; + tile.firstCrushTime++; + if (tile.firstCrushTime >= tile.getMaxCrushTime()) { + tile.finishCrushing(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2); + tile.firstCrushTime = 0; } - this.storage.extractEnergyInternal(ENERGY_USE, false); + tile.storage.extractEnergyInternal(ENERGY_USE, false); } - crushed = this.storage.getEnergyStored() >= ENERGY_USE; + crushed = tile.storage.getEnergyStored() >= ENERGY_USE; } else { - this.firstCrushTime = 0; + tile.firstCrushTime = 0; } - if (this.isDouble) { + if (tile.isDouble) { if (canCrushOnSecond) { - if (this.storage.getEnergyStored() >= ENERGY_USE) { - if (this.secondCrushTime % 20 == 0) { + if (tile.storage.getEnergyStored() >= ENERGY_USE) { + if (tile.secondCrushTime % 20 == 0) { shouldPlaySound = true; } - this.secondCrushTime++; - if (this.secondCrushTime >= this.getMaxCrushTime()) { - this.finishCrushing(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2); - this.secondCrushTime = 0; + tile.secondCrushTime++; + if (tile.secondCrushTime >= tile.getMaxCrushTime()) { + tile.finishCrushing(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2); + tile.secondCrushTime = 0; } - this.storage.extractEnergyInternal(ENERGY_USE, false); + tile.storage.extractEnergyInternal(ENERGY_USE, false); } - crushed = this.storage.getEnergyStored() >= ENERGY_USE; + crushed = tile.storage.getEnergyStored() >= ENERGY_USE; } else { - this.secondCrushTime = 0; + tile.secondCrushTime = 0; } } - BlockState currState = this.level.getBlockState(this.worldPosition); - boolean current = currState.getValue(BlockStateProperties.LIT); + boolean current = state.getValue(BlockStateProperties.LIT); boolean changeTo = current; - if (this.lastCrushed != crushed) { + if (tile.lastCrushed != crushed) { changeTo = crushed; } - if (this.isRedstonePowered) { + if (tile.isRedstonePowered) { changeTo = true; } - if (!crushed && !this.isRedstonePowered) { + if (!crushed && !tile.isRedstonePowered) { changeTo = false; } if (changeTo != current) { - this.level.setBlockAndUpdate(this.worldPosition, currState.setValue(BlockStateProperties.LIT, changeTo)); + level.setBlockAndUpdate(pos, state.setValue(BlockStateProperties.LIT, changeTo)); } - this.lastCrushed = crushed; + tile.lastCrushed = crushed; - if ((this.lastEnergy != this.storage.getEnergyStored() || this.lastFirstCrush != this.firstCrushTime || this.lastSecondCrush != this.secondCrushTime || this.isAutoSplit != this.lastAutoSplit) && this.sendUpdateWithInterval()) { - this.lastEnergy = this.storage.getEnergyStored(); - this.lastFirstCrush = this.firstCrushTime; - this.lastSecondCrush = this.secondCrushTime; - this.lastAutoSplit = this.isAutoSplit; + if ((tile.lastEnergy != tile.storage.getEnergyStored() || tile.lastFirstCrush != tile.firstCrushTime || tile.lastSecondCrush != tile.secondCrushTime || tile.isAutoSplit != tile.lastAutoSplit) && tile.sendUpdateWithInterval()) { + tile.lastEnergy = tile.storage.getEnergyStored(); + tile.lastFirstCrush = tile.firstCrushTime; + tile.lastSecondCrush = tile.secondCrushTime; + tile.lastAutoSplit = tile.isAutoSplit; } if (shouldPlaySound) { - this.level.playSound(null, this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ(), AASounds.CRUSHER.get(), SoundCategory.BLOCKS, 0.025F, 1.0F); + level.playSound(null, pos.getX(), pos.getY(), pos.getZ(), AASounds.CRUSHER.get(), SoundSource.BLOCKS, 0.025F, 1.0F); } } } @@ -259,7 +264,7 @@ public class TileEntityCrusher extends TileEntityInventoryBase implements IButto } @Override - public void onButtonPressed(int buttonID, PlayerEntity player) { + public void onButtonPressed(int buttonID, Player player) { if (buttonID == 0) { this.isAutoSplit = !this.isAutoSplit; this.setChanged(); @@ -272,13 +277,13 @@ public class TileEntityCrusher extends TileEntityInventoryBase implements IButto } @Override - public ITextComponent getDisplayName() { - return new TranslationTextComponent("container.actuallyadditions.crusher"); + public Component getDisplayName() { + return new TranslatableComponent("container.actuallyadditions.crusher"); } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity player) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player player) { return new CrusherContainer(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusherDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusherDouble.java index 4b496b410..d0c42abfa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusherDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusherDouble.java @@ -11,12 +11,27 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; public class TileEntityCrusherDouble extends TileEntityCrusher { - public TileEntityCrusherDouble() { - super(ActuallyBlocks.CRUSHER_DOUBLE.getTileEntityType(), 6); + public TileEntityCrusherDouble(BlockPos pos, BlockState state) { + super(ActuallyBlocks.CRUSHER_DOUBLE.getTileEntityType(), pos, state, 6); this.isDouble = true; } + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityCrusherDouble tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityCrusherDouble tile) { + tile.serverTick(); + } + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDisplayStand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDisplayStand.java index bc2343916..9e203ddfd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDisplayStand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDisplayStand.java @@ -13,46 +13,53 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.api.misc.IDisplayStandItem; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.Block; -import net.minecraft.item.BlockItem; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - public class TileEntityDisplayStand extends TileEntityInventoryBase implements IEnergyDisplay { public final CustomEnergyStorage storage = new CustomEnergyStorage(80000, 1000, 0); public final LazyOptional lazyEnergy = LazyOptional.of(() -> this.storage); private int oldEnergy; - public TileEntityDisplayStand() { - super(ActuallyBlocks.DISPLAY_STAND.getTileEntityType(), 1); + public TileEntityDisplayStand(BlockPos pos, BlockState state) { + super(ActuallyBlocks.DISPLAY_STAND.getTileEntityType(), pos, state, 1); } - @Override - public void updateEntity() { - super.updateEntity(); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityDisplayStand tile) { + tile.clientTick(); + } + } - if (!this.level.isClientSide) { - if (StackUtil.isValid(this.inv.getStackInSlot(0)) && !this.isRedstonePowered) { - IDisplayStandItem item = this.convertToDisplayStandItem(this.inv.getStackInSlot(0).getItem()); + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityDisplayStand tile) { + tile.serverTick(); + + if (StackUtil.isValid(tile.inv.getStackInSlot(0)) && !tile.isRedstonePowered) { + IDisplayStandItem item = tile.convertToDisplayStandItem(tile.inv.getStackInSlot(0).getItem()); if (item != null) { - int energy = item.getUsePerTick(this.inv.getStackInSlot(0), this, this.ticksElapsed); - if (this.storage.getEnergyStored() >= energy) { - if (item.update(this.inv.getStackInSlot(0), this, this.ticksElapsed)) { - this.storage.extractEnergyInternal(energy, false); + int energy = item.getUsePerTick(tile.inv.getStackInSlot(0), tile, tile.ticksElapsed); + if (tile.storage.getEnergyStored() >= energy) { + if (item.update(tile.inv.getStackInSlot(0), tile, tile.ticksElapsed)) { + tile.storage.extractEnergyInternal(energy, false); } } } } - if (this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()) { - this.oldEnergy = this.storage.getEnergyStored(); + if (tile.oldEnergy != tile.storage.getEnergyStored() && tile.sendUpdateWithInterval()) { + tile.oldEnergy = tile.storage.getEnergyStored(); } } } @@ -63,13 +70,13 @@ public class TileEntityDisplayStand extends TileEntityInventoryBase implements I } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); this.storage.writeToNBT(compound); } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.storage.readFromNBT(compound); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java index 1f1fe75b7..515ab15de 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java @@ -14,29 +14,31 @@ import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.inventory.ContainerDropper; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import javax.annotation.Nullable; -import net.minecraft.util.text.TranslationTextComponent; - -public class TileEntityDropper extends TileEntityInventoryBase implements INamedContainerProvider { +public class TileEntityDropper extends TileEntityInventoryBase implements MenuProvider { private int currentTime; - public TileEntityDropper() { - super(ActuallyBlocks.DROPPER.getTileEntityType(), 9); + public TileEntityDropper(BlockPos pos, BlockState state) { + super(ActuallyBlocks.DROPPER.getTileEntityType(), pos, state,9); } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { compound.putInt("CurrentTime", this.currentTime); @@ -44,25 +46,31 @@ public class TileEntityDropper extends TileEntityInventoryBase implements INamed } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { this.currentTime = compound.getInt("CurrentTime"); } } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - if (!this.isRedstonePowered && !this.isPulseMode) { - if (this.currentTime > 0) { - this.currentTime--; - if (this.currentTime <= 0) { - this.doWork(); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityDropper tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityDropper tile) { + tile.serverTick(); + + if (!tile.isRedstonePowered && !tile.isPulseMode) { + if (tile.currentTime > 0) { + tile.currentTime--; + if (tile.currentTime <= 0) { + tile.doWork(); } } else { - this.currentTime = 5; + tile.currentTime = 5; } } } @@ -104,13 +112,13 @@ public class TileEntityDropper extends TileEntityInventoryBase implements INamed } @Override - public ITextComponent getDisplayName() { - return new TranslationTextComponent("container.actuallyadditions.dropper"); + public Component getDisplayName() { + return new TranslatableComponent("container.actuallyadditions.dropper"); } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity player) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player player) { return new ContainerDropper(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEmpowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEmpowerer.java index bdf828274..1f9daf72b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEmpowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEmpowerer.java @@ -14,24 +14,21 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.crafting.ActuallyRecipes; import de.ellpeck.actuallyadditions.mod.crafting.EmpowererRecipe; -import de.ellpeck.actuallyadditions.mod.crafting.SolidFuelRecipe; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; -import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.particles.ParticleTypes; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.server.ServerLifecycleHooks; import javax.annotation.Nullable; -import java.util.ArrayList; -import java.util.List; - -import net.minecraftforge.fml.server.ServerLifecycleHooks; public class TileEntityEmpowerer extends TileEntityInventoryBase { @@ -43,8 +40,8 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase { return this.currentRecipe; } - public TileEntityEmpowerer() { - super(ActuallyBlocks.EMPOWERER.getTileEntityType(), 1); + public TileEntityEmpowerer(BlockPos pos, BlockState state) { + super(ActuallyBlocks.EMPOWERER.getTileEntityType(), pos, state, 1); } public static boolean isPossibleInput(ItemStack stack) { @@ -66,16 +63,21 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase { return null; } - @Override - public void updateEntity() { - super.updateEntity(); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityEmpowerer tile) { + tile.clientTick(); + } + } - if (!this.level.isClientSide) { - TileEntityDisplayStand[] stands = this.getNearbyStands(); + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityEmpowerer tile) { + tile.serverTick(); + + TileEntityDisplayStand[] stands = tile.getNearbyStands(); if (stands != null) { - EmpowererRecipe recipe = findMatchingRecipe(this.inv.getStackInSlot(0), stands[0].getStack(), stands[1].getStack(), stands[2].getStack(), stands[3].getStack()); + EmpowererRecipe recipe = findMatchingRecipe(tile.inv.getStackInSlot(0), stands[0].getStack(), stands[1].getStack(), stands[2].getStack(), stands[3].getStack()); if (recipe != null) { - currentRecipe = recipe; + tile.currentRecipe = recipe; boolean hasPower = true; @@ -87,8 +89,8 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase { if (hasPower) { - this.processTime++; - boolean done = this.processTime >= recipe.getTime(); + tile.processTime++; + boolean done = tile.processTime >= recipe.getTime(); for (TileEntityDisplayStand stand : stands) { stand.storage.extractEnergyInternal(recipe.getEnergyPerStand() / recipe.getTime(), false); @@ -99,28 +101,28 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase { } } - if (this.processTime % 5 == 0 && this.level instanceof ServerWorld) { - ((ServerWorld) this.level).sendParticles(ParticleTypes.FIREWORK, this.worldPosition.getX() + 0.5, this.worldPosition.getY() + 1.1, this.worldPosition.getZ() + 0.5, 2, 0, 0, 0, 0.1D); + if (tile.processTime % 5 == 0 && level instanceof ServerLevel) { + ((ServerLevel) level).sendParticles(ParticleTypes.FIREWORK, pos.getX() + 0.5, pos.getY() + 1.1, pos.getZ() + 0.5, 2, 0, 0, 0, 0.1D); } if (done) { - ((ServerWorld) this.level).sendParticles(ParticleTypes.END_ROD, this.worldPosition.getX() + 0.5, this.worldPosition.getY() + 1.1, this.worldPosition.getZ() + 0.5, 100, 0, 0, 0, 0.25D); + ((ServerLevel) level).sendParticles(ParticleTypes.END_ROD, pos.getX() + 0.5, pos.getY() + 1.1, pos.getZ() + 0.5, 100, 0, 0, 0, 0.25D); - this.inv.setStackInSlot(0, recipe.getOutput().copy()); - this.setChanged(); + tile.inv.setStackInSlot(0, recipe.getOutput().copy()); + tile.setChanged(); - this.processTime = 0; - this.currentRecipe = null; + tile.processTime = 0; + tile.currentRecipe = null; } } } else { - this.processTime = 0; - this.currentRecipe = null; + tile.processTime = 0; + tile.currentRecipe = null; } - if (this.lastRecipe != this.currentRecipe) { - this.lastRecipe = this.currentRecipe; - this.sendUpdate(); + if (tile.lastRecipe != tile.currentRecipe) { + tile.lastRecipe = tile.currentRecipe; + tile.sendUpdate(); } } } @@ -132,7 +134,7 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase { for (int i = 0; i <= 3; i++) { Direction facing = Direction.from2DDataValue(i); BlockPos offset = this.worldPosition.relative(facing, 3); - TileEntity tile = this.level.getBlockEntity(offset); + BlockEntity tile = this.level.getBlockEntity(offset); if (tile instanceof TileEntityDisplayStand) { stands[i] = (TileEntityDisplayStand) tile; } else { @@ -144,7 +146,7 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase { } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); if (type == NBTType.SAVE_TILE) { compound.putInt("ProcessTime", this.processTime); @@ -158,7 +160,7 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase { } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); if (type == NBTType.SAVE_TILE) { this.processTime = compound.getInt("ProcessTime"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java index 0e34f03a0..2f3c90e7a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java @@ -15,65 +15,75 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerEnergizer; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.enchantment.EnchantmentHelper; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; import javax.annotation.Nullable; -public class TileEntityEnergizer extends TileEntityInventoryBase implements INamedContainerProvider { +public class TileEntityEnergizer extends TileEntityInventoryBase implements MenuProvider { public final CustomEnergyStorage storage = new CustomEnergyStorage(50000, 1000, 0); public final LazyOptional lazyEnergy = LazyOptional.of(() -> this.storage); private int lastEnergy; - public TileEntityEnergizer() { - super(ActuallyBlocks.ENERGIZER.getTileEntityType(), 2); + public TileEntityEnergizer(BlockPos pos, BlockState state) { + super(ActuallyBlocks.ENERGIZER.getTileEntityType(), pos, state, 2); } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { this.storage.writeToNBT(compound); super.writeSyncableNBT(compound, type); } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { this.storage.readFromNBT(compound); super.readSyncableNBT(compound, type); } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - if (StackUtil.isValid(this.inv.getStackInSlot(0)) && !StackUtil.isValid(this.inv.getStackInSlot(1))) { - if (this.storage.getEnergyStored() > 0) { - int received = this.inv.getStackInSlot(0).getCapability(CapabilityEnergy.ENERGY, null).map(cap -> cap.receiveEnergy(this.storage.getEnergyStored(), false)).orElse(0); - boolean canTakeUp = this.inv.getStackInSlot(0).getCapability(CapabilityEnergy.ENERGY, null).map(cap -> cap.getEnergyStored() >= cap.getMaxEnergyStored()).orElse(false); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityEnergizer tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityEnergizer tile) { + tile.serverTick(); + + if (StackUtil.isValid(tile.inv.getStackInSlot(0)) && !StackUtil.isValid(tile.inv.getStackInSlot(1))) { + if (tile.storage.getEnergyStored() > 0) { + int received = tile.inv.getStackInSlot(0).getCapability(CapabilityEnergy.ENERGY, null).map(cap -> cap.receiveEnergy(tile.storage.getEnergyStored(), false)).orElse(0); + boolean canTakeUp = tile.inv.getStackInSlot(0).getCapability(CapabilityEnergy.ENERGY, null).map(cap -> cap.getEnergyStored() >= cap.getMaxEnergyStored()).orElse(false); if (received > 0) { - this.storage.extractEnergyInternal(received, false); + tile.storage.extractEnergyInternal(received, false); } if (canTakeUp) { - this.inv.setStackInSlot(1, this.inv.getStackInSlot(0).copy()); - this.inv.setStackInSlot(0, StackUtil.shrink(this.inv.getStackInSlot(0), 1)); + tile.inv.setStackInSlot(1, tile.inv.getStackInSlot(0).copy()); + tile.inv.setStackInSlot(0, StackUtil.shrink(tile.inv.getStackInSlot(0), 1)); } } } - if (this.lastEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()) { - this.lastEnergy = this.storage.getEnergyStored(); + if (tile.lastEnergy != tile.storage.getEnergyStored() && tile.sendUpdateWithInterval()) { + tile.lastEnergy = tile.storage.getEnergyStored(); } } } @@ -98,13 +108,13 @@ public class TileEntityEnergizer extends TileEntityInventoryBase implements INam } @Override - public ITextComponent getDisplayName() { - return StringTextComponent.EMPTY; + public Component getDisplayName() { + return TextComponent.EMPTY; } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity playerEntity) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player playerEntity) { return new ContainerEnergizer(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java index 57aee3cfd..af743647b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java @@ -15,68 +15,77 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerEnervator; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; import javax.annotation.Nullable; -public class TileEntityEnervator extends TileEntityInventoryBase implements ISharingEnergyProvider, INamedContainerProvider { +public class TileEntityEnervator extends TileEntityInventoryBase implements ISharingEnergyProvider, MenuProvider { public final CustomEnergyStorage storage = new CustomEnergyStorage(50000, 0, 1000); public final LazyOptional lazyEnergy = LazyOptional.of(() -> this.storage); private int lastEnergy; - public TileEntityEnervator() { - super(ActuallyBlocks.ENERVATOR.getTileEntityType(), 2); + public TileEntityEnervator(BlockPos pos, BlockState state) { + super(ActuallyBlocks.ENERVATOR.getTileEntityType(), pos, state, 2); } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { this.storage.writeToNBT(compound); super.writeSyncableNBT(compound, type); } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { this.storage.readFromNBT(compound); super.readSyncableNBT(compound, type); } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - if (StackUtil.isValid(this.inv.getStackInSlot(0)) && !StackUtil.isValid(this.inv.getStackInSlot(1))) { - if (this.storage.getEnergyStored() < this.storage.getMaxEnergyStored()) { - LazyOptional capability = this.inv.getStackInSlot(0).getCapability(CapabilityEnergy.ENERGY, null); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityEnervator tile) { + tile.clientTick(); + } + } - int maxExtract = this.storage.getMaxEnergyStored() - this.storage.getEnergyStored(); + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityEnervator tile) { + tile.serverTick(); + + if (StackUtil.isValid(tile.inv.getStackInSlot(0)) && !StackUtil.isValid(tile.inv.getStackInSlot(1))) { + if (tile.storage.getEnergyStored() < tile.storage.getMaxEnergyStored()) { + LazyOptional capability = tile.inv.getStackInSlot(0).getCapability(CapabilityEnergy.ENERGY, null); + + int maxExtract = tile.storage.getMaxEnergyStored() - tile.storage.getEnergyStored(); int extracted = capability.map(cap -> cap.extractEnergy(maxExtract, false)).orElse(0); boolean canTakeUp = capability.map(cap -> cap.getEnergyStored() <= 0).orElse(false); if (extracted > 0) { - this.storage.receiveEnergyInternal(extracted, false); + tile.storage.receiveEnergyInternal(extracted, false); } if (canTakeUp) { - this.inv.setStackInSlot(1, this.inv.getStackInSlot(0).copy()); - this.inv.getStackInSlot(0).shrink(1); + tile.inv.setStackInSlot(1, tile.inv.getStackInSlot(0).copy()); + tile.inv.getStackInSlot(0).shrink(1); } } } - if (this.lastEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()) { - this.lastEnergy = this.storage.getEnergyStored(); + if (tile.lastEnergy != tile.storage.getEnergyStored() && tile.sendUpdateWithInterval()) { + tile.lastEnergy = tile.storage.getEnergyStored(); } } } @@ -111,7 +120,7 @@ public class TileEntityEnervator extends TileEntityInventoryBase implements ISha } @Override - public boolean canShareTo(TileEntity tile) { + public boolean canShareTo(BlockEntity tile) { return true; } @@ -121,13 +130,13 @@ public class TileEntityEnervator extends TileEntityInventoryBase implements ISha } @Override - public ITextComponent getDisplayName() { - return StringTextComponent.EMPTY; + public Component getDisplayName() { + return TextComponent.EMPTY; } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity playerEntity) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player playerEntity) { return new ContainerEnervator(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFarmer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFarmer.java index c990692dd..e0818c858 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFarmer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFarmer.java @@ -21,20 +21,21 @@ import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; @@ -43,7 +44,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -public class TileEntityFarmer extends TileEntityInventoryBase implements IFarmer, INamedContainerProvider { +public class TileEntityFarmer extends TileEntityInventoryBase implements IFarmer, MenuProvider { private static final List SORTED_FARMER_BEHAVIORS = new ArrayList<>(); public final CustomEnergyStorage storage = new CustomEnergyStorage(100000, 1000, 0); @@ -54,12 +55,12 @@ public class TileEntityFarmer extends TileEntityInventoryBase implements IFarmer private int lastEnergy; - public TileEntityFarmer() { - super(ActuallyBlocks.FARMER.getTileEntityType(), 12); + public TileEntityFarmer(BlockPos pos, BlockState state) { + super(ActuallyBlocks.FARMER.getTileEntityType(), pos, state, 12); } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { if (type != NBTType.SAVE_BLOCK) { compound.putInt("WaitTime", this.waitTime); } @@ -72,7 +73,7 @@ public class TileEntityFarmer extends TileEntityInventoryBase implements IFarmer } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { if (type != NBTType.SAVE_BLOCK) { this.waitTime = compound.getInt("WaitTime"); } @@ -84,43 +85,48 @@ public class TileEntityFarmer extends TileEntityInventoryBase implements IFarmer super.readSyncableNBT(compound, type); } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - if (!this.isRedstonePowered && this.storage.getEnergyStored() > 0) { - if (this.waitTime > 0) { - this.waitTime--; + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityFarmer tile) { + tile.clientTick(); + } + } - if (this.waitTime <= 0) { + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityFarmer tile) { + tile.serverTick(); + + if (!tile.isRedstonePowered && tile.storage.getEnergyStored() > 0) { + if (tile.waitTime > 0) { + tile.waitTime--; + + if (tile.waitTime <= 0) { int area = CommonConfig.Machines.FARMER_AREA.get(); if (area % 2 == 0) { area++; } int radius = area / 2; - BlockState state = this.level.getBlockState(this.worldPosition); - BlockPos center = this.worldPosition.relative(state.getValue(BlockStateProperties.HORIZONTAL_FACING), radius + 1); + BlockPos center = pos.relative(state.getValue(BlockStateProperties.HORIZONTAL_FACING), radius + 1); - BlockPos query = center.offset(this.checkX, 0, this.checkY); - this.checkBehaviors(query); + BlockPos query = center.offset(tile.checkX, 0, tile.checkY); + tile.checkBehaviors(query); - this.checkX++; - if (this.checkX > radius) { - this.checkX = -radius; - this.checkY++; - if (this.checkY > radius) { - this.checkY = -radius; + tile.checkX++; + if (tile.checkX > radius) { + tile.checkX = -radius; + tile.checkY++; + if (tile.checkY > radius) { + tile.checkY = -radius; } } } } else { - this.waitTime = 5; + tile.waitTime = 5; } } - if (this.lastEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()) { - this.lastEnergy = this.storage.getEnergyStored(); + if (tile.lastEnergy != tile.storage.getEnergyStored() && tile.sendUpdateWithInterval()) { + tile.lastEnergy = tile.storage.getEnergyStored(); } } } @@ -140,7 +146,7 @@ public class TileEntityFarmer extends TileEntityInventoryBase implements IFarmer } for (IFarmerBehavior behavior : SORTED_FARMER_BEHAVIORS) { - FarmerResult harvestResult = behavior.tryHarvestPlant((ServerWorld) level, query, this); + FarmerResult harvestResult = behavior.tryHarvestPlant((ServerLevel) level, query, this); if (harvestResult == FarmerResult.STOP_PROCESSING) { return; } @@ -203,7 +209,7 @@ public class TileEntityFarmer extends TileEntityInventoryBase implements IFarmer } @Override - public World getWorldObject() { + public Level getWorldObject() { return this.level; } @@ -238,13 +244,13 @@ public class TileEntityFarmer extends TileEntityInventoryBase implements IFarmer } @Override - public ITextComponent getDisplayName() { - return new TranslationTextComponent("container.actuallyadditions.farmer"); + public Component getDisplayName() { + return new TranslatableComponent("container.actuallyadditions.farmer"); } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity p_createMenu_3_) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player p_createMenu_3_) { return new ContainerFarmer(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java index c5fa3ed4c..d2ea8e026 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java @@ -13,27 +13,31 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFeeder; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; -import net.minecraft.entity.passive.AnimalEntity; -import net.minecraft.entity.passive.horse.HorseEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.particles.ParticleTypes; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.MathHelper; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.util.Mth; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.animal.Animal; +import net.minecraft.world.entity.animal.horse.Horse; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.AABB; import javax.annotation.Nullable; import java.util.List; import java.util.Optional; -public class TileEntityFeeder extends TileEntityInventoryBase implements INamedContainerProvider { +public class TileEntityFeeder extends TileEntityInventoryBase implements MenuProvider { public static final int THRESHOLD = 30; private static final int TIME = 100; @@ -42,8 +46,8 @@ public class TileEntityFeeder extends TileEntityInventoryBase implements INamedC private int lastAnimalAmount; private int lastTimer; - public TileEntityFeeder() { - super(ActuallyBlocks.FEEDER.getTileEntityType(), 1); + public TileEntityFeeder(BlockPos pos, BlockState state) { + super(ActuallyBlocks.FEEDER.getTileEntityType(), pos, state,1); } public int getCurrentTimerToScale(int i) { @@ -51,7 +55,7 @@ public class TileEntityFeeder extends TileEntityInventoryBase implements INamedC } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); compound.putInt("Timer", this.currentTimer); if (type == NBTType.SYNC) { @@ -60,7 +64,7 @@ public class TileEntityFeeder extends TileEntityInventoryBase implements INamedC } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.currentTimer = compound.getInt("Timer"); if (type == NBTType.SYNC) { @@ -68,31 +72,37 @@ public class TileEntityFeeder extends TileEntityInventoryBase implements INamedC } } - @Override - public void updateEntity() { - super.updateEntity(); - this.currentTimer = MathHelper.clamp(++this.currentTimer, 0, 100); - if (this.level.isClientSide) { - return; + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityFeeder tile) { + tile.clientTick(); + tile.currentTimer = Mth.clamp(++tile.currentTimer, 0, 100); } - int range = 5; - ItemStack stack = this.inv.getStackInSlot(0); - if (!stack.isEmpty() && this.currentTimer >= TIME) { - List animals = this.level.getEntitiesOfClass(AnimalEntity.class, new AxisAlignedBB(this.worldPosition.getX() - range, this.worldPosition.getY() - range, this.worldPosition.getZ() - range, this.worldPosition.getX() + range, this.worldPosition.getY() + range, this.worldPosition.getZ() + range)); - this.currentAnimalAmount = animals.size(); - if (this.currentAnimalAmount >= 2 && this.currentAnimalAmount < THRESHOLD) { - Optional opt = animals.stream().filter((e) -> canBeFed(stack, e)).findAny(); - if (opt.isPresent()) { - feedAnimal(opt.get()); - stack.shrink(1); - this.currentTimer = 0; - this.setChanged(); + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityFeeder tile) { + tile.serverTick(); + tile.currentTimer = Mth.clamp(++tile.currentTimer, 0, 100); + + int range = 5; + ItemStack stack = tile.inv.getStackInSlot(0); + if (!stack.isEmpty() && tile.currentTimer >= TIME) { + List animals = level.getEntitiesOfClass(Animal.class, new AABB(tile.worldPosition.getX() - range, tile.worldPosition.getY() - range, tile.worldPosition.getZ() - range, tile.worldPosition.getX() + range, tile.worldPosition.getY() + range, tile.worldPosition.getZ() + range)); + tile.currentAnimalAmount = animals.size(); + if (tile.currentAnimalAmount >= 2 && tile.currentAnimalAmount < THRESHOLD) { + Optional opt = animals.stream().filter((e) -> canBeFed(stack, e)).findAny(); + if (opt.isPresent()) { + feedAnimal(opt.get()); + stack.shrink(1); + tile.currentTimer = 0; + tile.setChanged(); + } } } - } - if ((this.lastAnimalAmount != this.currentAnimalAmount || this.lastTimer != this.currentTimer) && this.sendUpdateWithInterval()) { - this.lastAnimalAmount = this.currentAnimalAmount; - this.lastTimer = this.currentTimer; + if ((tile.lastAnimalAmount != tile.currentAnimalAmount || tile.lastTimer != tile.currentTimer) && tile.sendUpdateWithInterval()) { + tile.lastAnimalAmount = tile.currentAnimalAmount; + tile.lastTimer = tile.currentTimer; + } } } @@ -101,7 +111,7 @@ public class TileEntityFeeder extends TileEntityInventoryBase implements INamedC return (slot, automation) -> !automation; } - private static void feedAnimal(AnimalEntity animal) { + private static void feedAnimal(Animal animal) { animal.setInLove(null); for (int i = 0; i < 7; i++) { double d = animal.level.random.nextGaussian() * 0.02D; @@ -111,8 +121,8 @@ public class TileEntityFeeder extends TileEntityInventoryBase implements INamedC } } - private static boolean canBeFed(ItemStack stack, AnimalEntity animal) { - if (animal instanceof HorseEntity && ((HorseEntity) animal).isTamed()) { + private static boolean canBeFed(ItemStack stack, Animal animal) { + if (animal instanceof Horse && ((Horse) animal).isTamed()) { Item item = stack.getItem(); return animal.getAge() == 0 && !animal.isInLove() && (item == Items.GOLDEN_APPLE || item == Items.GOLDEN_CARROT); } @@ -120,13 +130,13 @@ public class TileEntityFeeder extends TileEntityInventoryBase implements INamedC } @Override - public ITextComponent getDisplayName() { - return StringTextComponent.EMPTY; + public Component getDisplayName() { + return TextComponent.EMPTY; } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity p_createMenu_3_) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player p_createMenu_3_) { return new ContainerFeeder(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java index 296998943..5c8c0d680 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java @@ -14,14 +14,18 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.crafting.FermentingRecipe; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFermentingBarrel; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.LazyOptional; @@ -34,7 +38,7 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Optional; -public class TileEntityFermentingBarrel extends TileEntityBase implements ISharingFluidHandler, INamedContainerProvider { +public class TileEntityFermentingBarrel extends TileEntityBase implements ISharingFluidHandler, MenuProvider { public final FermentingBarrelMultiTank tanks = new FermentingBarrelMultiTank(); public final LazyOptional fluidOptional = LazyOptional.of(()->tanks); @@ -45,12 +49,12 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari private int lastCompare; private FermentingRecipe currentRecipe; - public TileEntityFermentingBarrel() { - super(ActuallyBlocks.FERMENTING_BARREL.getTileEntityType()); + public TileEntityFermentingBarrel(BlockPos pos, BlockState state) { + super(ActuallyBlocks.FERMENTING_BARREL.getTileEntityType(), pos, state); } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { compound.putInt("ProcessTime", this.currentProcessTime); compound.put("tanks", tanks.writeNBT()); if (currentRecipe != null) @@ -59,7 +63,7 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { this.currentProcessTime = compound.getInt("ProcessTime"); if (compound.contains("tanks")) { tanks.readNBT(compound.getCompound("tanks")); @@ -70,45 +74,50 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari super.readSyncableNBT(compound, type); } - @Override - public void updateEntity() { - super.updateEntity(); - if (this.level.isClientSide) - return; + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityFermentingBarrel tile) { + tile.clientTick(); + } + } - if (currentRecipe == null) { - //No recipe currently selected, check for one every 20 ticks - if (ticksElapsed % 20 == 0) - this.currentRecipe = ActuallyAdditionsAPI.FERMENTING_RECIPES.stream().filter(recipe -> recipe.matches(this.tanks.getFluidInTank(0), this.tanks.getFluidInTank(1))).findFirst().orElse(null); - } else { - if (this.tanks.getFluidInTank(0).getAmount() >= currentRecipe.getInput().getAmount() && - this.tanks.getFluidInTank(0).getFluid().isSame(currentRecipe.getInput().getFluid()) && - (this.tanks.getFluidInTank(1).getFluid().isSame(currentRecipe.getOutput().getFluid()) || tanks.getFluidInTank(1).isEmpty()) && - currentRecipe.getOutput().getAmount() <= this.tanks.getTankCapacity(1) - this.tanks.getFluidInTank(1).getAmount()) { + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityFermentingBarrel tile) { + tile.serverTick(); - this.currentProcessTime++; - if (this.currentProcessTime >= currentRecipe.getTime()) { - this.currentProcessTime = 0; - - this.tanks.outputTank.fill(currentRecipe.getOutput().copy(), IFluidHandler.FluidAction.EXECUTE); - this.tanks.inputTank.getFluid().shrink(currentRecipe.getInput().getAmount()); - } + if (tile.currentRecipe == null) { + //No recipe currently selected, check for one every 20 ticks + if (tile.ticksElapsed % 20 == 0) + tile.currentRecipe = ActuallyAdditionsAPI.FERMENTING_RECIPES.stream().filter(recipe -> recipe.matches(tile.tanks.getFluidInTank(0), tile.tanks.getFluidInTank(1))).findFirst().orElse(null); } else { - this.currentProcessTime = 0; - currentRecipe = null; + if (tile.tanks.getFluidInTank(0).getAmount() >= tile.currentRecipe.getInput().getAmount() && + tile.tanks.getFluidInTank(0).getFluid().isSame(tile.currentRecipe.getInput().getFluid()) && + (tile.tanks.getFluidInTank(1).getFluid().isSame(tile.currentRecipe.getOutput().getFluid()) || tile.tanks.getFluidInTank(1).isEmpty()) && + tile.currentRecipe.getOutput().getAmount() <= tile.tanks.getTankCapacity(1) - tile.tanks.getFluidInTank(1).getAmount()) { + + tile.currentProcessTime++; + if (tile.currentProcessTime >= tile.currentRecipe.getTime()) { + tile.currentProcessTime = 0; + + tile.tanks.outputTank.fill(tile.currentRecipe.getOutput().copy(), IFluidHandler.FluidAction.EXECUTE); + tile.tanks.inputTank.getFluid().shrink(tile.currentRecipe.getInput().getAmount()); + } + } else { + tile.currentProcessTime = 0; + tile.currentRecipe = null; + } } - } - int compare = this.getComparatorStrength(); - if (compare != this.lastCompare) { - this.lastCompare = compare; + int compare = tile.getComparatorStrength(); + if (compare != tile.lastCompare) { + tile.lastCompare = compare; - this.setChanged(); - } + tile.setChanged(); + } - if ((this.tanks.getFluidInTank(0).getAmount() != this.lastInput || this.tanks.getFluidInTank(1).getAmount() != this.lastOutput || this.currentProcessTime != this.lastProcessTime) && this.sendUpdateWithInterval()) { - this.lastProcessTime = this.currentProcessTime; - this.lastInput = this.tanks.getFluidInTank(0).getAmount(); - this.lastOutput = this.tanks.getFluidInTank(1).getAmount(); + if ((tile.tanks.getFluidInTank(0).getAmount() != tile.lastInput || tile.tanks.getFluidInTank(1).getAmount() != tile.lastOutput || tile.currentProcessTime != tile.lastProcessTime) && tile.sendUpdateWithInterval()) { + tile.lastProcessTime = tile.currentProcessTime; + tile.lastInput = tile.tanks.getFluidInTank(0).getAmount(); + tile.lastOutput = tile.tanks.getFluidInTank(1).getAmount(); + } } } @@ -158,13 +167,13 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari @Nonnull @Override - public ITextComponent getDisplayName() { - return new TranslationTextComponent("container.actuallyadditions.fermenting_barrel"); + public Component getDisplayName() { + return new TranslatableComponent("container.actuallyadditions.fermenting_barrel"); } @Nullable @Override - public Container createMenu(int windowId, @Nonnull PlayerInventory playerInventory, @Nonnull PlayerEntity p_createMenu_3_) { + public AbstractContainerMenu createMenu(int windowId, @Nonnull Inventory playerInventory, @Nonnull Player p_createMenu_3_) { return new ContainerFermentingBarrel(windowId, playerInventory, this); } @@ -239,19 +248,19 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari } } - public CompoundNBT writeNBT() { - CompoundNBT inputNBT = new CompoundNBT(); + public CompoundTag writeNBT() { + CompoundTag inputNBT = new CompoundTag(); inputTank.writeToNBT(inputNBT); - CompoundNBT outputNBT = new CompoundNBT(); + CompoundTag outputNBT = new CompoundTag(); outputTank.writeToNBT(outputNBT); - CompoundNBT nbt = new CompoundNBT(); + CompoundTag nbt = new CompoundTag(); nbt.put("inputTank", inputNBT); nbt.put("outputTank", outputNBT); return nbt; } - public void readNBT(CompoundNBT nbt) { + public void readNBT(CompoundTag nbt) { inputTank.readFromNBT(nbt.getCompound("inputTank")); outputTank.readFromNBT(nbt.getCompound("outputTank")); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java index 2914ecdf8..3505f7c6d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java @@ -13,23 +13,27 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFireworkBox; import de.ellpeck.actuallyadditions.mod.network.gui.INumberReactor; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.entity.projectile.FireworkRocketEntity; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.DyeColor; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.nbt.ListNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.WeightedRandom; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.util.Mth; +import net.minecraft.util.random.Weight; +import net.minecraft.util.random.WeightedEntry; +import net.minecraft.util.random.WeightedRandom; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.entity.projectile.FireworkRocketEntity; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.DyeColor; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; @@ -37,7 +41,7 @@ import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; -public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisplay, INumberReactor, INamedContainerProvider { +public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisplay, INumberReactor, MenuProvider { public static final int USE_PER_SHOT = 500; public final CustomEnergyStorage storage = new CustomEnergyStorage(20000, 200, 0); @@ -57,12 +61,12 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisp private int timeUntilNextFirework; private int oldEnergy; - public TileEntityFireworkBox() { - super(ActuallyBlocks.FIREWORK_BOX.getTileEntityType()); + public TileEntityFireworkBox(BlockPos pos, BlockState state) { + super(ActuallyBlocks.FIREWORK_BOX.getTileEntityType(), pos, state); } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); this.storage.writeToNBT(compound); @@ -83,7 +87,7 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisp } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.storage.readFromNBT(compound); @@ -104,7 +108,7 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisp } @Override - public void onNumberReceived(double number, int id, PlayerEntity player) { + public void onNumberReceived(double number, int id, Player player) { switch (id) { case 0: this.intValuePlay = (int) number; @@ -147,7 +151,7 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisp this.sendUpdate(); } - public void spawnFireworks(World world, double x, double y, double z) { + public void spawnFireworks(Level world, double x, double y, double z) { ItemStack firework = this.makeFirework(); double newX = x + this.getRandomAoe(); @@ -163,21 +167,21 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisp if (this.areaOfEffect <= 0) { return 0.5; } else { - return MathHelper.nextDouble(this.level.random, 0, this.areaOfEffect * 2) - this.areaOfEffect; + return Mth.nextDouble(this.level.random, 0, this.areaOfEffect * 2) - this.areaOfEffect; } } private ItemStack makeFirework() { - ListNBT list = new ListNBT(); + ListTag list = new ListTag(); for (int i = 0; i < this.getRandomWithPlay(this.chargeAmount); i++) { list.add(this.makeFireworkCharge()); } - CompoundNBT compound1 = new CompoundNBT(); + CompoundTag compound1 = new CompoundTag(); compound1.put("Explosions", list); compound1.putByte("Flight", (byte) this.getRandomWithPlay(this.flightTime)); - CompoundNBT compound = new CompoundNBT(); + CompoundTag compound = new CompoundTag(); compound.put("Fireworks", compound1); ItemStack firework = new ItemStack(Items.FIREWORK_ROCKET); @@ -186,8 +190,8 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisp return firework; } - private CompoundNBT makeFireworkCharge() { - CompoundNBT compound = new CompoundNBT(); + private CompoundTag makeFireworkCharge() { + CompoundTag compound = new CompoundTag(); if (this.level.random.nextFloat() <= this.trailOrFlickerChance) { if (this.level.random.nextFloat() <= this.flickerChance) { @@ -200,7 +204,7 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisp // TODO: [port] Validate this is the correct way to get colors int[] colors = new int[this.getRandomWithPlay(this.colorAmount)]; for (int i = 0; i < colors.length; i++) { - colors[i] = DyeColor.values()[this.level.random.nextInt(DyeColor.values().length)].getColorValue(); + colors[i] = DyeColor.values()[this.level.random.nextInt(DyeColor.values().length)].getFireworkColor(); } compound.putIntArray("Colors", colors); @@ -210,7 +214,7 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisp } private int getRandomWithPlay(int value) { - return MathHelper.clamp(MathHelper.nextInt(this.level.random, value - this.intValuePlay, value + this.intValuePlay), 1, 6); + return Mth.clamp(Mth.nextInt(this.level.random, value - this.intValuePlay, value + this.intValuePlay), 1, 6); } private int getRandomType() { @@ -226,28 +230,33 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisp if (weight <= 0) { return 0; } else { - return WeightedRandom.getRandomItem(this.level.random, possible, weight).type; + return WeightedRandom.getRandomItem(this.level.random, possible, weight).map(weightedFireworkType -> weightedFireworkType.type).orElse(0); } } - @Override - public void updateEntity() { - super.updateEntity(); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityFireworkBox tile) { + tile.clientTick(); + } + } - if (!this.level.isClientSide) { - if (!this.isRedstonePowered && !this.isPulseMode) { - if (this.timeUntilNextFirework > 0) { - this.timeUntilNextFirework--; - if (this.timeUntilNextFirework <= 0) { - this.doWork(); + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityFireworkBox tile) { + tile.serverTick(); + + if (!tile.isRedstonePowered && !tile.isPulseMode) { + if (tile.timeUntilNextFirework > 0) { + tile.timeUntilNextFirework--; + if (tile.timeUntilNextFirework <= 0) { + tile.doWork(); } } else { - this.timeUntilNextFirework = 100; + tile.timeUntilNextFirework = 100; } } - if (this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()) { - this.oldEnergy = this.storage.getEnergyStored(); + if (tile.oldEnergy != tile.storage.getEnergyStored() && tile.sendUpdateWithInterval()) { + tile.oldEnergy = tile.storage.getEnergyStored(); } } } @@ -286,23 +295,29 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisp } @Override - public ITextComponent getDisplayName() { - return StringTextComponent.EMPTY; + public Component getDisplayName() { + return TextComponent.EMPTY; } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity p_createMenu_3_) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player p_createMenu_3_) { return new ContainerFireworkBox(windowId, playerInventory); } - private static class WeightedFireworkType extends WeightedRandom.Item { + private static class WeightedFireworkType implements WeightedEntry { public final int type; + public final Weight chance; public WeightedFireworkType(int type, float chance) { - super((int) (chance * 100F)); this.type = type; + this.chance = Weight.of((int) (chance * 100F)); + } + + @Override + public Weight getWeight() { + return this.chance; } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java index a68442b71..9d8fbe639 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java @@ -13,40 +13,38 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.fluids.AATank; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFluidCollector; -import de.ellpeck.actuallyadditions.mod.util.Util; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.block.FlowingFluidBlock; -import net.minecraft.block.material.Material; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.fluid.Fluids; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.particles.ParticleTypes; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.util.Direction; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.SoundEvents; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.sounds.SoundEvents; +import net.minecraft.sounds.SoundSource; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.LiquidBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Material; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.fluids.FluidAttributes; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.fluids.capability.templates.FluidTank; import javax.annotation.Nonnull; import javax.annotation.Nullable; -public class TileEntityFluidCollector extends TileEntityBase implements ISharingFluidHandler, INamedContainerProvider { +public class TileEntityFluidCollector extends TileEntityBase implements ISharingFluidHandler, MenuProvider { public boolean isPlacer; public final AATank tank = new AATank(8 * FluidAttributes.BUCKET_VOLUME) { @@ -81,12 +79,12 @@ public class TileEntityFluidCollector extends TileEntityBase implements ISharing private int currentTime; private int lastCompare; - public TileEntityFluidCollector(TileEntityType type) { - super(type); + public TileEntityFluidCollector(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state); } - public TileEntityFluidCollector() { - this(ActuallyBlocks.FLUID_COLLECTOR.getTileEntityType()); + public TileEntityFluidCollector(BlockPos pos, BlockState state) { + this(ActuallyBlocks.FLUID_COLLECTOR.getTileEntityType(), pos, state); this.isPlacer = false; } @@ -109,9 +107,9 @@ public class TileEntityFluidCollector extends TileEntityBase implements ISharing BlockState stateToBreak = this.level.getBlockState(coordsBlock); Block blockToBreak = stateToBreak.getBlock(); if (!this.isPlacer && FluidAttributes.BUCKET_VOLUME <= this.tank.getCapacity() - this.tank.getFluidAmount()) { - if (blockToBreak instanceof FlowingFluidBlock && stateToBreak.getFluidState().isSource() && ((FlowingFluidBlock) blockToBreak).getFluid() != null) { - if (this.tank.fillInternal(new FluidStack(((FlowingFluidBlock) blockToBreak).getFluid(), FluidAttributes.BUCKET_VOLUME), IFluidHandler.FluidAction.SIMULATE) >= FluidAttributes.BUCKET_VOLUME) { - this.tank.fillInternal(new FluidStack(((FlowingFluidBlock) blockToBreak).getFluid(), FluidAttributes.BUCKET_VOLUME), IFluidHandler.FluidAction.EXECUTE); + if (blockToBreak instanceof LiquidBlock && stateToBreak.getFluidState().isSource() && ((LiquidBlock) blockToBreak).getFluid() != null) { + if (this.tank.fillInternal(new FluidStack(((LiquidBlock) blockToBreak).getFluid(), FluidAttributes.BUCKET_VOLUME), IFluidHandler.FluidAction.SIMULATE) >= FluidAttributes.BUCKET_VOLUME) { + this.tank.fillInternal(new FluidStack(((LiquidBlock) blockToBreak).getFluid(), FluidAttributes.BUCKET_VOLUME), IFluidHandler.FluidAction.EXECUTE); this.level.setBlockAndUpdate(coordsBlock, Blocks.AIR.defaultBlockState()); } } @@ -126,11 +124,11 @@ public class TileEntityFluidCollector extends TileEntityBase implements ISharing this.tank.drainInternal(FluidAttributes.BUCKET_VOLUME, IFluidHandler.FluidAction.EXECUTE); // TODO: [port] validate this check is still valid. if (this.level.dimensionType().ultraWarm() && fluid.defaultBlockState().getMaterial() == Material.WATER) { - this.level.playSound(null, offsetPos, SoundEvents.FIRE_EXTINGUISH, SoundCategory.BLOCKS, 0.5F, 2.6F + (this.level.random.nextFloat() - this.level.random.nextFloat()) * 0.8F); + this.level.playSound(null, offsetPos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (this.level.random.nextFloat() - this.level.random.nextFloat()) * 0.8F); - if (this.level instanceof ServerWorld) { + if (this.level instanceof ServerLevel) { for (int l = 0; l < 8; ++l) { - ((ServerWorld) this.level).sendParticles(ParticleTypes.SMOKE, offsetPos.getX() + Math.random(), offsetPos.getY() + Math.random(), offsetPos.getZ() + Math.random(), 1, 0.0D, 0.0D, 0.0D, 0); + ((ServerLevel) this.level).sendParticles(ParticleTypes.SMOKE, offsetPos.getX() + Math.random(), offsetPos.getY() + Math.random(), offsetPos.getZ() + Math.random(), 1, 0.0D, 0.0D, 0.0D, 0); } } } else { @@ -154,7 +152,7 @@ public class TileEntityFluidCollector extends TileEntityBase implements ISharing } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { compound.putInt("CurrentTime", this.currentTime); @@ -163,7 +161,7 @@ public class TileEntityFluidCollector extends TileEntityBase implements ISharing } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { this.currentTime = compound.getInt("CurrentTime"); @@ -171,29 +169,35 @@ public class TileEntityFluidCollector extends TileEntityBase implements ISharing this.tank.readFromNBT(compound); } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - if (!this.isRedstonePowered && !this.isPulseMode) { - if (this.currentTime > 0) { - this.currentTime--; - if (this.currentTime <= 0) { - this.doWork(); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityFluidCollector tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityFluidCollector tile) { + tile.serverTick(); + + if (!tile.isRedstonePowered && !tile.isPulseMode) { + if (tile.currentTime > 0) { + tile.currentTime--; + if (tile.currentTime <= 0) { + tile.doWork(); } } else { - this.currentTime = 15; + tile.currentTime = 15; } } - if (this.lastCompare != this.getComparatorStrength()) { - this.lastCompare = this.getComparatorStrength(); + if (tile.lastCompare != tile.getComparatorStrength()) { + tile.lastCompare = tile.getComparatorStrength(); - this.setChanged(); + tile.setChanged(); } - if (this.lastTankAmount != this.tank.getFluidAmount() && this.sendUpdateWithInterval()) { - this.lastTankAmount = this.tank.getFluidAmount(); + if (tile.lastTankAmount != tile.tank.getFluidAmount() && tile.sendUpdateWithInterval()) { + tile.lastTankAmount = tile.tank.getFluidAmount(); } } } @@ -214,13 +218,13 @@ public class TileEntityFluidCollector extends TileEntityBase implements ISharing } @Override - public ITextComponent getDisplayName() { - return new TranslationTextComponent(isPlacer ? "container.actuallyadditions.fluidPlacer" : "container.actuallyadditions.fluidCollector"); + public Component getDisplayName() { + return new TranslatableComponent(isPlacer ? "container.actuallyadditions.fluidPlacer" : "container.actuallyadditions.fluidCollector"); } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity player) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player player) { return new ContainerFluidCollector(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidPlacer.java index e07a091fd..90ccb9e16 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidPlacer.java @@ -11,12 +11,28 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; public class TileEntityFluidPlacer extends TileEntityFluidCollector { - public TileEntityFluidPlacer() { - super(ActuallyBlocks.FLUID_PLACER.getTileEntityType()); + public TileEntityFluidPlacer(BlockPos pos, BlockState state) { + super(ActuallyBlocks.FLUID_PLACER.getTileEntityType(), pos, state); this.isPlacer = true; } + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityFluidPlacer tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityFluidPlacer tile) { + tile.serverTick(); + } + } + } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java index 561382153..b639691d4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java @@ -12,15 +12,16 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.block.MagmaBlock; -import net.minecraft.block.material.Material; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.MagmaBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.material.Material; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; @@ -35,12 +36,12 @@ public class TileEntityHeatCollector extends TileEntityBase implements ISharingE private int oldEnergy; private int disappearTime; - public TileEntityHeatCollector() { - super(ActuallyBlocks.HEAT_COLLECTOR.getTileEntityType()); + public TileEntityHeatCollector(BlockPos pos, BlockState state) { + super(ActuallyBlocks.HEAT_COLLECTOR.getTileEntityType(), pos, state); } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); this.storage.writeToNBT(compound); @@ -50,7 +51,7 @@ public class TileEntityHeatCollector extends TileEntityBase implements ISharingE } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.storage.readFromNBT(compound); @@ -59,39 +60,45 @@ public class TileEntityHeatCollector extends TileEntityBase implements ISharingE } } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityHeatCollector tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityHeatCollector tile) { + tile.serverTick(); + ArrayList blocksAround = new ArrayList<>(); - if (ENERGY_PRODUCE <= this.storage.getMaxEnergyStored() - this.storage.getEnergyStored()) { + if (ENERGY_PRODUCE <= tile.storage.getMaxEnergyStored() - tile.storage.getEnergyStored()) { for (int i = 1; i <= 5; i++) { - BlockPos coords = this.worldPosition.relative(WorldUtil.getDirectionBySidesInOrder(i)); - BlockState state = this.level.getBlockState(coords); - Block block = state.getBlock(); - if (block != null && this.level.getBlockState(coords).getMaterial() == Material.LAVA || this.level.getBlockState(coords).getBlock() instanceof MagmaBlock) { + BlockPos coords = pos.relative(WorldUtil.getDirectionBySidesInOrder(i)); + BlockState relativeState = level.getBlockState(coords); + Block block = relativeState.getBlock(); + if (block != null && level.getBlockState(coords).getMaterial() == Material.LAVA || level.getBlockState(coords).getBlock() instanceof MagmaBlock) { blocksAround.add(i); } } if (blocksAround.size() >= BLOCKS_NEEDED) { - this.storage.receiveEnergyInternal(ENERGY_PRODUCE, false); - this.setChanged(); + tile.storage.receiveEnergyInternal(ENERGY_PRODUCE, false); + tile.setChanged(); - this.disappearTime++; - if (this.disappearTime >= 1000) { - this.disappearTime = 0; + tile.disappearTime++; + if (tile.disappearTime >= 1000) { + tile.disappearTime = 0; - if (this.level.random.nextInt(200) == 0) { - int randomSide = blocksAround.get(this.level.random.nextInt(blocksAround.size())); - this.level.setBlockAndUpdate(this.worldPosition.relative(WorldUtil.getDirectionBySidesInOrder(randomSide)), Blocks.AIR.defaultBlockState()); + if (level.random.nextInt(200) == 0) { + int randomSide = blocksAround.get(level.random.nextInt(blocksAround.size())); + level.setBlockAndUpdate(pos.relative(WorldUtil.getDirectionBySidesInOrder(randomSide)), Blocks.AIR.defaultBlockState()); } } } } - if (this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()) { - this.oldEnergy = this.storage.getEnergyStored(); + if (tile.oldEnergy != tile.storage.getEnergyStored() && tile.sendUpdateWithInterval()) { + tile.oldEnergy = tile.storage.getEnergyStored(); } } } @@ -122,7 +129,7 @@ public class TileEntityHeatCollector extends TileEntityBase implements ISharingE } @Override - public boolean canShareTo(TileEntity tile) { + public boolean canShareTo(BlockEntity tile) { return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java index 057f206a8..e8d891834 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityInventoryBase.java @@ -14,11 +14,13 @@ import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.nbt.ListNBT; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.util.Direction; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandlerModifiable; @@ -29,18 +31,18 @@ public abstract class TileEntityInventoryBase extends TileEntityBase { public final ItemStackHandlerAA inv; public final LazyOptional lazyInv; - public TileEntityInventoryBase(TileEntityType type, int slots) { - super(type); + public TileEntityInventoryBase(BlockEntityType type, BlockPos pos, BlockState state, int slots) { + super(type, pos, state); this.inv = new TileStackHandler(slots); this.lazyInv = LazyOptional.of(() -> this.inv); } - public static void saveSlots(IItemHandler slots, CompoundNBT compound) { + public static void saveSlots(IItemHandler slots, CompoundTag compound) { if (slots != null && slots.getSlots() > 0) { - ListNBT tagList = new ListNBT(); + ListTag tagList = new ListTag(); for (int i = 0; i < slots.getSlots(); i++) { ItemStack slot = slots.getStackInSlot(i); - CompoundNBT tagCompound = new CompoundNBT(); + CompoundTag tagCompound = new CompoundTag(); if (StackUtil.isValid(slot)) { slot.save(tagCompound); } @@ -50,11 +52,11 @@ public abstract class TileEntityInventoryBase extends TileEntityBase { } } - public static void loadSlots(IItemHandlerModifiable slots, CompoundNBT compound) { + public static void loadSlots(IItemHandlerModifiable slots, CompoundTag compound) { if (slots != null && slots.getSlots() > 0) { - ListNBT tagList = compound.getList("Items", 10); + ListTag tagList = compound.getList("Items", 10); for (int i = 0; i < slots.getSlots(); i++) { - CompoundNBT tagCompound = tagList.getCompound(i); + CompoundTag tagCompound = tagList.getCompound(i); slots.setStackInSlot(i, tagCompound.contains("id") ? ItemStack.of(tagCompound) : ItemStack.EMPTY); @@ -63,7 +65,7 @@ public abstract class TileEntityInventoryBase extends TileEntityBase { } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); if (type == NBTType.SAVE_TILE || type == NBTType.SYNC && this.shouldSyncSlots()) { saveSlots(this.inv, compound); @@ -106,7 +108,7 @@ public abstract class TileEntityInventoryBase extends TileEntityBase { } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); if (type == NBTType.SAVE_TILE || type == NBTType.SYNC && this.shouldSyncSlots()) { loadSlots(this.inv, compound); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterface.java index 59d292f4e..ae3856891 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterface.java @@ -17,21 +17,27 @@ import de.ellpeck.actuallyadditions.mod.network.PacketServerToClient; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import de.ellpeck.actuallyadditions.mod.util.compat.SlotlessableItemHandlerWrapper; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.IItemHandler; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; public class TileEntityItemInterface extends TileEntityBase { @@ -44,8 +50,8 @@ public class TileEntityItemInterface extends TileEntityBase { private int lastNetworkChangeAmount = -1; private int slotCount; - public TileEntityItemInterface(TileEntityType type) { - super(type); + public TileEntityItemInterface(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state); IItemHandler normalHandler = new IItemHandler() { @Override @@ -118,8 +124,20 @@ public class TileEntityItemInterface extends TileEntityBase { this.itemHandler = new SlotlessableItemHandlerWrapper(this.lazyHandlers, slotlessHandler); } - public TileEntityItemInterface() { - this(ActuallyBlocks.ITEM_INTERFACE.getTileEntityType()); + public TileEntityItemInterface(BlockPos pos, BlockState state) { + this(ActuallyBlocks.ITEM_INTERFACE.getTileEntityType(), pos, state); + } + + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityItemInterface tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityItemInterface tile) { + tile.serverTick(); + } } @Override @@ -155,7 +173,7 @@ public class TileEntityItemInterface extends TileEntityBase { public void doItemParticle(ItemStack stack, BlockPos input, BlockPos output) { if (!this.level.isClientSide) { - CompoundNBT compound = new CompoundNBT(); + CompoundTag compound = new CompoundTag(); stack.save(compound); compound.putDouble("InX", input.getX()); @@ -167,10 +185,10 @@ public class TileEntityItemInterface extends TileEntityBase { compound.putDouble("OutZ", output.getZ()); int rangeSq = 16 * 16; - for (PlayerEntity player : this.level.players()) { - if (player instanceof ServerPlayerEntity) { + for (Player player : this.level.players()) { + if (player instanceof ServerPlayer) { if (player.distanceToSqr(input.getX(), input.getY(), input.getZ()) <= rangeSq || player.distanceToSqr(output.getX(), output.getY(), output.getZ()) <= rangeSq) { - PacketHandler.sendTo(new PacketServerToClient(compound, PacketHandler.LASER_PARTICLE_HANDLER), (ServerPlayerEntity) player); + PacketHandler.sendTo(new PacketServerToClient(compound, PacketHandler.LASER_PARTICLE_HANDLER), (ServerPlayer) player); } } } @@ -256,7 +274,7 @@ public class TileEntityItemInterface extends TileEntityBase { BlockPos pos = this.getBlockPos().relative(side); if (this.level.isLoaded(pos)) { - TileEntity tile = this.level.getBlockEntity(pos); + BlockEntity tile = this.level.getBlockEntity(pos); if (tile instanceof TileEntityLaserRelayItem) { if (tileFound != null) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterfaceHopping.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterfaceHopping.java index 1bdbbf337..9557da360 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterfaceHopping.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterfaceHopping.java @@ -15,16 +15,17 @@ import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import de.ellpeck.actuallyadditions.mod.util.compat.SlotlessableItemHandlerWrapper; -import net.minecraft.block.BlockState; -import net.minecraft.entity.EntityType; -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.EntityPredicates; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.entity.EntitySelector; +import net.minecraft.world.entity.EntityType; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.phys.AABB; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; @@ -36,60 +37,67 @@ public class TileEntityItemInterfaceHopping extends TileEntityItemInterface { private SlotlessableItemHandlerWrapper handlerToPullFrom; private SlotlessableItemHandlerWrapper handlerToPushTo; - public TileEntityItemInterfaceHopping() { - super(ActuallyBlocks.ITEM_INTERFACE_HOPPING.getTileEntityType()); + public TileEntityItemInterfaceHopping(BlockPos pos, BlockState state) { + super(ActuallyBlocks.ITEM_INTERFACE_HOPPING.getTileEntityType(), pos, state); } - @Override - public void updateEntity() { - super.updateEntity(); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityItemInterfaceHopping tile) { + tile.clientTick(); + } + } - // TODO: [port] validate this is the correct way to get total game time getGameTime - if (!this.level.isClientSide && this.level.getLevelData().getGameTime() % 10 == 0) { - if (this.handlerToPullFrom != null) { - WorldUtil.doItemInteraction(this.handlerToPullFrom, this.itemHandler, 4); - } else { - if (this.level.getLevelData().getGameTime() % 20 == 0) { - //TODO hmm? - AxisAlignedBB axisAlignedBB = new AxisAlignedBB(this.getBlockPos().getX(), this.getBlockPos().getY() + 0.5, this.getBlockPos().getZ(), this.getBlockPos().getX() + 1, this.getBlockPos().getY() + 2, this.getBlockPos().getZ() + 1); - List items = this.level.getEntities(EntityType.ITEM, axisAlignedBB, EntityPredicates.ENTITY_STILL_ALIVE); - if (items != null && !items.isEmpty()) { - for (ItemEntity item : items) { - if (item != null && item.isAlive()) { - if (ActuallyAdditions.commonCapsLoaded) { - Object slotless = this.itemHandler.getSlotlessHandler(); - // TODO: [port] add back? - // if (slotless instanceof ISlotlessItemHandler) { - // ItemStack left = ((ISlotlessItemHandler) slotless).insertItem(item.getItem(), false); - // item.setItem(left); - // - // if (!StackUtil.isValid(left)) { - // item.remove(); - // continue; - // } - // } - } + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityItemInterfaceHopping tile) { + tile.serverTick(); - LazyOptional handler = this.itemHandler.getNormalHandler(); - handler.ifPresent(cap -> { - for (int i = 0; i < cap.getSlots(); i++) { - ItemStack left = cap.insertItem(i, item.getItem(), false); - item.setItem(left); - - if (!StackUtil.isValid(left)) { - item.remove(); - break; - } + // TODO: [port] validate tile is the correct way to get total game time getGameTime + if (level.getLevelData().getGameTime() % 10 == 0) { + if (tile.handlerToPullFrom != null) { + WorldUtil.doItemInteraction(tile.handlerToPullFrom, tile.itemHandler, 4); + } else { + if (level.getLevelData().getGameTime() % 20 == 0) { + //TODO hmm? + AABB axisAlignedBB = new AABB(pos.getX(), pos.getY() + 0.5, pos.getZ(), pos.getX() + 1, pos.getY() + 2, pos.getZ() + 1); + List items = level.getEntities(EntityType.ITEM, axisAlignedBB, EntitySelector.ENTITY_STILL_ALIVE); + if (items != null && !items.isEmpty()) { + for (ItemEntity item : items) { + if (item != null && item.isAlive()) { + if (ActuallyAdditions.commonCapsLoaded) { + Object slotless = tile.itemHandler.getSlotlessHandler(); + // TODO: [port] add back? + // if (slotless instanceof ISlotlessItemHandler) { + // ItemStack left = ((ISlotlessItemHandler) slotless).insertItem(item.getItem(), false); + // item.setItem(left); + // + // if (!StackUtil.isValid(left)) { + // item.remove(); + // continue; + // } + // } } - }); + + LazyOptional handler = tile.itemHandler.getNormalHandler(); + handler.ifPresent(cap -> { + for (int i = 0; i < cap.getSlots(); i++) { + ItemStack left = cap.insertItem(i, item.getItem(), false); + item.setItem(left); + + if (!StackUtil.isValid(left)) { + item.discard(); + break; + } + } + }); + } } } } } - } - if (this.handlerToPushTo != null) { - WorldUtil.doItemInteraction(this.itemHandler, this.handlerToPushTo, 4); + if (tile.handlerToPushTo != null) { + WorldUtil.doItemInteraction(tile.itemHandler, tile.handlerToPushTo, 4); + } } } } @@ -101,7 +109,7 @@ public class TileEntityItemInterfaceHopping extends TileEntityItemInterface { this.handlerToPullFrom = null; this.handlerToPushTo = null; - TileEntity from = this.level.getBlockEntity(this.getBlockPos().relative(Direction.UP)); + BlockEntity from = this.level.getBlockEntity(this.getBlockPos().relative(Direction.UP)); if (from != null && !(from instanceof TileEntityItemInterface)) { LazyOptional normal = from.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, Direction.DOWN); @@ -122,7 +130,7 @@ public class TileEntityItemInterfaceHopping extends TileEntityItemInterface { BlockPos toPos = this.getBlockPos().relative(facing); if (this.level.isLoaded(toPos)) { - TileEntity to = this.level.getBlockEntity(toPos); + BlockEntity to = this.level.getBlockEntity(toPos); if (to != null && !(to instanceof TileEntityItemInterface)) { LazyOptional normal = to.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing.getOpposite()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java index 3eaea8908..552e9ff85 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelay.java @@ -18,20 +18,20 @@ import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import de.ellpeck.actuallyadditions.mod.misc.apiimpl.ConnectionPair; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import io.netty.util.internal.ConcurrentSet; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.nbt.ListNBT; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.util.Direction; -import net.minecraft.util.math.AxisAlignedBB; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.nbt.ListTag; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.AABB; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.IItemHandler; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - public abstract class TileEntityLaserRelay extends TileEntityInventoryBase { public static final int MAX_DISTANCE = 15; @@ -45,20 +45,20 @@ public abstract class TileEntityLaserRelay extends TileEntityInventoryBase { // List of connections that are synced to the client for RenderLaserRelay to use private final ConcurrentSet connections = new ConcurrentSet<>(); - public TileEntityLaserRelay(TileEntityType tileType, LaserType type) { - super(tileType, 1); + public TileEntityLaserRelay(BlockEntityType tileType, BlockPos pos, BlockState state, LaserType type) { + super(tileType, pos, state,1); this.type = type; } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); if (type == NBTType.SYNC) { ActuallyAdditionsAPI.connectionHandler.removeRelayFromNetwork(this.worldPosition, this.level); this.connections.clear(); - ListNBT list = compound.getList("Connections", 10); + ListTag list = compound.getList("Connections", 10); if (!list.isEmpty()) { for (int i = 0; i < list.size(); i++) { ConnectionPair pair = new ConnectionPair(); @@ -71,16 +71,16 @@ public abstract class TileEntityLaserRelay extends TileEntityInventoryBase { } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); if (type == NBTType.SYNC) { - ListNBT list = new ListNBT(); + ListTag list = new ListTag(); ConcurrentSet connections = ActuallyAdditionsAPI.connectionHandler.getConnectionsFor(this.worldPosition, this.level); if (connections != null && !connections.isEmpty()) { for (IConnectionPair pair : connections) { - CompoundNBT tag = new CompoundNBT(); + CompoundTag tag = new CompoundTag(); pair.writeToNBT(tag); list.add(tag); } @@ -91,9 +91,28 @@ public abstract class TileEntityLaserRelay extends TileEntityInventoryBase { } @Override - public void updateEntity() { - super.updateEntity(); + protected void clientTick() { + super.clientTick(); + int range = this.getMaxRange(); + if (this.lastRange != range) { + ConcurrentSet connections = ActuallyAdditionsAPI.connectionHandler.getConnectionsFor(this.worldPosition, this.level); + if (connections != null && !connections.isEmpty()) { + for (IConnectionPair pair : connections) { + int distanceSq = (int) pair.getPositions()[0].distSqr(pair.getPositions()[1]); + if (distanceSq > range * range) { + this.connections.remove(pair); + ActuallyAdditionsAPI.connectionHandler.removeConnection(this.level, pair.getPositions()[0], pair.getPositions()[1]); + } + } + } + this.lastRange = range; + } + } + + @Override + protected void serverTick() { + super.serverTick(); int range = this.getMaxRange(); if (this.lastRange != range) { ConcurrentSet connections = ActuallyAdditionsAPI.connectionHandler.getConnectionsFor(this.worldPosition, this.level); @@ -159,7 +178,7 @@ public abstract class TileEntityLaserRelay extends TileEntityInventoryBase { @Override @OnlyIn(Dist.CLIENT) - public AxisAlignedBB getRenderBoundingBox() { + public AABB getRenderBoundingBox() { return INFINITE_EXTENT_AABB; } @@ -188,7 +207,7 @@ public abstract class TileEntityLaserRelay extends TileEntityInventoryBase { @OnlyIn(Dist.CLIENT) public abstract String getCompassDisplayString(); - public abstract void onCompassAction(PlayerEntity player); + public abstract void onCompassAction(Player player); public ConcurrentSet getConnections() { return connections; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java index 38ba8b877..3a43611ef 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java @@ -17,15 +17,17 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; import it.unimi.dsi.fastutil.objects.ObjectOpenHashSet; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; -import net.minecraft.util.text.TextFormatting; +import net.minecraft.ChatFormatting; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.util.Mth; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.LazyOptional; @@ -40,12 +42,12 @@ import java.util.concurrent.ConcurrentHashMap; public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { public static final int CAP = 1000; - public final ConcurrentHashMap receiversAround = new ConcurrentHashMap<>(); + public final ConcurrentHashMap receiversAround = new ConcurrentHashMap<>(); private final IEnergyStorage[] energyStorages = new IEnergyStorage[6]; private Mode mode = Mode.BOTH; - public TileEntityLaserRelayEnergy(TileEntityType type) { - super(type, LaserType.ENERGY); + public TileEntityLaserRelayEnergy(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state, LaserType.ENERGY); for (int i = 0; i < this.energyStorages.length; i++) { Direction facing = Direction.values()[i]; @@ -83,8 +85,20 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { } } - public TileEntityLaserRelayEnergy() { - this(ActuallyBlocks.LASER_RELAY.getTileEntityType()); + public TileEntityLaserRelayEnergy(BlockPos pos, BlockState state) { + this(ActuallyBlocks.LASER_RELAY.getTileEntityType(), pos, state); + } + + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLaserRelayEnergy tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLaserRelayEnergy tile) { + tile.serverTick(); + } } private int transmitEnergy(Direction from, int maxTransmit, boolean simulate) { @@ -113,19 +127,19 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { @Override public void saveDataOnChangeOrWorldStart() { - Map old = new HashMap<>(this.receiversAround); + Map old = new HashMap<>(this.receiversAround); boolean change = false; this.receiversAround.clear(); for (Direction side : Direction.values()) { BlockPos pos = this.getBlockPos().relative(side); if (this.level.hasChunkAt(pos)) { - TileEntity tile = this.level.getBlockEntity(pos); + BlockEntity tile = this.level.getBlockEntity(pos); if (tile != null && !(tile instanceof TileEntityLaserRelay)) { if (tile.getCapability(CapabilityEnergy.ENERGY, side.getOpposite()).isPresent()) { this.receiversAround.put(side, tile); - TileEntity oldTile = old.get(side); + BlockEntity oldTile = old.get(side); if (oldTile == null || !tile.equals(oldTile)) { change = true; } @@ -154,7 +168,7 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { for (BlockPos relay : pair.getPositions()) { if (relay != null && this.level.hasChunkAt(relay) && !alreadyChecked.contains(relay)) { alreadyChecked.add(relay); - TileEntity relayTile = this.level.getBlockEntity(relay); + BlockEntity relayTile = this.level.getBlockEntity(relay); if (relayTile instanceof TileEntityLaserRelayEnergy) { TileEntityLaserRelayEnergy theRelay = (TileEntityLaserRelayEnergy) relayTile; if (theRelay.mode != Mode.INPUT_ONLY) { @@ -162,7 +176,7 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { for (Direction facing : theRelay.receiversAround.keySet()) { if (theRelay != this || facing != from) { - TileEntity tile = theRelay.receiversAround.get(facing); + BlockEntity tile = theRelay.receiversAround.get(facing); Direction opp = facing.getOpposite(); if (tile != null) { @@ -192,11 +206,11 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { for (TileEntityLaserRelayEnergy theRelay : relaysThatWork) { double highestLoss = Math.max(theRelay.getLossPercentage(), this.getLossPercentage()); int lowestCap = Math.min(theRelay.getEnergyCap(), this.getEnergyCap()); - for (Map.Entry receiver : theRelay.receiversAround.entrySet()) { + for (Map.Entry receiver : theRelay.receiversAround.entrySet()) { if (receiver != null) { Direction side = receiver.getKey(); Direction opp = side.getOpposite(); - TileEntity tile = receiver.getValue(); + BlockEntity tile = receiver.getValue(); if (!alreadyChecked.contains(tile.getBlockPos())) { alreadyChecked.add(tile.getBlockPos()); if (theRelay != this || side != from) { @@ -232,7 +246,7 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { private int calcDeduction(int theoreticalReceived, double highestLoss) { return CommonConfig.Machines.LASER_RELAY_LOSS.get() - ? MathHelper.ceil(theoreticalReceived * (highestLoss / 100)) + ? Mth.ceil(theoreticalReceived * (highestLoss / 100)) : 0; } @@ -247,22 +261,22 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { @Override @OnlyIn(Dist.CLIENT) public String getExtraDisplayString() { - return I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.energy.extra") + ": " + TextFormatting.DARK_RED + I18n.get(this.mode.name) + TextFormatting.RESET; + return I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.energy.extra") + ": " + ChatFormatting.DARK_RED + I18n.get(this.mode.name) + ChatFormatting.RESET; } @Override @OnlyIn(Dist.CLIENT) public String getCompassDisplayString() { - return TextFormatting.GREEN + I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.energy.display"); + return ChatFormatting.GREEN + I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.energy.display"); } @Override - public void onCompassAction(PlayerEntity player) { + public void onCompassAction(Player player) { this.mode = this.mode.getNext(); } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { @@ -271,7 +285,7 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyAdvanced.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyAdvanced.java index 2656c195f..5b92bfbbc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyAdvanced.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyAdvanced.java @@ -11,13 +11,29 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; public class TileEntityLaserRelayEnergyAdvanced extends TileEntityLaserRelayEnergy { public static final int CAP = 10000; - public TileEntityLaserRelayEnergyAdvanced() { - super(ActuallyBlocks.LASER_RELAY_ADVANCED.getTileEntityType()); + public TileEntityLaserRelayEnergyAdvanced(BlockPos pos, BlockState state) { + super(ActuallyBlocks.LASER_RELAY_ADVANCED.getTileEntityType(), pos, state); + } + + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLaserRelayEnergyAdvanced tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLaserRelayEnergyAdvanced tile) { + tile.serverTick(); + } } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyExtreme.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyExtreme.java index 3e5c5a44b..2d2900efb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyExtreme.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergyExtreme.java @@ -11,13 +11,29 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; public class TileEntityLaserRelayEnergyExtreme extends TileEntityLaserRelayEnergy { public static final int CAP = 100000; - public TileEntityLaserRelayEnergyExtreme() { - super(ActuallyBlocks.LASER_RELAY_EXTREME.getTileEntityType()); + public TileEntityLaserRelayEnergyExtreme(BlockPos pos, BlockState state) { + super(ActuallyBlocks.LASER_RELAY_EXTREME.getTileEntityType(), pos, state); + } + + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLaserRelayEnergyExtreme tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLaserRelayEnergyExtreme tile) { + tile.serverTick(); + } } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java index f2ff7cb1d..4f1d13c08 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java @@ -17,13 +17,15 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayEnergy.Mode; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.TextFormatting; +import net.minecraft.ChatFormatting; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.LazyOptional; @@ -40,12 +42,12 @@ import java.util.concurrent.ConcurrentHashMap; public class TileEntityLaserRelayFluids extends TileEntityLaserRelay { - public final ConcurrentHashMap handlersAround = new ConcurrentHashMap<>(); + public final ConcurrentHashMap handlersAround = new ConcurrentHashMap<>(); private final IFluidHandler[] fluidHandlers = new IFluidHandler[6]; private Mode mode = Mode.BOTH; - public TileEntityLaserRelayFluids() { - super(ActuallyBlocks.LASER_RELAY_FLUIDS.getTileEntityType(), LaserType.FLUID); + public TileEntityLaserRelayFluids(BlockPos pos, BlockState state) { + super(ActuallyBlocks.LASER_RELAY_FLUIDS.getTileEntityType(), pos, state, LaserType.FLUID); for (int i = 0; i < this.fluidHandlers.length; i++) { Direction facing = Direction.values()[i]; @@ -93,15 +95,24 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay { } } - @Override - public void updateEntity() { - super.updateEntity(); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLaserRelayFluids tile) { + tile.clientTick(); + } + } - if (!this.level.isClientSide) { - if (this.mode == Mode.INPUT_ONLY) { - for (Direction side : this.handlersAround.keySet()) { - WorldUtil.doFluidInteraction(this.handlersAround.get(side), this, side.getOpposite(), Integer.MAX_VALUE); - } + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLaserRelayFluids tile) { + tile.serverTick(); + } + } + + @Override + protected void serverTick() { + super.serverTick(); + if (this.mode == Mode.INPUT_ONLY) { + for (Direction side : this.handlersAround.keySet()) { + WorldUtil.doFluidInteraction(this.handlersAround.get(side), this, side.getOpposite(), Integer.MAX_VALUE); } } } @@ -113,19 +124,19 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay { @Override public void saveDataOnChangeOrWorldStart() { - Map old = new HashMap<>(this.handlersAround); + Map old = new HashMap<>(this.handlersAround); boolean change = false; this.handlersAround.clear(); for (Direction side : Direction.values()) { BlockPos pos = this.getBlockPos().relative(side); if (this.level.hasChunkAt(pos)) { - TileEntity tile = this.level.getBlockEntity(pos); + BlockEntity tile = this.level.getBlockEntity(pos); if (tile != null && !(tile instanceof TileEntityLaserRelay)) { if (tile.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, side.getOpposite()).isPresent()) { this.handlersAround.put(side, tile); - TileEntity oldTile = old.get(side); + BlockEntity oldTile = old.get(side); if (oldTile == null || !tile.equals(oldTile)) { change = true; } @@ -173,7 +184,7 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay { for (BlockPos relay : pair.getPositions()) { if (relay != null && this.level.hasChunkAt(relay) && !alreadyChecked.contains(relay)) { alreadyChecked.add(relay); - TileEntity relayTile = this.level.getBlockEntity(relay); + BlockEntity relayTile = this.level.getBlockEntity(relay); if (relayTile instanceof TileEntityLaserRelayFluids) { TileEntityLaserRelayFluids theRelay = (TileEntityLaserRelayFluids) relayTile; if (theRelay.mode != Mode.INPUT_ONLY) { @@ -181,7 +192,7 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay { for (Direction facing : theRelay.handlersAround.keySet()) { if (theRelay != this || facing != from) { - TileEntity tile = theRelay.handlersAround.get(facing); + BlockEntity tile = theRelay.handlersAround.get(facing); Direction opp = facing.getOpposite(); boolean received = tile.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, opp).map(cap -> cap.fill(stack, IFluidHandler.FluidAction.SIMULATE) > 0).orElse(false); @@ -207,11 +218,11 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay { : stack.getAmount(); for (TileEntityLaserRelayFluids theRelay : relaysThatWork) { - for (Map.Entry receiver : theRelay.handlersAround.entrySet()) { + for (Map.Entry receiver : theRelay.handlersAround.entrySet()) { if (receiver != null) { Direction side = receiver.getKey(); Direction opp = side.getOpposite(); - TileEntity tile = receiver.getValue(); + BlockEntity tile = receiver.getValue(); if (!alreadyChecked.contains(tile.getBlockPos())) { alreadyChecked.add(tile.getBlockPos()); if (theRelay != this || side != from) { @@ -240,22 +251,22 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay { @Override @OnlyIn(Dist.CLIENT) public String getExtraDisplayString() { - return I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.fluid.extra") + ": " + TextFormatting.DARK_RED + I18n.get(this.mode.name) + TextFormatting.RESET; + return I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.fluid.extra") + ": " + ChatFormatting.DARK_RED + I18n.get(this.mode.name) + ChatFormatting.RESET; } @Override @OnlyIn(Dist.CLIENT) public String getCompassDisplayString() { - return TextFormatting.GREEN + I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.energy.display"); + return ChatFormatting.GREEN + I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.energy.display"); } @Override - public void onCompassAction(PlayerEntity player) { + public void onCompassAction(Player player) { this.mode = this.mode.getNext(); } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { @@ -264,7 +275,7 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay { } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java index 154f2569f..53cf3f8b9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java @@ -18,22 +18,28 @@ import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.tile.TileEntityItemInterface.GenericItemHandlerInfo; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import de.ellpeck.actuallyadditions.mod.util.compat.SlotlessableItemHandlerWrapper; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.TextFormatting; +import net.minecraft.ChatFormatting; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; -import java.util.*; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; public class TileEntityLaserRelayItem extends TileEntityLaserRelay { @@ -41,12 +47,24 @@ public class TileEntityLaserRelayItem extends TileEntityLaserRelay { public final Map handlersAround = new ConcurrentHashMap<>(); public int priority; - public TileEntityLaserRelayItem(TileEntityType type) { - super(type, LaserType.ITEM); + public TileEntityLaserRelayItem(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state, LaserType.ITEM); } - public TileEntityLaserRelayItem() { - this(ActuallyBlocks.LASER_RELAY_ITEM.getTileEntityType()); + public TileEntityLaserRelayItem(BlockPos pos, BlockState state) { + this(ActuallyBlocks.LASER_RELAY_ITEM.getTileEntityType(), pos, state); + } + + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLaserRelayItem tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLaserRelayItem tile) { + tile.serverTick(); + } } public int getPriority() { @@ -72,7 +90,7 @@ public class TileEntityLaserRelayItem extends TileEntityLaserRelay { Direction side = WorldUtil.getDirectionBySidesInOrder(i); BlockPos pos = this.getBlockPos().relative(side); if (this.level.hasChunkAt(pos)) { - TileEntity tile = this.level.getBlockEntity(pos); + BlockEntity tile = this.level.getBlockEntity(pos); if (tile != null && !(tile instanceof TileEntityItemInterface) && !(tile instanceof TileEntityLaserRelay)) { LazyOptional itemHandler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side.getOpposite()); @@ -112,7 +130,7 @@ public class TileEntityLaserRelayItem extends TileEntityLaserRelay { for (BlockPos relay : pair.getPositions()) { if (relay != null && this.level.hasChunkAt(relay) && !alreadyChecked.contains(relay)) { alreadyChecked.add(relay); - TileEntity aRelayTile = this.level.getBlockEntity(relay); + BlockEntity aRelayTile = this.level.getBlockEntity(relay); if (aRelayTile instanceof TileEntityLaserRelayItem) { TileEntityLaserRelayItem relayTile = (TileEntityLaserRelayItem) aRelayTile; GenericItemHandlerInfo info = new GenericItemHandlerInfo(relayTile); @@ -133,7 +151,7 @@ public class TileEntityLaserRelayItem extends TileEntityLaserRelay { } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { compound.putInt("Priority", this.priority); @@ -143,17 +161,17 @@ public class TileEntityLaserRelayItem extends TileEntityLaserRelay { @Override @OnlyIn(Dist.CLIENT) public String getExtraDisplayString() { - return I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.item.extra") + ": " + TextFormatting.DARK_RED + this.getPriority() + TextFormatting.RESET; + return I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.item.extra") + ": " + ChatFormatting.DARK_RED + this.getPriority() + ChatFormatting.RESET; } @Override @OnlyIn(Dist.CLIENT) public String getCompassDisplayString() { - return TextFormatting.GREEN + I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.item.display.1") + "\n" + I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.item.display.2"); + return ChatFormatting.GREEN + I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.item.display.1") + "\n" + I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.item.display.2"); } @Override - public void onCompassAction(PlayerEntity player) { + public void onCompassAction(Player player) { if (player.isShiftKeyDown()) { this.priority--; } else { @@ -162,7 +180,7 @@ public class TileEntityLaserRelayItem extends TileEntityLaserRelay { } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { this.priority = compound.getInt("Priority"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemAdvanced.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemAdvanced.java index 46c3a3f77..c0f9e9202 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemAdvanced.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemAdvanced.java @@ -18,24 +18,45 @@ import de.ellpeck.actuallyadditions.mod.items.DrillItem; import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.compat.SlotlessableItemHandlerWrapper; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import javax.annotation.Nullable; -public class TileEntityLaserRelayItemAdvanced extends TileEntityLaserRelayItem implements IButtonReactor, INamedContainerProvider { +public class TileEntityLaserRelayItemAdvanced extends TileEntityLaserRelayItem implements IButtonReactor, MenuProvider { public FilterSettings leftFilter = new FilterSettings(12, true, false, false); public FilterSettings rightFilter = new FilterSettings(12, true, false, false); - public TileEntityLaserRelayItemAdvanced() { - super(ActuallyBlocks.LASER_RELAY_ITEM_ADVANCED.getTileEntityType()); + public TileEntityLaserRelayItemAdvanced(BlockPos pos, BlockState state) { + super(ActuallyBlocks.LASER_RELAY_ITEM_ADVANCED.getTileEntityType(), pos, state); + } + + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLaserRelayItemAdvanced tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLaserRelayItemAdvanced tile) { + tile.serverTick(); + + if ((tile.leftFilter.needsUpdateSend() || tile.rightFilter.needsUpdateSend()) && tile.sendUpdateWithInterval()) { + tile.leftFilter.updateLasts(); + tile.rightFilter.updateLasts(); + } + } } @Override @@ -51,7 +72,7 @@ public class TileEntityLaserRelayItemAdvanced extends TileEntityLaserRelayItem i } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); this.leftFilter.writeToNBT(compound, "LeftFilter"); @@ -59,7 +80,7 @@ public class TileEntityLaserRelayItemAdvanced extends TileEntityLaserRelayItem i } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.leftFilter.readFromNBT(compound, "LeftFilter"); @@ -67,7 +88,7 @@ public class TileEntityLaserRelayItemAdvanced extends TileEntityLaserRelayItem i } @Override - public void onButtonPressed(int buttonID, PlayerEntity player) { + public void onButtonPressed(int buttonID, Player player) { this.leftFilter.onButtonPressed(buttonID); this.rightFilter.onButtonPressed(buttonID); if (buttonID == 2) { @@ -128,25 +149,13 @@ public class TileEntityLaserRelayItemAdvanced extends TileEntityLaserRelayItem i } @Override - public void updateEntity() { - super.updateEntity(); - - if (!this.level.isClientSide) { - if ((this.leftFilter.needsUpdateSend() || this.rightFilter.needsUpdateSend()) && this.sendUpdateWithInterval()) { - this.leftFilter.updateLasts(); - this.rightFilter.updateLasts(); - } - } - } - - @Override - public ITextComponent getDisplayName() { - return StringTextComponent.EMPTY; + public Component getDisplayName() { + return TextComponent.EMPTY; } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity player) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player player) { return new ContainerLaserRelayItemWhitelist(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java index 66238473a..fdc8227f5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLavaFactoryController.java @@ -12,12 +12,14 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; @@ -33,12 +35,12 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I private int currentWorkTime; private int oldEnergy; - public TileEntityLavaFactoryController() { - super(ActuallyBlocks.LAVA_FACTORY_CONTROLLER.getTileEntityType()); + public TileEntityLavaFactoryController(BlockPos pos, BlockState state) { + super(ActuallyBlocks.LAVA_FACTORY_CONTROLLER.getTileEntityType(), pos, state); } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); this.storage.writeToNBT(compound); if (type != NBTType.SAVE_BLOCK) { @@ -47,7 +49,7 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.storage.readFromNBT(compound); if (type != NBTType.SAVE_BLOCK) { @@ -55,23 +57,29 @@ public class TileEntityLavaFactoryController extends TileEntityBase implements I } } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - if (this.storage.getEnergyStored() >= ENERGY_USE && this.isMultiblock() == HAS_AIR) { - this.currentWorkTime++; - if (this.currentWorkTime >= 200) { - this.currentWorkTime = 0; - this.level.setBlock(this.worldPosition.above(), Blocks.LAVA.defaultBlockState(), 2); - this.storage.extractEnergyInternal(ENERGY_USE, false); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLavaFactoryController tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLavaFactoryController tile) { + tile.serverTick(); + + if (tile.storage.getEnergyStored() >= ENERGY_USE && tile.isMultiblock() == HAS_AIR) { + tile.currentWorkTime++; + if (tile.currentWorkTime >= 200) { + tile.currentWorkTime = 0; + level.setBlock(tile.worldPosition.above(), Blocks.LAVA.defaultBlockState(), 2); + tile.storage.extractEnergyInternal(ENERGY_USE, false); } } else { - this.currentWorkTime = 0; + tile.currentWorkTime = 0; } - if (this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()) { - this.oldEnergy = this.storage.getEnergyStored(); + if (tile.oldEnergy != tile.storage.getEnergyStored() && tile.sendUpdateWithInterval()) { + tile.oldEnergy = tile.storage.getEnergyStored(); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java index ca28c4e4a..94987a76a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLeafGenerator.java @@ -13,13 +13,15 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.config.values.ConfigIntValues; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; -import net.minecraft.block.Block; -import net.minecraft.block.Blocks; -import net.minecraft.block.LeavesBlock; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.LeavesBlock; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; @@ -27,8 +29,6 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - public class TileEntityLeafGenerator extends TileEntityBase implements ISharingEnergyProvider, IEnergyDisplay { public final CustomEnergyStorage storage = new CustomEnergyStorage(35000, 0, 450); @@ -36,43 +36,49 @@ public class TileEntityLeafGenerator extends TileEntityBase implements ISharingE private int nextUseCounter; private int oldEnergy; - public TileEntityLeafGenerator() { - super(ActuallyBlocks.LEAF_GENERATOR.getTileEntityType()); + public TileEntityLeafGenerator(BlockPos pos, BlockState state) { + super(ActuallyBlocks.LEAF_GENERATOR.getTileEntityType(), pos, state); } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); this.storage.writeToNBT(compound); } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.storage.readFromNBT(compound); } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - if (!this.isRedstonePowered) { + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLeafGenerator tile) { + tile.clientTick(); + } + } - if (this.nextUseCounter >= ConfigIntValues.LEAF_GENERATOR_COOLDOWN.getValue()) { - this.nextUseCounter = 0; + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLeafGenerator tile) { + tile.serverTick(); + + if (!tile.isRedstonePowered) { + + if (tile.nextUseCounter >= ConfigIntValues.LEAF_GENERATOR_COOLDOWN.getValue()) { + tile.nextUseCounter = 0; int energyProduced = ConfigIntValues.LEAF_GENERATOR_CF_PER_LEAF.getValue(); - if (energyProduced > 0 && energyProduced <= this.storage.getMaxEnergyStored() - this.storage.getEnergyStored()) { + if (energyProduced > 0 && energyProduced <= tile.storage.getMaxEnergyStored() - tile.storage.getEnergyStored()) { List breakPositions = new ArrayList<>(); int range = ConfigIntValues.LEAF_GENERATOR_AREA.getValue(); for (int reachX = -range; reachX < range + 1; reachX++) { for (int reachZ = -range; reachZ < range + 1; reachZ++) { for (int reachY = -range; reachY < range + 1; reachY++) { - BlockPos pos = this.worldPosition.offset(reachX, reachY, reachZ); - Block block = this.level.getBlockState(pos).getBlock(); - if (block instanceof LeavesBlock) { // TODO: [port] validate this is a good way of checking if something is a leaf - breakPositions.add(pos); + BlockPos offsetPos = pos.offset(reachX, reachY, reachZ); + Block block = level.getBlockState(offsetPos).getBlock(); + if (block instanceof LeavesBlock) { // TODO: [port] validate tile is a good way of checking if something is a leaf + breakPositions.add(offsetPos); } } } @@ -82,22 +88,22 @@ public class TileEntityLeafGenerator extends TileEntityBase implements ISharingE Collections.shuffle(breakPositions); BlockPos theCoord = breakPositions.get(0); - this.level.levelEvent(2001, theCoord, Block.getId(this.level.getBlockState(theCoord))); + level.levelEvent(2001, theCoord, Block.getId(level.getBlockState(theCoord))); - this.level.setBlockAndUpdate(theCoord, Blocks.AIR.defaultBlockState()); + level.setBlockAndUpdate(theCoord, Blocks.AIR.defaultBlockState()); - this.storage.receiveEnergyInternal(energyProduced, false); + tile.storage.receiveEnergyInternal(energyProduced, false); - AssetUtil.spawnLaserWithTimeServer(this.level, this.getBlockPos().getX(), this.getBlockPos().getY(), this.getBlockPos().getZ(), theCoord.getX(), theCoord.getY(), theCoord.getZ(), 0x3EA34A, 25, 0, 0.075F, 0.8F); + AssetUtil.spawnLaserWithTimeServer(level, pos.getX(), pos.getY(), pos.getZ(), theCoord.getX(), theCoord.getY(), theCoord.getZ(), 0x3EA34A, 25, 0, 0.075F, 0.8F); } } } else { - this.nextUseCounter++; + tile.nextUseCounter++; } } - if (this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()) { - this.oldEnergy = this.storage.getEnergyStored(); + if (tile.oldEnergy != tile.storage.getEnergyStored() && tile.sendUpdateWithInterval()) { + tile.oldEnergy = tile.storage.getEnergyStored(); } } } @@ -128,7 +134,7 @@ public class TileEntityLeafGenerator extends TileEntityBase implements ISharingE } @Override - public boolean canShareTo(TileEntity tile) { + public boolean canShareTo(BlockEntity tile) { return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLongRangeBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLongRangeBreaker.java index ca5473437..021e5aac0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLongRangeBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLongRangeBreaker.java @@ -15,27 +15,29 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerDirectionalBreaker; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; import javax.annotation.Nullable; import java.util.List; -public class TileEntityLongRangeBreaker extends TileEntityInventoryBase implements INamedContainerProvider { +public class TileEntityLongRangeBreaker extends TileEntityInventoryBase implements MenuProvider { public static final int RANGE = 8; public static final int ENERGY_USE = 5; @@ -44,12 +46,12 @@ public class TileEntityLongRangeBreaker extends TileEntityInventoryBase implemen private int lastEnergy; private int currentTime; - public TileEntityLongRangeBreaker() { - super(ActuallyBlocks.LONG_RANGE_BREAKER.getTileEntityType(), 9); + public TileEntityLongRangeBreaker(BlockPos pos, BlockState state) { + super(ActuallyBlocks.LONG_RANGE_BREAKER.getTileEntityType(), pos, state, 9); } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); this.storage.writeToNBT(compound); if (type != NBTType.SAVE_BLOCK) { @@ -58,7 +60,7 @@ public class TileEntityLongRangeBreaker extends TileEntityInventoryBase implemen } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.storage.readFromNBT(compound); if (type != NBTType.SAVE_BLOCK) { @@ -66,23 +68,29 @@ public class TileEntityLongRangeBreaker extends TileEntityInventoryBase implemen } } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - if (!this.isRedstonePowered && !this.isPulseMode) { - if (this.currentTime > 0) { - this.currentTime--; - if (this.currentTime <= 0) { - this.doWork(); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLongRangeBreaker tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityLongRangeBreaker tile) { + tile.serverTick(); + + if (!tile.isRedstonePowered && !tile.isPulseMode) { + if (tile.currentTime > 0) { + tile.currentTime--; + if (tile.currentTime <= 0) { + tile.doWork(); } } else { - this.currentTime = 15; + tile.currentTime = 15; } } - if (this.storage.getEnergyStored() != this.lastEnergy && this.sendUpdateWithInterval()) { - this.lastEnergy = this.storage.getEnergyStored(); + if (tile.storage.getEnergyStored() != tile.lastEnergy && tile.sendUpdateWithInterval()) { + tile.lastEnergy = tile.storage.getEnergyStored(); } } } @@ -97,7 +105,7 @@ public class TileEntityLongRangeBreaker extends TileEntityInventoryBase implemen BlockState breakState = this.level.getBlockState(coordsBlock); Block blockToBreak = breakState.getBlock(); if (blockToBreak != null && !this.level.isEmptyBlock(coordsBlock) && this.level.getBlockState(coordsBlock).getDestroySpeed(this.level, coordsBlock) > -1.0F) { - List drops = Block.getDrops(breakState, (ServerWorld) this.level, coordsBlock, this.level.getBlockEntity(coordsBlock)); + List drops = Block.getDrops(breakState, (ServerLevel) this.level, coordsBlock, this.level.getBlockEntity(coordsBlock)); float chance = WorldUtil.fireFakeHarvestEventsForDropChance(this, drops, this.level, coordsBlock); if (chance > 0 && this.level.random.nextFloat() <= chance) { @@ -139,13 +147,13 @@ public class TileEntityLongRangeBreaker extends TileEntityInventoryBase implemen } @Override - public ITextComponent getDisplayName() { - return StringTextComponent.EMPTY; + public Component getDisplayName() { + return TextComponent.EMPTY; } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity playerEntity) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player playerEntity) { return new ContainerDirectionalBreaker(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java index 2c3884acf..14daa11a7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java @@ -15,16 +15,18 @@ import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; import de.ellpeck.actuallyadditions.mod.crafting.LiquidFuelRecipe; import de.ellpeck.actuallyadditions.mod.inventory.ContainerOilGenerator; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.util.text.TranslationTextComponent; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.LazyOptional; @@ -37,7 +39,7 @@ import net.minecraftforge.fluids.capability.templates.FluidTank; import javax.annotation.Nonnull; import javax.annotation.Nullable; -public class TileEntityOilGenerator extends TileEntityBase implements ISharingEnergyProvider, ISharingFluidHandler, INamedContainerProvider { +public class TileEntityOilGenerator extends TileEntityBase implements ISharingEnergyProvider, ISharingFluidHandler, MenuProvider { public final CustomEnergyStorage storage = new CustomEnergyStorage(50000, 0, CommonConfig.Machines.OIL_GENERATOR_TRANSFER.get()); public final LazyOptional lazyEnergy = LazyOptional.of(() -> this.storage); public final FluidTank tank = new FluidTank(2 * FluidAttributes.BUCKET_VOLUME, fluid -> getRecipeForFluid(fluid) != null) { @@ -65,8 +67,8 @@ public class TileEntityOilGenerator extends TileEntityBase implements ISharingEn private int lastCompare; public int fuelUsage; - public TileEntityOilGenerator() { - super(ActuallyBlocks.OIL_GENERATOR.getTileEntityType()); + public TileEntityOilGenerator(BlockPos pos, BlockState state) { + super(ActuallyBlocks.OIL_GENERATOR.getTileEntityType(), pos, state); } private static LiquidFuelRecipe getRecipeForFluid(FluidStack fluid) { @@ -94,7 +96,7 @@ public class TileEntityOilGenerator extends TileEntityBase implements ISharingEn } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { if (type != NBTType.SAVE_BLOCK) { compound.putInt("BurnTime", this.currentBurnTime); compound.putInt("CurrentEnergy", this.currentEnergyProduce); @@ -107,7 +109,7 @@ public class TileEntityOilGenerator extends TileEntityBase implements ISharingEn } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { if (type != NBTType.SAVE_BLOCK) { this.currentBurnTime = compound.getInt("BurnTime"); this.currentEnergyProduce = compound.getInt("CurrentEnergy"); @@ -119,46 +121,52 @@ public class TileEntityOilGenerator extends TileEntityBase implements ISharingEn super.readSyncableNBT(compound, type); } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - boolean flag = this.currentBurnTime > 0; + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityOilGenerator tile) { + tile.clientTick(); + } + } - if (this.currentBurnTime > 0 && this.currentEnergyProduce > 0) { - this.currentBurnTime--; + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityOilGenerator tile) { + tile.serverTick(); - this.storage.receiveEnergyInternal(this.currentEnergyProduce, false); - } else if (!this.isRedstonePowered) { + boolean flag = tile.currentBurnTime > 0; - LiquidFuelRecipe recipe = this.getRecipeForCurrentFluid(); - if (recipe != null && this.storage.getEnergyStored() < this.storage.getMaxEnergyStored() && this.tank.getFluidAmount() >= recipe.getFuelAmount()) { - fuelUsage = recipe.getFuelAmount(); - this.currentEnergyProduce = recipe.getTotalEnergy() / recipe.getBurnTime(); - this.maxBurnTime = recipe.getBurnTime(); - this.currentBurnTime = this.maxBurnTime; + if (tile.currentBurnTime > 0 && tile.currentEnergyProduce > 0) { + tile.currentBurnTime--; - this.tank.getFluid().shrink(fuelUsage); + tile.storage.receiveEnergyInternal(tile.currentEnergyProduce, false); + } else if (!tile.isRedstonePowered) { + + LiquidFuelRecipe recipe = tile.getRecipeForCurrentFluid(); + if (recipe != null && tile.storage.getEnergyStored() < tile.storage.getMaxEnergyStored() && tile.tank.getFluidAmount() >= recipe.getFuelAmount()) { + tile.fuelUsage = recipe.getFuelAmount(); + tile.currentEnergyProduce = recipe.getTotalEnergy() / recipe.getBurnTime(); + tile.maxBurnTime = recipe.getBurnTime(); + tile.currentBurnTime = tile.maxBurnTime; + + tile.tank.getFluid().shrink(tile.fuelUsage); } else { - this.currentEnergyProduce = 0; - this.currentBurnTime = 0; - this.maxBurnTime = 0; - this.fuelUsage = 0; + tile.currentEnergyProduce = 0; + tile.currentBurnTime = 0; + tile.maxBurnTime = 0; + tile.fuelUsage = 0; } } - if (flag != this.currentBurnTime > 0 || this.lastCompare != this.getComparatorStrength()) { - this.lastCompare = this.getComparatorStrength(); + if (flag != tile.currentBurnTime > 0 || tile.lastCompare != tile.getComparatorStrength()) { + tile.lastCompare = tile.getComparatorStrength(); - this.setChanged(); + tile.setChanged(); } - if ((this.storage.getEnergyStored() != this.lastEnergy || this.tank.getFluidAmount() != this.lastTank || this.lastBurnTime != this.currentBurnTime || this.lastEnergyProduce != this.currentEnergyProduce || this.lastMaxBurnTime != this.maxBurnTime) && this.sendUpdateWithInterval()) { - this.lastEnergy = this.storage.getEnergyStored(); - this.lastTank = this.tank.getFluidAmount(); - this.lastBurnTime = this.currentBurnTime; - this.lastEnergyProduce = this.currentEnergyProduce; - this.lastMaxBurnTime = this.maxBurnTime; + if ((tile.storage.getEnergyStored() != tile.lastEnergy || tile.tank.getFluidAmount() != tile.lastTank || tile.lastBurnTime != tile.currentBurnTime || tile.lastEnergyProduce != tile.currentEnergyProduce || tile.lastMaxBurnTime != tile.maxBurnTime) && tile.sendUpdateWithInterval()) { + tile.lastEnergy = tile.storage.getEnergyStored(); + tile.lastTank = tile.tank.getFluidAmount(); + tile.lastBurnTime = tile.currentBurnTime; + tile.lastEnergyProduce = tile.currentEnergyProduce; + tile.lastMaxBurnTime = tile.maxBurnTime; } } } @@ -205,7 +213,7 @@ public class TileEntityOilGenerator extends TileEntityBase implements ISharingEn } @Override - public boolean canShareTo(TileEntity tile) { + public boolean canShareTo(BlockEntity tile) { return true; } @@ -215,13 +223,13 @@ public class TileEntityOilGenerator extends TileEntityBase implements ISharingEn } @Override - public ITextComponent getDisplayName() { - return new TranslationTextComponent("container.actuallyadditions.oilGenerator"); + public Component getDisplayName() { + return new TranslatableComponent("container.actuallyadditions.oilGenerator"); } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity player) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player player) { return new ContainerOilGenerator(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomBooster.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomBooster.java index 1d04a13f6..6f1f2deb1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomBooster.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomBooster.java @@ -11,10 +11,26 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; public class TileEntityPhantomBooster extends TileEntityBase { - public TileEntityPhantomBooster() { - super(ActuallyBlocks.PHANTOM_BOOSTER.getTileEntityType()); + public TileEntityPhantomBooster(BlockPos pos, BlockState state) { + super(ActuallyBlocks.PHANTOM_BOOSTER.getTileEntityType(), pos, state); + } + + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPhantomBooster tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPhantomBooster tile) { + tile.serverTick(); + } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomBreaker.java index cf8d5a2da..a6ef3d5f8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomBreaker.java @@ -14,14 +14,30 @@ import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; public class TileEntityPhantomBreaker extends TileEntityPhantomPlacer { - public TileEntityPhantomBreaker() { - super(ActuallyBlocks.PHANTOM_BREAKER.getTileEntityType(), 9); + public TileEntityPhantomBreaker(BlockPos pos, BlockState state) { + super(ActuallyBlocks.PHANTOM_BREAKER.getTileEntityType(), pos, state, 9); this.isBreaker = true; } + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPhantomBreaker tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPhantomBreaker tile) { + tile.serverTick(); + } + } + @Override public IAcceptor getAcceptor() { return (slot, stack, automation) -> !automation; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java index b2f891491..ea1cf69ab 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java @@ -12,22 +12,37 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.blocks.BlockPhantom; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.energy.CapabilityEnergy; public class TileEntityPhantomEnergyface extends TileEntityPhantomface implements ISharingEnergyProvider { - public TileEntityPhantomEnergyface() { - super(ActuallyBlocks.PHANTOM_ENERGYFACE.getTileEntityType()); + public TileEntityPhantomEnergyface(BlockPos pos, BlockState state) { + super(ActuallyBlocks.PHANTOM_ENERGYFACE.getTileEntityType(), pos, state); this.type = BlockPhantom.Type.ENERGYFACE; } + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPhantomEnergyface tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPhantomEnergyface tile) { + tile.serverTick(); + } + } + @Override public boolean isBoundThingInRange() { if (super.isBoundThingInRange()) { - TileEntity tile = this.level.getBlockEntity(this.boundPosition); + BlockEntity tile = this.level.getBlockEntity(this.boundPosition); if (tile != null && !(tile instanceof TileEntityLaserRelayEnergy)) { for (Direction facing : Direction.values()) { if (tile.getCapability(CapabilityEnergy.ENERGY, facing).isPresent()) { @@ -60,7 +75,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement } @Override - public boolean canShareTo(TileEntity tile) { + public boolean canShareTo(BlockEntity tile) { return true; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomItemface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomItemface.java index 3d9d5a579..38ffdf134 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomItemface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomItemface.java @@ -14,18 +14,33 @@ import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.blocks.BlockPhantom; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.items.CapabilityItemHandler; public class TileEntityPhantomItemface extends TileEntityPhantomface { - public TileEntityPhantomItemface() { - super(ActuallyBlocks.PHANTOM_ITEMFACE.getTileEntityType()); + public TileEntityPhantomItemface(BlockPos pos, BlockState state) { + super(ActuallyBlocks.PHANTOM_ITEMFACE.getTileEntityType(), pos, state); this.type = BlockPhantom.Type.ITEMFACE; } + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPhantomItemface tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPhantomItemface tile) { + tile.serverTick(); + } + } + @Override public IAcceptor getAcceptor() { return (slot, stack, automation) -> !automation || this.isBoundThingInRange(); @@ -34,7 +49,7 @@ public class TileEntityPhantomItemface extends TileEntityPhantomface { @Override public boolean isBoundThingInRange() { if (super.isBoundThingInRange()) { - TileEntity tile = this.level.getBlockEntity(this.getBoundPosition()); + BlockEntity tile = this.level.getBlockEntity(this.getBoundPosition()); if (tile != null) { for (Direction facing : Direction.values()) { if (tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing).isPresent()) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java index 1b445406c..27bf1587c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java @@ -12,22 +12,37 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.blocks.BlockPhantom; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.capabilities.Capability; import net.minecraftforge.fluids.capability.CapabilityFluidHandler; public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements ISharingFluidHandler { - public TileEntityPhantomLiquiface() { - super(ActuallyBlocks.PHANTOM_LIQUIFACE.getTileEntityType()); + public TileEntityPhantomLiquiface(BlockPos pos, BlockState state) { + super(ActuallyBlocks.PHANTOM_LIQUIFACE.getTileEntityType(), pos, state); this.type = BlockPhantom.Type.LIQUIFACE; } + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPhantomLiquiface tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPhantomLiquiface tile) { + tile.serverTick(); + } + } + @Override public boolean isBoundThingInRange() { if (super.isBoundThingInRange()) { - TileEntity tile = this.level.getBlockEntity(this.boundPosition); + BlockEntity tile = this.level.getBlockEntity(this.boundPosition); if (tile != null && !(tile instanceof TileEntityLaserRelayFluids)) { for (Direction facing : Direction.values()) { if (tile.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, facing).isPresent()) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java index 53881fe5f..c075857ec 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java @@ -19,26 +19,29 @@ import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.Block; -import net.minecraft.block.Blocks; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.particles.ParticleTypes; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; import javax.annotation.Nullable; import java.util.List; -public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements IPhantomTile, IButtonReactor, INamedContainerProvider { +public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements IPhantomTile, IButtonReactor, MenuProvider { public static final int RANGE = 3; public BlockPos boundPosition; @@ -48,17 +51,17 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements public int side; private int oldRange; - public TileEntityPhantomPlacer(TileEntityType type, int slots) { - super(type, slots); + public TileEntityPhantomPlacer(BlockEntityType type, BlockPos pos, BlockState state, int slots) { + super(type, pos, state, slots); } - public TileEntityPhantomPlacer() { - super(ActuallyBlocks.PHANTOM_PLACER.getTileEntityType(), 9); + public TileEntityPhantomPlacer(BlockPos pos, BlockState state) { + super(ActuallyBlocks.PHANTOM_PLACER.getTileEntityType(), pos, state, 9); this.isBreaker = false; } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { compound.putInt("Range", this.range); @@ -74,7 +77,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { int x = compound.getInt("xOfTileStored"); @@ -91,37 +94,43 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements } } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - this.range = TileEntityPhantomface.upgradeRange(RANGE, this.level, this.worldPosition); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPhantomPlacer tile) { + tile.clientTick(); - if (!this.hasBoundPosition()) { - this.boundPosition = null; + if (tile.boundPosition != null) { + tile.renderParticles(); + } + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPhantomPlacer tile) { + tile.serverTick(); + + tile.range = TileEntityPhantomface.upgradeRange(RANGE, tile.level, tile.worldPosition); + + if (!tile.hasBoundPosition()) { + tile.boundPosition = null; } - if (this.isBoundThingInRange()) { - if (!this.isRedstonePowered && !this.isPulseMode) { - if (this.currentTime > 0) { - this.currentTime--; - if (this.currentTime <= 0) { - this.doWork(); + if (tile.isBoundThingInRange()) { + if (!tile.isRedstonePowered && !tile.isPulseMode) { + if (tile.currentTime > 0) { + tile.currentTime--; + if (tile.currentTime <= 0) { + tile.doWork(); } } else { - this.currentTime = 30; + tile.currentTime = 30; } } } - if (this.oldRange != this.range) { - this.oldRange = this.range; + if (tile.oldRange != tile.range) { + tile.oldRange = tile.range; - this.sendUpdate(); - } - } else { - if (this.boundPosition != null) { - this.renderParticles(); + tile.sendUpdate(); } } } @@ -144,7 +153,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements if (this.isBreaker) { Block blockToBreak = this.level.getBlockState(this.boundPosition).getBlock(); if (blockToBreak != null && this.level.getBlockState(this.boundPosition).getDestroySpeed(this.level, this.boundPosition) > -1.0F) { - List drops = Block.getDrops(this.level.getBlockState(this.boundPosition), (ServerWorld) this.level, this.worldPosition, this.level.getBlockEntity(this.worldPosition)); + List drops = Block.getDrops(this.level.getBlockState(this.boundPosition), (ServerLevel) this.level, this.worldPosition, this.level.getBlockEntity(this.worldPosition)); if (StackUtil.canAddAll(this.inv, drops, false)) { this.level.levelEvent(2001, this.boundPosition, Block.getId(this.level.getBlockState(this.boundPosition))); @@ -218,7 +227,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements } @Override - public void onButtonPressed(int buttonID, PlayerEntity player) { + public void onButtonPressed(int buttonID, Player player) { if (this.side + 1 >= Direction.values().length) { this.side = 0; } else { @@ -229,13 +238,13 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements } @Override - public ITextComponent getDisplayName() { - return StringTextComponent.EMPTY; + public Component getDisplayName() { + return TextComponent.EMPTY; } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity player) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player player) { return new ContainerPhantomPlacer(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomRedstoneface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomRedstoneface.java index 4f6bff578..d266e0b13 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomRedstoneface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomRedstoneface.java @@ -11,9 +11,12 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.util.Direction; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.capabilities.Capability; import java.util.Arrays; @@ -26,29 +29,34 @@ public class TileEntityPhantomRedstoneface extends TileEntityPhantomface { private final int[] lastProvidesStrong = new int[this.providesStrong.length]; private final int[] lastProvidesWeak = new int[this.providesWeak.length]; - public TileEntityPhantomRedstoneface() { - super(ActuallyBlocks.PHANTOM_REDSTONEFACE.getTileEntityType()); + public TileEntityPhantomRedstoneface(BlockPos pos, BlockState state) { + super(ActuallyBlocks.PHANTOM_REDSTONEFACE.getTileEntityType(), pos, state); } - @Override - public void updateEntity() { - if (!this.level.isClientSide) { - if (this.isBoundThingInRange()) { - BlockState boundState = this.level.getBlockState(this.boundPosition); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPhantomRedstoneface tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPhantomRedstoneface tile) { + tile.serverTick(); + + if (tile.isBoundThingInRange()) { + BlockState boundState = tile.level.getBlockState(tile.boundPosition); if (boundState != null) { Block boundBlock = boundState.getBlock(); if (boundBlock != null) { for (int i = 0; i < Direction.values().length; i++) { Direction facing = Direction.values()[i]; - this.providesWeak[i] = boundState.getSignal(this.level, this.boundPosition, facing); - this.providesStrong[i] = boundState.getDirectSignal(this.level, this.boundPosition, facing); + tile.providesWeak[i] = boundState.getSignal(tile.level, tile.boundPosition, facing); + tile.providesStrong[i] = boundState.getDirectSignal(tile.level, tile.boundPosition, facing); } } } } } - - super.updateEntity(); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java index c3dc2cfa0..ee832905f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomface.java @@ -13,15 +13,15 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.blocks.BlockPhantom; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.particles.ParticleTypes; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityType; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.capabilities.Capability; @@ -40,12 +40,12 @@ public abstract class TileEntityPhantomface extends TileEntityInventoryBase impl private Block boundBlockBefore; private int lastStrength; - public TileEntityPhantomface(TileEntityType type) { - super(type, 0); + public TileEntityPhantomface(BlockEntityType type, BlockPos pos, BlockState state) { + super(type, pos, state, 0); } - public static int upgradeRange(int defaultRange, World world, BlockPos pos) { + public static int upgradeRange(int defaultRange, Level world, BlockPos pos) { int newRange = defaultRange; for (int i = 0; i < 3; i++) { Block block = world.getBlockState(pos.above(1 + i)).getBlock(); @@ -59,7 +59,7 @@ public abstract class TileEntityPhantomface extends TileEntityInventoryBase impl } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { compound.putInt("Range", this.range); @@ -72,7 +72,7 @@ public abstract class TileEntityPhantomface extends TileEntityInventoryBase impl } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { int x = compound.getInt("xOfTileStored"); @@ -87,29 +87,31 @@ public abstract class TileEntityPhantomface extends TileEntityInventoryBase impl } @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - this.range = upgradeRange(RANGE, this.level, this.getBlockPos()); + protected void serverTick() { + super.serverTick(); + this.range = upgradeRange(RANGE, this.level, this.getBlockPos()); - if (!this.hasBoundPosition()) { - this.boundPosition = null; - } + if (!this.hasBoundPosition()) { + this.boundPosition = null; + } - if (this.doesNeedUpdateSend()) { - this.onUpdateSent(); - } + if (this.doesNeedUpdateSend()) { + this.onUpdateSent(); + } - int strength = this.getComparatorStrength(); - if (this.lastStrength != strength) { - this.lastStrength = strength; + int strength = this.getComparatorStrength(); + if (this.lastStrength != strength) { + this.lastStrength = strength; - this.setChanged(); - } - } else { - if (this.boundPosition != null) { - this.renderParticles(); - } + this.setChanged(); + } + } + + @Override + protected void clientTick() { + super.clientTick(); + if (this.boundPosition != null) { + this.renderParticles(); } } @@ -190,7 +192,7 @@ public abstract class TileEntityPhantomface extends TileEntityInventoryBase impl @Override public LazyOptional getCapability(@Nonnull Capability capability, @Nullable Direction side) { if (this.isBoundThingInRange() && this.isCapabilitySupported(capability)) { - TileEntity tile = this.level.getBlockEntity(this.getBoundPosition()); + BlockEntity tile = this.level.getBlockEntity(this.getBoundPosition()); if (tile != null) { return tile.getCapability(capability, side); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlacer.java index 982fd1cea..07ba0b4b3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlacer.java @@ -13,17 +13,32 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; +import net.minecraft.core.BlockPos; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; public class TileEntityPlacer extends TileEntityBreaker { - public TileEntityPlacer() { - super(ActuallyBlocks.PLACER.getTileEntityType(), 9); - this.isPlacer = true; - } + public TileEntityPlacer(BlockPos pos, BlockState state) { + super(ActuallyBlocks.PLACER.getTileEntityType(), pos, state, 9); + this.isPlacer = true; + } - @Override - public IAcceptor getAcceptor() { - return ItemStackHandlerAA.ACCEPT_TRUE; - } + @Override + public IAcceptor getAcceptor() { + return ItemStackHandlerAA.ACCEPT_TRUE; + } + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPlacer tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPlacer tile) { + tile.serverTick(); + } + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java index 4492b9bea..08e3392bf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java @@ -12,10 +12,14 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; @@ -24,8 +28,6 @@ import net.minecraftforge.items.wrapper.PlayerInvWrapper; import java.util.UUID; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - public class TileEntityPlayerInterface extends TileEntityBase implements IEnergyDisplay { public static final int DEFAULT_RANGE = 32; @@ -34,17 +36,17 @@ public class TileEntityPlayerInterface extends TileEntityBase implements IEnergy public UUID connectedPlayer; public String playerName; private IItemHandler playerHandler; - private PlayerEntity oldPlayer; + private Player oldPlayer; private int oldEnergy; private int range; - public TileEntityPlayerInterface() { - super(ActuallyBlocks.PLAYER_INTERFACE.getTileEntityType()); + public TileEntityPlayerInterface(BlockPos pos, BlockState state) { + super(ActuallyBlocks.PLAYER_INTERFACE.getTileEntityType(), pos, state); } - private PlayerEntity getPlayer() { + private Player getPlayer() { if (this.connectedPlayer != null && this.level != null) { - PlayerEntity player = this.level.getPlayerByUUID(this.connectedPlayer); + Player player = this.level.getPlayerByUUID(this.connectedPlayer); if (player != null) { if (player.distanceToSqr(this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ()) <= this.range) { return player; @@ -57,37 +59,43 @@ public class TileEntityPlayerInterface extends TileEntityBase implements IEnergy // TODO: [port] this might not be a stable way of doing this. @Override public LazyOptional getItemHandler(Direction facing) { - PlayerEntity player = this.getPlayer(); + Player player = this.getPlayer(); if (this.oldPlayer != player) { this.oldPlayer = player; this.playerHandler = player == null ? null - : new PlayerInvWrapper(player.inventory); + : new PlayerInvWrapper(player.getInventory()); } return LazyOptional.of(() -> this.playerHandler); } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPlayerInterface tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPlayerInterface tile) { + tile.serverTick(); + boolean changed = false; - this.range = TileEntityPhantomface.upgradeRange(DEFAULT_RANGE, this.level, this.worldPosition); + tile.range = TileEntityPhantomface.upgradeRange(DEFAULT_RANGE, level, pos); - PlayerEntity player = this.getPlayer(); + Player player = tile.getPlayer(); if (player != null) { - for (int i = 0; i < player.inventory.getContainerSize(); i++) { - if (this.storage.getEnergyStored() > 0) { - ItemStack slot = player.inventory.getItem(i); + for (int i = 0; i < player.getInventory().getContainerSize(); i++) { + if (tile.storage.getEnergyStored() > 0) { + ItemStack slot = player.getInventory().getItem(i); if (StackUtil.isValid(slot) && slot.getCount() == 1) { - int received = slot.getCapability(CapabilityEnergy.ENERGY).map(cap -> cap.receiveEnergy(this.storage.getEnergyStored(), false)).orElse(0); + int received = slot.getCapability(CapabilityEnergy.ENERGY).map(cap -> cap.receiveEnergy(tile.storage.getEnergyStored(), false)).orElse(0); if (received > 0) { - this.storage.extractEnergyInternal(received, false); + tile.storage.extractEnergyInternal(received, false); } } } else { @@ -97,18 +105,18 @@ public class TileEntityPlayerInterface extends TileEntityBase implements IEnergy } if (changed) { - this.setChanged(); - this.sendUpdate(); + tile.setChanged(); + tile.sendUpdate(); } - if (this.storage.getEnergyStored() != this.oldEnergy && this.sendUpdateWithInterval()) { - this.oldEnergy = this.storage.getEnergyStored(); + if (tile.storage.getEnergyStored() != tile.oldEnergy && tile.sendUpdateWithInterval()) { + tile.oldEnergy = tile.storage.getEnergyStored(); } } } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); this.storage.writeToNBT(compound); @@ -119,7 +127,7 @@ public class TileEntityPlayerInterface extends TileEntityBase implements IEnergy } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.storage.readFromNBT(compound); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPoweredFurnace.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPoweredFurnace.java index 7aad62cc9..e50bd7295 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPoweredFurnace.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPoweredFurnace.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.tile; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.crafting.SingleItem; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFurnaceDouble; @@ -19,23 +18,24 @@ import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IRemover; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; -import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.block.BlockState; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.inventory.container.Slot; -import net.minecraft.item.ItemStack; -import net.minecraft.item.crafting.AbstractCookingRecipe; -import net.minecraft.item.crafting.FurnaceRecipe; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.util.Direction; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.TranslationTextComponent; -import net.minecraftforge.common.util.Constants; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.AbstractCookingRecipe; +import net.minecraft.world.item.crafting.RecipeType; +import net.minecraft.world.item.crafting.SmeltingRecipe; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; @@ -43,7 +43,7 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.util.Optional; -public class TileEntityPoweredFurnace extends TileEntityInventoryBase implements IButtonReactor, INamedContainerProvider { +public class TileEntityPoweredFurnace extends TileEntityInventoryBase implements IButtonReactor, MenuProvider { public static final int SLOT_INPUT_1 = 0; public static final int SLOT_OUTPUT_1 = 1; @@ -62,8 +62,8 @@ public class TileEntityPoweredFurnace extends TileEntityInventoryBase implements private boolean lastAutoSplit; private boolean lastSmelted; - public TileEntityPoweredFurnace() { - super(ActuallyBlocks.POWERED_FURNACE.getTileEntityType(), 4); + public TileEntityPoweredFurnace(BlockPos pos, BlockState state) { + super(ActuallyBlocks.POWERED_FURNACE.getTileEntityType(), pos, state, 4); } public static void autoSplit(ItemStackHandlerAA inv, int slot1, int slot2) { @@ -95,7 +95,7 @@ public class TileEntityPoweredFurnace extends TileEntityInventoryBase implements } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { compound.putInt("FirstSmeltTime", this.firstSmeltTime); @@ -106,7 +106,7 @@ public class TileEntityPoweredFurnace extends TileEntityInventoryBase implements } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); if (type != NBTType.SAVE_BLOCK) { this.firstSmeltTime = compound.getInt("FirstSmeltTime"); @@ -116,72 +116,77 @@ public class TileEntityPoweredFurnace extends TileEntityInventoryBase implements this.storage.readFromNBT(compound); } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - if (this.isAutoSplit) { - autoSplit(this.inv, SLOT_INPUT_1, SLOT_INPUT_2); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPoweredFurnace tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityPoweredFurnace tile) { + tile.serverTick(); + + if (tile.isAutoSplit) { + autoSplit(tile.inv, SLOT_INPUT_1, SLOT_INPUT_2); } - //TODO all this logic needs redone someday + //TODO all tile logic needs redone someday boolean smelted = false; - boolean canSmeltOnFirst = this.canSmeltOn(SLOT_INPUT_1, SLOT_OUTPUT_1); - boolean canSmeltOnSecond = this.canSmeltOn(SLOT_INPUT_2, SLOT_OUTPUT_2); + boolean canSmeltOnFirst = tile.canSmeltOn(SLOT_INPUT_1, SLOT_OUTPUT_1); + boolean canSmeltOnSecond = tile.canSmeltOn(SLOT_INPUT_2, SLOT_OUTPUT_2); if (canSmeltOnFirst) { - if (this.storage.getEnergyStored() >= ENERGY_USE) { - this.firstSmeltTime++; - if (this.firstSmeltTime >= SMELT_TIME) { - this.finishBurning(SLOT_INPUT_1, SLOT_OUTPUT_1); - this.firstSmeltTime = 0; + if (tile.storage.getEnergyStored() >= ENERGY_USE) { + tile.firstSmeltTime++; + if (tile.firstSmeltTime >= SMELT_TIME) { + tile.finishBurning(SLOT_INPUT_1, SLOT_OUTPUT_1); + tile.firstSmeltTime = 0; } - this.storage.extractEnergyInternal(ENERGY_USE, false); + tile.storage.extractEnergyInternal(ENERGY_USE, false); } smelted = true; } else { - this.firstSmeltTime = 0; + tile.firstSmeltTime = 0; } if (canSmeltOnSecond) { - if (this.storage.getEnergyStored() >= ENERGY_USE) { - this.secondSmeltTime++; - if (this.secondSmeltTime >= SMELT_TIME) { - this.finishBurning(SLOT_INPUT_2, SLOT_OUTPUT_2); - this.secondSmeltTime = 0; + if (tile.storage.getEnergyStored() >= ENERGY_USE) { + tile.secondSmeltTime++; + if (tile.secondSmeltTime >= SMELT_TIME) { + tile.finishBurning(SLOT_INPUT_2, SLOT_OUTPUT_2); + tile.secondSmeltTime = 0; } - this.storage.extractEnergyInternal(ENERGY_USE, false); + tile.storage.extractEnergyInternal(ENERGY_USE, false); } smelted = true; } else { - this.secondSmeltTime = 0; + tile.secondSmeltTime = 0; } - BlockState currState = this.level.getBlockState(this.getBlockPos()); - boolean current = currState.getValue(BlockStateProperties.LIT); + boolean current = state.getValue(BlockStateProperties.LIT); boolean changeTo = current; - if (this.lastSmelted != smelted) { + if (tile.lastSmelted != smelted) { changeTo = smelted; } - if (this.isRedstonePowered) { + if (tile.isRedstonePowered) { changeTo = true; } - if (!smelted && !this.isRedstonePowered) { + if (!smelted && !tile.isRedstonePowered) { changeTo = false; } if (changeTo != current) { - this.level.setBlock(this.worldPosition, currState.setValue(BlockStateProperties.LIT, changeTo), Constants.BlockFlags.DEFAULT); + tile.level.setBlock(tile.worldPosition, state.setValue(BlockStateProperties.LIT, changeTo), Block.UPDATE_ALL); } - this.lastSmelted = smelted; + tile.lastSmelted = smelted; - if ((this.lastEnergy != this.storage.getEnergyStored() || this.lastFirstSmelt != this.firstSmeltTime || this.lastSecondSmelt != this.secondSmeltTime || this.isAutoSplit != this.lastAutoSplit) && this.sendUpdateWithInterval()) { - this.lastEnergy = this.storage.getEnergyStored(); - this.lastFirstSmelt = this.firstSmeltTime; - this.lastAutoSplit = this.isAutoSplit; - this.lastSecondSmelt = this.secondSmeltTime; + if ((tile.lastEnergy != tile.storage.getEnergyStored() || tile.lastFirstSmelt != tile.firstSmeltTime || tile.lastSecondSmelt != tile.secondSmeltTime || tile.isAutoSplit != tile.lastAutoSplit) && tile.sendUpdateWithInterval()) { + tile.lastEnergy = tile.storage.getEnergyStored(); + tile.lastFirstSmelt = tile.firstSmeltTime; + tile.lastAutoSplit = tile.isAutoSplit; + tile.lastSecondSmelt = tile.secondSmeltTime; } } } @@ -191,11 +196,11 @@ public class TileEntityPoweredFurnace extends TileEntityInventoryBase implements } public Optional getOutputForInput(ItemStack stack) { - return level.getServer().getRecipeManager().getRecipeFor(IRecipeType.SMELTING, new SingleItem(stack), level).map(AbstractCookingRecipe::getResultItem); + return level.getServer().getRecipeManager().getRecipeFor(RecipeType.SMELTING, new SingleItem(stack), level).map(AbstractCookingRecipe::getResultItem); } - public Optional getRecipeForInput(ItemStack stack) { - return level.getServer().getRecipeManager().getRecipeFor(IRecipeType.SMELTING, new SingleItem(stack), level); + public Optional getRecipeForInput(ItemStack stack) { + return level.getServer().getRecipeManager().getRecipeFor(RecipeType.SMELTING, new SingleItem(stack), level); } @Override @@ -212,7 +217,7 @@ public class TileEntityPoweredFurnace extends TileEntityInventoryBase implements ItemStack input = this.inv.getStackInSlot(theInput); ItemStack output = this.inv.getStackInSlot(theOutput); if (!input.isEmpty()) { - Optional recipe = getRecipeForInput(input); + Optional recipe = getRecipeForInput(input); return recipe.map($ -> output.isEmpty() || output.sameItem($.getResultItem()) && output.getCount() <= output.getMaxStackSize() - $.getResultItem().getCount()).orElse(false); } return false; @@ -238,7 +243,7 @@ public class TileEntityPoweredFurnace extends TileEntityInventoryBase implements } @Override - public void onButtonPressed(int buttonID, PlayerEntity player) { + public void onButtonPressed(int buttonID, Player player) { if (buttonID == 0) { this.isAutoSplit = !this.isAutoSplit; this.setChanged(); @@ -252,13 +257,13 @@ public class TileEntityPoweredFurnace extends TileEntityInventoryBase implements @Nonnull @Override - public ITextComponent getDisplayName() { - return new TranslationTextComponent("container.actuallyadditions.powered_furnace"); + public Component getDisplayName() { + return new TranslatableComponent("container.actuallyadditions.powered_furnace"); } @Nullable @Override - public Container createMenu(int windowId, @Nonnull PlayerInventory playerInventory, @Nonnull PlayerEntity player) { + public AbstractContainerMenu createMenu(int windowId, @Nonnull Inventory playerInventory, @Nonnull Player player) { return new ContainerFurnaceDouble(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java index 49c269c5c..022979ba5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java @@ -15,41 +15,45 @@ import de.ellpeck.actuallyadditions.mod.inventory.ContainerRangedCollector; import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.particles.ParticleTypes; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.core.particles.ParticleTypes; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.AABB; import javax.annotation.Nullable; import java.util.ArrayList; import java.util.List; -public class TileEntityRangedCollector extends TileEntityInventoryBase implements IButtonReactor, INamedContainerProvider { +public class TileEntityRangedCollector extends TileEntityInventoryBase implements IButtonReactor, MenuProvider { public static final int RANGE = 6; public FilterSettings filter = new FilterSettings(12, true, false, false); - public TileEntityRangedCollector() { - super(ActuallyBlocks.RANGED_COLLECTOR.getTileEntityType(), 6); + public TileEntityRangedCollector(BlockPos pos, BlockState state) { + super(ActuallyBlocks.RANGED_COLLECTOR.getTileEntityType(), pos, state, 6); } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); this.filter.writeToNBT(compound, "Filter"); } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.filter.readFromNBT(compound, "Filter"); @@ -62,7 +66,7 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement @Override public void activateOnPulse() { - List items = this.level.getEntitiesOfClass(ItemEntity.class, new AxisAlignedBB(this.worldPosition.getX() - RANGE, this.worldPosition.getY() - RANGE, this.worldPosition.getZ() - RANGE, this.worldPosition.getX() + RANGE, this.worldPosition.getY() + RANGE, this.worldPosition.getZ() + RANGE)); + List items = this.level.getEntitiesOfClass(ItemEntity.class, new AABB(this.worldPosition.getX() - RANGE, this.worldPosition.getY() - RANGE, this.worldPosition.getZ() - RANGE, this.worldPosition.getX() + RANGE, this.worldPosition.getY() + RANGE, this.worldPosition.getZ() + RANGE)); if (!items.isEmpty()) { for (ItemEntity item : items) { if (item.isAlive() && !item.hasPickUpDelay() && !item.getItem().isEmpty()) { @@ -72,8 +76,8 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement checkList.add(toAdd); if (StackUtil.canAddAll(this.inv, checkList, false)) { StackUtil.addAll(this.inv, checkList, false); - ((ServerWorld) this.level).sendParticles(ParticleTypes.CLOUD, item.getX(), item.getY() + 0.45F, item.getZ(), 5, 0, 0, 0, 0.03D); - item.remove(); + ((ServerLevel) this.level).sendParticles(ParticleTypes.CLOUD, item.getX(), item.getY() + 0.45F, item.getZ(), 5, 0, 0, 0, 0.03D); + item.discard(); } } } @@ -81,16 +85,22 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement } } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - if (!this.isRedstonePowered && !this.isPulseMode) { - this.activateOnPulse(); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityRangedCollector tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityRangedCollector tile) { + tile.serverTick(); + + if (!tile.isRedstonePowered && !tile.isPulseMode) { + tile.activateOnPulse(); } - if (this.filter.needsUpdateSend() && this.sendUpdateWithInterval()) { - this.filter.updateLasts(); + if (tile.filter.needsUpdateSend() && tile.sendUpdateWithInterval()) { + tile.filter.updateLasts(); } } } @@ -101,18 +111,18 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement } @Override - public void onButtonPressed(int buttonID, PlayerEntity player) { + public void onButtonPressed(int buttonID, Player player) { //this.filter.onButtonPressed(buttonID); } //TODO @Override - public ITextComponent getDisplayName() { - return StringTextComponent.EMPTY; + public Component getDisplayName() { + return TextComponent.EMPTY; } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity player) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player player) { return new ContainerRangedCollector(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityShockSuppressor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityShockSuppressor.java index a8ab3239b..274a037a5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityShockSuppressor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityShockSuppressor.java @@ -11,8 +11,12 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; @@ -30,8 +34,8 @@ public class TileEntityShockSuppressor extends TileEntityBase implements IEnergy public final LazyOptional lazyEnergy = LazyOptional.of(() -> this.storage); private int oldEnergy; - public TileEntityShockSuppressor() { - super(ActuallyBlocks.SHOCK_SUPPRESSOR.getTileEntityType()); + public TileEntityShockSuppressor(BlockPos pos, BlockState state) { + super(ActuallyBlocks.SHOCK_SUPPRESSOR.getTileEntityType(), pos, state); } @Override @@ -52,30 +56,34 @@ public class TileEntityShockSuppressor extends TileEntityBase implements IEnergy } } + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityShockSuppressor tile) { + tile.clientTick(); + } + } - @Override - public void updateEntity() { - super.updateEntity(); + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityShockSuppressor tile) { + tile.serverTick(); - if (!this.level.isClientSide) { - if (!this.isRemoved() && !SUPPRESSORS.contains(this)) { - SUPPRESSORS.add(this); + if (!tile.isRemoved() && !SUPPRESSORS.contains(tile)) { + SUPPRESSORS.add(tile); } - if (this.oldEnergy != this.storage.getEnergyStored() && this.sendUpdateWithInterval()) { - this.oldEnergy = this.storage.getEnergyStored(); + if (tile.oldEnergy != tile.storage.getEnergyStored() && tile.sendUpdateWithInterval()) { + tile.oldEnergy = tile.storage.getEnergyStored(); } } } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); this.storage.writeToNBT(compound); } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.storage.readFromNBT(compound); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityVerticalDigger.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityVerticalDigger.java index 29e1678a7..ec4c3f0d2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityVerticalDigger.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityVerticalDigger.java @@ -19,22 +19,26 @@ import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.Direction; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Tiers; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.Vec3; +import net.minecraftforge.common.TierSortingRegistry; import net.minecraftforge.common.util.FakePlayerFactory; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; @@ -43,7 +47,7 @@ import net.minecraftforge.fluids.IFluidBlock; import javax.annotation.Nullable; import java.util.List; -public class TileEntityVerticalDigger extends TileEntityInventoryBase implements IButtonReactor, IEnergyDisplay, INamedContainerProvider { +public class TileEntityVerticalDigger extends TileEntityInventoryBase implements IButtonReactor, IEnergyDisplay, MenuProvider { public static final int ENERGY_USE_PER_BLOCK = 650; public static final int DEFAULT_RANGE = 2; @@ -58,12 +62,12 @@ public class TileEntityVerticalDigger extends TileEntityInventoryBase implements private int oldCheckY; private int oldCheckZ; - public TileEntityVerticalDigger() { - super(ActuallyBlocks.VERTICAL_DIGGER.getTileEntityType(), 9); + public TileEntityVerticalDigger(BlockPos pos, BlockState state) { + super(ActuallyBlocks.VERTICAL_DIGGER.getTileEntityType(), pos, state, 9); } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); this.storage.writeToNBT(compound); if (type != NBTType.SAVE_BLOCK) { @@ -77,7 +81,7 @@ public class TileEntityVerticalDigger extends TileEntityInventoryBase implements } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.storage.readFromNBT(compound); if (type != NBTType.SAVE_BLOCK) { @@ -88,29 +92,34 @@ public class TileEntityVerticalDigger extends TileEntityInventoryBase implements this.onlyMineOres = compound.getBoolean("OnlyOres"); } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityVerticalDigger tile) { + tile.clientTick(); + } + } - if (!this.isRedstonePowered && this.ticksElapsed % 5 == 0) { - if (this.checkY != 0) { - int range = TileEntityPhantomface.upgradeRange(DEFAULT_RANGE, this.level, this.worldPosition); - if (this.checkY < 0) { - this.checkY = this.worldPosition.getY() - 1; - this.checkX = -range; - this.checkZ = -range; + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityVerticalDigger tile) { + tile.serverTick(); + + if (!tile.isRedstonePowered && tile.ticksElapsed % 5 == 0) { + if (tile.checkY != 0) { + int range = TileEntityPhantomface.upgradeRange(DEFAULT_RANGE, level, pos); + if (tile.checkY < 0) { + tile.checkY = tile.worldPosition.getY() - 1; + tile.checkX = -range; + tile.checkZ = -range; } - if (this.checkY > 0) { - if (this.mine()) { - this.checkX++; - if (this.checkX > range) { - this.checkX = -range; - this.checkZ++; - if (this.checkZ > range) { - this.checkZ = -range; - this.checkY--; + if (tile.checkY > 0) { + if (tile.mine()) { + tile.checkX++; + if (tile.checkX > range) { + tile.checkX = -range; + tile.checkZ++; + if (tile.checkZ > range) { + tile.checkZ = -range; + tile.checkY--; } } } @@ -118,11 +127,11 @@ public class TileEntityVerticalDigger extends TileEntityInventoryBase implements } } - if ((this.oldEnergy != this.storage.getEnergyStored() || this.oldCheckX != this.checkX || this.oldCheckY != this.checkY || this.oldCheckZ != this.checkZ) && this.sendUpdateWithInterval()) { - this.oldEnergy = this.storage.getEnergyStored(); - this.oldCheckX = this.checkX; - this.oldCheckY = this.checkY; - this.oldCheckZ = this.checkZ; + if ((tile.oldEnergy != tile.storage.getEnergyStored() || tile.oldCheckX != tile.checkX || tile.oldCheckY != tile.checkY || tile.oldCheckZ != tile.checkZ) && tile.sendUpdateWithInterval()) { + tile.oldEnergy = tile.storage.getEnergyStored(); + tile.oldCheckX = tile.checkX; + tile.oldCheckY = tile.checkY; + tile.oldCheckZ = tile.checkZ; } } } @@ -136,15 +145,16 @@ public class TileEntityVerticalDigger extends TileEntityInventoryBase implements BlockState state = this.level.getBlockState(pos); Block block = state.getBlock(); - ItemStack stack = block.getPickBlock(state, new BlockRayTraceResult(new Vector3d(0, 0, 0), Direction.DOWN, pos, false), this.level, pos, FakePlayerFactory.getMinecraft((ServerWorld) this.level)); - if (!block.isAir(this.level.getBlockState(pos), this.level, pos)) { - if (block.getHarvestLevel(this.level.getBlockState(pos)) <= DrillItem.HARVEST_LEVEL && state.getDestroySpeed(this.level, pos) >= 0F && !(block instanceof IFluidBlock) && this.isMinable(block, stack)) { - List drops = Block.getDrops(state, (ServerWorld) this.level, pos, this.level.getBlockEntity(pos)); + ItemStack stack = block.getCloneItemStack(state, new BlockHitResult(new Vec3(0, 0, 0), Direction.DOWN, pos, false), this.level, pos, FakePlayerFactory.getMinecraft((ServerLevel) this.level)); + if (!state.isAir()) { + //block.getHarvestLevel(state) <= DrillItem.HARVEST_LEVEL + if (TierSortingRegistry.isCorrectTierForDrops(Tiers.NETHERITE, state) && state.getDestroySpeed(this.level, pos) >= 0F && !(block instanceof IFluidBlock) && this.isMinable(block, stack)) { + List drops = Block.getDrops(state, (ServerLevel) this.level, pos, this.level.getBlockEntity(pos)); float chance = WorldUtil.fireFakeHarvestEventsForDropChance(this, drops, this.level, pos); if (chance > 0 && this.level.random.nextFloat() <= chance) { if (StackUtil.canAddAll(this.inv, drops, false)) { - this.level.levelEvent(2001, pos, Block.getId(this.level.getBlockState(pos))); + this.level.levelEvent(2001, pos, Block.getId(state)); this.level.setBlockAndUpdate(pos, Blocks.AIR.defaultBlockState()); StackUtil.addAll(this.inv, drops, false); @@ -218,7 +228,7 @@ public class TileEntityVerticalDigger extends TileEntityInventoryBase implements } @Override - public void onButtonPressed(int buttonID, PlayerEntity player) { + public void onButtonPressed(int buttonID, Player player) { if (buttonID == 0) { this.onlyMineOres = !this.onlyMineOres; this.sendUpdate(); @@ -245,13 +255,13 @@ public class TileEntityVerticalDigger extends TileEntityInventoryBase implements } @Override - public ITextComponent getDisplayName() { - return StringTextComponent.EMPTY; + public Component getDisplayName() { + return TextComponent.EMPTY; } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity player) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player player) { return new ContainerMiner(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java index 6db2c283d..2912c3a52 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java @@ -18,24 +18,26 @@ import de.ellpeck.actuallyadditions.mod.items.ItemSolidifiedExperience; import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.entity.item.ExperienceOrbEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.PlayerInventory; -import net.minecraft.inventory.container.Container; -import net.minecraft.inventory.container.INamedContainerProvider; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.util.math.AxisAlignedBB; -import net.minecraft.util.math.MathHelper; -import net.minecraft.util.text.ITextComponent; -import net.minecraft.util.text.StringTextComponent; +import net.minecraft.core.BlockPos; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.network.chat.Component; +import net.minecraft.network.chat.TextComponent; +import net.minecraft.util.Mth; +import net.minecraft.world.MenuProvider; +import net.minecraft.world.entity.ExperienceOrb; +import net.minecraft.world.entity.player.Inventory; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.inventory.AbstractContainerMenu; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.phys.AABB; import javax.annotation.Nullable; import java.util.List; -import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase.NBTType; - -public class TileEntityXPSolidifier extends TileEntityInventoryBase implements IButtonReactor, INamedContainerProvider { +public class TileEntityXPSolidifier extends TileEntityInventoryBase implements IButtonReactor, MenuProvider { private static final int[] XP_MAP = new int[256]; @@ -50,8 +52,8 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I private int lastAmount; private int singlePointAmount; - public TileEntityXPSolidifier() { - super(ActuallyBlocks.XP_SOLIDIFIER.getTileEntityType(), 2); + public TileEntityXPSolidifier(BlockPos pos, BlockState state) { + super(ActuallyBlocks.XP_SOLIDIFIER.getTileEntityType(), pos, state, 2); } /* @@ -101,11 +103,11 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I return i - 1; } - public static int getPlayerXP(PlayerEntity player) { + public static int getPlayerXP(Player player) { return (int) (getExperienceForLevel(player.experienceLevel) + player.experienceProgress * player.getXpNeededForNextLevel()); } - public static void addPlayerXP(PlayerEntity player, int amount) { + public static void addPlayerXP(Player player, int amount) { int experience = Math.max(0, getPlayerXP(player) + amount); player.totalExperience = experience; player.experienceLevel = getLevelForExperience(experience); @@ -114,75 +116,81 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I } @Override - public void writeSyncableNBT(CompoundNBT compound, NBTType type) { + public void writeSyncableNBT(CompoundTag compound, NBTType type) { super.writeSyncableNBT(compound, type); compound.putInt("Amount", this.amount); compound.putInt("SinglePointAmount", this.singlePointAmount); } @Override - public void readSyncableNBT(CompoundNBT compound, NBTType type) { + public void readSyncableNBT(CompoundTag compound, NBTType type) { super.readSyncableNBT(compound, type); this.amount = compound.getInt("Amount"); this.singlePointAmount = compound.getInt("SinglePointAmount"); } - @Override - public void updateEntity() { - super.updateEntity(); - if (!this.level.isClientSide) { - if (this.amount > 0) { - ItemStack stack = this.inv.getStackInSlot(0); + public static void clientTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityXPSolidifier tile) { + tile.clientTick(); + } + } + + public static void serverTick(Level level, BlockPos pos, BlockState state, T t) { + if (t instanceof TileEntityXPSolidifier tile) { + tile.serverTick(); + + if (tile.amount > 0) { + ItemStack stack = tile.inv.getStackInSlot(0); if (stack.isEmpty()) { - int toSet = Math.min(this.amount, 64); - this.inv.setStackInSlot(0, new ItemStack(ActuallyItems.SOLIDIFIED_EXPERIENCE.get(), toSet)); - this.amount -= toSet; - this.setChanged(); + int toSet = Math.min(tile.amount, 64); + tile.inv.setStackInSlot(0, new ItemStack(ActuallyItems.SOLIDIFIED_EXPERIENCE.get(), toSet)); + tile.amount -= toSet; + tile.setChanged(); } else if (stack.getCount() < 64) { int needed = 64 - stack.getCount(); - int toAdd = Math.min(needed, this.amount); + int toAdd = Math.min(needed, tile.amount); stack.grow(toAdd); - this.amount -= toAdd; - this.setChanged(); + tile.amount -= toAdd; + tile.setChanged(); } } - if (!this.isRedstonePowered) { + if (!tile.isRedstonePowered) { int range = 5; - List orbs = this.level.getEntitiesOfClass(ExperienceOrbEntity.class, new AxisAlignedBB(this.worldPosition.getX() - range, this.worldPosition.getY() - range, this.worldPosition.getZ() - range, this.worldPosition.getX() + 1 + range, this.worldPosition.getY() + 1 + range, this.worldPosition.getZ() + 1 + range)); + List orbs = level.getEntitiesOfClass(ExperienceOrb.class, new AABB(pos.getX() - range, pos.getY() - range, pos.getZ() - range, pos.getX() + 1 + range, pos.getY() + 1 + range, pos.getZ() + 1 + range)); if (orbs != null && !orbs.isEmpty()) { - for (ExperienceOrbEntity orb : orbs) { + for (ExperienceOrb orb : orbs) { // TODO: [port] validate the getPersistentData is correct if (orb != null && orb.isAlive() && !orb.getPersistentData().getBoolean(ActuallyAdditions.MODID + "FromSolidified")) { - this.singlePointAmount += orb.getValue(); - orb.remove(); + tile.singlePointAmount += orb.getValue(); + orb.discard(); - if (this.singlePointAmount >= ItemSolidifiedExperience.SOLID_XP_AMOUNT) { - this.amount += this.singlePointAmount / ItemSolidifiedExperience.SOLID_XP_AMOUNT; - this.singlePointAmount = 0; - this.setChanged(); + if (tile.singlePointAmount >= ItemSolidifiedExperience.SOLID_XP_AMOUNT) { + tile.amount += tile.singlePointAmount / ItemSolidifiedExperience.SOLID_XP_AMOUNT; + tile.singlePointAmount = 0; + tile.setChanged(); } } } } } - ItemStack stack = this.inv.getStackInSlot(1); + ItemStack stack = tile.inv.getStackInSlot(1); if (StackUtil.isValid(stack) && stack.getItem() instanceof ItemSolidifiedExperience) { - int remainingSpace = MathHelper.clamp(Integer.MAX_VALUE - this.amount, 0, stack.getCount()); + int remainingSpace = Mth.clamp(Integer.MAX_VALUE - tile.amount, 0, stack.getCount()); if (stack.getCount() >= remainingSpace && remainingSpace != 0) { - this.amount += remainingSpace; + tile.amount += remainingSpace; stack.shrink(remainingSpace); - this.setChanged(); + tile.setChanged(); } } - if (this.lastAmount != this.amount && this.sendUpdateWithInterval()) { - this.lastAmount = this.amount; + if (tile.lastAmount != tile.amount && tile.sendUpdateWithInterval()) { + tile.lastAmount = tile.amount; } } } - + @Override public IAcceptor getAcceptor() { return (slot, stack, automation) -> slot == 1 && stack.getItem() == ActuallyItems.SOLIDIFIED_EXPERIENCE.get(); @@ -197,7 +205,7 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I } @Override - public void onButtonPressed(int buttonID, PlayerEntity player) { + public void onButtonPressed(int buttonID, Player player) { if (buttonID < this.buttonAmounts.length) { int playerXP = getPlayerXP(player); if (playerXP > 0) { @@ -215,13 +223,13 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I } @Override - public ITextComponent getDisplayName() { - return StringTextComponent.EMPTY; + public Component getDisplayName() { + return TextComponent.EMPTY; } @Nullable @Override - public Container createMenu(int windowId, PlayerInventory playerInventory, PlayerEntity player) { + public AbstractContainerMenu createMenu(int windowId, Inventory playerInventory, Player player) { return new ContainerXPSolidifier(windowId, playerInventory, this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateChecker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateChecker.java index 9c3f929ba..11887e870 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateChecker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/update/UpdateChecker.java @@ -11,11 +11,10 @@ package de.ellpeck.actuallyadditions.mod.update; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; -import net.minecraft.client.resources.I18n; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.network.chat.Component; +import net.minecraft.world.entity.player.Player; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.MinecraftForge; @@ -44,13 +43,13 @@ public class UpdateChecker { @SubscribeEvent(receiveCanceled = true) public void onTick(TickEvent.ClientTickEvent event) { if (Minecraft.getInstance().player != null) { - PlayerEntity player = Minecraft.getInstance().player; + Player player = Minecraft.getInstance().player; if (UpdateChecker.checkFailed) { - player.displayClientMessage(ITextComponent.Serializer.fromJson(I18n.get("info." + ActuallyAdditions.MODID + ".update.failed")), false); + player.displayClientMessage(Component.Serializer.fromJson(I18n.get("info." + ActuallyAdditions.MODID + ".update.failed")), false); } else if (UpdateChecker.needsUpdateNotify) { - player.displayClientMessage(ITextComponent.Serializer.fromJson(I18n.get("info." + ActuallyAdditions.MODID + ".update.generic")), false); - player.displayClientMessage(ITextComponent.Serializer.fromJson(I18n.get("info." + ActuallyAdditions.MODID + ".update.versionCompare", ActuallyAdditions.VERSION, UpdateChecker.updateVersionString)), false); - player.displayClientMessage(ITextComponent.Serializer.fromJson(I18n.get("info." + ActuallyAdditions.MODID + ".update.buttons", UpdateChecker.CHANGELOG_LINK, UpdateChecker.DOWNLOAD_LINK)), false); + player.displayClientMessage(Component.Serializer.fromJson(I18n.get("info." + ActuallyAdditions.MODID + ".update.generic")), false); + player.displayClientMessage(Component.Serializer.fromJson(I18n.get("info." + ActuallyAdditions.MODID + ".update.versionCompare", ActuallyAdditions.VERSION, UpdateChecker.updateVersionString)), false); + player.displayClientMessage(Component.Serializer.fromJson(I18n.get("info." + ActuallyAdditions.MODID + ".update.buttons", UpdateChecker.CHANGELOG_LINK, UpdateChecker.DOWNLOAD_LINK)), false); } if (threadFinished) { MinecraftForge.EVENT_BUS.unregister(this); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index 066c2a948..2e47e0f10 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -10,10 +10,14 @@ package de.ellpeck.actuallyadditions.mod.util; -import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.IVertexBuilder; +import com.mojang.blaze3d.vertex.BufferBuilder; +import com.mojang.blaze3d.vertex.PoseStack; +import com.mojang.blaze3d.vertex.Tesselator; +import com.mojang.blaze3d.vertex.VertexConsumer; +import com.mojang.math.Matrix4f; +import com.mojang.math.Vector3f; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.render.RenderTypes; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; @@ -21,27 +25,27 @@ import de.ellpeck.actuallyadditions.mod.network.PacketServerToClient; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.renderer.*; -import net.minecraft.client.renderer.model.IBakedModel; -import net.minecraft.client.renderer.model.ItemCameraTransforms; -import net.minecraft.client.renderer.texture.AtlasTexture; +import net.minecraft.client.gui.Font; +import net.minecraft.client.renderer.LightTexture; +import net.minecraft.client.renderer.MultiBufferSource; +import net.minecraft.client.renderer.block.model.ItemTransforms; +import net.minecraft.client.renderer.entity.ItemRenderer; +import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.client.resources.I18n; -import net.minecraft.item.ItemStack; -import net.minecraft.nbt.CompoundNBT; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.NonNullList; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.vector.Matrix4f; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.util.math.vector.Vector3f; -import net.minecraft.world.World; +import net.minecraft.client.resources.language.I18n; +import net.minecraft.client.resources.model.BakedModel; +import net.minecraft.core.BlockPos; +import net.minecraft.core.NonNullList; +import net.minecraft.nbt.CompoundTag; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.phys.Vec3; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.client.ForgeHooksClient; -import net.minecraftforge.fml.network.PacketDistributor; +import net.minecraftforge.network.PacketDistributor; public final class AssetUtil { @@ -59,12 +63,12 @@ public final class AssetUtil { } @OnlyIn(Dist.CLIENT) - public static void displayNameString(MatrixStack matrices, FontRenderer font, int xSize, int yPositionOfMachineText, String text) { + public static void displayNameString(PoseStack matrices, Font font, int xSize, int yPositionOfMachineText, String text) { font.draw(matrices, text, xSize / 2f - font.width(text) / 2f, yPositionOfMachineText, 0xFFFFFF); } @OnlyIn(Dist.CLIENT) - public static void displayNameString(MatrixStack matrices, FontRenderer font, int xSize, int yPositionOfMachineText, TileEntityBase tile) { + public static void displayNameString(PoseStack matrices, Font font, int xSize, int yPositionOfMachineText, TileEntityBase tile) { displayNameString(matrices, font, xSize, yPositionOfMachineText, I18n.get(tile.getNameForTranslation())); } @@ -73,10 +77,10 @@ public final class AssetUtil { // } @OnlyIn(Dist.CLIENT) - public static void renderItemInWorld(ItemStack stack, int combinedLight, int combinedOverlay, MatrixStack matrices, IRenderTypeBuffer buffer) { + public static void renderItemInWorld(ItemStack stack, int combinedLight, int combinedOverlay, PoseStack matrices, MultiBufferSource buffer) { if (!stack.isEmpty()) { Minecraft.getInstance().getItemRenderer().renderStatic( - stack, ItemCameraTransforms.TransformType.FIXED, combinedLight, combinedOverlay, matrices, buffer + stack, ItemTransforms.TransformType.FIXED, combinedLight, combinedOverlay, matrices, buffer, 0 ); } } @@ -96,28 +100,30 @@ public final class AssetUtil { // } @OnlyIn(Dist.CLIENT) - public static void renderItemWithoutScrewingWithColors(ItemStack stack, MatrixStack matrices, int combinedOverlay, int combinedLight) { + public static void renderItemWithoutScrewingWithColors(ItemStack stack, PoseStack matrices, int combinedOverlay, int combinedLight) { if (StackUtil.isValid(stack)) { Minecraft mc = Minecraft.getInstance(); ItemRenderer renderer = mc.getItemRenderer(); TextureManager manager = mc.getTextureManager(); - IRenderTypeBuffer.Impl irendertypebuffer$impl = mc.renderBuffers().bufferSource(); + MultiBufferSource.BufferSource bufferSource = mc.renderBuffers().bufferSource(); - IBakedModel model = renderer.getModel(stack, null, null); - manager.bind(AtlasTexture.LOCATION_BLOCKS); - manager.getTexture(AtlasTexture.LOCATION_BLOCKS).setBlurMipmap(false, false); - RenderSystem.enableRescaleNormal(); + BakedModel model = renderer.getModel(stack, null, null, 0); + manager.bindForSetup(TextureAtlas.LOCATION_BLOCKS); //bind + manager.getTexture(TextureAtlas.LOCATION_BLOCKS).setBlurMipmap(false, false); +// RenderSystem.enableRescaleNormal(); RenderSystem.enableBlend(); - RenderSystem.pushMatrix(); - model = ForgeHooksClient.handleCameraTransforms(matrices, model, ItemCameraTransforms.TransformType.FIXED, false); - renderer.render(stack, ItemCameraTransforms.TransformType.FIXED, false, matrices, irendertypebuffer$impl, +// RenderSystem.pushMatrix(); + matrices.pushPose(); + model = ForgeHooksClient.handleCameraTransforms(matrices, model, ItemTransforms.TransformType.FIXED, false); + renderer.render(stack, ItemTransforms.TransformType.FIXED, false, matrices, bufferSource, combinedOverlay, combinedLight, model); - RenderSystem.popMatrix(); - RenderSystem.disableRescaleNormal(); +// RenderSystem.popMatrix(); + matrices.popPose(); +// RenderSystem.disableRescaleNormal(); RenderSystem.disableBlend(); - manager.bind(AtlasTexture.LOCATION_BLOCKS); - manager.getTexture(AtlasTexture.LOCATION_BLOCKS).restoreLastBlurMipmap(); - irendertypebuffer$impl.endBatch(); + manager.bindForSetup(TextureAtlas.LOCATION_BLOCKS); //bind + manager.getTexture(TextureAtlas.LOCATION_BLOCKS).restoreLastBlurMipmap(); + bufferSource.endBatch(); } } @@ -211,9 +217,9 @@ public final class AssetUtil { // GlStateManager._popMatrix(); // } - public static void spawnLaserWithTimeServer(World world, double startX, double startY, double startZ, double endX, double endY, double endZ, int color, int maxAge, double rotationTime, float size, float alpha) { + public static void spawnLaserWithTimeServer(Level world, double startX, double startY, double startZ, double endX, double endY, double endZ, int color, int maxAge, double rotationTime, float size, float alpha) { if (!world.isClientSide) { - CompoundNBT data = new CompoundNBT(); + CompoundTag data = new CompoundTag(); data.putDouble("StartX", startX); data.putDouble("StartY", startY); data.putDouble("StartZ", startZ); @@ -232,7 +238,7 @@ public final class AssetUtil { @OnlyIn(Dist.CLIENT) public static void spawnLaserWithTimeClient(double startX, double startY, double startZ, double endX, double endY, double endZ, int color, int maxAge, double rotationTime, float size, float alpha) { Minecraft mc = Minecraft.getInstance(); - TileEntity tile = mc.level.getBlockEntity(new BlockPos(startX, startY, startZ)); + BlockEntity tile = mc.level.getBlockEntity(new BlockPos(startX, startY, startZ)); if(tile instanceof TileEntityAtomicReconstructor) ((TileEntityAtomicReconstructor) tile).resetBeam(maxAge, color); @@ -249,8 +255,8 @@ public final class AssetUtil { }*/ @OnlyIn(Dist.CLIENT) - public static void renderLaser(MatrixStack matrixStack, IRenderTypeBuffer buffer, float offX, float offY, float offZ, float yaw, float pitch, float length, float rotationTime, int color, float alpha, float beamWidth) { - World world = Minecraft.getInstance().level; + public static void renderLaser(PoseStack matrixStack, MultiBufferSource buffer, float offX, float offY, float offZ, float yaw, float pitch, float length, float rotationTime, int color, float alpha, float beamWidth) { + Level world = Minecraft.getInstance().level; int r = (color >> 16) & 0xFF; int g = (color >> 8) & 0xFF; int b = color & 0xFF; @@ -260,7 +266,7 @@ public final class AssetUtil { float roll = rotationTime > 0.0f ? 360.0f * (world.getGameTime() % rotationTime / rotationTime) : 0.0f; - IVertexBuilder builder = buffer.getBuffer(RenderTypes.LASER); + VertexConsumer builder = buffer.getBuffer(RenderTypes.LASER); matrixStack.pushPose(); matrixStack.translate(0.5f, 0.5f, 0.5f); matrixStack.translate(offX, offY, offZ); @@ -300,8 +306,8 @@ public final class AssetUtil { matrixStack.popPose(); } - public static void renderLaser(MatrixStack matrixStack, IRenderTypeBuffer buffer, Vector3d startOffset, Vector3d endOffset, float rotationTime, int color, float alpha, float beamWidth) { - Vector3d combined = endOffset.subtract(startOffset); + public static void renderLaser(PoseStack matrixStack, MultiBufferSource buffer, Vec3 startOffset, Vec3 endOffset, float rotationTime, int color, float alpha, float beamWidth) { + Vec3 combined = endOffset.subtract(startOffset); double pitch = Math.toDegrees(Math.atan2(combined.y, Math.sqrt(combined.x * combined.x + combined.z * combined.z))); double yaw = Math.toDegrees(Math.atan2(-combined.z, combined.x)); @@ -314,17 +320,17 @@ public final class AssetUtil { //I can't do rendering code. Ever. @OnlyIn(Dist.CLIENT) public static void renderLaser(double firstX, double firstY, double firstZ, double secondX, double secondY, double secondZ, double rotationTime, float alpha, double beamWidth, float[] color) { - Tessellator tessy = Tessellator.getInstance(); + Tesselator tessy = Tesselator.getInstance(); BufferBuilder render = tessy.getBuilder(); - World world = Minecraft.getInstance().level; + Level world = Minecraft.getInstance().level; float r = color[0]; float g = color[1]; float b = color[2]; - Vector3d vec1 = new Vector3d(firstX, firstY, firstZ); - Vector3d vec2 = new Vector3d(secondX, secondY, secondZ); - Vector3d combinedVec = vec2.subtract(vec1); + Vec3 vec1 = new Vec3(firstX, firstY, firstZ); + Vec3 vec2 = new Vec3(secondX, secondY, secondZ); + Vec3 combinedVec = vec2.subtract(vec1); double rot = rotationTime > 0 ? 360D * (world.getGameTime() % rotationTime / rotationTime) @@ -334,7 +340,7 @@ public final class AssetUtil { double length = combinedVec.length(); - GlStateManager._pushMatrix(); +// GlStateManager._pushMatrix(); /* GlStateManager._disableLighting(); GlStateManager._enableBlend(); @@ -425,19 +431,19 @@ public final class AssetUtil { //GlStateManager._alphaFunc(func, ref); //GlStateManager._blendFunc(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA); GlStateManager._disableBlend(); - GlStateManager._enableLighting(); - GlStateManager._popMatrix(); +// GlStateManager._enableLighting(); +// GlStateManager._popMatrix(); } @OnlyIn(Dist.CLIENT) - public static void renderTextInWorld(MatrixStack matrixStack, double offsetX, double offsetY, double offsetZ, NonNullList text, int color) { + public static void renderTextInWorld(PoseStack matrixStack, double offsetX, double offsetY, double offsetZ, NonNullList text, int color) { matrixStack.pushPose(); matrixStack.translate(offsetX,offsetY,offsetZ); matrixStack.scale(-1, -1, 1); - matrixStack.mulPose(Vector3f.YP.rotationDegrees(Minecraft.getInstance().cameraEntity.yRot)); + matrixStack.mulPose(Vector3f.YP.rotationDegrees(Minecraft.getInstance().cameraEntity.getYRot())); matrixStack.scale(0.01F, 0.01F, 0.01F); - FontRenderer font = Minecraft.getInstance().font; + Font font = Minecraft.getInstance().font; int y = 0; for (String s : text) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemStackHandlerAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemStackHandlerAA.java index 4d747a86f..2c194298c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemStackHandlerAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemStackHandlerAA.java @@ -10,8 +10,8 @@ package de.ellpeck.actuallyadditions.mod.util; -import net.minecraft.item.ItemStack; -import net.minecraft.util.NonNullList; +import net.minecraft.core.NonNullList; +import net.minecraft.world.item.ItemStack; import net.minecraftforge.items.ItemStackHandler; /** diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemUtil.java index 48c272e9c..7779515b2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemUtil.java @@ -10,13 +10,13 @@ package de.ellpeck.actuallyadditions.mod.util; -import net.minecraft.enchantment.Enchantment; -import net.minecraft.enchantment.EnchantmentHelper; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.util.Hand; -import net.minecraft.util.ResourceLocation; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.Item; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.enchantment.Enchantment; +import net.minecraft.world.item.enchantment.EnchantmentHelper; import net.minecraftforge.registries.ForgeRegistries; import java.util.Map; @@ -82,7 +82,7 @@ public final class ItemUtil { return stack.getOrCreateTag().getBoolean("IsEnabled"); } - public static void changeEnabled(PlayerEntity player, Hand hand) { + public static void changeEnabled(Player player, InteractionHand hand) { changeEnabled(player.getItemInHand(hand)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/Lang.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/Lang.java index 8be58c350..ffb261931 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/Lang.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/Lang.java @@ -1,9 +1,6 @@ package de.ellpeck.actuallyadditions.mod.util; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.util.text.TranslationTextComponent; import net.minecraftforge.energy.IEnergyStorage; -import net.minecraftforge.fml.ForgeI18n; import java.text.NumberFormat; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/NetHandlerSpaghettiServer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/NetHandlerSpaghettiServer.java index a1085bd76..a0ed8500c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/NetHandlerSpaghettiServer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/NetHandlerSpaghettiServer.java @@ -2,106 +2,149 @@ package de.ellpeck.actuallyadditions.mod.util; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.GenericFutureListener; -import net.minecraft.network.IPacket; -import net.minecraft.network.NetworkManager; -import net.minecraft.network.PacketDirection; -import net.minecraft.network.play.ServerPlayNetHandler; -import net.minecraft.network.play.client.*; -import net.minecraft.network.play.server.SPlayerPositionLookPacket; -import net.minecraft.util.text.ITextComponent; +import net.minecraft.network.Connection; +import net.minecraft.network.chat.Component; +import net.minecraft.network.protocol.Packet; +import net.minecraft.network.protocol.PacketFlow; +import net.minecraft.network.protocol.game.ClientboundPlayerPositionPacket; +import net.minecraft.network.protocol.game.ServerboundAcceptTeleportationPacket; +import net.minecraft.network.protocol.game.ServerboundBlockEntityTagQuery; +import net.minecraft.network.protocol.game.ServerboundChangeDifficultyPacket; +import net.minecraft.network.protocol.game.ServerboundChatPacket; +import net.minecraft.network.protocol.game.ServerboundClientCommandPacket; +import net.minecraft.network.protocol.game.ServerboundClientInformationPacket; +import net.minecraft.network.protocol.game.ServerboundCommandSuggestionPacket; +import net.minecraft.network.protocol.game.ServerboundContainerButtonClickPacket; +import net.minecraft.network.protocol.game.ServerboundContainerClickPacket; +import net.minecraft.network.protocol.game.ServerboundContainerClosePacket; +import net.minecraft.network.protocol.game.ServerboundCustomPayloadPacket; +import net.minecraft.network.protocol.game.ServerboundEditBookPacket; +import net.minecraft.network.protocol.game.ServerboundEntityTagQuery; +import net.minecraft.network.protocol.game.ServerboundInteractPacket; +import net.minecraft.network.protocol.game.ServerboundJigsawGeneratePacket; +import net.minecraft.network.protocol.game.ServerboundKeepAlivePacket; +import net.minecraft.network.protocol.game.ServerboundLockDifficultyPacket; +import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket; +import net.minecraft.network.protocol.game.ServerboundMoveVehiclePacket; +import net.minecraft.network.protocol.game.ServerboundPaddleBoatPacket; +import net.minecraft.network.protocol.game.ServerboundPickItemPacket; +import net.minecraft.network.protocol.game.ServerboundPlaceRecipePacket; +import net.minecraft.network.protocol.game.ServerboundPlayerAbilitiesPacket; +import net.minecraft.network.protocol.game.ServerboundPlayerActionPacket; +import net.minecraft.network.protocol.game.ServerboundPlayerCommandPacket; +import net.minecraft.network.protocol.game.ServerboundPlayerInputPacket; +import net.minecraft.network.protocol.game.ServerboundRecipeBookChangeSettingsPacket; +import net.minecraft.network.protocol.game.ServerboundRecipeBookSeenRecipePacket; +import net.minecraft.network.protocol.game.ServerboundRenameItemPacket; +import net.minecraft.network.protocol.game.ServerboundResourcePackPacket; +import net.minecraft.network.protocol.game.ServerboundSeenAdvancementsPacket; +import net.minecraft.network.protocol.game.ServerboundSelectTradePacket; +import net.minecraft.network.protocol.game.ServerboundSetBeaconPacket; +import net.minecraft.network.protocol.game.ServerboundSetCarriedItemPacket; +import net.minecraft.network.protocol.game.ServerboundSetCommandBlockPacket; +import net.minecraft.network.protocol.game.ServerboundSetCommandMinecartPacket; +import net.minecraft.network.protocol.game.ServerboundSetCreativeModeSlotPacket; +import net.minecraft.network.protocol.game.ServerboundSetJigsawBlockPacket; +import net.minecraft.network.protocol.game.ServerboundSetStructureBlockPacket; +import net.minecraft.network.protocol.game.ServerboundSignUpdatePacket; +import net.minecraft.network.protocol.game.ServerboundSwingPacket; +import net.minecraft.network.protocol.game.ServerboundTeleportToEntityPacket; +import net.minecraft.network.protocol.game.ServerboundUseItemOnPacket; +import net.minecraft.network.protocol.game.ServerboundUseItemPacket; +import net.minecraft.server.network.ServerGamePacketListenerImpl; import net.minecraftforge.common.util.FakePlayer; import javax.annotation.Nullable; import java.util.Set; -public class NetHandlerSpaghettiServer extends ServerPlayNetHandler { +public class NetHandlerSpaghettiServer extends ServerGamePacketListenerImpl { public NetHandlerSpaghettiServer(FakePlayer player) { - super(null, new NetworkManager(PacketDirection.CLIENTBOUND), player); + super(null, new Connection(PacketFlow.CLIENTBOUND), player); } @Override - public void disconnect(ITextComponent textComponent) { + public void disconnect(Component textComponent) { } @Override - public void handlePlayerInput(CInputPacket p_147358_1_) { + public void handlePlayerInput(ServerboundPlayerInputPacket p_147358_1_) { } @Override - public void handleMoveVehicle(CMoveVehiclePacket p_184338_1_) { + public void handleMoveVehicle(ServerboundMoveVehiclePacket p_184338_1_) { } @Override - public void handleAcceptTeleportPacket(CConfirmTeleportPacket p_184339_1_) { + public void handleAcceptTeleportPacket(ServerboundAcceptTeleportationPacket p_184339_1_) { } @Override - public void handleRecipeBookSeenRecipePacket(CMarkRecipeSeenPacket p_191984_1_) { + public void handleRecipeBookSeenRecipePacket(ServerboundRecipeBookSeenRecipePacket p_191984_1_) { } @Override - public void handleRecipeBookChangeSettingsPacket(CUpdateRecipeBookStatusPacket p_241831_1_) { + public void handleRecipeBookChangeSettingsPacket(ServerboundRecipeBookChangeSettingsPacket p_241831_1_) { } @Override - public void handleSeenAdvancements(CSeenAdvancementsPacket p_194027_1_) { + public void handleSeenAdvancements(ServerboundSeenAdvancementsPacket p_194027_1_) { } @Override - public void handleCustomCommandSuggestions(CTabCompletePacket p_195518_1_) { + public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket p_195518_1_) { } @Override - public void handleSetCommandBlock(CUpdateCommandBlockPacket p_210153_1_) { + public void handleSetCommandBlock(ServerboundSetCommandBlockPacket p_210153_1_) { } @Override - public void handleSetCommandMinecart(CUpdateMinecartCommandBlockPacket p_210158_1_) { + public void handleSetCommandMinecart(ServerboundSetCommandMinecartPacket p_210158_1_) { } @Override - public void handlePickItem(CPickItemPacket p_210152_1_) { + public void handlePickItem(ServerboundPickItemPacket p_210152_1_) { } @Override - public void handleRenameItem(CRenameItemPacket p_210155_1_) { + public void handleRenameItem(ServerboundRenameItemPacket p_210155_1_) { } @Override - public void handleSetBeaconPacket(CUpdateBeaconPacket p_210154_1_) { + public void handleSetBeaconPacket(ServerboundSetBeaconPacket p_210154_1_) { } @Override - public void handleSetStructureBlock(CUpdateStructureBlockPacket p_210157_1_) { + public void handleSetStructureBlock(ServerboundSetStructureBlockPacket p_210157_1_) { } @Override - public void handleSetJigsawBlock(CUpdateJigsawBlockPacket p_217262_1_) { + public void handleSetJigsawBlock(ServerboundSetJigsawBlockPacket p_217262_1_) { } @Override - public void handleJigsawGenerate(CJigsawBlockGeneratePacket p_230549_1_) { + public void handleJigsawGenerate(ServerboundJigsawGeneratePacket p_230549_1_) { } @Override - public void handleSelectTrade(CSelectTradePacket p_210159_1_) { + public void handleSelectTrade(ServerboundSelectTradePacket p_210159_1_) { } @Override - public void handleEditBook(CEditBookPacket p_210156_1_) { + public void handleEditBook(ServerboundEditBookPacket p_210156_1_) { } @Override - public void handleEntityTagQuery(CQueryEntityNBTPacket p_211526_1_) { + public void handleEntityTagQuery(ServerboundEntityTagQuery p_211526_1_) { } @Override - public void handleBlockEntityTagQuery(CQueryTileEntityNBTPacket p_211525_1_) { + public void handleBlockEntityTagQuery(ServerboundBlockEntityTagQuery p_211525_1_) { } @Override - public void handleMovePlayer(CPlayerPacket p_147347_1_) { + public void handleMovePlayer(ServerboundMovePlayerPacket p_147347_1_) { } @Override @@ -109,118 +152,114 @@ public class NetHandlerSpaghettiServer extends ServerPlayNetHandler { } @Override - public void teleport(double p_175089_1_, double p_175089_3_, double p_175089_5_, float p_175089_7_, float p_175089_8_, Set p_175089_9_) { + public void teleport(double p_175089_1_, double p_175089_3_, double p_175089_5_, float p_175089_7_, float p_175089_8_, Set p_175089_9_) { } @Override - public void handlePlayerAction(CPlayerDiggingPacket p_147345_1_) { + public void handlePlayerAction(ServerboundPlayerActionPacket p_147345_1_) { } @Override - public void handleUseItemOn(CPlayerTryUseItemOnBlockPacket p_184337_1_) { + public void handleUseItemOn(ServerboundUseItemOnPacket p_184337_1_) { } @Override - public void handleUseItem(CPlayerTryUseItemPacket p_147346_1_) { + public void handleUseItem(ServerboundUseItemPacket p_147346_1_) { } @Override - public void handleTeleportToEntityPacket(CSpectatePacket p_175088_1_) { + public void handleTeleportToEntityPacket(ServerboundTeleportToEntityPacket p_175088_1_) { } @Override - public void handleResourcePackResponse(CResourcePackStatusPacket p_175086_1_) { + public void handleResourcePackResponse(ServerboundResourcePackPacket p_175086_1_) { } @Override - public void handlePaddleBoat(CSteerBoatPacket p_184340_1_) { + public void handlePaddleBoat(ServerboundPaddleBoatPacket p_184340_1_) { } @Override - public void onDisconnect(ITextComponent p_147231_1_) { + public void onDisconnect(Component p_147231_1_) { } @Override - public void send(IPacket p_147359_1_) { + public void send(Packet p_147359_1_) { } @Override - public void send(IPacket p_211148_1_, @Nullable GenericFutureListener> p_211148_2_) { + public void send(Packet p_211148_1_, @Nullable GenericFutureListener> p_211148_2_) { } @Override - public void handleSetCarriedItem(CHeldItemChangePacket p_147355_1_) { + public void handleSetCarriedItem(ServerboundSetCarriedItemPacket p_147355_1_) { } @Override - public void handleChat(CChatMessagePacket p_147354_1_) { + public void handleChat(ServerboundChatPacket p_147354_1_) { } @Override - public void handleAnimate(CAnimateHandPacket p_175087_1_) { + public void handleAnimate(ServerboundSwingPacket p_175087_1_) { } @Override - public void handlePlayerCommand(CEntityActionPacket p_147357_1_) { + public void handlePlayerCommand(ServerboundPlayerCommandPacket p_147357_1_) { } @Override - public void handleInteract(CUseEntityPacket p_147340_1_) { + public void handleInteract(ServerboundInteractPacket p_147340_1_) { } @Override - public void handleClientCommand(CClientStatusPacket p_147342_1_) { + public void handleClientCommand(ServerboundClientCommandPacket p_147342_1_) { } @Override - public void handleContainerClose(CCloseWindowPacket p_147356_1_) { + public void handleContainerClose(ServerboundContainerClosePacket p_147356_1_) { } @Override - public void handleContainerClick(CClickWindowPacket p_147351_1_) { + public void handleContainerClick(ServerboundContainerClickPacket p_147351_1_) { } @Override - public void handlePlaceRecipe(CPlaceRecipePacket p_194308_1_) { + public void handlePlaceRecipe(ServerboundPlaceRecipePacket p_194308_1_) { } @Override - public void handleContainerButtonClick(CEnchantItemPacket p_147338_1_) { + public void handleContainerButtonClick(ServerboundContainerButtonClickPacket p_147338_1_) { } @Override - public void handleSetCreativeModeSlot(CCreativeInventoryActionPacket p_147344_1_) { + public void handleSetCreativeModeSlot(ServerboundSetCreativeModeSlotPacket p_147344_1_) { } @Override - public void handleContainerAck(CConfirmTransactionPacket p_147339_1_) { + public void handleSignUpdate(ServerboundSignUpdatePacket p_147343_1_) { } @Override - public void handleSignUpdate(CUpdateSignPacket p_147343_1_) { + public void handleKeepAlive(ServerboundKeepAlivePacket p_147353_1_) { } @Override - public void handleKeepAlive(CKeepAlivePacket p_147353_1_) { + public void handlePlayerAbilities(ServerboundPlayerAbilitiesPacket p_147348_1_) { } @Override - public void handlePlayerAbilities(CPlayerAbilitiesPacket p_147348_1_) { + public void handleClientInformation(ServerboundClientInformationPacket p_147352_1_) { } @Override - public void handleClientInformation(CClientSettingsPacket p_147352_1_) { + public void handleCustomPayload(ServerboundCustomPayloadPacket p_147349_1_) { } @Override - public void handleCustomPayload(CCustomPayloadPacket p_147349_1_) { + public void handleChangeDifficulty(ServerboundChangeDifficultyPacket p_217263_1_) { } @Override - public void handleChangeDifficulty(CSetDifficultyPacket p_217263_1_) { - } - - @Override - public void handleLockDifficulty(CLockDifficultyPacket p_217261_1_) { + public void handleLockDifficulty(ServerboundLockDifficultyPacket p_217261_1_) { } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/ResourceReloader.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/ResourceReloader.java index 7545a7299..229edd1d7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/ResourceReloader.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/ResourceReloader.java @@ -3,23 +3,20 @@ package de.ellpeck.actuallyadditions.mod.util; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.mod.crafting.ActuallyRecipes; -import net.minecraft.item.crafting.IRecipeType; -import net.minecraft.item.crafting.RecipeManager; -import net.minecraft.resources.DataPackRegistries; -import net.minecraft.resources.IResourceManager; -import net.minecraft.resources.IResourceManagerReloadListener; - -import java.util.List; +import net.minecraft.server.ReloadableServerResources; +import net.minecraft.server.packs.resources.ResourceManager; +import net.minecraft.server.packs.resources.ResourceManagerReloadListener; +import net.minecraft.world.item.crafting.RecipeManager; @SuppressWarnings("deprecation") -public class ResourceReloader implements IResourceManagerReloadListener { - private final DataPackRegistries data; - public ResourceReloader(DataPackRegistries dataPackRegistries) { +public class ResourceReloader implements ResourceManagerReloadListener { + private final ReloadableServerResources data; + public ResourceReloader(ReloadableServerResources dataPackRegistries) { data = dataPackRegistries; } @Override - public void onResourceManagerReload(IResourceManager pResourceManager) { + public void onResourceManagerReload(ResourceManager pResourceManager) { RecipeManager recipeManager = data.getRecipeManager(); ActuallyAdditionsAPI.EMPOWERER_RECIPES.clear(); ActuallyAdditionsAPI.EMPOWERER_RECIPES.addAll(recipeManager.getAllRecipesFor(ActuallyRecipes.Types.EMPOWERING)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/StackUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/StackUtil.java index fca43a11d..8fbb0597a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/StackUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/StackUtil.java @@ -12,8 +12,8 @@ package de.ellpeck.actuallyadditions.mod.util; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.util.compat.SlotlessableItemHandlerWrapper; -import net.minecraft.item.ItemStack; -import net.minecraft.util.NonNullList; +import net.minecraft.core.NonNullList; +import net.minecraft.world.item.ItemStack; import net.minecraftforge.items.IItemHandler; import java.util.Collection; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java index a01efef0a..7c646177d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java @@ -10,9 +10,9 @@ package de.ellpeck.actuallyadditions.mod.util; -import com.mojang.blaze3d.matrix.MatrixStack; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.resources.I18n; +import com.mojang.blaze3d.vertex.PoseStack; +import net.minecraft.client.gui.Font; +import net.minecraft.client.resources.language.I18n; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -29,7 +29,7 @@ public final class StringUtil { // TODO: Move to official @OnlyIn(Dist.CLIENT) - public static void drawSplitString(FontRenderer renderer, String strg, int x, int y, int width, int color, boolean shadow) { + public static void drawSplitString(Font renderer, String strg, int x, int y, int width, int color, boolean shadow) { // ResourcePackList <- holds the correct way // List list = renderer.listFormattedStringToWidth(strg, width); // for (int i = 0; i < list.size(); i++) { @@ -47,7 +47,7 @@ public final class StringUtil { // } @OnlyIn(Dist.CLIENT) - public static void renderScaledString(MatrixStack matrices, FontRenderer font, String text, float x, float y, int color, boolean shadow, float scale) { + public static void renderScaledString(PoseStack matrices, Font font, String text, float x, float y, int color, boolean shadow, float scale) { matrices.pushPose(); matrices.translate(x, y, 0); matrices.scale(scale, scale, 1.0F); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/VanillaPacketDispatcher.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/VanillaPacketDispatcher.java index f6d2f9172..64940333f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/VanillaPacketDispatcher.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/VanillaPacketDispatcher.java @@ -1,27 +1,27 @@ package de.ellpeck.actuallyadditions.mod.util; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; -import net.minecraft.world.chunk.Chunk; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.chunk.LevelChunk; public final class VanillaPacketDispatcher { //Don't call from the client. - public static void dispatchTEToNearbyPlayers(TileEntity tile) { - ServerWorld world = (ServerWorld) tile.getLevel(); - Chunk chunk = world.getChunk(tile.getBlockPos().getX() >> 4, tile.getBlockPos().getZ() >> 4); + public static void dispatchTEToNearbyPlayers(BlockEntity blockEntity) { + ServerLevel serverLevel = (ServerLevel) blockEntity.getLevel(); + LevelChunk chunk = serverLevel.getChunk(blockEntity.getBlockPos().getX() >> 4, blockEntity.getBlockPos().getZ() >> 4); - world.getChunkSource().chunkMap.getPlayers(chunk.getPos(), false).forEach(e -> { - e.connection.send(tile.getUpdatePacket()); + serverLevel.getChunkSource().chunkMap.getPlayers(chunk.getPos(), false).forEach(e -> { + e.connection.send(blockEntity.getUpdatePacket()); }); } - public static void dispatchTEToNearbyPlayers(World world, BlockPos pos) { - TileEntity tile = world.getBlockEntity(pos); - if (tile != null) { - dispatchTEToNearbyPlayers(tile); + public static void dispatchTEToNearbyPlayers(Level level, BlockPos pos) { + BlockEntity blockEntity = level.getBlockEntity(pos); + if (blockEntity != null) { + dispatchTEToNearbyPlayers(blockEntity); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index 25ce81db8..4a0334249 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -14,26 +14,26 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.ActuallyAdditionsClient; import de.ellpeck.actuallyadditions.mod.tile.FilterSettings; import de.ellpeck.actuallyadditions.mod.util.compat.SlotlessableItemHandlerWrapper; -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.block.Blocks; -import net.minecraft.block.material.Material; -import net.minecraft.entity.item.ItemEntity; -import net.minecraft.entity.player.PlayerEntity; -import net.minecraft.entity.player.ServerPlayerEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Items; -import net.minecraft.state.properties.BlockStateProperties; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.Direction; -import net.minecraft.util.Hand; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.BlockRayTraceResult; -import net.minecraft.util.math.MathHelper; -import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.vector.Vector3d; -import net.minecraft.world.World; -import net.minecraft.world.server.ServerWorld; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.server.level.ServerLevel; +import net.minecraft.server.level.ServerPlayer; +import net.minecraft.util.Mth; +import net.minecraft.world.InteractionHand; +import net.minecraft.world.entity.item.ItemEntity; +import net.minecraft.world.entity.player.Player; +import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.Items; +import net.minecraft.world.level.Level; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.state.properties.BlockStateProperties; +import net.minecraft.world.level.material.Material; +import net.minecraft.world.phys.BlockHitResult; +import net.minecraft.world.phys.HitResult; +import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.util.FakePlayer; @@ -115,7 +115,7 @@ public final class WorldUtil { return extracted; } - public static void doEnergyInteraction(TileEntity tileFrom, TileEntity tileTo, Direction sideTo, int maxTransfer) { + public static void doEnergyInteraction(BlockEntity tileFrom, BlockEntity tileTo, Direction sideTo, int maxTransfer) { if (maxTransfer > 0) { Direction opp = sideTo == null ? null @@ -134,7 +134,7 @@ public final class WorldUtil { } } - public static void doFluidInteraction(TileEntity tileFrom, TileEntity tileTo, Direction sideTo, int maxTransfer) { + public static void doFluidInteraction(BlockEntity tileFrom, BlockEntity tileTo, Direction sideTo, int maxTransfer) { if (maxTransfer > 0) { LazyOptional optionalFrom = tileFrom.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, sideTo); LazyOptional optionalTo = tileTo.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, sideTo.getOpposite()); @@ -155,12 +155,12 @@ public final class WorldUtil { * * @param positions The Positions, an array of {x, y, z} arrays containing Positions * @param block The Block - * @param world The World + * @param level The World * @return Is every block present? */ - public static boolean hasBlocksInPlacesGiven(BlockPos[] positions, Block block, World world) { + public static boolean hasBlocksInPlacesGiven(BlockPos[] positions, Block block, Level level) { for (BlockPos pos : positions) { - BlockState state = world.getBlockState(pos); + BlockState state = level.getBlockState(pos); if (!(state.getBlock() == block)) { return false; } @@ -168,16 +168,16 @@ public final class WorldUtil { return true; } - public static ItemStack useItemAtSide(Direction side, World world, BlockPos pos, ItemStack stack) { - if (world instanceof ServerWorld && StackUtil.isValid(stack) && pos != null) { + public static ItemStack useItemAtSide(Direction side, Level level, BlockPos pos, ItemStack stack) { + if (level instanceof ServerLevel && StackUtil.isValid(stack) && pos != null) { BlockPos offsetPos = pos.relative(side); - BlockState state = world.getBlockState(offsetPos); + BlockState state = level.getBlockState(offsetPos); Block block = state.getBlock(); boolean replaceable = false; //= block.canBeReplaced(world, offsetPos); //TODO //Redstone if (replaceable && stack.getItem() == Items.REDSTONE) { - world.setBlock(offsetPos, Blocks.REDSTONE_WIRE.defaultBlockState(), 2); + level.setBlock(offsetPos, Blocks.REDSTONE_WIRE.defaultBlockState(), 2); return StackUtil.shrink(stack, 1); } @@ -192,31 +192,31 @@ public final class WorldUtil { //Everything else try { - FakePlayer fake = FakePlayerFactory.getMinecraft((ServerWorld) world); + FakePlayer fake = FakePlayerFactory.getMinecraft((ServerLevel) level); if (fake.connection == null) { fake.connection = new NetHandlerSpaghettiServer(fake); } //ItemStack heldBefore = fake.getMainHandItem(); - setHandItemWithoutAnnoyingSound(fake, Hand.MAIN_HAND, stack.copy()); - BlockRayTraceResult ray = new BlockRayTraceResult(new Vector3d(0.5, 0.5, 0.5), side.getOpposite(), offsetPos, true); - fake.gameMode.useItemOn(fake, world, fake.getMainHandItem(), Hand.MAIN_HAND, ray); - ItemStack result = fake.getItemInHand(Hand.MAIN_HAND); + setHandItemWithoutAnnoyingSound(fake, InteractionHand.MAIN_HAND, stack.copy()); + BlockHitResult ray = new BlockHitResult(new Vec3(0.5, 0.5, 0.5), side.getOpposite(), offsetPos, true); + fake.gameMode.useItemOn(fake, level, fake.getMainHandItem(), InteractionHand.MAIN_HAND, ray); + ItemStack result = fake.getItemInHand(InteractionHand.MAIN_HAND); //setHandItemWithoutAnnoyingSound(fake, Hand.MAIN_HAND, heldBefore); return result; } catch (Exception e) { - ActuallyAdditions.LOGGER.error("Something that places Blocks at " + offsetPos.getX() + ", " + offsetPos.getY() + ", " + offsetPos.getZ() + " in World " + world.dimension() + " threw an Exception! Don't let that happen again!", e); + ActuallyAdditions.LOGGER.error("Something that places Blocks at " + offsetPos.getX() + ", " + offsetPos.getY() + ", " + offsetPos.getZ() + " in World " + level.dimension() + " threw an Exception! Don't let that happen again!", e); } } return stack; } - public static boolean dropItemAtSide(Direction side, World world, BlockPos pos, ItemStack stack) { + public static boolean dropItemAtSide(Direction side, Level level, BlockPos pos, ItemStack stack) { BlockPos coords = pos.relative(side); - if (world.hasChunkAt(coords)) { - ItemEntity item = new ItemEntity(world, coords.getX() + 0.5, coords.getY() + 0.5, coords.getZ() + 0.5, stack); + if (level.hasChunkAt(coords)) { + ItemEntity item = new ItemEntity(level, coords.getX() + 0.5, coords.getY() + 0.5, coords.getZ() + 0.5, stack); item.setDeltaMovement(0,0,0); - return world.addFreshEntity(item); + return level.addFreshEntity(item); } return false; } @@ -242,64 +242,64 @@ public final class WorldUtil { return state.getValue(BlockStateProperties.FACING); } - public static ArrayList getMaterialsAround(World world, BlockPos pos) { + public static ArrayList getMaterialsAround(Level level, BlockPos pos) { ArrayList blocks = new ArrayList<>(); - blocks.add(world.getBlockState(pos.relative(Direction.NORTH)).getMaterial()); - blocks.add(world.getBlockState(pos.relative(Direction.EAST)).getMaterial()); - blocks.add(world.getBlockState(pos.relative(Direction.SOUTH)).getMaterial()); - blocks.add(world.getBlockState(pos.relative(Direction.WEST)).getMaterial()); + blocks.add(level.getBlockState(pos.relative(Direction.NORTH)).getMaterial()); + blocks.add(level.getBlockState(pos.relative(Direction.EAST)).getMaterial()); + blocks.add(level.getBlockState(pos.relative(Direction.SOUTH)).getMaterial()); + blocks.add(level.getBlockState(pos.relative(Direction.WEST)).getMaterial()); return blocks; } - public static RayTraceResult getNearestPositionWithAir(World world, PlayerEntity player, int reach) { - return getMovingObjectPosWithReachDistance(world, player, reach, false, false, true); + public static HitResult getNearestPositionWithAir(Level level, Player player, int reach) { + return getMovingObjectPosWithReachDistance(level, player, reach, false, false, true); } - private static RayTraceResult getMovingObjectPosWithReachDistance(World world, PlayerEntity player, double distance, boolean p1, boolean p2, boolean p3) { - float f = player.xRot; - float f1 = player.yRot; + private static HitResult getMovingObjectPosWithReachDistance(Level level, Player player, double distance, boolean p1, boolean p2, boolean p3) { + float f = player.getXRot(); + float f1 = player.getYRot(); double d0 = player.position().x; double d1 = player.position().y + player.getEyeHeight(); double d2 = player.position().z; - Vector3d vec3 = new Vector3d(d0, d1, d2); - float f2 = MathHelper.cos(-f1 * 0.017453292F - (float) Math.PI); - float f3 = MathHelper.sin(-f1 * 0.017453292F - (float) Math.PI); - float f4 = -MathHelper.cos(-f * 0.017453292F); - float f5 = MathHelper.sin(-f * 0.017453292F); + Vec3 vec3 = new Vec3(d0, d1, d2); + float f2 = Mth.cos(-f1 * 0.017453292F - (float) Math.PI); + float f3 = Mth.sin(-f1 * 0.017453292F - (float) Math.PI); + float f4 = -Mth.cos(-f * 0.017453292F); + float f5 = Mth.sin(-f * 0.017453292F); float f6 = f3 * f4; float f7 = f2 * f4; - Vector3d vec31 = vec3.add(f6 * distance, f5 * distance, f7 * distance); + Vec3 vec31 = vec3.add(f6 * distance, f5 * distance, f7 * distance); //return world.clipWithInteractionOverride(vec3, vec31, p1, p2, p3); //TODO - return new BlockRayTraceResult(Vector3d.ZERO, Direction.DOWN, BlockPos.ZERO, false); + return new BlockHitResult(Vec3.ZERO, Direction.DOWN, BlockPos.ZERO, false); } - public static RayTraceResult getNearestBlockWithDefaultReachDistance(World world, PlayerEntity player) { - return getNearestBlockWithDefaultReachDistance(world, player, false, true, false); + public static HitResult getNearestBlockWithDefaultReachDistance(Level level, Player player) { + return getNearestBlockWithDefaultReachDistance(level, player, false, true, false); } - public static RayTraceResult getNearestBlockWithDefaultReachDistance(World world, PlayerEntity player, boolean stopOnLiquids, boolean ignoreBlockWithoutBoundingBox, boolean returnLastUncollidableBlock) { - return new BlockRayTraceResult(Vector3d.ZERO, Direction.DOWN, BlockPos.ZERO, false); //TODO + public static HitResult getNearestBlockWithDefaultReachDistance(Level level, Player player, boolean stopOnLiquids, boolean ignoreBlockWithoutBoundingBox, boolean returnLastUncollidableBlock) { + return new BlockHitResult(Vec3.ZERO, Direction.DOWN, BlockPos.ZERO, false); //TODO //return getMovingObjectPosWithReachDistance(world, player, player.getAttribute(PlayerEntity.REACH_DISTANCE).getAttributeValue(), stopOnLiquids, ignoreBlockWithoutBoundingBox, returnLastUncollidableBlock); } - public static void setHandItemWithoutAnnoyingSound(PlayerEntity player, Hand hand, ItemStack stack) { - if (hand == Hand.MAIN_HAND) { - player.inventory.items.set(player.inventory.selected, stack); - } else if (hand == Hand.OFF_HAND) { - player.inventory.offhand.set(0, stack); + public static void setHandItemWithoutAnnoyingSound(Player player, InteractionHand hand, ItemStack stack) { + if (hand == InteractionHand.MAIN_HAND) { + player.getInventory().items.set(player.getInventory().selected, stack); + } else if (hand == InteractionHand.OFF_HAND) { + player.getInventory().offhand.set(0, stack); } } //I think something is up with this, but I'm not entirely certain what. - public static float fireFakeHarvestEventsForDropChance(TileEntity caller, List drops, World world, BlockPos pos) { - if (world instanceof ServerWorld) { - FakePlayer fake = FakePlayerFactory.getMinecraft((ServerWorld) world); + public static float fireFakeHarvestEventsForDropChance(BlockEntity caller, List drops, Level level, BlockPos pos) { + if (level instanceof ServerLevel) { + FakePlayer fake = FakePlayerFactory.getMinecraft((ServerLevel) level); BlockPos tePos = caller.getBlockPos(); fake.setPos(tePos.getX() + 0.5, tePos.getY() + 0.5, tePos.getZ() + 0.5); - BlockState state = world.getBlockState(pos); + BlockState state = level.getBlockState(pos); - BreakEvent event = new BreakEvent(world, pos, state, fake); + BreakEvent event = new BreakEvent(level, pos, state, fake); if (!MinecraftForge.EVENT_BUS.post(event)) { //return ForgeEventFactory.fireBlockHarvesting(drops, world, pos, state, 0, 1, false, fake); //TODO what?! } @@ -311,43 +311,43 @@ public final class WorldUtil { * Tries to break a block as if this player had broken it. This is a complex operation. * * @param stack The player's current held stack, main hand. - * @param world The player's world. + * @param level The player's world. * @param player The player that is breaking this block. * @param pos The pos to break. * @return If the break was successful. */ - public static boolean breakExtraBlock(ItemStack stack, World world, PlayerEntity player, BlockPos pos) { - BlockState state = world.getBlockState(pos); + public static boolean breakExtraBlock(ItemStack stack, Level level, Player player, BlockPos pos) { + BlockState state = level.getBlockState(pos); Block block = state.getBlock(); if (player.isCreative()) { - if (block.removedByPlayer(state, world, pos, player, false, state.getFluidState())) { - block.destroy(world, pos, state); + if (block.onDestroyedByPlayer(state, level, pos, player, false, state.getFluidState())) { + block.destroy(level, pos, state); } // send update to client - if (!world.isClientSide) { + if (!level.isClientSide) { //((ServerPlayerEntity) player).connection.send(new SPacketBlockChange(world, pos)); //TODO dunno what this is } return true; } // callback to the tool the player uses. Called on both sides. This damages the tool n stuff. - stack.mineBlock(world, state, pos, player); + stack.mineBlock(level, state, pos, player); // server sided handling - if (!world.isClientSide) { + if (!level.isClientSide) { // send the blockbreak event - int xp = ForgeHooks.onBlockBreakEvent(world, ((ServerPlayerEntity) player).gameMode.getGameModeForPlayer(), (ServerPlayerEntity) player, pos); + int xp = ForgeHooks.onBlockBreakEvent(level, ((ServerPlayer) player).gameMode.getGameModeForPlayer(), (ServerPlayer) player, pos); if (xp == -1) { return false; } - TileEntity tileEntity = world.getBlockEntity(pos); - if (block.removedByPlayer(state, world, pos, player, true, state.getFluidState())) { // boolean is if block can be harvested, checked above - block.destroy(world, pos, state); - block.playerDestroy(world, player, pos, state, tileEntity, stack); - block.popExperience(((ServerWorld) world), pos, xp); + BlockEntity blockEntity = level.getBlockEntity(pos); + if (block.onDestroyedByPlayer(state, level, pos, player, true, state.getFluidState())) { // boolean is if block can be harvested, checked above + block.destroy(level, pos, state); + block.playerDestroy(level, player, pos, state, blockEntity, stack); + block.popExperience(((ServerLevel) level), pos, xp); } // always send block update to client @@ -360,12 +360,12 @@ public final class WorldUtil { // the code above, executed on the server, sends a block-updates that give us the correct state of the block we destroy. // following code can be found in PlayerControllerMP.onPlayerDestroyBlock - world.levelEvent(2001, pos, Block.getId(state)); - if (block.removedByPlayer(state, world, pos, player, true, state.getFluidState())) { - block.destroy(world, pos, state); + level.levelEvent(2001, pos, Block.getId(state)); + if (block.onDestroyedByPlayer(state, level, pos, player, true, state.getFluidState())) { + block.destroy(level, pos, state); } // callback to the tool - stack.mineBlock(world, state, pos, player); + stack.mineBlock(level, state, pos, player); // send an update to the server, so we get an update back diff --git a/src/main/java/de/ellpeck/actuallyadditions/registration/AABlockReg.java b/src/main/java/de/ellpeck/actuallyadditions/registration/AABlockReg.java index 6b1d59789..a5529448d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/registration/AABlockReg.java +++ b/src/main/java/de/ellpeck/actuallyadditions/registration/AABlockReg.java @@ -2,29 +2,29 @@ package de.ellpeck.actuallyadditions.registration; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.block.Block; -import net.minecraft.item.BlockItem; -import net.minecraft.item.Item; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityType; -import net.minecraftforge.fml.RegistryObject; +import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.Item; +import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.entity.BlockEntity; +import net.minecraft.world.level.block.entity.BlockEntityType; +import net.minecraftforge.registries.RegistryObject; import javax.annotation.Nonnull; import java.util.Objects; import java.util.function.Function; import java.util.function.Supplier; -public class AABlockReg implements Supplier { +public class AABlockReg implements Supplier { private final String name; private RegistryObject block; private RegistryObject item; - private RegistryObject> tileEntityType; + private RegistryObject> tileEntityType; - public AABlockReg(String name, Supplier blockSupplier, Function itemSupplier, Supplier tileSupplier) { + public AABlockReg(String name, Supplier blockSupplier, Function itemSupplier, BlockEntityType.BlockEntitySupplier tileSupplier) { this.name = name; this.block = ActuallyBlocks.BLOCKS.register(name, blockSupplier); this.item = ActuallyItems.ITEMS.register(name, () -> itemSupplier.apply(block.get())); - this.tileEntityType = ActuallyBlocks.TILES.register(name, () -> TileEntityType.Builder.of(tileSupplier, block.get()).build(null)); + this.tileEntityType = ActuallyBlocks.TILES.register(name, () -> BlockEntityType.Builder.of(tileSupplier, block.get()).build(null)); } public AABlockReg(String name, Supplier blockSupplier, Function itemSupplier) { this.name = name; @@ -59,7 +59,7 @@ public class AABlockReg i } @Nonnull - public TileEntityType getTileEntityType() { return Objects.requireNonNull(tileEntityType.get());} + public BlockEntityType getTileEntityType() { return Objects.requireNonNull(tileEntityType.get());} public static class BlockBuilder { @@ -67,7 +67,7 @@ public class AABlockReg i private Supplier blockSupplier; private Function itemSupplier = (b) -> new BlockItem(b, ActuallyItems.defaultProps()); private boolean hasTile = false; - private Supplier> tileSupplier; + private Supplier> tileSupplier; private BlockBuilder(String nameIn, Supplier blockSupplierIn) { this.name = nameIn; @@ -84,7 +84,7 @@ public class AABlockReg i return this; } - public BlockBuilder tile(Supplier> tileSupplierIn) { + public BlockBuilder tile(Supplier> tileSupplierIn) { tileSupplier = tileSupplierIn; hasTile = true; diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 4899be19f..1f7524923 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,6 +1,6 @@ modLoader="javafml" -loaderVersion="[36,)" +loaderVersion="[40,)" license="MIT" [[mods]] modId="actuallyadditions" @@ -16,13 +16,13 @@ Do you want Automation? Wireless Transport? Better Machines? A cup o' Coffee? Ch [[dependencies.actuallyadditions]] modId="forge" mandatory=true - versionRange="[36,)" + versionRange="[40,)" ordering="NONE" side="BOTH" [[dependencies.actuallyadditions]] modId="minecraft" mandatory=true - versionRange="[1.16.5,1.17)" + versionRange="[1.18.2,1.21)" ordering="NONE" side="BOTH" From 6133488eee43b80b592e42e32a672346dc585b9a Mon Sep 17 00:00:00 2001 From: Mrbysco Date: Sun, 3 Mar 2024 01:20:53 +0100 Subject: [PATCH 2/2] Port to 1.20.1 --- build.gradle | 56 +- gradle.properties | 8 +- gradle/wrapper/gradle-wrapper.jar | Bin 59821 -> 61574 bytes gradle/wrapper/gradle-wrapper.properties | 3 +- gradlew | 18 +- gradlew.bat | 15 +- settings.gradle | 14 + .../27a06cb38e627c3bacb7787d001fbadd6becbe3f | 229 +++++ .../2a0621f54729484bb667bdf33a347c218c756998 | 11 + .../3425a48f50a5cfd73d65d933e25ea9828512dab8 | 14 + .../59eb3dbb5f86130e09b3c62d89b9525ee01cf52d | 122 +++ .../67661e0cbb74e53678db18185e51bbcd4d93f3a2 | 2 + .../68e357711f2c2ca6f18b64025293f52db04fd591 | 129 +++ .../70af3238de42da66beb5f354425347f373dca837 | 7 + .../735031f3addf80804addae5e3f53249900116f1e | 2 + .../74807d958079a027731c973b9550985af6711175 | 5 + .../7f59a03675256e210e43fea84b89db21b9eccf0d | 27 + .../9cf54cdf67e16111ec482a2a3b607e8fd75a4246 | 72 ++ .../9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e | 40 + .../ac8a02941a4e34649db8b388fb528d3ed610c50f | 3 + .../b3ca5dca15f867120b82824364d3156b7fdfd666 | 228 +++++ src/generated/resources/.cache/cache | 904 ------------------ .../cbced4962689e36cb386fe2a02f01561d1264b58 | 2 + .../e5c5eb35b4ba40351ecb7d9f04c3527f2f5779b0 | 19 + .../fa43e5ef6ac83dd009de17d3b434e29660c4c3fc | 10 + .../blockstates/atomic_reconstructor.json | 14 +- .../blockstates/black_quartz_brick_slab.json | 6 +- .../blockstates/black_quartz_brick_stair.json | 330 +++---- .../blockstates/black_quartz_brick_wall.json | 82 +- .../blockstates/black_quartz_pillar_slab.json | 6 +- .../black_quartz_pillar_stair.json | 330 +++---- .../blockstates/black_quartz_pillar_wall.json | 82 +- .../blockstates/black_quartz_slab.json | 6 +- .../blockstates/black_quartz_stair.json | 330 +++---- .../blockstates/black_quartz_wall.json | 82 +- .../blockstates/breaker.json | 14 +- .../chiseled_black_quartz_slab.json | 6 +- .../chiseled_black_quartz_stair.json | 330 +++---- .../chiseled_black_quartz_wall.json | 82 +- .../blockstates/coal_generator.json | 8 +- .../blockstates/coffee_machine.json | 8 +- .../blockstates/crusher.json | 30 +- .../blockstates/crusher_double.json | 30 +- .../blockstates/dropper.json | 14 +- .../blockstates/ethetic_green_slab.json | 6 +- .../blockstates/ethetic_green_stairs.json | 330 +++---- .../blockstates/ethetic_green_wall.json | 82 +- .../blockstates/ethetic_white_slab.json | 6 +- .../blockstates/ethetic_white_stairs.json | 330 +++---- .../blockstates/ethetic_white_wall.json | 82 +- .../actuallyadditions/blockstates/farmer.json | 8 +- .../blockstates/fluid_collector.json | 14 +- .../blockstates/fluid_placer.json | 14 +- .../blockstates/lamp_controller.json | 14 +- .../blockstates/laser_relay.json | 14 +- .../blockstates/laser_relay_advanced.json | 14 +- .../blockstates/laser_relay_extreme.json | 14 +- .../blockstates/laser_relay_fluids.json | 14 +- .../blockstates/laser_relay_item.json | 14 +- .../laser_relay_item_advanced.json | 14 +- .../blockstates/lava_factory_controller.json | 8 +- .../blockstates/leaf_generator.json | 8 +- .../blockstates/long_range_breaker.json | 14 +- .../blockstates/oil_generator.json | 8 +- .../actuallyadditions/blockstates/placer.json | 14 +- .../blockstates/powered_furnace.json | 30 +- .../blockstates/smooth_black_quartz_slab.json | 6 +- .../smooth_black_quartz_stair.json | 330 +++---- .../blockstates/smooth_black_quartz_wall.json | 82 +- .../blockstates/vertical_digger.json | 8 +- .../models/block/black_quartz_brick_slab.json | 2 +- .../block/black_quartz_brick_slab_top.json | 2 +- .../block/black_quartz_brick_stair.json | 2 +- .../block/black_quartz_brick_stair_inner.json | 2 +- .../block/black_quartz_brick_stair_outer.json | 2 +- .../block/black_quartz_pillar_slab.json | 2 +- .../block/black_quartz_pillar_slab_top.json | 2 +- .../block/black_quartz_pillar_stair.json | 2 +- .../black_quartz_pillar_stair_inner.json | 2 +- .../black_quartz_pillar_stair_outer.json | 2 +- .../models/block/black_quartz_slab.json | 2 +- .../models/block/black_quartz_slab_top.json | 2 +- .../models/block/black_quartz_stair.json | 2 +- .../block/black_quartz_stair_inner.json | 2 +- .../block/black_quartz_stair_outer.json | 2 +- .../block/chiseled_black_quartz_slab.json | 2 +- .../block/chiseled_black_quartz_slab_top.json | 2 +- .../block/chiseled_black_quartz_stair.json | 2 +- .../chiseled_black_quartz_stair_inner.json | 2 +- .../chiseled_black_quartz_stair_outer.json | 2 +- .../models/block/ethetic_green_slab.json | 2 +- .../models/block/ethetic_green_slab_top.json | 2 +- .../models/block/ethetic_green_stairs.json | 2 +- .../block/ethetic_green_stairs_inner.json | 2 +- .../block/ethetic_green_stairs_outer.json | 2 +- .../models/block/ethetic_white_slab.json | 2 +- .../models/block/ethetic_white_slab_top.json | 2 +- .../models/block/ethetic_white_stairs.json | 2 +- .../block/ethetic_white_stairs_inner.json | 2 +- .../block/ethetic_white_stairs_outer.json | 2 +- .../block/smooth_black_quartz_slab.json | 2 +- .../block/smooth_black_quartz_slab_top.json | 2 +- .../block/smooth_black_quartz_stair.json | 2 +- .../smooth_black_quartz_stair_inner.json | 2 +- .../smooth_black_quartz_stair_outer.json | 2 +- .../models/item/canola_oil_bucket.json | 4 +- .../models/item/crystallized_oil_bucket.json | 4 +- .../models/item/empowered_oil_bucket.json | 4 +- .../item/refined_canola_oil_bucket.json | 4 +- .../actuallyadditions/models/item/worm.json | 12 +- .../assets/actuallyadditions/sounds.json | 14 +- .../advancements/craft_coal_generator.json | 37 +- .../advancements/craft_coffee_machine.json | 37 +- .../advancements/craft_crusher.json | 37 +- .../advancements/craft_double_crusher.json | 37 +- .../advancements/craft_empowerer.json | 37 +- .../advancements/craft_energyface.json | 37 +- .../advancements/craft_item_interface.json | 37 +- .../advancements/craft_laser_relay.json | 37 +- .../craft_laser_relay_advanced.json | 37 +- .../craft_laser_relay_extreme.json | 37 +- .../advancements/craft_laser_relay_item.json | 37 +- .../advancements/craft_leaf_generator.json | 37 +- .../advancements/craft_liquiface.json | 37 +- .../advancements/craft_phantom_face.json | 39 +- .../advancements/craft_reconstructor.json | 37 +- .../advancements/make_first_crystal.json | 37 +- .../advancements/pickup_coffee.json | 37 +- .../actuallyadditions/advancements/root.json | 29 +- .../blocks/atomic_reconstructor.json | 33 +- .../loot_tables/blocks/battery_box.json | 15 +- .../loot_tables/blocks/bio_reactor.json | 15 +- .../blocks/black_quartz_block.json | 15 +- .../blocks/black_quartz_brick_block.json | 15 +- .../blocks/black_quartz_brick_slab.json | 15 +- .../blocks/black_quartz_brick_stair.json | 15 +- .../blocks/black_quartz_brick_wall.json | 15 +- .../loot_tables/blocks/black_quartz_ore.json | 15 +- .../blocks/black_quartz_pillar_block.json | 15 +- .../blocks/black_quartz_pillar_slab.json | 15 +- .../blocks/black_quartz_pillar_stair.json | 15 +- .../blocks/black_quartz_pillar_wall.json | 15 +- .../loot_tables/blocks/black_quartz_slab.json | 15 +- .../blocks/black_quartz_stair.json | 15 +- .../loot_tables/blocks/black_quartz_wall.json | 15 +- .../loot_tables/blocks/breaker.json | 15 +- .../loot_tables/blocks/canola.json | 39 +- .../loot_tables/blocks/canola_press.json | 15 +- .../blocks/chiseled_black_quartz_block.json | 15 +- .../blocks/chiseled_black_quartz_slab.json | 15 +- .../blocks/chiseled_black_quartz_stair.json | 15 +- .../blocks/chiseled_black_quartz_wall.json | 15 +- .../loot_tables/blocks/coal_generator.json | 25 +- .../loot_tables/blocks/coffee.json | 39 +- .../loot_tables/blocks/coffee_machine.json | 15 +- .../loot_tables/blocks/crusher.json | 25 +- .../loot_tables/blocks/crusher_double.json | 25 +- .../blocks/diamatine_crystal_block.json | 15 +- .../blocks/diamatine_crystal_cluster.json | 15 +- .../loot_tables/blocks/display_stand.json | 25 +- .../loot_tables/blocks/dropper.json | 15 +- .../blocks/emeradic_crystal_block.json | 15 +- .../blocks/emeradic_crystal_cluster.json | 15 +- .../empowered_diamatine_crystal_block.json | 15 +- .../empowered_emeradic_crystal_block.json | 15 +- .../blocks/empowered_enori_crystal_block.json | 15 +- .../blocks/empowered_palis_crystal_block.json | 15 +- .../empowered_restonia_crystal_block.json | 15 +- .../blocks/empowered_void_crystal_block.json | 15 +- .../loot_tables/blocks/empowerer.json | 15 +- .../loot_tables/blocks/ender_casing.json | 15 +- .../loot_tables/blocks/energizer.json | 15 +- .../loot_tables/blocks/enervator.json | 15 +- .../blocks/enori_crystal_block.json | 15 +- .../blocks/enori_crystal_cluster.json | 15 +- .../blocks/ethetic_green_block.json | 15 +- .../blocks/ethetic_green_slab.json | 15 +- .../blocks/ethetic_green_stairs.json | 15 +- .../blocks/ethetic_green_wall.json | 15 +- .../blocks/ethetic_white_block.json | 15 +- .../blocks/ethetic_white_slab.json | 15 +- .../blocks/ethetic_white_stairs.json | 15 +- .../blocks/ethetic_white_wall.json | 15 +- .../loot_tables/blocks/farmer.json | 15 +- .../loot_tables/blocks/feeder.json | 15 +- .../loot_tables/blocks/fermenting_barrel.json | 15 +- .../loot_tables/blocks/firework_box.json | 15 +- .../loot_tables/blocks/flax.json | 39 +- .../loot_tables/blocks/fluid_collector.json | 15 +- .../loot_tables/blocks/fluid_placer.json | 15 +- .../loot_tables/blocks/greenhouse_glass.json | 15 +- .../loot_tables/blocks/heat_collector.json | 15 +- .../blocks/hopping_item_interface.json | 15 +- .../loot_tables/blocks/iron_casing.json | 15 +- .../loot_tables/blocks/item_interface.json | 15 +- .../loot_tables/blocks/lamp_black.json | 15 +- .../loot_tables/blocks/lamp_blue.json | 15 +- .../loot_tables/blocks/lamp_brown.json | 15 +- .../loot_tables/blocks/lamp_controller.json | 15 +- .../loot_tables/blocks/lamp_cyan.json | 15 +- .../loot_tables/blocks/lamp_gray.json | 15 +- .../loot_tables/blocks/lamp_green.json | 15 +- .../loot_tables/blocks/lamp_light_blue.json | 15 +- .../loot_tables/blocks/lamp_light_gray.json | 15 +- .../loot_tables/blocks/lamp_lime.json | 15 +- .../loot_tables/blocks/lamp_magenta.json | 15 +- .../loot_tables/blocks/lamp_orange.json | 15 +- .../loot_tables/blocks/lamp_pink.json | 15 +- .../loot_tables/blocks/lamp_purple.json | 15 +- .../loot_tables/blocks/lamp_red.json | 15 +- .../loot_tables/blocks/lamp_white.json | 15 +- .../loot_tables/blocks/lamp_yellow.json | 15 +- .../loot_tables/blocks/laser_relay.json | 15 +- .../blocks/laser_relay_advanced.json | 15 +- .../blocks/laser_relay_extreme.json | 15 +- .../blocks/laser_relay_fluids.json | 15 +- .../loot_tables/blocks/laser_relay_item.json | 15 +- .../blocks/laser_relay_item_advanced.json | 15 +- .../blocks/lava_factory_casing.json | 15 +- .../blocks/lava_factory_controller.json | 15 +- .../loot_tables/blocks/leaf_generator.json | 15 +- .../blocks/long_range_breaker.json | 15 +- .../loot_tables/blocks/oil_generator.json | 25 +- .../blocks/palis_crystal_block.json | 15 +- .../blocks/palis_crystal_cluster.json | 15 +- .../loot_tables/blocks/phantom_booster.json | 15 +- .../loot_tables/blocks/phantom_breaker.json | 15 +- .../blocks/phantom_energyface.json | 15 +- .../loot_tables/blocks/phantom_itemface.json | 15 +- .../loot_tables/blocks/phantom_liquiface.json | 15 +- .../loot_tables/blocks/phantom_placer.json | 15 +- .../blocks/phantom_redstoneface.json | 15 +- .../loot_tables/blocks/placer.json | 15 +- .../loot_tables/blocks/player_interface.json | 15 +- .../loot_tables/blocks/powered_furnace.json | 25 +- .../loot_tables/blocks/ranged_collector.json | 15 +- .../blocks/restonia_crystal_block.json | 15 +- .../blocks/restonia_crystal_cluster.json | 15 +- .../loot_tables/blocks/rice.json | 39 +- .../loot_tables/blocks/shock_suppressor.json | 15 +- .../blocks/smooth_black_quartz_block.json | 15 +- .../blocks/smooth_black_quartz_slab.json | 15 +- .../blocks/smooth_black_quartz_stair.json | 15 +- .../blocks/smooth_black_quartz_wall.json | 15 +- .../loot_tables/blocks/tiny_torch.json | 15 +- .../loot_tables/blocks/vertical_digger.json | 15 +- .../blocks/void_crystal_block.json | 15 +- .../blocks/void_crystal_cluster.json | 15 +- .../loot_tables/blocks/wood_casing.json | 15 +- .../loot_tables/blocks/xp_solidifier.json | 15 +- .../recipes/advanced_coil.json | 14 +- .../recipes/advanced_leaf_blower.json | 32 +- .../recipes/atomic_reconstructor.json | 26 +- .../actuallyadditions/recipes/basic_coil.json | 14 +- .../recipes/battery_box.json | 1 + .../recipes/black_quartz_brick_slab.json | 10 +- .../recipes/black_quartz_brick_stair.json | 14 +- .../recipes/black_quartz_brick_wall.json | 12 +- .../recipes/black_quartz_pillar_slab.json | 10 +- .../recipes/black_quartz_pillar_stair.json | 14 +- .../recipes/black_quartz_pillar_wall.json | 12 +- .../recipes/black_quartz_slab.json | 10 +- .../recipes/black_quartz_stair.json | 14 +- .../recipes/black_quartz_wall.json | 12 +- .../actuallyadditions/recipes/booklet.json | 1 + .../recipes/canola_seeds.json | 1 + .../recipes/charcoal_to_tiny.json | 9 +- .../recipes/chiseled_black_quartz_slab.json | 10 +- .../recipes/chiseled_black_quartz_stair.json | 14 +- .../recipes/chiseled_black_quartz_wall.json | 12 +- .../recipes/coal_to_tiny.json | 9 +- .../recipes/compress/diamatine_crystal.json | 14 +- .../recipes/compress/emeradic_crystal.json | 14 +- .../recipes/compress/enori_crystal.json | 14 +- .../recipes/compress/palis_crystal.json | 14 +- .../recipes/compress/restonia_crystal.json | 14 +- .../recipes/compress/void_crystal.json | 14 +- .../recipes/crafter_on_a_stick.json | 1 + .../recipes/crate_keeper.json | 26 +- .../recipes/crushing/bone_crusher.json | 8 +- .../decompress/diamatine_crystal_shard.json | 5 +- .../decompress/emeradic_crystal_shard.json | 5 +- .../decompress/enori_crystal_shard.json | 5 +- .../decompress/palis_crystal_shard.json | 5 +- .../decompress/restonia_crystal_shard.json | 5 +- .../decompress/void_crystal_shard.json | 5 +- .../recipes/diamond_aiot.json | 1 + .../recipes/display_stand.json | 20 +- .../recipes/double_battery.json | 28 +- .../actuallyadditions/recipes/drill_core.json | 26 +- .../recipes/drill_light_blue.json | 32 +- .../recipes/drill_upgrade_block_placing.json | 20 +- .../recipes/drill_upgrade_five_by_five.json | 26 +- .../recipes/drill_upgrade_fortune.json | 26 +- .../recipes/drill_upgrade_fortune_ii.json | 26 +- .../recipes/drill_upgrade_silk_touch.json | 20 +- .../recipes/drill_upgrade_speed.json | 26 +- .../recipes/drill_upgrade_speed_ii.json | 26 +- .../recipes/drill_upgrade_speed_iii.json | 26 +- .../recipes/drill_upgrade_three_by_three.json | 26 +- .../actuallyadditions/recipes/empowerer.json | 20 +- .../recipes/empowering/diamatine.json | 8 +- .../recipes/empowering/diamatine_block.json | 8 +- .../recipes/empowering/emeradic.json | 8 +- .../recipes/empowering/emeradic_block.json | 8 +- .../recipes/empowering/empowered_canola.json | 8 +- .../recipes/empowering/enori.json | 8 +- .../recipes/empowering/enori_block.json | 8 +- .../recipes/empowering/palis.json | 8 +- .../recipes/empowering/palis_block.json | 8 +- .../recipes/empowering/restonia.json | 8 +- .../recipes/empowering/restonia_block.json | 8 +- .../recipes/empowering/void.json | 8 +- .../recipes/empowering/void_block.json | 8 +- .../actuallyadditions/recipes/empty_cup.json | 20 +- .../recipes/ender_casing.json | 20 +- .../recipes/engineers_goggles.json | 20 +- .../recipes/engineers_goggles_advanced.json | 20 +- .../recipes/ethetic_green_slab.json | 10 +- .../recipes/ethetic_green_stairs.json | 14 +- .../recipes/ethetic_green_wall.json | 12 +- .../recipes/ethetic_white_slab.json | 10 +- .../recipes/ethetic_white_stairs.json | 14 +- .../recipes/ethetic_white_wall.json | 12 +- .../actuallyadditions/recipes/farmer.json | 20 +- .../recipes/fermenting/refined_canola.json | 8 +- .../actuallyadditions/recipes/filter.json | 14 +- .../recipes/firework_box.json | 32 +- .../actuallyadditions/recipes/gold_aiot.json | 1 + .../recipes/handheld_filler.json | 28 +- .../recipes/hopping_item_interface.json | 1 + .../actuallyadditions/recipes/iron_aiot.json | 1 + .../recipes/iron_casing.json | 26 +- .../recipes/item_interface.json | 20 +- .../laser/crystalize_diamatine_crystal.json | 2 +- .../crystalize_diamatine_crystal_block.json | 2 +- .../laser/crystalize_emeradic_crystal.json | 2 +- .../crystalize_emeradic_crystal_block.json | 2 +- .../laser/crystalize_enori_crystal.json | 2 +- .../laser/crystalize_enori_crystal_block.json | 2 +- .../laser/crystalize_palis_crystal.json | 2 +- .../laser/crystalize_palis_crystal_block.json | 2 +- .../laser/crystalize_restonia_crystal.json | 2 +- .../crystalize_restonia_crystal_block.json | 2 +- .../laser/crystalize_void_crystal.json | 2 +- .../laser/crystalize_void_crystal_block.json | 2 +- .../laser/crystallized_canola_seed.json | 2 +- .../recipes/laser/ethetic_green_block.json | 2 +- .../recipes/laser/ethetic_white_block.json | 2 +- .../recipes/laser/laser_relay.json | 2 +- .../recipes/laser/laser_relay_fluids.json | 2 +- .../recipes/laser/laser_relay_item.json | 2 +- .../recipes/laser/leather.json | 2 +- .../actuallyadditions/recipes/laser/lens.json | 2 +- .../recipes/laser/lens_of_certain_death.json | 2 +- .../recipes/laser/lens_of_color.json | 2 +- .../recipes/laser/lens_of_detonation.json | 2 +- .../recipes/laser/nether_wart.json | 2 +- .../recipes/laser/prismarine_shard.json | 2 +- .../recipes/laser/soul_sand.json | 2 +- .../recipes/laser_relay.json | 24 +- .../recipes/laser_relay_advanced.json | 14 +- .../recipes/laser_relay_extreme.json | 14 +- .../recipes/laser_relay_item_advanced.json | 1 + .../recipes/laser_upgrade_invisibility.json | 24 +- .../recipes/laser_upgrade_range.json | 30 +- .../recipes/laser_wrench.json | 14 +- .../recipes/laser_wrench_nbt.json | 1 + .../recipes/leaf_blower.json | 26 +- .../data/actuallyadditions/recipes/lens.json | 20 +- .../recipes/lens_of_disenchanting.json | 1 + .../recipes/lens_of_the_killer.json | 3 +- .../recipes/lens_of_the_miner.json | 36 +- .../recipes/liquid_fuel/canola_oil.json | 8 +- .../liquid_fuel/crystallized_canola_oil.json | 8 +- .../liquid_fuel/empowered_canola_oil.json | 8 +- .../liquid_fuel/refined_canola_oil.json | 8 +- .../mininglens/nether_nether_gold_ore.json | 4 +- .../mininglens/nether_nether_quartz_ore.json | 4 +- .../recipes/mininglens/stone_coal_ore.json | 4 +- .../recipes/mininglens/stone_diamond_ore.json | 4 +- .../recipes/mininglens/stone_emerald_ore.json | 4 +- .../recipes/mininglens/stone_gold_ore.json | 4 +- .../recipes/mininglens/stone_iron_ore.json | 4 +- .../recipes/mininglens/stone_lapis_ore.json | 4 +- .../mininglens/stone_redstone_ore.json | 4 +- .../recipes/netherite_aiot.json | 1 + .../recipes/phantom_clearing.json | 1 + .../recipes/phantom_connector.json | 20 +- .../recipes/player_probe.json | 20 +- .../recipes/pressing/canola.json | 4 +- .../recipes/quadruple_battery.json | 28 +- .../recipes/quintuple_battery.json | 28 +- .../actuallyadditions/recipes/rice_seeds.json | 1 + .../actuallyadditions/recipes/rice_slime.json | 20 +- .../recipes/rice_slime_potion.json | 20 +- .../recipes/ring_of_growth.json | 20 +- .../recipes/ring_of_magnetizing.json | 32 +- .../recipes/shock_suppressor.json | 26 +- .../recipes/single_battery.json | 26 +- .../recipes/smooth_black_quartz_slab.json | 10 +- .../recipes/smooth_black_quartz_stair.json | 14 +- .../recipes/smooth_black_quartz_wall.json | 12 +- .../recipes/solid_fuel/charcoal.json | 4 +- .../recipes/solid_fuel/coal-block.json | 4 +- .../recipes/solid_fuel/coal.json | 4 +- .../recipes/solid_fuel/lava.json | 4 +- .../recipes/solid_fuel/stick.json | 4 +- .../recipes/solid_fuel/tiny-coal.json | 4 +- .../actuallyadditions/recipes/stone_aiot.json | 1 + .../recipes/teleport_staff.json | 32 +- .../recipes/tiny_to_charcoal.json | 18 +- .../recipes/tiny_to_coal.json | 18 +- .../actuallyadditions/recipes/tiny_torch.json | 16 +- .../recipes/travelers_sack.json | 22 +- .../recipes/triple_battery.json | 28 +- .../recipes/vertical_digger.json | 26 +- .../actuallyadditions/recipes/void_sack.json | 1 + .../recipes/wings_of_the_bats.json | 26 +- .../recipes/wood_casing.json | 20 +- .../recipes/wooden_aiot.json | 1 + .../tags/blocks/mineable/aio.json | 1 - .../tags/blocks/mineable/drill.json | 1 - .../tags/items/coffee_beans.json | 1 - .../tags/items/crystals.json | 1 - .../actuallyadditions/tags/items/drills.json | 1 - .../tags/items/tiny_coals.json | 1 - .../minecraft/tags/blocks/mineable/axe.json | 1 - .../tags/blocks/mineable/pickaxe.json | 1 - .../tags/blocks/needs_stone_tool.json | 1 - .../data/minecraft/tags/blocks/walls.json | 1 - .../tags/damage_type/bypasses_armor.json | 5 + .../actuallyadditions/api/ActuallyTags.java | 8 +- .../data/ActuallyAdditionsData.java | 62 +- .../data/AdvancementGenerator.java | 341 +++---- .../data/BlockRecipeGenerator.java | 21 +- .../data/BlockStateGenerator.java | 17 +- .../data/BlockTagsGenerator.java | 28 +- .../data/ColorChangeGenerator.java | 33 +- .../data/CrushingRecipeGenerator.java | 22 +- .../data/DamageTypeTagsGenerator.java | 25 + .../data/EmpoweringRecipeGenerator.java | 27 +- .../data/FuelRecipeGenerator.java | 22 +- .../data/ItemModelGenerator.java | 19 +- .../data/ItemRecipeGenerator.java | 32 +- .../data/ItemTagsGenerator.java | 15 +- .../data/LaserRecipeGenerator.java | 35 +- .../data/LootTableGenerator.java | 32 +- .../data/MiningLensGenerator.java | 23 +- .../data/MiscMachineRecipeGenerator.java | 23 +- .../data/SoundsGenerator.java | 6 +- .../actuallyadditions/mod/AASounds.java | 8 +- .../mod/ActuallyAdditions.java | 17 +- .../actuallyadditions/mod/ActuallyTabs.java | 36 + .../mod/ClientRegistryHandler.java | 8 +- .../mod/blocks/AABlockItem.java | 3 +- .../mod/blocks/ActuallyBlock.java | 7 +- .../mod/blocks/ActuallyBlocks.java | 16 +- .../mod/blocks/BlockAtomicReconstructor.java | 21 +- .../mod/blocks/BlockBatteryBox.java | 5 +- .../mod/blocks/BlockCanolaPress.java | 2 +- .../mod/blocks/BlockCoalGenerator.java | 4 +- .../mod/blocks/BlockCoffeeMachine.java | 2 +- .../mod/blocks/BlockColoredLamp.java | 5 +- .../mod/blocks/BlockCrusher.java | 4 +- .../mod/blocks/BlockFermentingBarrel.java | 7 +- .../mod/blocks/BlockGreenhouseGlass.java | 5 +- .../mod/blocks/BlockLaserRelay.java | 23 +- .../blocks/BlockLavaFactoryController.java | 4 +- .../mod/blocks/BlockLeafGenerator.java | 4 +- .../mod/blocks/BlockOilGenerator.java | 6 +- .../mod/blocks/BlockPhantom.java | 11 +- .../mod/blocks/BlockPlayerInterface.java | 18 +- .../mod/blocks/BlockPoweredFurnace.java | 4 +- .../mod/blocks/BlockShockSuppressor.java | 4 +- .../mod/blocks/BlockTinyTorch.java | 4 +- .../mod/blocks/BlockVerticalDigger.java | 11 +- .../mod/blocks/BlockWildPlant.java | 5 +- .../mod/blocks/CrystalClusterBlock.java | 5 +- .../mod/blocks/IHudDisplay.java | 4 +- .../mod/blocks/base/BlockBase.java | 3 +- .../mod/blocks/base/BlockContainerBase.java | 40 +- .../mod/blocks/base/BlockPlant.java | 7 +- .../mod/blocks/render/CompostModel.java | 4 +- .../blocks/render/ReconstructorRenderer.java | 6 +- .../mod/blocks/render/RenderBatteryBox.java | 28 +- .../mod/blocks/render/RenderDisplayStand.java | 7 +- .../mod/blocks/render/RenderEmpowerer.java | 7 +- .../mod/blocks/render/RenderLaserRelay.java | 4 +- .../mod/booklet/InitBooklet.java | 4 +- .../mod/booklet/button/BookmarkButton.java | 4 +- .../mod/booklet/gui/GuiBooklet.java | 6 +- .../mod/config/CommonConfig.java | 4 +- .../conditions/BoolConfigCondition.java | 2 +- .../mod/crafting/ColorChangeRecipe.java | 11 +- .../mod/crafting/CrushingRecipe.java | 15 +- .../mod/crafting/EmpowererRecipe.java | 11 +- .../mod/crafting/FermentingRecipe.java | 16 +- .../mod/crafting/LaserRecipe.java | 11 +- .../mod/crafting/LiquidFuelRecipe.java | 12 +- .../mod/crafting/MiningLensRecipe.java | 11 +- .../mod/crafting/PressingRecipe.java | 12 +- .../mod/crafting/RecipeKeepDataShaped.java | 13 +- .../mod/crafting/SolidFuelRecipe.java | 8 +- .../mod/crafting/WrappedRecipe.java | 5 +- .../mod/entity/EntityWorm.java | 35 +- .../mod/entity/RenderWorm.java | 12 +- .../mod/event/ClientEvents.java | 37 +- .../mod/event/CommonEvents.java | 30 +- .../actuallyadditions/mod/fluids/FluidAA.java | 64 +- .../mod/fluids/InitFluids.java | 3 + .../mod/inventory/ActuallyContainers.java | 2 +- .../mod/inventory/ContainerBioReactor.java | 2 +- .../mod/inventory/ContainerBreaker.java | 2 +- .../mod/inventory/ContainerCanolaPress.java | 2 +- .../mod/inventory/ContainerCoalGenerator.java | 2 +- .../mod/inventory/ContainerCoffeeMachine.java | 2 +- .../ContainerDirectionalBreaker.java | 2 +- .../mod/inventory/ContainerDropper.java | 2 +- .../mod/inventory/ContainerEnergizer.java | 8 +- .../mod/inventory/ContainerEnervator.java | 6 +- .../mod/inventory/ContainerFarmer.java | 2 +- .../mod/inventory/ContainerFeeder.java | 2 +- .../inventory/ContainerFermentingBarrel.java | 2 +- .../inventory/ContainerFluidCollector.java | 2 +- .../mod/inventory/ContainerFurnaceDouble.java | 4 +- .../ContainerLaserRelayItemWhitelist.java | 2 +- .../mod/inventory/ContainerMiner.java | 2 +- .../mod/inventory/ContainerOilGenerator.java | 2 +- .../mod/inventory/ContainerPhantomPlacer.java | 2 +- .../inventory/ContainerRangedCollector.java | 2 +- .../mod/inventory/ContainerXPSolidifier.java | 2 +- .../mod/inventory/CrusherContainer.java | 2 +- .../mod/inventory/gui/AAScreen.java | 14 +- .../mod/inventory/gui/Buttons.java | 25 +- .../mod/inventory/gui/CrusherScreen.java | 37 +- .../mod/inventory/gui/EnergyDisplay.java | 31 +- .../mod/inventory/gui/FilterSettingsGui.java | 46 +- .../mod/inventory/gui/FluidDisplay.java | 33 +- .../mod/inventory/gui/GuiBioReactor.java | 18 +- .../mod/inventory/gui/GuiBreaker.java | 10 +- .../mod/inventory/gui/GuiCanolaPress.java | 24 +- .../mod/inventory/gui/GuiCoalGenerator.java | 26 +- .../mod/inventory/gui/GuiCoffeeMachine.java | 39 +- .../inventory/gui/GuiDirectionalBreaker.java | 18 +- .../mod/inventory/gui/GuiDrill.java | 14 +- .../mod/inventory/gui/GuiDropper.java | 10 +- .../mod/inventory/gui/GuiEnergizer.java | 18 +- .../mod/inventory/gui/GuiEnervator.java | 18 +- .../mod/inventory/gui/GuiFarmer.java | 18 +- .../mod/inventory/gui/GuiFeeder.java | 19 +- .../inventory/gui/GuiFermentingBarrel.java | 23 +- .../mod/inventory/gui/GuiFilter.java | 14 +- .../mod/inventory/gui/GuiFireworkBox.java | 4 +- .../mod/inventory/gui/GuiFluidCollector.java | 18 +- .../mod/inventory/gui/GuiFurnaceDouble.java | 32 +- .../mod/inventory/gui/GuiGiantChest.java | 4 +- .../gui/GuiLaserRelayItemWhitelist.java | 26 +- .../mod/inventory/gui/GuiMiner.java | 11 +- .../mod/inventory/gui/GuiOilGenerator.java | 38 +- .../mod/inventory/gui/GuiPhantomPlacer.java | 14 +- .../mod/inventory/gui/GuiRangedCollector.java | 14 +- .../mod/inventory/gui/GuiRepairer.java | 6 +- .../mod/inventory/gui/GuiSmileyCloud.java | 2 +- .../mod/inventory/gui/GuiXPSolidifier.java | 12 +- .../mod/inventory/gui/SackGui.java | 17 +- .../mod/inventory/gui/TexturedButton.java | 18 +- .../mod/items/ActuallyItems.java | 2 +- .../mod/items/AllInOneTool.java | 3 +- .../mod/items/CanolaSeed.java | 6 +- .../mod/items/DrillItem.java | 23 +- .../mod/items/ItemAxeAA.java | 4 +- .../mod/items/ItemBattery.java | 14 +- .../mod/items/ItemBooklet.java | 9 +- .../mod/items/ItemCrafterOnAStick.java | 5 +- .../mod/items/ItemEngineerGoggles.java | 5 +- .../mod/items/ItemFillingWand.java | 17 +- .../mod/items/ItemFilter.java | 3 +- .../mod/items/ItemGrowthRing.java | 7 +- .../mod/items/ItemLaserWrench.java | 28 +- .../mod/items/ItemLeafBlower.java | 4 +- .../mod/items/ItemMagnetRing.java | 5 +- .../mod/items/ItemPhantomConnector.java | 20 +- .../mod/items/ItemPickaxeAA.java | 3 +- .../mod/items/ItemPlayerProbe.java | 16 +- .../mod/items/ItemResonantRice.java | 3 +- .../mod/items/ItemShovelAA.java | 1 - .../mod/items/ItemTeleportStaff.java | 6 +- .../mod/items/ItemWaterBowl.java | 41 +- .../mod/items/ItemWaterRemovalRing.java | 2 +- .../mod/items/ItemWingsOfTheBats.java | 29 +- .../actuallyadditions/mod/items/Sack.java | 8 +- .../actuallyadditions/mod/items/Worm.java | 27 +- .../mod/items/base/ActuallyItem.java | 3 +- .../mod/items/base/ItemArmorAA.java | 5 +- .../mod/items/base/ItemEnergy.java | 47 +- .../mod/items/base/ItemHoeAA.java | 3 +- .../mod/items/base/ItemSwordAA.java | 3 +- .../mod/items/base/ItemToolAA.java | 3 - .../mod/items/lens/LensColor.java | 9 +- .../mod/items/lens/LensDeath.java | 8 +- .../mod/items/lens/LensDetonation.java | 4 +- .../mod/items/lens/LensKiller.java | 3 +- .../mod/items/lens/LensMining.java | 2 +- .../mod/jei/FermentingCategory.java | 2 +- .../mod/jei/LaserRecipeCategory.java | 2 +- .../mod/material/ArmorMaterials.java | 60 +- .../mod/misc/ActuallyDamageTypes.java | 15 + .../mod/misc/DamageSources.java | 35 - .../mod/misc/MultiMessageDamageSource.java | 34 + .../mod/misc/apiimpl/ConnectionPair.java | 5 +- .../mod/misc/apiimpl/MethodHandler.java | 4 +- .../apiimpl/farmer/CactusFarmerBehavior.java | 18 +- .../apiimpl/farmer/DefaultFarmerBehavior.java | 31 +- .../farmer/MelonPumpkinFarmerBehavior.java | 4 +- .../farmer/NetherWartFarmerBehavior.java | 4 +- .../apiimpl/farmer/ReedFarmerBehavior.java | 4 +- .../mod/misc/special/RenderSpecial.java | 12 +- .../mod/misc/special/SpecialRenderInit.java | 6 +- .../mod/network/PacketHandler.java | 33 +- .../mod/network/PacketHandlerHelper.java | 4 +- .../mod/particle/ParticleLaserItem.java | 8 +- .../mod/tile/FilterSettings.java | 5 +- .../mod/tile/TileEntityBase.java | 10 +- .../mod/tile/TileEntityBatteryBox.java | 11 +- .../mod/tile/TileEntityBioReactor.java | 3 +- .../mod/tile/TileEntityBreaker.java | 3 +- .../mod/tile/TileEntityCanolaPress.java | 7 +- .../mod/tile/TileEntityCoalGenerator.java | 3 +- .../mod/tile/TileEntityCoffeeMachine.java | 7 +- .../mod/tile/TileEntityCrusher.java | 5 +- .../mod/tile/TileEntityDropper.java | 3 +- .../mod/tile/TileEntityEmpowerer.java | 2 +- .../mod/tile/TileEntityEnergizer.java | 11 +- .../mod/tile/TileEntityEnervator.java | 9 +- .../mod/tile/TileEntityFarmer.java | 5 +- .../mod/tile/TileEntityFeeder.java | 11 +- .../mod/tile/TileEntityFermentingBarrel.java | 7 +- .../mod/tile/TileEntityFireworkBox.java | 5 +- .../mod/tile/TileEntityFluidCollector.java | 25 +- .../mod/tile/TileEntityHeatCollector.java | 4 +- .../mod/tile/TileEntityItemInterface.java | 2 +- .../tile/TileEntityItemInterfaceHopping.java | 6 +- .../mod/tile/TileEntityLaserRelayEnergy.java | 13 +- .../mod/tile/TileEntityLaserRelayFluids.java | 13 +- .../mod/tile/TileEntityLaserRelayItem.java | 9 +- .../TileEntityLaserRelayItemAdvanced.java | 3 +- .../mod/tile/TileEntityLongRangeBreaker.java | 3 +- .../mod/tile/TileEntityOilGenerator.java | 7 +- .../mod/tile/TileEntityPhantomEnergyface.java | 6 +- .../mod/tile/TileEntityPhantomItemface.java | 6 +- .../mod/tile/TileEntityPhantomLiquiface.java | 6 +- .../mod/tile/TileEntityPhantomPlacer.java | 3 +- .../mod/tile/TileEntityPlayerInterface.java | 4 +- .../mod/tile/TileEntityPoweredFurnace.java | 8 +- .../mod/tile/TileEntityRangedCollector.java | 3 +- .../mod/tile/TileEntityVerticalDigger.java | 9 +- .../mod/tile/TileEntityXPSolidifier.java | 3 +- .../actuallyadditions/mod/util/AssetUtil.java | 46 +- .../actuallyadditions/mod/util/ItemUtil.java | 4 +- .../mod/util/NetHandlerSpaghettiServer.java | 10 +- .../actuallyadditions/mod/util/StackUtil.java | 2 +- .../mod/util/StringUtil.java | 8 +- .../actuallyadditions/mod/util/WorldUtil.java | 26 +- .../resources/META-INF/accesstransformer.cfg | 3 + src/main/resources/META-INF/mods.toml | 6 +- 666 files changed, 6825 insertions(+), 6369 deletions(-) create mode 100644 settings.gradle create mode 100644 src/generated/resources/.cache/27a06cb38e627c3bacb7787d001fbadd6becbe3f create mode 100644 src/generated/resources/.cache/2a0621f54729484bb667bdf33a347c218c756998 create mode 100644 src/generated/resources/.cache/3425a48f50a5cfd73d65d933e25ea9828512dab8 create mode 100644 src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d create mode 100644 src/generated/resources/.cache/67661e0cbb74e53678db18185e51bbcd4d93f3a2 create mode 100644 src/generated/resources/.cache/68e357711f2c2ca6f18b64025293f52db04fd591 create mode 100644 src/generated/resources/.cache/70af3238de42da66beb5f354425347f373dca837 create mode 100644 src/generated/resources/.cache/735031f3addf80804addae5e3f53249900116f1e create mode 100644 src/generated/resources/.cache/74807d958079a027731c973b9550985af6711175 create mode 100644 src/generated/resources/.cache/7f59a03675256e210e43fea84b89db21b9eccf0d create mode 100644 src/generated/resources/.cache/9cf54cdf67e16111ec482a2a3b607e8fd75a4246 create mode 100644 src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e create mode 100644 src/generated/resources/.cache/ac8a02941a4e34649db8b388fb528d3ed610c50f create mode 100644 src/generated/resources/.cache/b3ca5dca15f867120b82824364d3156b7fdfd666 delete mode 100644 src/generated/resources/.cache/cache create mode 100644 src/generated/resources/.cache/cbced4962689e36cb386fe2a02f01561d1264b58 create mode 100644 src/generated/resources/.cache/e5c5eb35b4ba40351ecb7d9f04c3527f2f5779b0 create mode 100644 src/generated/resources/.cache/fa43e5ef6ac83dd009de17d3b434e29660c4c3fc create mode 100644 src/generated/resources/data/minecraft/tags/damage_type/bypasses_armor.json create mode 100644 src/main/java/de/ellpeck/actuallyadditions/data/DamageTypeTagsGenerator.java create mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyTabs.java create mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/misc/ActuallyDamageTypes.java delete mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/misc/DamageSources.java create mode 100644 src/main/java/de/ellpeck/actuallyadditions/mod/misc/MultiMessageDamageSource.java create mode 100644 src/main/resources/META-INF/accesstransformer.cfg diff --git a/build.gradle b/build.gradle index 3a98c5c27..045b8ec99 100644 --- a/build.gradle +++ b/build.gradle @@ -1,27 +1,16 @@ -buildscript { - repositories { - maven { url = 'https://maven.minecraftforge.net' } - mavenCentral() - - maven { url = 'https://maven.parchmentmc.org' } - maven { url "https://www.cursemaven.com" } - } - dependencies { - classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '5.1.+', changing: true - classpath 'org.parchmentmc:librarian:1.+' - } +plugins { + id 'eclipse' + id 'idea' + id 'maven-publish' + id 'net.minecraftforge.gradle' version '[6.0,6.2)' + id 'org.parchmentmc.librarian.forgegradle' version '1.+' } -apply plugin: 'net.minecraftforge.gradle' -apply plugin: 'org.parchmentmc.librarian.forgegradle' -apply plugin: 'java' -apply plugin: 'idea' -apply plugin: 'maven-publish' -apply from: 'https://raw.githubusercontent.com/SizableShrimp/Forge-Class-Remapper/main/classremapper.gradle' -apply from: 'https://raw.githubusercontent.com/SizableShrimp/ForgeUpdatesRemapper/main/remapper.gradle' version = "$mod_version" group = "de.ellpeck.actuallyadditions" -archivesBaseName = "ActuallyAdditions-$game_version" +base { + archivesName = "ActuallyAdditions-$game_version" +} if (System.getenv('BUILD_NUMBER') != null) { version += "." + System.getenv('BUILD_NUMBER') @@ -75,8 +64,7 @@ sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { maven { - name = "Progwml6 maven" - url = "https://dvs1.progwml6.com/files/maven/" + url = "https://maven.blamejared.com" } maven { url = "https://www.cursemaven.com" @@ -86,11 +74,13 @@ repositories { dependencies { minecraft "net.minecraftforge:forge:${game_version}-${forge_version}" - compileOnly fg.deobf("mezz.jei:jei-${jei_version}:api") - runtimeOnly fg.deobf("mezz.jei:jei-${jei_version}") + compileOnly fg.deobf("mezz.jei:jei-${game_version}-common-api:${jei_version}") + compileOnly fg.deobf("mezz.jei:jei-${game_version}-forge-api:${jei_version}") - runtimeOnly fg.deobf("curse.maven:the-one-probe-245211:3965688") - runtimeOnly fg.deobf("curse.maven:mekanism-268560:3875976") + runtimeOnly fg.deobf("mezz.jei:jei-${game_version}-forge:${jei_version}") + + runtimeOnly fg.deobf("curse.maven:the-one-probe-245211:4629624") + runtimeOnly fg.deobf("curse.maven:mekanism-268560:5125665") } // not sure if this is still needed @@ -123,13 +113,13 @@ jar { task deobfJar(type: Jar) { from sourceSets.main.output from sourceSets.main.java - classifier = 'dev' + archiveClassifier.set('dev') } task apiJar(type: Jar) { from sourceSets.main.output from sourceSets.main.java - classifier = 'api' + archiveClassifier.set('api') include 'de/ellpeck/actuallyadditions/api/**' } @@ -139,12 +129,12 @@ javadoc { task javadocJar(type: Jar, dependsOn: javadoc) { from 'build/docs/javadoc' - classifier 'javadoc' + archiveClassifier.set('javadoc') } task sourcesJar(type: Jar) { from sourceSets.main.java - classifier = 'sources' + archiveClassifier.set('sources') } artifacts { @@ -156,7 +146,7 @@ publishing { publications { mavenJava(MavenPublication) { groupId = group - artifactId = archivesBaseName + artifactId = base.archivesName.get() version = version from components.java @@ -179,3 +169,7 @@ publishing { } } } + +tasks.withType(JavaCompile).configureEach { + options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation +} diff --git a/gradle.properties b/gradle.properties index 92fe44a8c..b8c4072a7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,11 +6,11 @@ org.gradle.daemon=false mod_version=1.1.52 # Forge -game_version=1.18.2 -forge_version=40.2.17 +game_version=1.20.1 +forge_version=47.1.3 # Parchment (Mappings) -parchment_version=2022.11.06 +parchment_version=2023.09.03 # Other mods -jei_version=1.18.2:9.7.1.255 +jei_version=15.3.0.4 diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar index 41d9927a4d4fb3f96a785543079b8df6723c946b..943f0cbfa754578e88a3dae77fce6e3dea56edbf 100644 GIT binary patch delta 36987 zcmaI7V{oQH*DaihZQHh;iEZ1qlL_wFwrx9iY}=lAVmp~6XP)<~uj)LfPMv>O^|iZy ztzLWgT6@0L%Mke=l%(I{A1%VOoaE&Om>6y_=vN2gUFd_< z`I49N?Bm%~A$xw!r1{R)ZEe!vOQUafT$v|Di? z@6~Mff!Wcm&giJ>4E38a-ShQMLFjksfkL-#Xul77x8}fyTFt*bZ&h9SH`}sN~U_x_}#Pldr> zv8PI_b7zggb-?EDtAWaYG&Te)NF^l1gw$7Xfa2Q-YdBa8OPHKtm_`rt1=~xTUSIjj z+go^${hAi!SRJv)2O8b=zR63PD~Tk*_Yvpua(%(S=~K{G?%DT~*d^Cr$1(C^Vm}Q~ zVLy^I#0UPTJ$oXhmg-9M7r#Aph|D-2@5k0J(p&-_!6)sMYQ$%^=aYgdxB?0>3_jC| zj2_tn`fWF<{xt_gWgU6)H1_9mv@wKgLm@)0lB7QcghC~{EFE*8e$P_$6b+0fIztRY zX@clnI-~S{Zp#fiojF&=p6!b96xJyKrUAo1@qMyVO1?#R+l;^G0&x(_^e1#~vIUzX z5t$4=rq03TE5&IOqI?!5vLi$C@RLRfot(xi zT;}ESD9NN7S~G}$ahl^rg7GMO!*7<4kBhQMUSS`ekSr#$rASIXZmOZ^c8<3KnC!<6 z7?zx@%cm}gQ?EGDTAE265Rqif)4jz>4)BxeDB;fdP2tPzlV5GSZ;`M}Cd5jF6o$i= z(ir7Yt+E1Z1c*{wzDQi@ak!pH0#gml1PC@))5D>OL4J3a&DwmI=`zji_dOfq#D!aerL|9DXaM+a9 z3J=wmi&H@KNW+@__HM|Cst)tVUv@%Yv*nIv!;L$H&t=xdv3V8r|M`st@ccn}rN@gP zD!i<6pLa@){asX!DBU zKSQ6TFzX<|F-UClir`U2H74RDBWDOHgOqA`=E{7#xe1C1pd_gSY=<>XrQ zo)%o|1RP5LU=XUb%9ri1?%a@R`&N#i4#_BwWR=i)73-j+730ZX;*dkNjs2-E7^xJJ z?^dLOQbk!6QWo)+Re{M7Rk0$L3r$^QfCe`#Lb(QiEY>bZC1uD9upUE|xK_G1EQuUZ zf!l?lt&gN2rEaL!SEQ8ZV>g>02S3EYO%dmo0fZ`KXi#4yBbUpahL}@|1mj1HJ*A-7 z=w;h%t0koLjMcM2+RM{pOqBqSqqGVmQx8DJL)aT(*P5@U^{%qC7$z|m3L-g77?xCP zRK-!J*rFA@<3}wvc|z_ z)}Ccor@8(juC*77A>*i+(@IWT?p)@iXS=H7R}BSuD$0}1q%cjJm>h`XSwEw?RWHO# ze%5l;23sUNkFQHDRt`QHNnlcsG4y4oX!Pviphr`2r4EuLbAu3c-vsk< z;C#bU$lgd8pOG-yfeZ*V%bPu8RhDIH#rjRP8vdP*7pnPjFOph2+3M;Z1kk+7SXe=GNJ6X$r^i{PG@!RjmyWWCh++^w!GUYDO-Tsk_}N z7#EvAR@ZKhSpYIJv1>%VZVkG^v{B8Cb|fy+aV#m7e|MEFS!EXoM{XK-Iu@;{PL^Y< z&{^c$(~NGga46)V4!Ots4s>8~34X}{74nmIlga_Srd*WeQrC6aT`*l>6ivlW{bK8C z_DeYI;u-e_-Q>I4pJZt~luT`Lo@TE_!DL|%2`mbwPuv78%tX7njeJ>kl%QM6B9?n? zK3?AuP_ddvn7`&_GPF1*zJpmD;U4Stu7ut785kOLi|nmnpSp`yg~@RS$}? zG?oU;l^b%ymH#O!A9Wj3V0x{2Am`#)n?XocB&5yzBn#1exuW%omymlf`<0?uce^4V z-T-^gBo%-pd@0EUj_AaNq`qyK+P((7nc7-&BAVG+8=P|#qyQ3v3TH00Uj4<+ z5z&n>JHUh=z=*ufAk%eNu=G9nw*3vO5&8AV>_)hDBQ6Ka*Xuz-{-~Zf&HS5Rh>Bya z3R*<_OV`)}`jO!U54MC90^^duSyBMXzsVt4#A>RY$S87**y9EUnI*7kz+i@*2+${E z?#p~)NP2Myd@(7;uP`SS2hB_Zr$-K`Uj6Otmg~yBMjUVjjFDalRrn=)-WF#JHdPxIifOd4 z(tMQ0raUN@I+cO1|ESG{CUX9J`gSGZ8pn&$^Qol!$6V3#PRltYB{&pT@`8XL;`iFX zTDj2&T7{aEX@z8=lDc4NGb9rC21tz^;=k1II07nZ+Hp3q2V40JUYDZiKtBcd4m~p3 zkm6gm)3G?AplO9OtP-`)CqQSRt0DJ9PI_b@s(iSviBG^5ukW6gYqT#_gY_3nNfr$J zUlj=r4FUop46-%K=*;x*i!HgtO8|d4kaa2=6%JM<+AW$5HCja#7$x%{!|JMP-vN?< z+YIGBhXQ{3YTcK-8KuOj%iX}BR7Lz7g-(PiB?wwe>Bq4SHFVNmU#b3u$OgrhxGzNh zpk}{Vu#Cyy^1I9!=UIoqRh4ApXf(i2qBL@LQVm7X`Vh)t^5KOOaiMExc&BZwED{*} zA$%lm339JHrJxW={CJ*GY?~QP8^QId`NZW|J9^vk%p6qNljZf0-c}0R%#tda=%z%? z7;x?QiYyyJvy5{W&hM>3RLiJK)SYVhJQ#suW_Fl?!P(VLlbZ1ho+R+3Upj!<+Q~55 zXNW?{d2=B5^P*ae^vZbl6yF7e6y$D98O^Ae!t4n~6Rz74Ha|@G!DCrGgCa2NUJ4u6 z&3+>VfvwfPs&kZOVBW6YUbBQ9=0aT4Mbw{R%%v$UmLWT=${g)D$-(lE`TFnx1D>|C zv$@yfvD;Lh6h>$o?YP3na~mKQI-$FS>*Uz}Le+`ic%46;-YJg5!940hz8?F)e z!!=G=XVo*Ng|#y3(VC(848`+U6a>rnwm9>!5-B<3AmiB>vKjtLL34=tQtGIqt@5mE z6XtDRL;83~T@P*e4^1Kg!L)jSV{J)RCs*VCZBL2G+!}xpx?rDv7FYSlL`}VDPzGFWR(r(k zl>QpK@(F>$o-mIA)0tjnmlo#gO1kF{{$wNYOij1jRsE^QX2G9(*HQW_4^q#{>HETj z)KXZS?{hx;bZzdh{{o=S>Nrf+jcHyn(POE_bLkQ;RA>+bR`Pk@U(p9k$I1?!mopld z6N*W;DAlaCgv>{85Tjp5d6xud$o<};xVIQ9B>d09JQPrH0PQUX7pu3>gXEnc5bU;< z+4@|>j_An;Dq$6IPajUw>LQwu7WbLHDM;dHK%+Q&Get{-B{ZN3BU)zM!$r&-y?tI7 zefXTSRuA0?TzH!#M|LARtH-EDEGkKVP9gYfhX-S@4G~{Ul(w@wh+k;N%C9MnVgtV*SUz%z`{Ak zM=zt8=PdCHL=`w#l*wQ}IX!_YZy63NM!msFk&a8q471j~*-VwRfxCV60q-gqBc6x5^BTZ1kHmcm zB@Pg6?8W}uuVy+y@39Jej%MiI!fz%m{w+&3t(c;IaECQLZc)^95pc|o-PFG3rz_}t z$d{*do`l?{=jL5(oNRLyiyw(YP7+@9L381o+h^FU>C5<8mRRW6@|e|koHivsqjOhE zX7gZL4G+U;OWV;V9!97rh791f!2Xr(!bZ#Rt~O)?^0YP+3J*-3P9j%e1+p}nB1>v&2#ANy$m^R`*%_4_i^#f-V$rbPn&lc{8@a}u4 zm}*>dCGpZ#FOowv6s{2aMTASa8UCH+psV-p>)raxb1J=idPm+TAFCh+R3P2@m*^Ra zl7P4h7W;~&*%`@|pf&CcPV&`HwrInIbxQRi6x?`XVZQw0=$?Q915(MhuQI-SZbXXOjwFPu%Xfp)hYS} zT>NO5ceDTDN}?ofDYYmi82v!w zTyjJ)bA+JbN&rVN)-1!uSp^$DPF@;|1>KAt|FT<*3nIf!k(WKT=g2+jkE-<3jpYIU z3efXbEz@>d)KcN{(HAtdVN zBJVQzEd-c!|9S{GbO$vA7* zsLOTYr3tz3oT)s4u3i7l=1rmRw=*mdS1b+HSW6T z8Q8HZr7jXtz$ow742XmCcA7I3(Ij?1q@;obb~e6uoDclx^O}SJ?+|lZwf3>vhKeWc zFPUoW%2u7$sw_U9q2-%O4gL0}k{+{+u%2lr+eO_^cLd4qrK0rQO_PLG8$RA49FlcA zHQ7#gLk4vz)Y%pG)}~UOuywA`q<|^rmMWnt?RWVhK-E^LM5T4IaEEDDXRC(tg?sMu zVjgj^K7w+I@Rd?498Yc|GyL*&P_2%~SET*2TwFX3(lTj=8XYxWKyyhh)B#3)b}y`v?0iwfZ~Ha-YX9v)^aG><)l3 z@OT31B?d&PH8xoW^^!|$k3hz!+q`l;Lxio0k_zmI!FkGpDvee9u;^Om9XW6Jc6GN1 zfRQpW_6@`UC)6E|o$1S#Lrr(!;*w5-&oTQWFDmUxN|t)6mG))O!~UHdLCSR@qi1NJ zP`9-0H=I}c$9Ht+uyhTnNY4^-s~$Z%>PWVR|Em}S)X-K-m%NYAj12u3nQx<)3DVb% z_013;dmg5x9igAy58<@YE^@pww#6}Oz(!bek&X;&7?M+?^%IlR<3i1~DD5bk9g<&m zBhj8u;McIM6Oq3tFY2h9=8o8p~)M$v_?1ltv|ko@arfhcLlUO_o4uKoGr# zYRf%|lu#u$s+lV~SHdtmM=1@J)b8%MixhrfGYN8F^Ni9%3Ejdp!SyG`w{%XGU6PxY9WYN zemCR-gryT!QU2^6*+lr9^_NHz!8gQzv&60aEvhUi2*?dM2#Cc0u*Byf1)x+_UlC0h zU7-0>t3tODqN)g*RHo0YkZH8VdYO_^{#;UJ@S}y`e6MM1+947!@;#4b$b2{Odg(}d zn!6*9fLR-fl*{LOvh8}qll$p^cT5+6YlD-qK5Hb*M8m&4MTW-5tIw{?sm!8mF2z+s z7fdNyq{V9{)z%$oq;)Q(3Fs!we+=Q>69{L0i(5OHCDByLKQv?YqVfxi#e5OpdJ4Um z`k5EyP*B2W=S@Xc=e0)zS$)+h(u#lm5d>@C#?R3b9)*N&{6b)j_8ig$w)4cG*{ihW zN__!uA;iCc%{Ma3B6Qp~v{Ohxa?zZrl5NwiOf2AOc#-)-uHLr94nQ0qhmE~r*7f72 z4=^Ixcq+T|`!P;jsAA4S#vUzR^j5F(!~LrJ&N$xq!*CuxTA#JfQ+$;F83wTELA&)RV zrWJ?Reb_P4irbwC1gsHu=Am{94V_~+O7ta+&}13A5(;z}FJeikKh97XTjigcEliY+ zQfSL zL3;$Ue+0$|+l8Str4>(RsNZNPL-QRwCwoB780}*^pv~#9n=J6qr}-#+-VA@{&+7-7 zwCTNtsipc`N-2JklH#>a1>$SPOXsPun?S9vAfl7@yRD*M8wX#bt;65FG-8ZG0a0ch z6Lu)ho5H$q^K@Tf{u^?-#XeX|$=(^}fQlCJT1+}d_=yC>5;k{>#h{N~rizGF1SN1~ zH6`5|U~VxX7ylPV-r?@ve#OhI+#*F_i|_rEkK=XM$9t0D_uD-l$jqyn1cO7mayTFP zHcc@$o-9n!T~lN_HxrD3o5T)1365|+xacUUU7~VWt*?yuydfkSCKvjZ`x3|>bknbn7p^#44*lj?_Smq-P zjG~N}%+E$hy&={v{VnEX)I5^$P8j5OJ1+Sh2U+X5Vm?rLg0x&anN1ziQmzqI3DxYC z-TKT(#G&Q-H9N_6EX9&OJ>pAQ0J4@FtV(`Z!_>iHKR~b&c z4m`3Iea!{9uZFvlZ0W}2eH_DP!D@;}teR^0KG02b)1F*@Mt*D9>n`OY^~+O+Em=Nr zhhf^G)EL(xy1#c5=T~h*IV_)r#pv1-bjW56xV9%`v0Lc}*V(iDW*NFLfR?ugn0CHk z7u*MCG=9Z4uAXWuZ#(|jnsxLk3rClbpTbY2Yf+sm_i|B2=j3i*=W}6!yBU#oteH5a zV1!9B+U{Wk7UZakizWB5q`T6=OcDaDM%-uxc*>wq0w?aTnoBon4lqG96R9 zGPEnUuR)X+!F%mb`~E2bC@QoB*CgELgq%=x6W>033!T84GCkZkS#7Bpq}?q}Pq`Rq zI1wlWgYk54$!s})>I8%7W(F^fpB3!6)Et?I_ix{wJG9!{^QChe_EhYd=oJx1NkGVJ zRT<%AVbG6>!`2Py1g=l4Opp&$**gnFoZs(tl8C=l?NY2{Q7FU$vKrhZIT$qETWdS3 zGHocm@hUlDsct&ubsxE{pHU4go;+y1AiBUc+On#C3+*|~B~^-M6(g>%79`H2om)(4 z98#g|Q17cl)EjFFLv3Po$F;)#?$?2Fgw<1<-^vX;RAPL46QP8vH8L>ZzW9sjeAT2N zsSM$0+8!bR`+PtEfVeS95AyR;9Pp15leOeM##J-bUX9}|*?MouBYm)x-&xh0Dho6O7C_jPEo}as6-G#3Wgh7?EdKJb&XaBe6q?!yFE~xG5&t>P7MbQR z&6aMTOI}eB0NhUn^y`qagz}PwSqMYKMy#q$;!Y~S;8rH>*BrbHnCrZGz}jVaXwZhb{^6jw3*O6?X_jjrgZ1!*r+Ll&6`H&q)jCMtDt*tYbJ44sqiu%6P#nZv?)W2 zsJy<_msgJgy&%<1jg#!@Ff7s78~AlOVmTA`Cd5zHh<#L2C1>`QtEnGqlN-XXIPR1pBXg55b@l+>bEHm z9=LA56`E(atPz9GBWJ~d@WwjUzNkmAL6-$YLKH0kP00~ubn*B?;0v_~8Fl2S1ajPJ z{Ld)P7-H01#r{Py!gx#_ED_LQU1}7^0=@27ZxgPnVZt1$XOl=TC{5H^*nGCS!Ic0{ z6Zue26aDCJG+W)vT&-Q?o%a2#pIrjvp^cqI#R-OEL8jCfwMrs}rW%gUkFFtIef^ik z+=p9$b?QmBHCLDVGd)y1QE`-2wBnBNNYh43aSU%T6CrZv0Cu4Wo4X%6!z3-y@%(VK zerMWnoei*SNenL`Pq;sQ^cmYxmITd~Xcg>2lV;Md`6c=W+mN z@-gzRN!=?V%bkGu6Vx`1|8T-94ByBcHfG;E-5HlJMcg6O9iKlc!0Rh2Nzp^)w}(nj z^c{wGT{LUz!-Ln}5GH@TJ5X>u2m*Rc;Wqgq42?R~>2SA#_s0ldjxHi?OLmZxJ!M&n zT|#l=d)QlHF|uSCxLtbr&*=D6c^(5CE+}!bVk&A}oQvS1MCWKtcHi@nTJmCOJpSJH z!U0!NY!>c{@(+v_L+pb-TKtwpPp)RBc%>vhso-w}=UX?aFQorYZPfxl4od!2Q;(4U z|C?(*p8%k*xMYMr_HBu`vxWCU+sgiZw#K1rI2;HncR-1lN zSFvH?z0@{2rBF;_R%;{8_J}70s(nE1$zc8V0`u@@020a}VzN=`EC@E~RJyUwyt8I9 z^e1^q-BNYkcCa;tkbv^9CuTX{%2g8T%Mjx8%Z0N+^U{X_n7ki z$_wBin0iZOb*j2|%0V{NT|^J)p1PZu9pW!Z__N0Ir(3}D>Sqj@CVmGIt*cQl65sJ} zf$0GdZOOJw{xps{0YfcWleF8m@<`8@OvE~G7cmT;}cN3=Tv4O2Tr&iLl?aKZaRRW!?2J8t$d?KEU5SlPdP;fc_l*ut$Q)>wc@ zM~1x77vU{?{MwNPCqgVxL`Ugi@7X&ZutzKaac^|*;t^xZO}JA&s2(G`-TpgSPLf-i z3BBQ{6?iWeMTUmaEQ>exdk4dq8(fydamLUJGzZZsN|dYbL!V!#OF5I&!WxKWNEitt zT;5+c((GAdFbS0BRv_v*ruABlkMmsivszb#GAP0#UKU-J-Uv?-^*#y`PR*y< zy7}OdsDkzf?vu?S%~vXwn_$k?tvKk)yhiB|?%~mMX&qBK8cMDJd>EOGqURHBmORgs zh*-Tk6NiK&PwrcsBR0WZb<)7le)^@J%v1ej`L8yUB#Lf7_@Q~RI}E^#D}uwCD}|z# zhoAL5k7!18ryP(@ioy93VN8%Xf=K$=pQ&>%CcbP#G5dVgwD(F=ijIdtnPZLKx};NK zPD-2rhTJ`8G$#(=pR?$UHbnc!eS0t{N}NDe%OV4A+Uz*gGKxbMXi%wsHv}Ktv#oN) zIrMnP{c<6Wu*@evA>7Ob7|dgp`;@g;-!{ia%6oXU^NA}?^O-+REEp)SyVJQEz*D?s zb!?gLlhf$Pu9D5govl`1a$j=w?i|T9-InEP)crpGB5Vh6Ug+CUo!}yj(vUrNET4(u z4i@A%5@)8MDdsVw;}-p3&LOFmieRplChLN;XsCzAQSE{T+|LEgs^pj#G_sJdbBB$m z7h&fXKJm~0mX1YsHt27d>y~O06OXyXq9#IoBSnXr^0*a4^d<#H$f8>UV^H!fq5SOC z23}*Bm7f3$lf5MOh?N2r*^5aill z5##=!ckX|J@c*DBe^fAoA^YJpGgb!uK;WULx~%+nZX3jZyq5onX8#F0slo(Yr5;+@ zq9BWl(=QS-NTL9OtZGX_o*%t&$piK8A5o z5FjAoBqi>4uHHuMKXtrc&(zaf7W-ym6wwdki(d14!+&<`v<@+A=H-_@%6tVaoo)hq z|J;D9f0UA?F>ePllc~V#iH!cl3>M+%Oppl6NSA@cY#3*D!F+j(J6yf&??GxH;nS{gpEzMkk-+N$(RK`A_NiAYU7!WoXTZ~M`SL2 zD9s!QuII@SBw5q;t5wj)38wvwvc{(T_M$@|1Hwwlrx>fCg`xu%t?{l{3tIxkAE1`) z{(?k0Vt+u`A0kT|KPTodID>rhNyIb0E9zgW_{+J-K+~7W5=y|e&m8jlaZo4UaJ-wE z9O$>eXt_o81HC~^Uw~bhD(~Pb-JvNcxw|%0^(y-6#Mw(DqSQW?izG`k8sm3A+2vZG ziuT*^Bj#N)#OS$_hY94|nTr+XSchmV&`@=R4JJV)j{VVfo&@v)75EAjDc}B&VkG2S z**P`2u~rpOI)zCqqTUjuRaiQ%@)MedB;lWkQhTH` zLo3$&rZn|!)>Wq0IV^nepXR#pySbS5e|!ES3lOh4l`@tHXT(B)KxpPwo1Qo>4D;@g zUtMk}DEwzcwCnS28!5q#5J0w`UunY+xo@@RwIKmK8NNH#-Kp7BUa|%^PA8=x_E_D1?P=t+89BQxM7@Cix1;$vj)#D9Ze|**g09KJ({eBh ze{NjyA)|aJHXD-$GaY9&^FNtsc+bZ=1*kM?(T6QmFPmhXe=E*YIMcUdTuaV{Ic%Es zv1t`}mIoUr7*xVChL&1IkS5cUWoHOL0VEN}{*iR%k+j)3mkCInaSDC%y&DoBOvKx$ z+6_|N4@}+p1Lir zn;9B6c&)JMvd`{Zb61CGj+a@=<`>K?+`xn7_E{yx(U_U>Z!k1TqxoS^_F~L)Vi zcbuZcBbQ2k_I>1;^PctI+6DN3fjR}G#j;m%vQ}8!4ND*>GF)m^ps_LuoQc;%SN=K- zG4cp1l-0WWwJ6Yy{i6RQ{OC6eNa-B-`AQ|?&6`I)b2<$N(_vaDqWMIM;>`MOAfxH- zixS4zXXg&a;UXae@3)5YnzsZqYDyB`DXOBGP3wpTYkF6D<5E&o9G{3KHK^0$!zc(d zhUIefNP0Y>+~q7Y{%fCtoMKt3I%fby1C(dPqEMKc@{41q+%;?3y2~pEfa9>50C!|e z%rw%Q$u+m=1AByiREw{(PI0-6^}z3VQOqeQM7I0|CEwsP5Q+=D;rBbgV9Q9$qeOz! z4pIjYa6aqG!_DwNE44HzuIpNG5?<|k#J!(f6O-c8_j!o8-#M*iQAiH3#fYw}4tq9Fl{ zrgp}zuDROYMrtb^-+mL*+Y>VoBE&xR@L=pt#^eqzXydX5-9g7L+2} z6+!NmBdfJR?liS!Z8i`b0m|pL7b>>ZZGyGE8irdhzOtIN_88jleE+mai=^ntPt$9j zmz*2l6J5XwpQnM~*P}5A+i@j+%OODV{Lb>}H9GE>Z^6DOfrD?sVg0Mr$?Y!tU;QB= zmpe+q)xtwG0v_(7eN}=XXLhVHCw{CCry!(2$|BQnGj9srF=}V)gH;v{euIVOE=>U! z^w7FuS(hG@ibUgc7QNV*TNy(0#6*LMHM5jB>(>CjDJywcH}nIr`WRz6(-nYej?TVn zyefLID#q^JIg9Xwb!~P=^bl(#68_q7eX)wdl37#S2CH~-WtQ9$i>AVwGQ|>xc_F1Z zFXkewN=>oOjG9a&WhrkOZJ6T(d40+PtxBB*Z8xjvl}nhWMb)#M{%n$Vm1gC{Mu!$n za}TRzGVMxkwMXtr>YL2tzqVuTir-k)Dz&Bz-cu&{mWpZfa5BxUtP07c2HIt6e3E14 zE_LVsf^p3Y9^5;Ard_Dexf^H;8=sq0NxdLXOO4JIKO@4>uZ|p8XjK?hSZ8e{{D6KV(E~ z4=2+ddOn)`$!;NWaTo}!oS@jg3re2mfR^Beug5@NhBReyu%FYA)UBmCSJ^@3Dt@+- zOLh-hSRLmXu%b8E-H__wgc_VNYgo676r1rs%&JkuDfneeY-4fRC7h7W;zYwG*Pdpy z9FuWV~HvLctO?RNyBpy;lT z=t~olEmqiq5tK|+BDIBq-OW;S=%w-S&G{oh4Ax?B26s%6Ev!bZS{3k^X|RU|VZiL9 zK@F8LTy8@g@vtJpinpyowr9@3xWc5EOKKnDd>u?zRMPSmtpc_djp*mGS*^w9x{bK8 z4T;AY=}p{#X<}LO6hfX=7u(xb5}Gt3!e94Ns>Ch4$Ou(0!v%D|G09IR@=5CK?O-pi zl>`PhLN6fCb(iylTWfe?k$8?cpL$dXpg2MOHrgoJaCq?`n&FlzY)+XdUgz7`=mXKx zFmgC5l2oCFc>o<=(@t!r*>RP|$YM!}W$@?3z2Go)oC`R5c+!`-1WNc4e3gULr>9Ka z!IC-X%eA4AHFQLJJ#r(XW{_f=0V4z27=^N3g@yY zB4VTgCM)~BA(=Yd0g0-w=a|J9(|u`$qYY@;iSnOpZ-C|{s>G|xih}+(Fs)(MALYMe zTn92U$sWQ$X>hL>$O}k=aYvZqAau?Y4Lc>P_;|7BJy1~?W27M6;^M@zXRKH)FO@0u zB$w?P^%C$WWYHYFnahr59Jsn7P}8AAa<`Z5!w!|7dZ!)WSV>%~IBGP+c@JqZ2`J14 z?*i8C_5p5`(XL5DB{+E`?4hpVR%mS-*W=J6} z{8j743h87@aG$j@se~U~^~|vgNmA5ioZ3J3(3cR2k15aT9LvepqekV;if(7KVoH4% z0Z8xU7G*LBil&yb(Jr&VA9xIH7Rw$C=K*v4fq)O}Svrk0?bDjXEc_yse7;iE%u1-N ztZ6N~^BNpB@FiF%$v{%V1??@1$J(4)jXa)|RIte?@@Sr@P*1}2jq(lyqO%yzMoyIo zehZLtmyxml+I90i%5A&7sj3(CZHbWct%L5LHL+V(Cb)~FwUF1NexTn*4SWGmOQQ*# zFaQ^*jS|AEph@9)ys>kIT14xnjf4g<__G9tFfnlw8Ndk+YPte$=fCciDf8+AyLo~o zIK@_!W2ozy%(&Z$YJiF&gf3L*fLRsb7KR_v%8N53c@*8{Cl;5n*eP|lykI|dT) zjwwYQG{Rn!?6{6F-)e;`r-h zaLB)_JB=bw74=?(uwLb!JExNvCU+&vP&Tk_J8)8g#%uG4{rO~K3A;=az^PJ`ECvKJ zhEBsrs`LdK9@vXsCuV~)A6>ZA7pzpxi?RT^XC5D*?<95p#R+R=mxG%L$WaXexVP9Wr3@WYro^6+<#g82O(GGcN|8-`*G=;DofCu34UQQT0 z^2y?_Lv@Tc+Ck>o40DVMIsEa90r}htE~HX{ef`MMrZ_x{9%_MNd&-7Wf$4jCxnW2y z*)Qx;Gbn~hukW_%i9k~$eEj9yz0zP~6k$X>jGshtu_9Q4A^Jl+7!~1{ay}b%bn?zd zc#`%k*RO%;IRFwa>~{WJVo5vcnqZNvWut4p*zqrzR+uZVUr6 zx8~p>x8%1PS4871mfLI#QXw(!Us&$f)@OLz_P>ED4F#}ec7l|mJtY99<&hc&{CNc z!$Y3k<+8sS#j`D9HJIqD+?Z2CYTV_O4XeVTfa9RcR|s=26E<_R3)#sSlI`^mznb}= zeGAv@&d#n1l~@(iPmwRGmp3m%2ukzumXbMl+3bxfWe(raic&a^QQ8s7c z{D%&+nHX)!+hRbtdo_K`Mq-MG(D>_PUQlg?yWh2GOGv3fk9s;+CJtv)`r2mnA6}s`+Iv8r(;g1=)E7dwU_S6gGVpJPfnj4MnM3GrZdwv0@R*2toBDus^@KG zGla!J=ms!ZV5n?N{}p%3*1K_69(Kf5P**%#RnG-k2dO*0Jj1I-e2N~@)UF5|Y-KCh zhx^<8S>NvF_{L#da$ubO!%~eU-A=D(-1;>1x6)toCPWfVCy>z}@YPo%w_yh=JOL=~ z6yXVDcp-qP6W)--pq=}u^JBQYp$b~h%( zKLKuYE(Ma(Ir#%sALic4!-q#BP?$Q>0kPx9` z#ls@k4y&ftQ}*c9V}*pI+PN#~1^LZ*8Xu*f=aqnx-@)4ka>aBC--7806_drw&)$f} zzc8-^B<}9XJz7eJ@L+zcXNgx*P}ehDh?C%89Amu{h@qrE7O1rzR(A_JB29Xb?ViY2 z$tpWF<1*H}YW_h#qE1%79I>+*;VMnMcElUo++ zpQ9wXuhVBECnCCyudI`DkiJy0xzxJ%TT#&ar|*$Rga$#?R;aGk>q2`xT} zqLsL{+DtDq(vMNMsDz}s5;&Kw1~$(mojiYpTlr%hn@==0QlKs ztX$>ej?^c`(|uz}XAa7K@dC$z-s606s0ci`9#-p~=*{dg_xT)tm&)i(p70#LHmAHY zk#R-?C=!QM+zc1c{Fi0s9SCY48-O7H#(gVHNpuyfk-G8({l8v9=$qpEj`E@;425A% z%l{f%jGXzjxA*%GbofIFvqOQEU88`;Cs;>BBMWl}Qk~X}_G(~bhw3-eb@cJXBdQe^lRax9 zkSo}p!q1b$)D*$5C#_fWK2Lmtid1NS2JVe7Aoxg_M^&pcFNm7{i4`qRf(gK(@IFuI z9Y$tzLgSQcME#4s#nww>$XGD+&nvcSeAR-VBy(PLuVN)bvYF7_74*=(2a^R?3VuKS zfdj^!mjl?o>+c`a^>ng7{%Iuz48Ix^+H}>9X`82&#cyS?k1$qbwT4ZbD>dvelVc$Y zL!v08DPS3- z|GFX_@L!9d*r0D=CD`8m24nd4MFjft2!0|nj%z%!`PTgn`g{CLS1g*#*(w8|sFV~B zqc{^=k(H{#0Ah@*tQgwCd0N@ON!I|)6^`Q?Xw~3P z0>F&P85;TXwk#VAWS+GnLle5wSz<>g3hqrf#qGfiyY=*_G1~|k*h-g(AA+NbC~N@A zVhf6A6qXmVY2Temx2|X$S0UFw%*D3^qpS5e`ZtH#e-p_hv3bYtz!vUA56&MBhN4*s znI=g8YNZ{TYX{~dPZ_gk$3 zZ?0ZR{D-aliB#|SEnR`T;N3$!}02ZQ(F`K#y94FLke@r z>i04JrfBacpWL!tC&p$j#%e~cG0Oa(wM#M(Mn!CQ&`w@usAmfZg29h)&o{r_NeX64w5N5WxG6 zq(-s6n3+LYQoRE}bt$YsBWg30rQ*(MSoLcIu2Zpl1bcHm-1-=no;nuG(Rr?&=9Dia z+wfu8KmGNY@a~FBD`eM%#b5ICn=aI`v<7i^08qgeb@EmZ1l73Fe^)VHH>vwnl#LfZ zYM}d!X*vZ=X-Kmm)|p~g8rR~7THpjqRDXxKte4N;M7#iYw%0~Ki2cgxoq;87kGDaW zGMa(5g9dgC3{EpOF1o}w3Ms0+270RrL{cUBU0=kwNClDNSwY!Lm!3n$dY&svjk#S0d>tPZn?&G%Bd ztl_HV)BD3T&C$JTZ)yChEr+){P!q~(%s;6J22$ep1;aq;vT%}A@4H_e%j*18G#k|8 zR4HfuOLp~*H8ydsM!zd^J6-{I0L19#cSH6ZtZzWy;Vf%NE{=DfqJAc(Hd_EwUk?-s zA$*+!uqnSkia#g=*o}g>+r%Me7rkks(=8I_1ku94GwiBA%18pKMzhP#Af0}S zeaw|!n{!*P9TQbotzCQLm5EQN>{zN@{lSM;n`U!Q*p-J1;p{Vto$r7*_uOOfBqxP8j9?Yom^}ld7Gy)Bh)og{sMVE=iz& zQ8tl{Xm~-Z3>H`75=x^d=n#jJ1K1%%tgPj|GD0Xzq9fV3Ma?HtM@!DivcDoBi|RXcCu&(8=pz_F%9yGJ4E2WNqNhi9LNi3%1JG?Rmen)( znidVu1H>g%W>~Nf(Wc-#-n>MaFPSE!=s9gJNWJ^lL>IYBfrCTlc~T6XDLkz-s$mN% zIcmW+gIppg>?!bII5df3{O}s)J@}LF^h1FuLYU-?Vze6uM;x907Tu2_LdU}6#WqSB zkug=xXpYs;RFi*m4cZ2p00*fzjt{@Wmy9zR#T`u%o(6TyxeX%8M$A)wCq!0MXnhE! zs@Iv}v%rr(7RGQM)UwkdzhO-}lT}7!tC()&KKc@Dj>7m_nc}0VC9Y|;4=Sm7dofgU z+K{Ti32BJ+5cs-Xy7B&*T#hw4cF}b803^9dTGqsxPPP=R8-^vbHS!I{bIm;SX<)F`Yyo-=KgvZ`cta>vzo9Our^+Bfz+X9 zV?O5|xpYjqy`sdQ#j!QoL4@>Z1VWi#YaYf}_?(VW)6Jb?I%0-9#+l|j!<_zMUmr28 zik23XZ+1$xq!fw=hEFm2nC5_iuZV4X9&o7i zLrgr7Ms~sCEB_sDy#`7cxztH9MxO%Vu$A2wR*M^gV1>YxG_=tHv&#iqu~^$wcGpy?v*h@t(H$ zH|bo)EDRwA1s%B4fQft7@6e$2;M@)U$T^O5!>z4AOYTn{6SGX8hvO!By2v73jw^`8 z=HZ`X|)E5WAI&98d=Qk&8#5X>qZ%dRAYO!+Y$z*tBa^ z&){4d!#2n2RL#)WWo)O2y|<3#!jz0SxnV@_sd+@2et6Qm__f*>Ztf*pa9^^XX$-2! z+e{3w^PgG{s$OocN`|_D^8+P}+Tw=R)lt|<;>l4~B4Y@ziF_jJ?^?260204x_$pCN2!RMELv&n7a0dHvv!~W*yB~qxQVSiJ7k{ROR50x*QuojGalJF_K$p&Ul?FMT z&DVHWb(8HD$KLuihvY@DN}=fG);!(efhBilm#&2~I0+NuobS=9Fxe zz#tO1zN?UV0{P6%Fu7I4?94bv_m+30R(ZD~*F9k2pnS9#`W3i=M@{Xe#Im1}$Au0o zHxX=o%Q~r(4Nt(_aGA;|qDjGcs5>nb5q?Z)GFD#iisNE^T(HXkzY7ftImPb!MlG_k zgpcSeWS082&ms4T`UWg^iI}i7!=&MC3K6rmfKU|M62D4GJSEtL%RFmFeIWo|379{H zrGTh}r&I^?;fwcO@-ljq7NFchF6Y2$%I$XOc`WQ3yUri>IJ3U+d$>nA2Omc?+Vu}4 zDKc`JU*$v+$ZnN{V*kM|~Oz5fC%_3L} zubS}2@T6qj53q?Hgk~U*`be^>m6Gl_bjnVurQfuZodxPFyx%$IQCF}2Rb&BGh<4$b z;mVdA990|@Ds|@~-FtqRNkQn%RcLefMO)&k1xdP=D(y+19}~feMzCYbVpfqMwXm62 zg6zvoLd2OSbfiVlxiN>(qh)DMBJ^VZT1Zz!;rFge+?LVH`D+>&L>W6%iqWX3VNaZ5 zAV`F`&Lhk(u}fBoxw052zhBEdZMq~|_C73Q#@UhFZP}lRlH%F$mMooQSxWbi&4ZT6 ziS$QR)Pm*Ni_YILnlA9wEob90F%A&GLv2 zkW^Uh(@WkC(rUJ%P`^p6zYt1}Z))akS+g6i<;^}f7 zZT8$~D`X0xfWFn8{ez$X^+zie9ca6ab&RE2gnC$Ypc)33`*xABXDL+g&R8F&9EJu} zfD_}@4m{4hk1EZGyRtP?hs3Yn;~Harq^tbP9EwBGjGu25XF>?agUOxds6U1fXSQj2 zYBT$(GTkJ*aG*6nOOUoDpL^h9<{5p!am_Tmfq;W(vEd1E!N0tz1_&qDO;F1@oZQ7moSvE9 z)H3IKYVyx6BCoY_T!k+>Qp!KU}%oSL4`(T-*zo_Q^-$zmMv~bCDPcyjQ z7n(KA8z`7cL&bS4h}T>ZUlF2&@<#;ku;y2=>Q^+6TP(THSlDlvq;aMG>eG=8Qw-8a zK#wRYS+-M&luF1FZe`io4|K~3liQ>1&o@|nFc-cx6O%L~$%v-8C7kVlzOQx^L4~$-2hOZGabOWL?#^*o(L*9ossJ(CfH`xxLNk&Aa z0#56|`2O#KcHfk<10^R34lz>%6RqqsG^rt|GAb&x>3|$4q*@O-=Xk#<<;bKmN-_Rjaaf!({{$@Y2@^TNyfN9*TQ=ZWtL z@5x4b^6S5we4oUKwENln$`JpP!uZn{AmP*~GgD+B#>_)PHUXh`R4&A&u?GnMcoeo; z=mVUTNql&a9(DREEY@zn8!UEGkSEPm{EPWj8~V|6!MUqaDm#9_WqJ>svqp^ z-5j65_>jw+DH6enmvIK;+@~?uh^U=!)nGYIPrqoiS7A8j9Vt@pQ1pm}kQPm@RlrS+AG}cf+sO%+n6s;atg|E7< z#$9)B@8lRi=!3C6R?-?aB+)`sGG;6hWA&|LA`~A!)tbn^rzCc>gB}YHl!(=;0bsKt z5VLrJ{Ofj*-^6DbG;dJkB>SasakjQL-&tz%aeQ1SWMcs}_s{*j`{`c-Az=+d#=N0t zLtbSA4QgDb_u6Jn_rY?4)TX!Ry*Qcw!y}hlq6*4RP zzy3aCM#r*nOGid!L1TF-u(Z?0r@+mIRmf~ut);TsMPJi}xS`jI|J4zij_)u-tFZv;xMU2?Xe^gx#=5eG6th8;&yqapc}8Xt@F?YZ8IZ%&@0 zi<2$U@z5Gb5f1vlTyq)wF%H!`Jdl2IuJI^@1%QMO7@0HWmxHE)U3VAzXirY89JQM19z?4 z`dFKpF{PMp`N(iqf$7J61XbZ^#J=DXY0l5F~vB6JR2) z654K)Kt>!3?}i^R4a8x7Qp!dlWD94pXL(O1-VRvGq^Fcm>>v)LhtUtHU(d8{FXReC zIWdIAXNky50&XLUy}RR-nlk7e z>rKDLIgd8sg6rRu6awe@u42O#-=JgTNgUK>9!|)b24u8Bd>P+wt)Q2*n_MnLN5U<0 zqyA@~A&QdWsQ_uPgbf|2Q`-vVJDu=XT5m*0qWOb}7brRn>TYh)q8%R=1ZrarsZkb2 zz8?iI*8WHzl-td++)1z;d4ES{fJ@8q z=TViP`Aj>fpwxWq>E$|t5!;^^5FO^NGDq!}*tK@0@>AIR!u>tAYV*j%Uo_9}ssul~ zwyCpPyJ{lZp<;`_@Cw2k@;P1?KNoZ^!Nrd+iG}ii2^gVGD>265s z2RM$uM9o?`pPyNo0L#kidYsnr8$04p#a;1dhQ!T+5AIi(Ku9da(DDK!`!_1l-0S2g zM(iKju(3Co*!;tCwr^Y_wO6ay{JnacPx_rKwoIw;+{yxzdy3G*9fb} zRp|3@bOlSkiEws-!CB_SK@(iTS;rWx5TN@BP^3!YP$4F3)RT$aq>Ee{N9ae0jpcIn zRa}5JEFC%Y8-#%8to|W;CHI@9@d4p*eow1&_bU6ZXeM*rU3c71r^W5#?qg#IrToi}LjJFB&;GTYOcO?#H?%!I6?zeUSN z%!E9T2g~$bAF+4z(pZVXq!UCX!<;pD5%~rN+ zEE;HumO;S2M5Hk>g`TvllDMpyN(&a~A4~Sdnt4jbcw&0Xd}(aO;Rw>AFWt$PtvUxT zB)|mfvML)?L7F$b#v)F$G}Gh-cyN*)zGHz+lIf?$1i>P3(asIYz~t9;RSz*$I|eOM zm@(804`s*#^g)L-b_-c`=hnd3`*`xbe z3}rP!Pim3Y?f7FYBM?*sWw@f65j`^UrELxV;QSoTyK}u3sP+Z^i7(8C0%WM+9&sO8 zs!Nh7QOSH`vMF%*i(D!-;Oj?juG1_}9sewcwSrlBy4gVzZ_Ab_{;9{ z$@BQ*F6Ve9;dxrP22LbhWnVo~Q-d%#mpPHt?>+g@92M@slJzAQniTT0whH(JKcIwx z9-+)%J2~V6Hrp*^PU%we|FZyY5~iTQ-^5)8ea%c1#@MNLYtRb9g|c6>9x+C_NK^ZV zvbEP((f&a*Nc11-h9aFe+REuyN8A%!*}FJHr!6FA))ywcpJ#Uk9DhVo$JY(Ldv}qv z_9Y(A$>Uron)tblzGL1;t9zJSMV)YS94Z>GMeC(i&J(M03i8+6hr+kVs*5|*^1W=4OKvz3%;-SS|rD#w+Kq) z<3_9DA}VY-4Oy5uqwFkC-Wn8TRZ8AE#gjm)p7ei?aWX0^Nj_RTpIp2l z5>RYCkYM1tjM@1mE@?p{k@yMvh_zLdfFyp`ftwOSjxljXS=%oJHWO7XWSp%`^R|yq zD693?BQyrDT*$u|)h)+*{7MBeG8n z>Q>!~-%tDBG2ML_AKpcEf7A2z;P%0q4UqIi@=*O0CNvMf+}WA-F{M>Ss+f}=CX+8!vANYVg zU31%sh@u&zY~^6KOg+sb)=X#Kg_MZ&*JUAxvB)XZ$ zTk}~!$;yUeq)V($K03#i$1C>g1!C~YJRl_t0yGj$_w=%4L1>E!$NR(^HqC#W&QiQw z;G{e+Dry%9owX<{W#(vLc-&+|mA0+UDw-Jtkm44i-&Rsi%ymDQ2pVf&@MHH5ACj#)PZ?FN^5PMC^v^Te%XllwQz?zCj5)idP zUv;;r*|XYb8knj(?n1=hLDtF1i+(fUfJ&Ftl=%niTv`p;bf0@o^uv1U$4+1CpqW$s zy!;npeaDP6iqk2d3dfkV7jMm&g^A))2-b&}3p!XCxTE%l|4M8wdk*mAtHfxs`Dez* zDlP&9+`PZ-a4g4&KxhZFD;8r3n!d3Cxt2Sgz# zN3x84z4x{J022`R2Y7T~`75}RJo=;f%0p=oO&5chCXrN$#A?d`c@tCJNxVgGUyRPf zO55h4uL`2~LX{0iEIBh>DMplSo(G#>NDvuIsm@qDFODAV-qBBQ%JU0YdgCV^+xy=k zXcwSd+5Mze1Cqb=gjbya`m>X#5(d(oceGuZvl3>ggsz-?;={|)5!etZ2d?Pc8W2Zt zXLu1AzK*D64#vko5W((K-2$y&bz!GwQ?Mjs9>{R@{bK?pI^Gy`;;-rpWX#R{sH~G@ z4;>(H2i=FikZkkaocR6X`;ZVY?o_;Uw*!DtOxy|(2gK?XN|7RVumqZ?@}b)*r*@&+ ziJ2}DYmrh!lGJjcBd8ZG3r5sgx;tU$d%27 zplmZ26=7b$yys_)pmK1#-gGt`!Mp$aflia-?$2g;`T?EMHOWKgFP0?h-QjlYx%{ zUz-b5;g?Nba7%6c!dR`EUQggxx6j-L1>fK}1nS#BkVZmRzMBgIT~Ju`k)5C`KV(8q)u9y%>mLdO*ZW`T-fcFOM9b%Q z43EKqrW~mKI|D(YbBz$)u*)YmXGBaFB1LZy=7W;<(r53Om70%xQlvjpKj4I+VRSSO z_=f}wu_!`+(3z15!(X^miGPu!OZtodY2$x`sR?1uHm!}B(1DR}nKYyCysY4ncu15~ zY~qJzukY+&5H@c;5{BAyxC^EsYRYO)Pppaq4&)mM%lM^=p-O)!sLJF~p6$SInmx`o zz2$_HKM7BGD7gt1K~`T39y=to)92GP`egBvS9d4Zw2dF-*$O|GfhSJ-jhp4F)-g)g z>O1>cSzkRHXw=9^4vfYK)%WM)oQ8Hocy9@47HHmeg7sRP6|}GEhYD9B;+IV#m1X?` z(q$QhyE+*9<3D?%DL-P$jBU7rpvrY=cMYxlWs~}5To`;v*!)qqF2RL3-6@gKSTuk4 zSf_6-#`r**((AC`{-QF!HctJH{@&oQ1@w`UmWo-0ZK8HC6;C_OJ5cQLy%TYNGt#1y zKydF3zJ|-n-a&T2G6*8=R0kFg*busbo&10_8<3B~CgXCS!vG*_4D|owVIdK}`4PInCK9TeUn)ND=X5X4`d&yE<59nsz+V%MQ zP#AkkQtW$DA(4@6PHw!6dtz+^it}rw_WAjGGzULKJb}HMeso8qlUcrOYw9YXO%1pWG$m_Ff;5}Lbk+2u$0ifZ6W&DA(Lgf*X8m^Eb)znCFq1j#A<=~*cq1ZMi;f>9a4 zGE;_qvHkgsc_1$-D+(r5;U?|P1qCnr*14Gv#HXD`PLV*pDrak*T+{DnkLs_S@GJ#| zNrUATuiTBt=5$b*aH}LwQTcLq9Rv1YD%tFDD?#ZZdUeUPR7%Zx{w81>2!MlpFS+ir zGB=tWz}TIT5;Cs9!X8QXJ7Va!>jHJojOte%A(kZ0c>CO@Qd zFx-*fkfwoTb5*LPichy(NiYvTNXGs9O1j*I?4NWCc}E+U>zK;h?Q;5@Jw4)>`F`!W z)6&`;BKuL3)N4wJDk_kW*oI18QI-qf=p~S0FX8cwWX-(7UoNSbQI*^%y_I$b4gsm; zHq6pio2k$e8}#>lVvX!Y3x~JNOL*d>EOH#0ZDT6Ks1!zqm(8L-O7^uS2#UGN5YJw% z0VNyV_IS^$LwEqwR(&qa9bzMqLOZkyJ;o@#e^4dDe)?2GuNjCDa}X00?wEG}&lG{? z6~4axpc$5MG$d&D?$&Gj1GKMVSN63jsD8H^wXbaVf~$NN@3kyM65SUrp7xc4lH6Bv zz~hcTP)Jp#l>lOA4C!wL-!CZ-e!9=X5F(maW|uE;!PHw;2*EK%^qet9j8E8jnpbxJ z;@$R|9}g*H^M62gQJ0L|TS=7mOB3=_r%!`HBJ@ubMe0|y@0wl4S2~n*5K5A&=?UyR z??vZx*5g|5syx_=?M6#fdC)?8d3jxPI_WPw-cOHD(ShU)j6ccfV z%R^$uyh<%;9~yJ;x*QZX&{cio$m8TZ8~vrW=*hsWnI)h^c(L+9)1_~UUNmfxnuk+q z$iIx*$~fI_P=Fb)-8vz6t>7E!CV4e#RGeJ@XfjG^~7lKxsv|S0aO4*gd z#>7AlwrJdu9gH3t&FZu4hev6i{Vdotd-}VElA@3M3>k0xV>y8Az_MG-A^@~_)L18r zp(@o?odRg?2Z7Pe96ghxx-n&~IaSh@k=#4}P-nb--$_5Kn>7h)`hqXZi>rSmFx>{n z7@>cdDf(??-PC`6q5V*%ZNm^Y{K>)tElp#96LJD^lpq3wINDjL#DbNoEa>)I+E??c z(XA_%Yy>I9tkj{nN4Gkkz2L}Y(~1I>K`XjHw;O0^4(jn*G)RpWmYTt0hmhUo^jzk4 z2-dVm>Ss@DSonH)vP^+O2Z=~UBG#(-)VEQTZYHgbDdKw7oUK2|_jQN7K!x|)uH=?) z2RTv#S7}lIpYpk#|6=YvWQ_?Ju7yee_x)A3p2y?6^qx<}t~4is!Nq!7Hp4)g$nbBO z$w?rcr4a<)_l-phT@?O5;ie^U46P%zt~$ccBwG5@iX;KY z)18@wV%KsGq#k7!iM)&5k^W@wr$F93#Z7|8Rw9f9%f2?FH)^q=C}lM^wz$DnhV~RUT&Dwk>bA^yQI$CZg7y?%u?OSTdsBxk_(i&fGHa0eKjfY>f+?c0 zBVLUdlL2TEw&gsY*ig3LiQ*Zj7vB7Z>@Ons`2joakt^R$^yfN!L4`Q-T6|U_)q=pw z*+|rb4i-rr7Yr0Ob0>BbGvylsf$)*=FN=oZ@P?gacX@~HeJ6T5H^qFqIb3L{nO&Vg z6x;p!3vhl$(b@r23KSJo#H8#zc5d;#U9PmJJWq2{D((bvQOrqgqOZlhs7>L}^0qs0 z#8yZdF-hqX3lg|`?K6O1rFN}LX;FH zmaTG7;!g(=vlF7z9W;OKtcegGqCQ`w@Es$3q=lgxxMAn30DLAJ11X>zW||7-$){rB zlN`wXyr7v-LO`7R0euj1t4AOw6MJ4L-2I56=0yAy~9I1jLlgt52Pv0>NM&0lrqo%Ie9hXTfZM-Q z>ka}%TUg-E34%@{j7CS#dV{sytQCi4Dq)>5({J`K4v(!Tej}oa7MdQn^pCzNxDbobluhE;bIXfb0$LVzx2%1)6GvT7hqtzBy;j@nmClpDd_5IJ z?(!G@V{J4>TGRR0jydOd|FexHY4QW4Ie^ zl~#^+B#t-bwUhyMs?Jj9%)*pEOnObEM3a6(;-DI1zu<{t87#GfRz@Ln1%$`#b*t(P z%H(icHO87l={E!oqfw3baqF@(hAGe}RVd-fciUoq+YgTJ*a8B}8? zd2KN@E$tzz9o3oP*AJ;h5@U(c6;MDqQPvHm){5w54$xEcsb}(q=+YFBzZQl}E5Nm2 zaCL=(0LDq$u$c&^8KVH9Y4V)POj`~SL2ux_Q6?7KgiqzZrsbbPoBRUt_%jjLejBrX z8(Q%Ha`^Cxhc0P({rpw9w>1e^WE+hKg?Y_jIoQ{-h>=8w$1xdG@PZBV`}pRP5ye<& zf|pmGzds2QABJft@-FP23o>%45TCj0jX|thKOVf!JI{!5cFF>>e}yy!Qw05WwzVv zGuY>bs)+luF5mrL%L=v>hicl>it?}+Mv7J0fals>*Y=Bo$zau!^@g(X^@ zn372Ze!FUSOeh|7&Wu%;3W^?h3jz+=aXDYDnAeOPYuPSJxK&SU(raS{wu#B`*tbjW z%!z=TWAZEwBZ`w=)ol5s{EUSko;uZBbTW5Xc=DLO$xtu zXxG3|-mfJRjjLTn#Nzfh)djtZyYesequJLt(rpSwi;44S_CB$L*>@TmJXGJx%Pu*# zzD>oO2u7X~ukiZ0SDDy)B$H&Yo4hzyK{DPN^4RH7Awk3P&#W(4TqW?$C)T# z*C@ipMViB=QhVE8j@vSx1~bM|zJ)C(Ety13Z_~U?h{=_@+>p(_2&1_j3n|Uwm?oi}D&K%Qm2ts-_UO0%=%;OQkBTI!QEDz9Jd9YLeirlncdc}s)6xVJ%vE3Sql zyI2f|WXL^@0^Z6|-9TBSxuz_6D!c=bQ!|Xr+)Xw*Q?8ELI4r4lAyVW@nKK~ALz)Y- zEsZ5t|C7YquY+<7v)dFcxtns^nkBXdX>2M?tz})#mWhdmFrpnhQC@RfU2bo666I->Fpc++oJ0r}&Sk^(e zXG_Di=-Gh=57Mu8X<1BwQY}Wvw6J>&eT11Y9R>FQKo&ztQ~;Vu5yg0bVzUk0V%0sl z0~@yQAPFC~Z_>q%D|6D#m0X*Fr#r3$w^8ESaN4VgbT)INqZa#*89Nu3KY@LGc9z*l46Ae z8>0nBXBVz86Zo#KDA_ilTF<5d(ev{D}F^?6PiT*X6NO}!A)^l));|A3%L<`f!&|&$o z?SDB=(n%uh^u$2Ce9?A}w5Y6g`WqG0u23!xy@c_sgK*d+g?g79X#fpx)+uV<@0C{` zp$a}OG(F4BF_KZSa%b}Kd7a#wMZX2*J8KXUF~`pqSo zfax56n&U|H87OxNSV@L;9y(FWK4cx|{SfDi2KZWtu`;0Blx=EZtCFR94s^r$4-+oE3Qa=9o(oYnIg9@yWO>9MSjudo59lbB+S5c?{kbcIe&wQ>Yv<_iMK8|Z z^$)9Wkg-6Al>e-IeVGpPZyJ3N?5E)cer?Fz@+TW_cuFLiqU4dI>dP3^Ij-N7K)6g& z4-TpbVUVtS!tb`3oxPj$PyX+y8IRkS#D<(n>{wvI1Jav9?#sPC&(8FVRI}mf!oo%fx}M&s@Ags zfl7Gpa-33{*2$Nz(1}l{;tA26zMKVtdIZ}Ixz=#-d^}~~ z%*)*uF458(h<}3BQzJX(Dh>=u)-wNT16&Gl3hB%hZ>#QM=o2j$X`p1YQF@}xF?wQu zz!R9gxMG+Ma?+NkhfWv84zd|%QzYThFtlb5nJv$X*%D(}j*c=wU{q~lt}N%LPhKQk zJ=8FlF@O`dgUA|`8_C6?vn6~w59qOt&?q6{VdX~(hAa(&4NF$yC0Plc)HRcxlM-ri zB?Rw6?|ytX)FmYh^{Wx1rO9iE?#wLGVgj}cAr|$)K}08sH_C}1$hgs}K0B_Y1I~C@ zOL{ z1Zfl%2LfHSj0bn{<4O;-p!s5H_boBjez{uo(eeQZ=DB1jR|nr7+`egy5!CYL-+&gM zH8X-({qZh!@R^{9;qCn84~(zrBBz=QpWXo~>l4Z+I}zfW#)^?mJLYK!HNV{a71HFt zZb_96PTal;{uDeIjprVOA7`|{$k^;xN>xYUr;JAo$mQZ+UNWWx+uey#Q@@>v#{%mg zh=!SU__$faqLdHPUBAix)ZFE}`U69MY94;S)@N)Rt)}z*nE)=nvHKHH)SBRwF6w@U z%{WAn?d<=tpyw-bUw9)*>i(&G`15L(`vbVn<6FbAfkF>Pb6#}1PI=uE+)rzF^G^S+ ze&GGoFSt7m|Fsx%P!q1?Z&5~3q3kfjeHZ^8bCWvRWMG!{NJ6yG={XLda{*G@ok|UR ztmP+?L29s9JcSRB{|Y}+YnL<0l~H-3AUX1J($9TVfOP577pB>?*8yuKQrBa7^)?$U z5a-6iG>Imtrw$rx;$7sXa?X8Byf%l0jI8aeZaRPZz4Y41;3MxcF3GS4sdLql>QYDE zEAcK{|L-naeh;*qzCQvl9h`lOiUr?id z+v?^Oxye_`ql+MG%>=)e@X#W*FCF8lyNI&Kz>sKDISoQVuaP%a?jMRWpQw|z8xr^3x5u04c%BP z3b>^9Z*$KFw0>B{858_?v1_O>nhWnrzn^oOhSO}%H z%Z5J+0G)Tn?&~;$zkv*YH2!Jo6oU+qScfFjv9L2-TD5>GmlJ+`qtHtTXW)`y#urM& zt}VpSxp#Of&nKYEMt5|^o&PagaK|=+dxAm)!^q~&^z~H;!u7=C9e7I;d5t~Gm)S`h zuTU&%GtiF&aFdWDb!sJ}cT&2*WvX`Xsi{U9dGer`Z9@^lJp(OMH~q|DDWBMV^a8Uw zo8a)Dx_piWgChXOgm3bd(WwGw%7UQGM)WeeeL?#DFJ)-dNnt@XjnH4JQH3EHL zR$B?5>3fOYqlw{+4~djG01ILH@I*_okPN96THH+(b#ip`0lox<0Sc^nZI3V@+(PA zyCHM18WF&4)O32~`xkjA&Wp!OXGK392=8J=J6)`5C7>VtAC;fdFR)LlBu|V|Ly=TH z&l|N<5Bm#MKN=;`T<}d=^iNAoxI~>WYgOSRA#Py!Jc&pDmM8>CysL?bK@1X-=ZB@O zs#QPUZ3-}5{ZYjTDb^=obcb7NMtshRnOakLg@P?op;*;2Gsz`&8bEiV^3I|U6>0jV zd0JhtAFlB`I8|>=SEl<6(vkzlds~XrXqkpB(|$BL-G0EH(|tRN|Fx|BX|J34cxcKE z0_|DVP@YKMmiD4l8lev2dcOEnvM-^0F4u!qz77cO>1}xr>QVSnM&^(T#aAan&22WD zm`>+yc}}<>YTyO!iIny-Cr#o(1d;81c9<~M+OKx$*$=9Dzw4r@t~0I=PL!-h=*Y)4 zJn2j2UEu2%3+LR~qo|To@P|rQ@^jF({u+=qzJ-kVV%f4>;()#DKl;B`v0sQoT_qj+ z`JJCo@m-yA!cOrS?sAXp5L8DKRzeHd5wxYZ*td%3+@g|GfH~7GQ(M8BA5kh>=LFu1 z>X|=nHyZ2FUrkPvD&yOfi(k`IWI}3lJ^8dm14Y`wnB&8jys7Z}(Pt^~&pM}HW|lx- z0tk>v6``i6KEzswg4Tfj&R=`%GQTN|R?O{S%WCov``f$ggsYHor2^He$(FebARqcZXjracd+=UxLrL{P1Ij`PnhTE4o^G(vL$nF;FvH>dV*r zPkW{z9@tAYv`v!nz~FGR`7mPT`>TKzIQNh9gJl8b>6iqY+2XmiXIBZQ*=+C?*l_W% zlx0KtF7u2<-B#RB)bi;;U!=rmW3+(?#i5VLdE{qHrmgjb;p)aIR4@yCPmgFAQy!H| z<3C^ndLBeYk_)(m!i!Ch*Xc&l zo0hGTbf^}v7Pk1y1YSLXwNfadAA<}W8u+-3Uz}56cUX(Ue_e?N&-Q9$Efy^y{1NC* z=8GS((F07i#WnvUbPOpt*&D2sKL7o~MhTt#>jqvaI~g)097{NcG$f`9v0Zlwjwx7} zbejC?7nRp$@(c2jcAjX^sL>Y4+4=H3|60}*6#u01glm6Vd?dg9QBgLo-T-RASP?qA z_nsQt>)Msut4ZQR_ONtSmg?8iRT)2Hne_5*ptC58Kw|pP+VI4)Hn$;a!4c{kZs{vT zr{y5|-+taT(b()njFDkH+~+yd>`O|%ecv@jqMJfWoHbHH*!_^XcS|}TwSUoW4Iz)N zVMJZ{%vqt!i%7OeNzJ5H@p--Yd4o|$=xCuI`iejNvk&OWQL@$@8}X|u>^y73>1@M) zp4v%9OS~`C@|*g`A13NA%(H85&m*P^{&=M?0+C0E-E;9@?=J!8vJ=I*0T0!6m?|)9v)j2cyL6 zel?wK52~P=ys3%>L)vAowVp;$jH0eob;4;SSFg%ZQ@{){U{%(ho3oxO{vu9RFQNsj z(RZ65xM`x=@R75@Cstzq0=kV;iLV!iszYeDO7+i#E9sTw>X<4>1L8IzC z{0gKt-CfGo^{Q}>B;OnM74e$;UfuCBjfM0#A?TY_m;ElVC)PND4pK}eKOW2<>s`NM z$=%Fl+4~T`=*Q^U?~pd9ObSyxM-pybd~!{`^|Da?vKVk#&aqNB?-*66Sa`FK(vmDW zU+%?rB?9DrukH}a^yYUo5Q}x3uxXeTNg=AQ=COu5|I4|Hi?B)RIJ<)}Q$K_IW&JMs zF4dj&UFrB=mT&*y_oG7xP4d%a?$3aNlRUc>GQnNx{Km~9X>3vd6AIHT0z_tu1)F!c z64_&q=-W>zpE|i|d_=6_3&R(upV(#ubD-6{C8tbh7|WWw^CIZWs+E{mDD5u8n#-YE zfD zg$*C2ZJxb@&~2ESsCzA!QajS%m@mmO7v}sKG@F>iXYHb4-N!eZy?=TeU&eyCzG^(j zV*>^_mc2Y;a{AoFkKqG?pPZdAhdE!GTH~#+lza+_Kb=_NJSggQwZOs2NaZ1q1ineUP6n)i2A@s0W z5vzZwryg(UDCqwR#DtYVqUSJcH5_&NaU3#IMp13iD5cFtcMd~m)|^J+fB}LNcebbn zTlN+`+!oCzJvRdDi;uHAzyE+3LOhEghf#s@A@nyB#|(!3$_800nml1MwOYg6g_!1L zyIe>>BW4r|4A5Gn-&m>w0(4njL5oXWj+#j?ssKc((b?dnxlj5dDlo&Fd0|DXN3bi8 zJR2_xjkD0?yzR6W6BGZuOP9%sedihUsJfheB=3f0hdx~^*wu^8(1^uBzX9^Am-K-H zuE!Yxj225u=nPg}T|3qq>JLhl9QecsYF7AkWfJ+l^7(#c+TbieilLfGH`PjZwYLQ| z1_m`%|C{5SLg3OlK(#R76>+c2`lP##ENP|z3$<;n%(AOHylE7N?!^yH(|yYWtKD;Y z+|_|`_Fu2i%Fq^pg*R^*ll>DQROxBYT7sndVW76-*kHsj!q_Z7lOztI9J|$3mKSLP4Mp1DkdeQ7lMvpqQ*Nie;g~@YedbCGHN6e0xc#kwQxN0 z^Vv#rKJAE9b#h*b;Bngxe;^6y|K&Ek{HxT%d2mvivAhS!cWgG?j}IwQ4|~8Spzf4! z*hlvTPC5d)v72oC%>g~bvs)9a;>x@bws#XZ35ZGF9n1Jdl!qen1I<(J=z;5J(Lmaj z=ZI&{j8>BOFq6!@_%GoRY}jEn%-_PLOq9+$n?Nh zu}?n{(tHF~oesPh27>LI2xE2-M<*NyzG@-Eu*>=hoz|QV;4nn=2hqC-lMDQJ*A$qy zB1sK`Y3~QcG!S3tC4BfMpkSJUv1j`UB@zAwV~`4f7p%to5krTG|HDC$<=R=uvZWNSAYY{6oc?3K+er?m_Z7MJyn4C5h<9k z=h$-P|NWZ(w|TZ*E5~aC=GU(pj91CI8+*1g2_w8KNIy{Kz+Dufr!B za*!iKcNwRcd5}aYBO@O{o3U#)!>}1Qpy-H&=LvO8d>XjX_45|w-p)jTfKyd0+nXsU&BOe65d-4RsUw6Mg zy}(p=um`g}eOYgMLMbL#o^_thr_j%s?e4m-uGxK`Q>@%MaiZm|K79NUk%Z)P#RZV*1GG2%eKhW{T;1i-e zBw=Tgl5H&Z=(#Kp#n6>jlqAXRynDu!frjKv(1l0rZuqJbTMlZhKHxetCCBsGf=%iH zmQAYDOZyWiTkd^DgHTKT$8)aUdHWiJ0;TCAJMcpjkk0$W$RK^6n!L>DY3eNppQoO5 z=1Phmn$E1}U(n8^->r08_Oma^Bih<-t_d=@(SQE%!KD$knimF+hmFigeq(BP|97K2 z&g%Ra|J)msl`W;4&wbHR;?qqbG*D>d<>r5O@@|!H(g|m0$ID|pGIx*FZqZfEr{9ET zm1M58Oz*WjdVG4=*|n<<(z;L^2{Q+@ymsigCqTm1ZuT?FGilmceIp-j?GtJB0cShR zqf1YC-8$($e|RRt>uUD352U(gdJV(J{)>Fbfyb@6yf=fZDcgJ1k=(u-#-`LpC!?cp zux5#jfhg^^I~SUI>eA>XcAKlm%x{gP62HpmI^J*LGFY^{l{WsO^5tl-)?z}%$?Ei) zI(;H(P-R3xufWBe5-~q|Z6LUc9k~*tml&Y4Pv9E#_gTMkB=u@(wm1o^)|KaG(ja}O zhcEfX@=EJhd3N~#;ffHfHRiIVwY2Jtm1{wH<3?X?KJPtK%kX`fwmM&aN2saV*d^t~-d8jcFKelOu1u#)L?b}9j@DrEk3zs zmLwva$*6SY?Bn{&qjA)!YTE~WAsuEI|FX?zvoA=Jza`T!;*!{3kLJGW4`?fVaF!sL zH0&`XOkP#DRH%LbZ0%Xsb<@WcUdHd6t?iYrmk?~54kM(+Aj`r-XH|n4_hZ~%2l==02UN39MR#|n1zvh%ZZ~lD`j?}|s}6D+ zc-6G$o4gs$l;^(RI;NNV4+?$SS)*_dGT@qwmk!E@E=k>eF15wTKiYQ%FJYnSn) zM*e7lbK2F^ro8Cew!02==YmDOWfDd-zS7xd?zriwCP9xr(*6`mErI`7X^LOh(~?aE zrYlBE^WqWex-pC1rusPD{C8~Dor91ceC@4%mw45*X9BflU6fP&d(7EQLVC3gFFi*+3$HoaE5`DIZNN+4f zrD=Nhe)?OUM5Uok40c=>yBu3y%9o)R=qaYvpPaa2KOb@ zT}!1cAs==0ivbCaURv3Z<^pHv_6^4afh{-NgJN8mGoA^ccHG+&_#osv=gx~7S4yy& z@m`^Ow_1^G)vlyrl|xp9cZXLx2i&Bd&8ME_3)`j<8=vz8Lz}}y-+V%EdQNXLTT(f_ zQa~H8^-A`bj=Nc7+~D3gleMeKeO2>lc0`Qt+N^k-S%*-vu zOh5O{bXGo1)vP@&qbMqjr?Y_qwkhquS(}u<9$PU+2i8^@_B+HQf1CZ z17Bj~{<)(?e#sQ>PFR$}%I@BfDKF)LePd1@n##t_d5eY(=@UfRmW0s)9g<7MRIak- zBoZLJZI85G$hm!YHdh2wwIHRB4Y*l?xbh+43zzu~LMe=@1V}uuE;jjwL{W^?Gyg*< z4>{)2s%ANV#@U99o%}oB4L+Q%RIDM3b#eOQEjL7zvo}<6INEHglA9E1xc|jzlHF5C z(2!89ClvM~Yd>*P)7u_tEKtg41~^4<)cfDub)?&(%vyqIVv5Sr=b~YH)LzRE-bHZ- zinz^>9k|yikaw$KyPu)cu%leq8O5Aggi3q7r>b0;pbt=nY#gFb2;mav>1M zL=XrZm^3605>!P%-cb}V(y={A6`BmS16t*vb$ux!CvbzA6Niv%+~C5*5u_mxs5hyD z4B-LEVLQOyDHPZ`DTe&U3x#NKW%3}hMgZ(f1weX~2*@>#0xwO8A&rFKqJZeF&<}9P z5@9%edY%U+7B8WAerH<(ph`I~cv@r=LLC1MrP?^pP z(k6IhzKitzSWt*%y%O(#Sxx;u(?Bw)q9-_*c=Db-*4eTRt~kb)bb%ZCH{asi=- z_*1{{XEx}}Z}s_4vfs_HsQG;#tf10{e_sN9{$P-@5Qw4+f}KMe$icv$;Q^%H8F)8I zo&yY~i?YG;V_-5}2q}N|S4A180=Pg&vB5$@;5VqUKKxfDo)-<84MU^vmoy0iA+z3X zXj?=sBmII^`8R{dMp0n-uo&{;-#?2b!Oz1uWIYInB#boZFoHwg&4NNz_)sKA#gI`s zaP6T{Dd5+49{dP|EK4G93Jm2!(4P}B*SR7xdnpXP8N~rC^W)YDxXVwM!bpQD7c(xNECxAehkA08+4t?U2wV$ep1F*Vf zutvHcEqjh?&ARxb?KtM!N7W{}(h%YICGL1boJPq_ON6wsZ3p7<}YII%U zEnH9v4LVpGJ3V4tTv-Zq@tQe`PJ}JS?v4%N?+C%ym5jc#lw~X^RfCZm^QzPPr#U*q-*SLQMUURq1W#wSCx-iHM>Yn$DXyeQ}`J}4> z`>s%vz~I3W=u@{()91P)5qk#I^TcoW6&SYBDR}d~POY6F87Syhnr@dxkyb4| za1__^WQtV$-X!i_6gnu9uD4D)Dm|yiCIlrKuwUEsipKN~6cyxm3a2U_x&bgQE@frY z2J;aXjxHv}e~z|nv3>2;_^P`0<1CXFYSwZeZC6G9hR;9S%+)q{k+|8O7927`?!zN6 zH(1<1e@&DZv5^0Z7-N3xc22!wd2biK#Ep-B;??c~5Q?4#a9dm3BJRL2Ru$S1csFio zo}t(erAF@1NIvDg3kzbTn1F2&OYZ_QQ6uBhiu;=i?$j^TO)utU z0fz&RGxOVBu~bYkhNK4L8JU;%sOh4DT%<+hVDmB>&2i(OpW%%Ej9@OgRA2Z=K7)UJ zM4Nn+{Vt1UD{^ST8ouc=#pTBGG>s#nzapcw zUa%SpgKYrFWKviqe=JDgo1i0fuyxAKa&cs*a7eMp9&k{r$>eT-Eqm)=P_{ELRfw~2 zq!hDLRR7pqpa9cEJ69^kE3UW8R-Zf*@2UN}d){|MvEYB1f`Gp%JdL$gmN;QQvt6-b zbzu$DQ@#+@8RJjDRL#X?AV~dF^wCIJ4h$R?1OyryWUI8RP+4TQ$R$1sB??Omjo(fB3tK_Aa`K)I|L%IbnVkzAv+-sZ&u|N# z!z0ab2k{ENYQ65G4R36uX=$QnV^f-(C&*-Y+7q?GRZF@?y3r3urJzRsh| z1!o=AN4R1c{f-(bJ`usimuYSmN~!i)TX*7Rq`ljv-3PzxspHY^a!<6sd?E(brObV! zN%WoNl8Y*=d0e}mPqLpdN3s>@qKoZd{ban;m+)duFhH+oeQ$baqk-&xMuI)o@LON_ zkLn}o2IE*;4OGg#^Rr_^D0DAC=e@y}ZFucOtauV#;Z%>9|DX~bFt1+4mKGe+a^QeeKn z{Cqg#SaZ2SW{qdMIe__8E&5S+dn>vc)_re;ah`-CBN>SVnwhiAlUH~*{73DDrirGo zOI}B3`Xfp)Bfmcxw&@1RgyXQ9=Z#m67x)Eq!+QAbE|Da=juXz@TVr(81z^>KB#q_8 z96XAolRrO!&jDxmm$0_@-~@TrFx8lMZja^Mk7~*q^VUWk6`-{3yy{Q6Ef4udNa-QD z5#+eDwWs5sG1lR#jK5px6e_*kTBT)wDy_qndvvVMG_fq&qy4<@>Kp=lz~s~clk8?) zg@iv1ju$(w#pyVkgM6*u{}H|!dg1$96{Pm6~G9=a)sw!0d zikmn~?Ah@%3rGvBde8xK*%3c*yP?7O$MD!6ggKo-ofh#m^LFm;m~2e4?Xq}>_6`=f z8l^9)#h5JnBA-E$BBL0c2C=J4_y%n%$)3p&?Oq`S)PUiBQ+p!q9t=)_2fQv+sd6IH zCVqa^aXP)TUZuf4UmVaGIL$voG{xYWpw%k!7?a_jc(0=1XC-pm}pYjo) zh7wG>lr_jjP6q_Z*c)+V63L{cYtkGF-%^DFkyRyD|6Yi^@kb7nLxW{lp=tV9#q^B- zJ#ux#TMKe)EHP_@LM%Zyi(t40TM#;l`XH&Cj7=z(IG-~S7Tvuw2Q+;{{NL?ObXJ<7 zK?MP+q)ZtEsDM!&7;nARG{JG*-Igc(E!jhH8EDXEZbKPpnBT@x1Wkdz0WbM}H=U>Xj|FZwzl^?T-I!1pX}?rxR)Iyp`%LJ(pa1N$-8!&p;oEyc zg2?;Kq;XaE$ebvOT%%fEKQDM}mpoV^ zeWtcoZr3Z5&vl14^*tK!q3jjiFWet?~V88;eduBWb47Kgsvc^OY4K)|s+{xV+dBGAKw z0}v_VR;gQ&Ti_a-KLoq)?{~HGn2yX$6grNH(BIzfuI#kb`K_-#?Mhj2Y}XfFN=wh!lYeUkB&7xSvQcRK4rV8C3@mEnYfWFC8NwGdy|Rs z zZ_Sdfsora*b1VWoWWGKpza6Tu`(EoW9@0X)?yl5>2p3WnwD1 z%*0fU2~`9k^J2681%u$N2+ySTZqQJYfUF=jkx&^|;z|w*vSQ|f^bT7OX(B=Ab7;?J zU8{9WM3^$~s_l}lXVB!Li$GY`O}%2BN#fS;Ax>nnftP5~E8&0&1ZIEE=opUTQo_|V z=cO52igb5SZPZhhpbTLF4KZMaR19i`rN!3I-wR28o5Ui=mq zpG)4f1s#k$+@y}6Kxim*1_d2c&(EqNYv1YBwsVi_V-QUr(R+8-1?2k#-Jd6p$UV3_ z5=P3eknuueT((aZzS1Rr=Q4UKa;lN}xWVi!_pM`G_p`8j#rGtA8b^tb4!A%F65A}J zY61HfInmmy+Ee~m0cP*~ofXGBet=;KnY(n!);Tim7Ce+L@PP6nS~*g%e1_PiR#I_h zV{9?Pj)nk}^xvd6%xJ%xqYp}|0-j*` zEb=K~?BxL~X|1KROv6%|EVm%|=ivjJ(^u-xZ;Hk3iu=!xAjy6upm34tOyE_KTA%5@ z{66%e5Jz`qR(!4SZDv@1;mb|UUOiDs_#_-<&VbS+G^XyQLiS$aUC0V zSb{%&X^~ORd9oBUB|AjUp2LQeY(E$RWsfS}w&cCD36@`R0!5E*p|=YDp}^qY^KxkF zE+mu(nW8nik5htkK^`_FxhAV6pOb0+4H}H=8U?@+fCEcKK~u2S6l}?*aZzW z*nZ&lBmVpQ;!xQye#G@U3)*+Jv>^ctrY5WmAhF|P$8%mKj0_=MdZ=-^m^rpMzMyKt zKr=I}>biiTa{bMFQ>HUrS2qSm@UsS;lGKSYxxlL2Nm0f*4?wJ;l8nLd+C2wv1nJoE zt`=G!6f{U&S`0M7`}USz9Z=4i71^&^Y9cHXuWXea5u~VSWcgQ(F=&u{A<%Qry6Q0s{3flpdXf>p*j;AY8ZPF}{9qTYgHzdIPq5-Q z9vNPrC-01_LTB5c`=}HD8xMW@czyvIFI?d=S908KyP=v}>@FT`6BSV;H}Md$(fQlz zn?&0_M#U7D$;7~DVRH~%=^s!v8A1*qnN3;ahu@m>p(bx}MOQpnxj(A?xB(9(RQOB6 zcG?tz0T<3dhwYysMTptHc0SZYUw@guPi4zA5+_dYLVo(um(^z4+9op{Zr6y%FOgg zl4R?bP;`gn@gcj24cm9*7(6_3Jej0H=%TkQf9A&jAt@^Fg*G$jzfi=rIMA1f2!O}m2mk1O=fkl));RbT>gF&7-3qPJg} z#|mcf0N5j?(|DoKdn>px!FzRyJu1VR2fyym(NML(dr!#ko#b!ArG@^CzNlxp!Yg7f zo_mIds*|pFGXC)_ zsFQXl!O+v@I%}i7e#_112zrb9?#oOwbH~F85?9yYl*D9j9;xf70lEGhfu}Cn21i~5 zRP{I&JYc^(%-CPJHG&=TofE|f-~FX2Y=dFy3st*N9d)Guw@M6Zo05~(eA_Am+``dK zveUM%+^q|8MOpLPDEFK*7${x~rNVKF*^-S9uR&_YfAo7p^J-76@swb8;PWxrR?z{E zO3D4;^);y_5U%doQ{y%V!U*|;v5E^kDNtDyTsMUhtx45YYP1dx9YdP$D(C0P5{AnC z3gh;Ve^bPOdisXxg+utf?m9_qT4oqyIcKD+R-8`;9&YrISDg0*gu~mV7HuDW$FWwZ zPkB$aaYAjCk0u8UFSnGMXYjm?qQ{)=Blp1pZU&rzF}ZPTo%X%FqW_#CTesgWuKJ)6 zLm_4lCW96Sw9eH>BI4rODReKZXpBi7YR;{~G-9vS*%Jr;8;3mhm;_iMZBCqkD&E}r9=aH@6PbZeKUQnL@4*v_kEP+zO zo?8*nBDG(C(`8$soNM1*PcV$&d`)BNx=>g1aUqF8K4cR53r{Z?yIcMetmfZ|`W#ST zHQfLa1cmH9lt#To#HlDLc4P zR%?c1F?F*gex>4omCT3^tRTm^Un|kSJ?UE@L&IY&2JtBD(E-3Zhg7=;0pBY5o>$_q^AwJ z`DM7MZxZVlQeO-1aU9<8<3A&gSPRn&QYg|>rpN+#p=UbS^apU~|DM2Hg`wKkyE^g# zLlN}OpU@e?hc&{b&~aW9e8IC*=+$bKVnyrdz6M2H=)P)2?dG7cXnZJ(XdvJ6`t+TQ zmDxcLvMPe9sW7=s#>rPSnrAVMqE1T0FdFD)jo-l#v*3ttCVs~fg|vZQHddKA##Tu+ z7voiCAQa>i)|`h{Xo2Di=R-;_*njbXOZ*B3u)f_*7TCPxA_8HYUHzX9j!-9vr3-vz zp%TwRL=}Nqf#h$O=P&!nbhjPR9uPHhBe(q5Gmq%G#H!|U2+wDi^+KV|=a&uPia49^ zAU3STZ6w4O{#sTgRv;{DYC@7*b-zV;GiQQgA&8Z+x2fj{ulB<=A3+j9guQrxi!<}T z4wDr1>H3GZMMB`hvW@Sk?_^nH;k(Rh4HIzlbCVlx9GSaiM0(H1)SMV;2hcNZWMb>? zt8bo`XS#cg<8bZ<5l=U~dyXuG?xy_vcj02hoIIB}kCG7)+4_MMd*L!>11gtza|_Ve z5r)MREVbKonv!r@?|J%h-IFxH4hJnO<%b68@?T8ueyk#2xW4pwTVoti>6*qb|I|E4 z^$@wF{PqFFUg#VY@HqzVi#qAeA;a|n(8t01@h7UE3qb?_)Shw+XQWVH-MpQ_Ioqt; zi+4XDJ}G>ArP+b-{DFz2+`2^R?!$;^xlN_BhN6;2XNEL+W538S7SJ=Gf)w&u9zAxAWROgL-@^A)wgMCw)=nT& z`U_v|XVgv6eynzvRZjx7)p@R&wER(7d{Ox2En@0YEV~(a-N)X5W~#lFMx zyG6@@a-fM|E2<$%+NW41d^@>={nqrT7)Zm*Sm>X8-c!jNiJy}pLi-9{;HmWI`tbmF z-;0B9$SaG~EeF8;f6|olaf#bM!azx-6f<@Jan%}mW&~&z@l=2 zRm@Fk1RYWI^1WR>?@c-6ezSUU?`kFvcoSrAfBZ8`_wDz%3!f->zhD7kH%baIuigYP zuUd4t;p&}$pI@`@Ln}+(2@cF_IcJ1mz21uo8Ir>=Y2KsutR%Vx_Q(%TYpBbN(e{Wk z_Nk86I2#VuXw0}wHmKa|_9({m>LI>N9Q>ud8O1~ISxn@5ySKyubyB(0#PIOWiP7yb z801r@PXoOf<-^!M9q(2TyK}_29sGQ_>~-}nz~8+chx+I!EJjC~cmtp`{GpMmUzt^D zC0WW3NeNY%>-WiMIS-O!_?$Nq>0F1UKE1UE$sQifT1aI4SV)7QP1KWi>AXpf+7*fi4- zR*>7R(gQtVlp3+$CXB|_XCP{lXWT>~BcTC}vB>t+3+tgE>q=vORmpI$0@#;++m4y~ z`U~@Rj~^5jE(Nj$#)KS4AiUvq%~RTwwNaJO$_ZbNa84=Dpzsa7`c%3hrf#Wbp!QlmeMWgYTz*%-%8|_Y|JS+ z4kLDccQ>Tig-|n0k$4uwZ@p*5nH|GeT5LPEa8y&FIsjw)o@_Wo*6s9AQCT}}yMSqi z;30W`NCR9gf&#%Vs9L+C-SS`4D$g95nmy-7f5kx&Jq8R`B7X7KtcoKQHKK(^q#fLR zP(3lw^oSB;N$?6@LfpP!C)DqcW5l#nNuze*5-LHf` zim>Pf@_;0~p7GAN%NM&pkYddgV}|t-C{5@>ZxUmN%BGAxzBibRH;7VToY=%{0FQeGiM6t;rk@ z$ozy5;{@JzG?Wqtw8~c$Mu*XH*3cN%lvyoDuB+syC(`2Gm|0U> zGjrwOZ1s!Snm@4k>U_F(y`Sf59TZ)RiwIe-t~^@)j7tFX430THk%^hkXRfnXz{PtTsGR zHICQeb&VqpLn`0YQ(HwA4|M8?BeY=d<23Pn+HKgI&OaJK1Ol-F2D4D5gJR}^%NNFi z5-0I>+0nY*X;b5^%(J=R>kNd7Twt7|mB}CjlxgaY>boPDq*|A337S zF~2fqPL{W1)oCfK6i+-1Dwa8cSk4-$oO40=3(7bp=2FcO!L7{sWqy^3hRK5=vI3SH zhG?cj(5jT0RIXcHyV}rH^f`Tcwspn!)W{q+Ils)48O}V^f^izAqQ~aJ3!Ju@&9ls3L?_NioMQe9^1Rup12y`vFM!JS+w7G~U%={+@# zf4L=HAu;6^4mUqA+RtFi^O%2XsN9E?XJ}gS%=j~K8~Uw)DhP=K+6)Wa(~T3%BG=1e zmSgV4e3p)TFNdQctY8o5X?MFKDNE`P=^sTX$-EC5UYc$iA%ScvDEY&>50XE#r}}h2 z+}WX%TcKi6D!>|1d>6y=>ghtgE0B=fr$VjJhie4;1;){LC`Wxw2b=2g@&>Bw1m=oti>8fkZ=;=zn zeP}-treWNp`qoPD>6o$TnxJbM32PREIl!MNO`8&K^AMPw+2)MVZp6`UhAeZf-!=MMv13&xhpiEW#^^u8zh( zQCK?Mpof(!YtpvhMXa5nxjw-QhT*s31jTki&Y#cFJK&Hf}YYHa+3r73A~6^4)%Ni<+{NVMZ z?n~*ys!ssYHW+>AidkDciGL7Mt`KV0WR9brr0cS+r4G~BqzlckgasgpsvKz6BuJ`J z(Jpij+k@t3#EwhPkP!_b|B|^!bvV58En{Hn?LK&?8^Yzez5Z5x)Py({gv2M7s1Fhh zDu&ByykRQvZJ(NhDQ_WD%bEP!$vn}fr{YsR`)SFWSfnWeY750uAd(-}vNkEM zWrOlst8ya7RcEQDtMJC{sp<=%5r5eBaVFj}l2$Pa!#{k`^_T+Wy}^(xXX$DD*8_-1 z3C`yPg4k0RAU4Y}w`N5!t&7N!!BJxtk*z_)N}=UFsd8j2t=2YlK>rqQ>L&WG)BP1} ziji&75nUYnCv4a2w5VApC2&dftS0gKY3Z4=Gn%EcM12Saz+q+W;hr*T55FVLH=5yNIyflf$3Hso z#F6Qdm*g^>8zy*krZOBf@|yIfFdQXsNWaJ3CK$5Idh#IY$+zeg8N<7$-1TvzxEa*T zysPW+*P}4?_M_HGD!3BUV77DOI`5_|m_N9msl zAPEjFCCI&2#(8uoQ6dRZ9vq=6O238)ubQlCn`pDFo~^5KT}Dtg7P@H*)Jl5LOBiXVP0{h5C}3)yPvRuiI=yTMua- zMPL&AT2+^ADe2wa)|8h0I8fyf5WC0*eqH*q$^_dgWff&dTO*-l!k9wyiuwAE(gvTL zw7O^7NO8cIZ~f;7Ei(Ia6ZT=FBGm0u|9mGEXIr}*8-n_0W7Jl#JTJ=E(qs^=pB+7d z9+h_{Z8mB)c^lkv0-sfd&zTiaohr{;C8ujF@6AVTT{o4IspT}1x|WVgOm+zvD**h1iO% zI+f+d6>gSiw6&#+!ZpJfj?pI7yiJo?V*cbujeK`ruHrm#xe&V;F)#KsBqIly>#;*; zd(z!EfdpK5B*o0xM>-6s#jG6~4XVn&K zO5p%Vb%OR-8^>~Vn+mdy0gm4>A)VPcJCpR=HaiPWuw@PoTkU^nGx86-jtfkI<{iiw zhW+p?EN8LCASGdb=qzlTaZLzkE8Xt|`bk>#vVC?>78`+Ac zL18T_Wd6>VPq1d6M4t8)AF1H9muWv1wl9o{?iIF=_P`FdFToA=ze7#-zw5sJE-J*y zOm)Z$-5+ZY4Vt}7eM{vo;3Ft*3M|Ndy?Ka8_BAPlh;3czP7Ov#?au8(bkOHRb+F;C zGGzSD4x-=WvtJ^FdAT0I$sWE66N>4uAfgaSJn}*fY}iM7EeWBzqk;g&jG{W=nPF5M zG{>UWv(wdbSe%yCeyI!pN{~pgMuqmUv)yFXlfE$8IOspPh0Px+9auU)^RSYaQnFPO z<=oJy98j>kEn5$rQ7it1|dcQLWVUW+r!!eb$+s-t^N?8D=ehH2Wo#6U5iM z7FceDV~sFA%#eJubLbfVMX2rcn9GhOX{wAv6jhDUf;{kX;VD%P33YL#PMxu^SW(*3 zLfzBwv(IxplD-Eks(*4w^|~Chg13Id_tK3HgIgnYK4kv> zBROO$J2?R`*jqvnzF*ijF(eSLiFIs4U~65wWM(;H{H46L6f-!d^eW4Yco~TQA=g$P zRv-&MmT$`=k$RPLCGjn{Oyr&Ki1(ueJoOXIQ`{iFUr0faXE)S1VMkUv;Y&$;PPx2Z z41c-2UJeJlfL{y`x`1CQiFFlF)7|mohK?XDz4`;VcGijHg=hvr|3ORr{d8t`dMUkeKF9QmM$D97AltnhQo)$Uu@p#NGAPM*PFXNqiEWThxvkfg%rq$ zxq}{{X4WSSmkVhn?*6ey~wh{-wm96S;S``{P8iQitVR6IW=0x%J36Ti+IS-g}F zstkPaBXvP3ic83sT7HIWH9VyEZM%9T4S@n}9QG(QJti^4_!CcjR z-th`YDIjl3+Pq*NTp0ongo|D%DCA{Ei81LijiO10Nlb z8If5gF%iRfF%ixcljn~UammkLO*E6{hcWm-8$JY0W-NyyNh!A=58xts1z%kutY#FN zbR=e|gHA5hTa;^qz+UCKk{U5PD^UwpaY0&Ls~ho?-;V!0PD4_Pw(S9dlAiKm?@9*a zmez+|^s|bjMy0*3jqv~Rk35XrT__%ac;rekNchR@{3DiPgnXnxa;q_{95DIrN1>p# z9{EEh5~`s`%?{IWh3qkntUjz$E2Puri;+ltI+%)$8>#P0Fnq%gIxHYJG=lhEUEXWy z4eYdTfxQ9$x3W~bzds%T3Ic)y`5#RBuY&00YQ<#bYGQ7m!dSryfUY@xh*m9OnomcP zgR6+G8mm5mE`#5ePb*`#F>E-j0>=ng+0yLU-sj;$Q{I-IHgZ)(3d?M6o~HqGex8;u z^Ls@7AoRu?!uUQomZ<2K7T(m$JOmItb9mCmBIBf?Dt})S=s0mX2AOp?Pj5R<*lRNq z=rqrV7`?XBsW`)d+eg|uX(&250DQ)Z*pPfD+y!~8}hbzLmO#gjfJ z|A=2#Iv({ach#E4L+|_d!(s`yF>ICpCoz6q!zR_^M0_3I!uW2Mn z_H3`2v;#+HK;tCRa5;QE@8k>?EPTsG@If-hoAwz9Cb_W%wD9dB_YVfyh0TS+Wh!c) zrSyxMJerg-&61N1(e!KlMjjXz7YHqdxWf<_G#WI>WJ<@w^aP5C^B)9R9TAtT{HEBq z-hOHuSe_|>$>BHlFBuE@CA_pkET)iFcj1=SRxz^>S63+BqErTv5**_XasQl?ev$85 zbu5~(6N0uFId-m4jgDIE2>WItlKFS!{CrYyN7ClOpN$GSsbeg(LdgX@5$Od2l23AY zDdnifmkZh`FwgiUSK*?HkgW3ikcF10b1U+kctu2jz+2-CZ~TKH?Kj4z)7d7K^&(jp z^7TX4;t2;vh|{uAg!BUr9?>8{HSS&QPb{*nrjq>pjBak0?KFJUz2OxcmaOvtUzkTCeP^4 zXYgcN>*Pjt?XdpCcWb&CvRJxpXC@eJ|ZpW8>LhB(mYtr1LVe^~PZ=S||taHUSz%9ka!E0!SxBgb6wIALB8 za_?Fggp!xoZTveGx4hfOK6#PuFqZVI)N%H)G$j+tW6-}Q2DPaz-OauzSZxN#I%%*K6ifhm$4fs z0%o4YU$2Oi=!KKDF6H0Vw^yyG(eaim>dhJ_hYQ|I5XPr^7%>r7tMX1vfndG6+9_(W z2F-bs%gC3_ndO|3#hP-gOD3c3*_r4_BfPVBo@|84dsQNdJ9r_dfBtN5+;fz!^Btwz z=-G+E068`miU^yzgoxLOf60%^31TEJW$`N_O*Kr>TqLZX`PC+ET0$fZehU&_NKf55 z+%qquM+U4k*R(mH0Qca`c?jf`r1I=tW5k4*8g6-b)8Oi#K!^jyqL3Ih{ zUhM-*zuXW~y4Nqpy`lTAHSxMgp_6?OL&H|H;v%nttK)^K3OhMh%qZ;dT)p7nVOhI5 zCH^IIdN$8QiR+Dn^f+x&suBL?LuH=LCtk&+i01BE<>X`9vVNw?wfVq_zg;|Q9D~ZV z1PmNU#dg3pFt<@-f9PPvFZ&iR@!Tg5orhd)gQLK<3^uOGx{rwkBqRzL6mhra{ka?W z@2KV}ohjt2T^}c9-mY!>!M2crn7!W-UNaWc+ogCkpHQ6zYebg%*%CEGcI{NK@Pvfo72pN>zcr_MiJdX+H*mjttOiF?hgpEIs5Yq)7+roB)SXo=o zkiKz3z8toLA-9RsQ(d<{dWf>zh7n8^cMK&MKp=grGq#PND5Gnb0v}GGxINBp29O5N zXqye0s8QNpvVLjNWf%Wu&A$p=Y>}bl6Sj?#Ahkrlw+f=hRFcRWD+rYli*8d!AIEn0 zz{B0P z04;LV;x?w!2Gygvl7M8MTL>Rl253x}##U(dSZ2)Ap_%TmGuPGB1|%4m3PsBK|=><47lPlNo4| z@Ovi9UqD4dh%NOuX5K_OF&5sdt*uq96ER&ot46{*Dc|WI<8?=T^PJJ%9kS;<6lc zIAk;yi|y|*f9^8X+qadk$6u!Oa^37~6`J%I^iH|3R&*Y(Np(*f$?34gYBsA>gSRpt z1|g0HwLjzR4H!c;hw|Rn*arT6^nueh^n%MRgRA}K?ip##ayvL=Bz!;QWt*xE{l_j$ zf9+P!m8yG6FKWPMiOeswKmwn6UnUF7PadIP(g5oj-;+V8pg0ld8Q7CZC}EKl!sawo z(>>1WM)O%L32#F-rA-gG3q;LMB7hsE1HM(FLSNNA)tvc@f5VXtl`0n013 z5C}#yhq$h-fss+L>g>KrAaW;-A17VZ;E%2cv5&^V@z;*Q#5<8tBH(2FC#f5jA}+AH z-*A5fDKw~r`++XRFuRWM1-WN+$8|1IZh%GW6S^^~;H;uzs?tbjNfEM`Ngy8YkW*y6 z5Qi8VW?qF%su_Z$e7ai!skU(s|!=2Y_ zHzbf)VD7sm6E1z72Mk~~86N{F1N*m+NbFxlgF=T^nVh-0W-fU+Smii7p*)(wk1Zc& zp@>UZ2wyPYEBmL$sy91~;kuP-d3b}`UiD>zj%ah&ycN{C=nhaFZcE}b!Nv_fofub* zwbl!qWC5ye;9ikeyHmxLUGpPkBHin)i`s({JWh16Ap!T;0Olr`$QcW<9}jY!v`8x} z2T~|xnI&8VsxlwrTIh7Qxy(YGSgSfAc-M+&)yd$EH$CXT-}mOC{0FItX~o*i-Q-Bc z#kB~S6fwo;VYsQj+U2bQ(J;Ma=nA7v%-)0^)04J+EN6;) zW<7bmN!T&$FEJL=@Lvq32>O9mceig4p+@Kf^HT<~tPrmFyK}jNz`hV{iIB|W5_TEu zuj)YnGuC?~AJqboNr|uHK?u~D_|xyQQFU*G@P+pc?Cb;5H}tugW~!9b4p9`t2DGlq znPia5X+Dikt?WpiD0uWQ?r(SFT0qQ#u_uPu0^79sJIv)0Yor4E#m9Z2H-yf?R&^8AkpBUOiNt@l^s= zR;P!+6%F@b8dO1td+28z6Omnqm6Z-Vew*)%b3hLihxy8!HikIuMwn_9CH1NyGApD; zJU+S`v5jlmK{h%4n`!P?8mp>Z2fQF+Pr*l~iLQG#239@#xs427Ws%+7M-gc}W0`Y$ zgxl`E3o%~OMz|ejMP2XxZ^u(xehd4Zuz%A)m^40EbZrd5sC#{})=t8)tm^g(c>rVR zi7$(2(~jAO*{=dkeb%o@>u2ubTB*#eQ69SQ{i>@u_sJ~&q)(+=g}0*-O|Q{7-;zWn z-ZNGurS;EwiUaMMyf)WPJB@;@uHLoNo=95#eS9cvm#SYixWu_Zb~6GqH1dV}@I{Kzp5pt{$&aZna3j9;)CoJ?=7#CkvZ>)9Fdio>?(~7E209Fs{6kb9+Z;ho zqMC{W8BhDqGdLX)7d1urH)prYCO?ce3#Fz!ezX}H$4u!0A9XsRx@nt;ZKv@iSL-5i zv(ovo_}%roIYJMqoB{h&akx`-AvZptGJR_>$2G>|ol8cE)E%PsGJ=XqoBrrj-=v=s zvjqjza!)eVzpf3ZeH2WstkIq`MJ1K!9)VKw&uL&2ZhUf_AV<~KCHKSf`lwYeSelaQ zHk|Ng`oqLg&o%c(RUa7&9F>FI;U{?_Br20;f6D#iv4~UNqdXS@a&Dm{brUCGATgY8 ziG}R3TeYX&G|CRWY%FP}qCRLMm8~<%Lztq@PCl|k>eyByX*AcmV>uxi9y%;MYN<)d zG$X5QW|V1l8VH&6X&I+jW(Z=j!lbfQoByVnhmuUik0~3oof)VzTaD;aT{XhYlNPnq zKTZfYXPwt`S|-QpVI){5tRMu4K`OozlP2;vRX&OH{PlFLh^m1pBG!Q81aZf3Yz*P5q@DK(ffJW- zf<`^}Jo@{kzpB^L)QsMdBZ7fuxN)_#a@DCKFrht=Qox!y;_>NEto|Q>{}xKph3x>P zj#lr4r6H6Gtg>FYz#2}*-rMVlyy*;oQ;b6VxD2E>(UH9T3d=zH+Xt^NGj*?d(zedT@%#7~$qMLGZ&O?v15|3wTC> zwg0b>vpF4Mtr+XqY4y(TyI^$5aM$5j(TVZnmU!0ShUU)S_W0x>Xx#vW;*Hwd^Ju!ndoVP_~+1s@&aZ53S*!>&C0AD^Y<0y^*?SytZHfGvAr-MahflC_-i@3djyv zJ0P6ZgGV`A5&lHcg*65fbV|Ytul9WKPjJDuH8g!OgN3esE5~Kl@EsOD9viIUpN;Zl zpa8-TR>vzp5&{S;Bu^s+qy^?zfhZ0+8N45Q1(JU3v@2&M@r0J~2`IgykLxz>+uytj z<4*A*{vnuv?aCdj0^!k=)Y+nXVO&s!)-h8!R4)UDlnshlQP$gNeq?3oj=`>Pm~5i* z2FXk+8NyCNRm{EGO^NzBsj&Kje^_-s$l{@kIIBv4^dxbgwzQA6Q^YP&@L0Ptayqrd z>zc_UoJpQS<2)nyf?!!gGP7BWBZQi!QQ}}5qw@wJVN}*IXo)rSkZ86hrewUUoSxQ6 z#X{AVBYT5}zH(O8qPPI6jTBo@-cWJ)WMfZ$V^is!dm%R+Sy{fOMiSg{sLd&Hb~rSk-Q7<#|sYkEn(bV z?20RZgzS~M1_JR_dV znYVWKif+r<@kN-Dx=k`QN!M&Ca8|ENG|n`C313oR91cZh@R4Zm_omDx-PO2=-YWc? zphmKmviTL8`}3dAn|B6c@Ha~48#Q`BkR=$J(xTgvILz4~?|LT>~_RbyZ6uk48O0Ma(N#Vn5<(WSYo8AI5*6V8DXr%yoV z3UTM$`1ZfVo<#4gr}<9fzjFd|m@Sjn$HafR#OPbbjO(jtq9xLi)x^uI@)s!x#G8O+(zB+LG`#N{53a<@S=)D6~Qgd-Su+*+JHE_1QB%$ zaT_PPT5wkR;t2NAbo_23)FVI@WC7JO_f7q~l4K|=f&BB^y;xZXd= zK+b$9=0?`UMxxg{l;^5wM)=%@VX_UP;@#*NYz2MXk?8(j=3RRxDPjMvfes!l28PE!&q{rR&@lPi77`9|Hiy%0y!G(Q^#)sbw32u=Z9|%JkWTc=j@~~zsUzy zxE61LS%aN;Q}G!{_Ig-0=IM+V2DO*wHLqIH?8}-4#LcWyf#?B#8QotfB}iLJgs8mm zeGyLhrs`Enjo~40NTr|bqRDL#7elcSjy|EkTRk!9ujhR$P->=5FmsAs^Jw@`g$z+A zwR$sH^Zh!$Tc3an9}FV@BOUb*14TbCQguTQ8b7SO(=B1UCm$pA*pOXH^Ln)Pb+!Cg z@WO{Jvg`Xe)imHon|?|><`yD&wt_2X$(RM*0A~w{sec#Yaz>^fSu00d)>e5L(?1Si z9Z(^tR+ZehuMY|}pLfGr*-?R@o3=N+>PRh3(JT*s>;xrcBz`$2oqr-EX!FK?ZBHt7 zMdzp!?q~_cxLK$!ETKBsBl&$2iBb-Qh5UM;hk+pNk3`!{*I@9GAezm7LHJnDJ_ z_nI^8suF3q1{Wgh^=7Q6*S8tr>f*u>@&!jJ$i?lRNx0&E&LSwpD5+kGH7IcJ6=0L! zpx}12eH@odwP8kjXoqmj0`U{dM=>Shn?d#wz%1({+KQtcC(!eAOJzUm>k4|9RoZUa z>wQ6jspPLftpAZF1R;~Jov@Q`Z~$@1_KK*&NTZeo4}TA2Wb?uNK+vrb_ljX)NT8+E z<fcjKXHhNXJx<`?LF+{3^V9ul`D#TA=P;t zBX2EgHPb0$swdWvK{H}~UM+X+XRYgIeGg*yJj}Dh_5BLMGoDV286B6KAH^6^VCtfR$Mb2#MY~0*5?_#NVNgh4)Um|y!ii^$<)?H5no=Gaj2F1nc&M)KJ9Q)i( zuO!tm`DDwOe?zTe#nKXl9aq2g`p3?m>@D~G)zPn0e{TJ^T+_3f?FguXFf+>N&k*U{ zdjocC!783%c}RVQFf(2Ym}o(w|~|;GE9?GiCQpJv3$af!55V5bAvAOGPNI8w%X) z9cf&AkN{^9!xSzk^c&!Wq!)pEiY?JLM1kQ`37;V-^z9))#{h=8ALM##kA=C9esNXg z;QEI40E@;yrSSV$fvW(^Jqj9azGrR(b2}wE<@c#%bH(sE2g#2O1N^H%gn&A!{IDI{p)t!^KN;#_~gCKTb#^A^(lPq zllT07al+qoca3QXQ4ju|bQ>8fDe5IBjJ{2CU=I__RVFmB@p|Zt4Y-Ed%VpUv*@fG# z`Hi7Sl@Z~}vR!0EJhO~);_K~2h8&@1_2b3G}_D&quQA-`5gcxWrg=m9o-aH~1q|DX#@p5y`Z85X0ZS8Qf zu+6b1VVx?v!NVcQLOtWHD%f0N)AMfUHPe&w_UaCND6nR?wN(2{O`^F$$C(4+zbEMv zgu0lR?Cc67I(uU?dpqrnrP*&tCW-c-q~V__#F9b2Lw3?21Nc*5xX3LtxwjhO`5BEX zihTMxST3XXxhwj954rytOZbAtQy8>6;dfptp1R0jW-u20WgXY{OIL@ds4c&-8E?y0 z@M0=AxXj49)!5=pWh=uvG3UT%V%t%REo&tuv}WGrW`o!xcSRMvQ^F`nfmJ?>{(`yD z$I#eCtqr0@8L+~>XPqHnUuY;Nv!X=UMnOnyk%&NZJz4!UPGNlGOCR&5Yj0X zlvPm0OF`wCNnvYJ*HJadPhPR#d7IF$SCNTh@V2xU7m{!^LP1Y|cX^D#I5x;cYTWQ{ zaCmk#EM2L=?Prtyt?SHuq9+Jf^TXXK7}0O^2K-KFiIeWpvO&?&&m|$h8N;GR)$Zfy z6G-B)&St-i49KdqBu$lvt^%a+rbb`y`_f(Fu;=qu6QI`({!_>MW2=rQ)&>*j&L3Pv zQ+x1EMs`WPj6h#k^#W|5oH#0tE@&ogjt4!Rr*unt{KAa-uV?5mRDw~tk*Q*z5@Ey| z9Uy4V@kmUXUQBfwADYkncw!C)`GP6;LXLXw*GcYOzes1cFd(~GNK)p9XOo#cP=LFx z+Na_iYyZg(`VG;ie#>j{Ng!FFTr!zu6^>3pm>=d(s=XO6U025G$>;w|{6lz{@RkxC za4d&4s*DX#zSaDYAK6j=0R2v>ubYjH1c?30VY!GJgZ7_@@)9U3i)9v7l#H#eqvmu8 zNiq)8EI3qKSyAx)P&rvlp7i75GR`c^d9E7TxE9t@)2>EYdFgdD-wO7za8DVH`t%KJ>*9&J-0?X7x+1*2q4m8^~YdSvTJp& z7AD)OZ??%$;vHc&0Q{1d|6RR#=X#xUv3Ih`FovnkRwtsvG$zxBYx-W=1JNg{>6b@t zc>($y6Qs2lg8E>C(<2>-D-^E7Az`|cz`HI^U4~W z$gIgLo=wD{%r5y9Zf!hyolx%ZM-?5N21Aj~n3fPL5@{?~*4%O8@_AMwTDJ76S<`jK0`TE^Ai;#Sz^)Bk2niWea7&kP;JYgONqJ zwAn&qh`5<`n3HPhoEoLXJP~itJWnR2XBNem}!h_>k79n<;;qqkZHctAjBxV zvxn#gorxx6(ibvcm?e@s{#=kan*)jM%G~$xw3f(sChjSsIoJkO=|+?b;;=vD)u@7; z2`0g?LuX$)($g;A)i5mDcc_zb;FGK~R799;+1Usak;a9TbTyY~B_LEbz3^NROhvvw zS($vXPa~_yZK94Z?x!YVs%LcBHaoC~$zVcWX>^v4pr>yj77JBw@)7 zZ72MIo|n5rjTaknd4$<#;0xqTGN_h^TBx#08^7Y5XAmkQ9rCX(9|zrsBLUmHDaE$y zMIgu6W{aVZIB|Ne2WUCu4!2HBos*-#DM`Ylu-LX#1!rr!6J){wPTN`XDM)l1T@W@R z#zCJSMszLfLjrgih0YE-KNO&^LFA=?nz=B8G{06A)#>e{2Dd<0M(1PM&Q zgFQP}+lY6c6O#vdll}Wg2V8q^G@=mT+)p*}4_jRz_O}odvHX}ZQVK!}3BOpi(Ctd#xfLv=@mu|rj=&6Ow_W%^SmR+wllV%TzFP2QTniJjot z;e*arY@u2e>iB;B)yhHf(V-!CW;G6CLX%VW^osOz4yWUaIr7R#IzuiLJiaxRRZdSU zWT3BQ=*}Vmdom^6ma_y-G=r%$6xSNbG@^ITrT1YK=Cht^%Mv5);ymSO+yh$uifc94 zOCRMYaG*I~I6NoWqYwVx`v&=MEwyAG155bhS;9{)g5`%hq@kIn9iNhKIRXJnz-hvO zn?(jAL$~lvKEqc6Q1jQ*D=8seN1_+dH-jVB2a2S|puq@B-|V#N{}Wj!-w^i$&mYkI zBNifK@=GdY#x*vrk!>KpL&b%*|kNP~=xbU{i~O$3$%#RTiY z1nQY9ocjuPx*RN?IUW-40Hr%4g=mj>lr)|i;@7JTJy;cF&cjs~GDh2uu}bT59R>r2 zGgk|PaCy9QGg3;1TDV`mIS%Wn6-jd{;_KEs+pWmJN$FF^h28f4F!7^s*(XWhGYuov za?U+b(Zm$t!r?;nCs@Vm{-a}5td&yv@hsWE&YA+vfW2VEfMyrITVseOJXe9K18ULq z#bu^gZWQlYdz-gf4Pru`stUjMXxrd567t5PkT9AX{AILHc8ZK#AvK*6U13{kIO^~{ zKxKoDNh80)9$MBcwnqnU8# z*_Q;M2+F|G{_W1Z*YvwECg7C*;h$wdpOt2FWr(aB$%yrQf z|E0cFS%dcJ8r}IiUbh_qKG{Da{PhErTA-C^z#GCiR&6pT?jwE=(I%TBnBbpB=&Kvc zrLG(JyppeLD_$T&#KcnKv8VZVPax}0pzTMcjMm;SQSrq*ag8}ER3kg&8awDqx-cN! zhH@}_N=Y>eC)h19;cAD)331>EX6sIB+|wUfLN~3SPe635W7%bwe1XG{V~rf8@FfWZ{m@52|3Pofc69r?F&*EVgkAC zjV4C8U5iF`zh#Lr{(Ct9GA-Tq0QuhwSb{B9lpIGa4`?nY63_$-qIC+4CK(aCAtpnY zPmu63Zfv&X?zzgmEOKzFF_?8(NCGv@x|o@o`LeL^ba=mCZ6gG- zaNY=vR|d6?bx&riEwUntk_J_+ca!^bi%OdJBUWLL}21mQ`D6cDUkjBN;Ro}aR1uPmoc06QDgnu9R9_?_TfVo2ApP?pW04Lmp7lP!sFtP;hPL&&W~uE zT!+0{@-^&72`-y`O&B$(+TY$5Cc5dFY6%SBkD6Kr3(R?xE(_^%`lZmrja0VL(>{qx zJ`M|I&!$u|#lSV%wC9O)!r^mb9h;un?zh}*M`+m}PLy z0M=Qj2>RGh@8bm3!{=LZ`7e55oCDwpdD!0oRvA`=U$&k0&S&>W%jY5ZhIcHUZI_}3 zfh;f&dZlOZC6YpqXwv#~YWayJ5zUgt)@+t?t&r1n0m3HfYVbX5Pb9*;`9(1`gGRVx ziT1zG;`tOnf{N>71Ip$IMNX_V40QHQ0Wqm0xN9*`qPEOzjX4NdAzYX&1d9mK@tdAx zt1-uxWNP91`3OL?!1Z%(_Q0;hO429N3sSv-vcx{j)$2-2`1{PkO)*tOy;axGlcaNwh*#k5!mEI7~}1|``ba-Ed9bRz>PK=AnGC>XLk;OGzUHvKae=2)8kcAn zqD5P zg+r#?z1fb7^``gBGXAR1`+UOyP^O3o76sE=FnC#(@cOaDWMX4&35@i?_TVZ!!suz3 z(MqK*3Q@p_dps`j=3zVe0f#^mbD(>CcPteL7Yv>!_FJxFtdC!~F`eUjs@$+fTa}MQ z6;395m4@o{Ww-IUr+QcI2KRyihumPtfRpQj;io&iX7^TMdiGzlgq3Rh+`SYeJ2o5h zt=_V+XVqM+jSIP4>o6^dxRJr*E z_@<ROYUn$j+Py7Vo7Z`2v)jQ8x}t9-Hu-MVU;3_qsr@tXHWxB zEv*1oN&kxgy?Bzr8QgK&ZzPMYO<2BMui0$E%DL)FxSrJpK!*e(qRk zHA7}HM9+E?O&sGRfooT1krdvZ4BI zRq^vj5AoW2;(pmF)+RhUhziagq|yd`%b05iW^pn_(^FR*5(m%8bVBN9L+>m2-y_Ey#Z zX*r|ud%ia)wW&--M3Y3STM1)$F_(sx%gbdg{VEQ9F2FzE^+=y`hyo0M|A}GDcro&O zBE-Hun7M)o5x3nJJ(=0$e%|y|uoMJ*-yr{?;DD`HrZ$?QuZFdZJD zA?_>jL$^m|nOxQvX+?G;H!dsz_`Ukg?Iin1UU=tFw*|-Fc!X&j=TJ1w)1spsk2Jbw1YCiQ@xb&JZw=;avUwkZ? zD_BZJPH_+3ic;hoS#bF$ga^Hf8ZaxL@VF<}GS1#_TnqvjJjDjd(RXYFG}ivzp+s6m z+ekd^4xm6#oj>X9S>sK}Ef>hC;IQBP)lXXDuoQQ{lI<>XWH=Xk+j{;=f`fId3&^rS zqMrRcT3e~#wJ)V<4hgy%E1QtY#^ppCOv?sdtZ|Q$^D*6j19AHuy9K=^)`P5%e?Gp8=J<@_J7J~ z%FL*+LwZ2><`EC-?Jpo?wxzF-)1G#~VRbHJslA)o$HvnebU)6tlc(T0+Fvle0+3#Q z2VS$_#k8a)hq#bt_5X+IdRw`{4nz~Hr>$6hF0tW zzFyQx+u9Y4XXdaxC}Z3w*nb(x??Po}?k9RdfeZx1|3AQ+IlxPvrNswSH;dO`&@#Y{ zCmi8^EQsZ{U!Y$AS#pS*B-ah><-riyZ zMSh=HhJpq`l=b=p$#QQgp=IQJq`$R9YmGB|YV9+mp=XiJF2SJuJ+ew2Jd4>z=kbHm z7$y~3$?WM97j*Zji%JG@@Rp{;(v8nKty_yWVkj33sga(@q38fS@D+-pYv{Ll^*~XS zB+NkxQWJQZuI|vYs4aCOjG$myG5>gg^VRWJRIFPY8*Q67s#}WnNtYMQxfr%mpK+vB zT^Bi+4fu|HO1^U!rp#oGJaLOpuv{SFT+|C9FvF3Z9C1V0EiD=2XiHsvcF~I}gzfbg> zFU$=L((LpnCRq%0ytQX0VQL4horofyb*y=74IQ0~s_vb#xbe~SqEfpr&@!^Ct~@qY zTAicrmt|oXhRtCLtu*F>OJLFp)calZ3U?){kt1_;a^+B}|KhBMlrtdKW~;c>z3Hpe z=YvMMZ++A?)i8N62=HmgUao6>J#s@i1xtJdi28@JRR`-weu z)8z2y@!ZE+!{b8plsL6paRkFoEuibD*Fu!R^-tC6F>TShp z!{iWj`n!XjR=f$FFB@jWl)>L`OGDexy5l_2x?=!aFbKQ+;McBXe>)ecSAXM7HhL@} zZ>^L~e-H^M-4N@3BMammy7%d!`3)d^qvcD#=n2tl@WCML)&D86TtfxdDbt=#jyy&S zWS=glhhm#4E(NzKTdgdIKdG!fSIaxIZ%&)0f_Rm2CP#fbULkR04#nR(W}V5`(G_?Q zGh5kh>|dEEjfg$k{>xm2>Mi)$P~Bhj3$`9WfmTfr4cP0@{^A028@<{+6!6WNUN^M$&ohl2(X zUr6QySMn)|%oE&bbpbUnKSG*NC@+Z=HA89iYWzzQw+5CN*o1Lnh(IlRm07Vn2&VxN zGxAf5WP4~iv}xcZ*4BxBH&;t_FIQ_7<$CCEnh)g)r`R)oJHy-+ebRsy|2*@UZ^JGY z&0AH<9B0O|AF1ZCIarnAK#5sxv&1ad6l(KTsY}drq&vpt4eVY~f9k z%=zTMl3kgiwMUhR=FG?~nqK!^)nY`IhB5PuhAq*c3@-OzQUf2{po?1o3o}xQ zLVqdO*Fv!sf?Z-sfJyri!SfBQ4mXhc73v)&l{tmgcM?x9+{j{J0Y};rDz=?|jo=S? zID_8X#-gV}Bj6{N!HxA!N+aX{P95+lyQDApc=V`l_%R-bvPPWd`vKo~>vRNVITL%i z+5J_Q#$iw`SG#?Hg$BNpC5=V^-aglHv?CJgj;b2q5C6VoY-E1D>_@EfEo@Ixz@YOj zZvYBlSJQdmUNgn7G3Kr{dtWd5;IM;WLTzRiH3)H|9@N%ZH31wJDL(g*a&?+gnPD%j zPuUeE+LNmfMa`-WV(+h*9Q8Vpq-mV|y{IHHf+F-9Z61idfCk5r*(QcAT3l@JZ!5EE z*l3B7ON05F3PR6>Sd{ALm+dHuS$N~2-QS58b0a|$~>Q@t!A(pN{tO#PaeD^pol7>>M!w{eaSi!UN5VMCY!K!Pc^o2^s8vJjI=S2-K50VfTY z`F(u>pc%tS@n9}INn@1KG*s?7k}#ah>#<4E&M5~O=5smpvo2zIZCK%kFL$yG`T*5h zpG{Wm*fNofMjO{vcKz^aGE;P@T$H0xE#4TwcOd81_ui&K3-V&+d3&%W3H3#^z%>&la0t4 zEpxmvwRvhXo#TQI8O73!?UKrkEdWoyY)pFwoMCmvqzx5^T;d6H(Id}8ioxHc2t+Gg zM4dwK{{kkEY2()rQ+b$nAh%qu@sEuHn@M@(2%>nF^QLQtnMZF*>!O~YsNZ#wUzJqS zSq2ZC^{^h)%g8yWN7Mc$&69GlR$@bhCupQ^K)B_wF#Tc%MW@4RkCcVDG6L|$i-*5{ zr9~RQk$swH@Oy(|Q~0!n7@uPeLgVDtZ+?O=d|ErMm%^w{Un(B9AuEgfoX_Znvz=N&OA0^*Vi~$8oU(mAfh0j*F~24<R%--nGX-W@_~_yu9Cizi-AT0v z;fC`m*O?_*LC`~1T;y2HkKnY%VCV1Z1LzBsXhgX$|EvF{1|};|`Ge@8A4LCu)!Pm` zIZ?6memhwThu#EvF}3`b>|Y`39w%yaar6QraB&((+|gt*4*DM#85hb}#T*lj=c<}d zY{i(VURXRdcrp!|94%FOq^X9ma=&|c=pI}4W^F3nhS^veo-*SScpdvx@O(XtVu#c8 z-*dt#6wxJL>yD00f>Q*&_umPp=98`6yl{y3{WnIhw=kk+%N5Fv(r0T{>{X>+BUSKs za4C2poHTk`3r~Pt?xzU^%wC=K1A^fe_YIC=n~<(r>GrTcbgn&_r~0b$ zU#&JtmpbF!h~A zBo{Br;u;<^9N*DZCKY6{j&)^aT7PJt?SN zkA_#*&bEN2?Gg`{T016&q=MNJ3Bm;=h$BDHij*9$yHMl;VjQ4B>_(YTsKu-WN{@cG zCv;+e7tB4yFYP()=q5Tfj$pD$<48a2=y`0NSz{rbxyGz;vPtIRUHmCcFT#{7^)?}yN94Lhu@wCXV z-}B7kkz6&bWG+SeF>C*;>6JmgJJt0A(#ju@a{edbZI6!p|GaZ|*ddb7xg^2AN6HQ3 znmD-QK;RE8L^H~Ofq;rYfq=OF=U@GQ55DmVgTnaZH3{$q1H%`NJd0QTe7hAK2#EDR z$Apd{l0W&807nzfDLP+f!us&;(~IyL(TDQ(IWIEOhpGcbns0) zY-nLru*~TL_Itc_d$r-daL@!RSdEh#AEa%3SF6=604}%BzaXNDbCFwr%BBndb={&2 zs`YNwZK-HkD$xor8)IpC_*-S8ZB zWH7qX0Ga{x$4?QO-Na{B?XwBdA;%5jkZ_E%YM!0}=Igjei`7Wx#K%}JmQkjs2d$T4 z%C&rgvU{l?++FhxPX6?3(Do-CwBbyf;Y_3=aC$-`LKq<;d~8gCaLkOUaCAnA#)p8- zGTvHEcM;HE^=7*~BUo76hW#1gqi`jzw-#d`fI-8pO^=J0l(RA0LSMwQ+7t2jN2+6E zydKvB`tSmTWcuzh+F4xq(K?hZ1qAz2jp?O@TL&>Fg;_>a6-MiHbox?uYWtAi zF*1K4tf6%vr$ou7&iuPhW!@2adz*Rkm#=lV<@PJdr7^)n1pl9dqz4YQ38 zTJ5)b>6P?BnBUb%5K>TFiN^$rS2@XLK{9##s%`*}8x*S|#&MVkkJLv<=9V&3X%DO5uuwa5kUS-|Kt<6JHkbgBIPyco zdBoQXR$whKq)AR2Vg11xRM@U9Y9WsJWf<7Cg>=?tON*==1aaM*c&h;r3uE z5y5~7@BIT?wW;x=#BlEp`IV*m-vvVndTsi=KmM1yFnx%Y{YzaqQTC0Nyw-TY6Ww>m znkyBn-aXF1I(jet0aryhq{p9xb#4Uv*_w#nOAgxY`Gyob{sbL+8E7sQgHc2gO0kW>^b-_ZC{8v#@S}5-mx(@Wg*h zCK>0SigV=7bZyuKVzc26f6eMxwSIe+g%}4KRKPHVl~^T^B-4>*XY>F8BoRiDYNRs{ zVHOT?@qrwSLg|w4h9U$-3;62Q`63E?gGzhDD($8|acaufRZok~u~E8n`IE1xQEc8p zmoP6tqDTso?P&_d;zrK^O~847h!jaC+2!s94m;ve2>+lciif80%A1NTbcJmokJE1w z|3d8`kKJQfo+63xJ*+qkQlN~Je?o`&SMB2yGlKnVRGYk8go9o81I#`?;N;ZyTRd4U zLPTdI**THDkq;w9pV6umwEZyukH6e}Z!jdXKtx1h?udM&Y09-EG4SA_yp&hxuTtvY zkqy`XMX8Z|fI3)mov0vS$8kXk?Ms0g4c0YqV~HCbnG*|lxd%Iz0!3bK%p!PwaGPPS zp5bU^(?jB$($H^y2=W`~o9dv0K6{HuIIH;4`y5VYCeOt~phl>XN! z$GMk@@u)~hg72O*qmT3$Th=I86K<^DfX!_3)!wVwZY840u4^e^0XBR<5MyHTmd#qC z%s`5&8QHd&`Ig*`=75%>7Z#J3=Wd zk`XkW6dm6`wp$2g1-FOwR+_6f!L*E!S}~q?8dYQ)mXQd%U_|E#F1{XR3@tm1q9Er* z(=C6>nx*V=-`N7tt}RNO5E0ak^zO6GCwonuKs|=b-B>TXW=(hOy)rLp?-w9b{*9Pr z^c>>K?zZFew!~?{WX~^;jBy86bxUJ+)uxM~BYsg}XPjT(Hf6{6x9<`UerD5Hj7uxv zGW75MUM-t!e6VFkq?K1?-}X5PMAJl{2EtpT(J6YMQwS*_g1%w;>MQUz4j+_5(3MA; z9Bqw}0;shra9llzJF8QD+%Mww5ocOQt|?InC2OrKj2#KJ_CP_-4>LQ5 zaYA%)_BdsA3aZ1Z4NrGTDG84I#OQd}OIUXtA2o)sAC;}|F!wfcPUA}z)W$X%NZMxBT zJ%m3Hp4bj(bTr^|J9~cW6g%oe$y3o&-Cf;%d39N_4&V0)DNq}5r$)eY+hFsh$=$^Rqp!63jbZUr}+8;FR)s00E_SaqB3ZVPkMXehu1&vcQMMmjJFz! zrWx}>E;))dzC2W9+U@nZuiD4H{DLl?7q4IVPHs4jRf%0-A@OF8=AH=B7rRodH0tIz zkZT@GVd|c;i`oZ3Ye;vl#IEC_D5v-hmQ#F~SDh6lqZo6Y;>X9BytezZ;LCkUs)3^H zJcCx1Ewgf*4gcP}GhT;VUU_D&SZvh9M_9&vsUj7Jda+n<)P?-UKJzdg#z&lHStix6 za+!fu-L;dU=@5=Rt7bgMuR0BUot zu8~X;q)Zr<(O|x3#OE*qexTt=E;28rN`evH%ouZZ3NsQMWhIyF9y~r7?A#=P!by6o zMB)~eDNhEVs_$5Qoxzmj5^Us0*}`tXTm>_AW?e~vqL7ncaUFG4tZx-&`fL6MBCIS* zMR2n6WTRibrBg`nZV%0BF+0L;jS<^oF#|KaA60r~zho=Pv>*d4JKbtEHI=n$W;y}v z&KttaYPusI{1F>9y~(tt8_Zm_T3uzh)!x!jYdrkphIRk9Qlqs&1yy|xXMj?Dr4Tx> z%-poKsoq18@mnMDHCS0$cfEvP8oOwr95-0Mc-$7IMKU<*3X5JZv7__P7dC>#-zt0H zdrfiE%jL@kBiprV2k3}O{0)sTlG2)s5AhUk9xMb&PmWNJ%$oQvu!%S36~7U0XY(mG zbbMyOztuY>zIJ-Mg{WTe0x7BnsRUh>3D*a@nAR*Az}3=Pk7+ixZW$DKSXCi?|IM2b zU2y{pNu)HbM@z=| z+&W2yZjyxh?7d1fq9gC1%GzzU(Nlti0xlZhBxRqKv?kV`K#o6zC@YrjND1?ioNUgn zaB&>h{b>fC2HJE>&KS+joc7veggNcBGJPVdX!73ci%3_HD2dTn#F>h8C4X2aBB}ia*;tjE&SX^5b18h%; zyf+YOA#}24RlOWb?mCjEKH)w*#qkd+i51*>q6TI-wYOtqnxJrqyx)nF^D!$?OzzXb z_*pzNfqObjLvQ{nG+JB}KGUh2$U_Ujl}o)}efYyC7F6;_-NtXB{#Wt44E;-Xf}Ij~ z&2%9OLL58OaGW2WM|rFdJ$nOXH%7f@2TvGMqy_#2+8+C^5+r!jjSv5OKDr24VA@l&_=XTRB7N?A$?q zX>-f%t^dLj?WKG+%TNJe#{6vEVPPesiH7eE0Wg`h=`jWp`yLvI_A)+Ox#S0N9zlk0 z<`3tA*oqP;?Hy+l=)YXkCvhEhXlSpEv=aA<^jwO%w3`fBqW~H%I!+yc2T|F!d z=cD;$eaD)Lpxj?-EJGJBF~C1eKQBds6|FR18*dbPJS0LtOpnjkfDx{hb6fG$*jd9` z*~?;dIk!-! z6peEi6hDZ$Ywd!m|E~Nu+9jCX(ddt5J~4;bR6v+rrrU*%uo7&pKy`HQjD1W#E5e`7 z6MQS-syXmh+wU`p+7J*+Pwh^t1M30i+gg$CM3?B7f}Yx*5`w$z`?Y^%#FZzWzz2=8 zgy=G7=+Fxo*=Q>f%{4XX_SM~tS}siTSw-;(g*jnE<><_~N$1nm@3W0{<4{#-?RA{O z8{y^ohZ_7tYFS-NA%8`a&zGH7y0S}kcTGzQj4C$f{kD4Ub2q30YJEK3f;GZXIQ7i) ze?t{v0Z6iZKGNDN1sb>H>hrLb4BKoA>MNWkFgbqI-Y5iGxwF6zt72vxX#%4l@k}<; zum#38ec?%KhlUf3wT|vgY`)6|E6>&Ngui7>{Qs8ILC`H(!xd~ONt%R6z5i+33OHzB zA^^Y}nfTps5`3(G%}5!(cZJ=py0C7ez>*6FxK~hq>0u^EoPq6lG>wWJCW6Mm3m?JN zMRNi=w;cWL>#aUE1A0E;2S$JPPCsde21U5OK_dc>of+a#bdp~Q(RptSY~98m4ksS* zZ3hm*$)BwAUE7{zVK>$8j-syAG%`6zs^~1|-3s%8>oWgS<|VSimhGV!D8sg9X7w{` z;#`xv*C*p7JBpJ@F8x{;9d3jpn~ zj(HF4cZd88vB&^LJlbbdAgud05qoo4? zAJ~yd2I5?f5Y+BWHbi_rzm9V9p%=|-sYxHoSqZpryWOZ-$Mk8CQ}!U2M%_f!hLL3Cu5 zkJL?|y#iBX1zjW5+5(o6vb^0#W3|h4GSda!m5qetXlgoID={wOdfPED%Zk;2N63$! z^3Aw`KtXE;^?rGq&dPb+WX+T^J&jMI;{}>86%X{)^Gp(V$>KZ|?PV|fybIp1eF3^s zhNRlsre4Iwhy_{Xvz5eYyG>6!3v)(=x;01f$mlXk<^Cr=IU^J~an$pA1X^c-jYlXG z(AEQxhu_$mCZvl-sHXO;1S1##zBt(1)wO8D1CnmpiRXIw{37ttc^Xoq39sgHYO8b; zHz{hKBRRWticoV@4=KvRg)oK=5X?#W$Z>naA6qCMf2{IKj>I&aZ)zuC%?-yhI~ej7 z$t}v1IY2C)&!%Ns=h1bC&r&T~llqL<#qady&3e6TZIYYt{80PiV63W#i!C;j5 z_`LnyGs@m&qr~g1H*C zuU0m+1w7VJ+FBB`gh*bheFaQpO=ga~2Jy)BR@YHOA3-%OF4T8$s!xgWXZt*z#vrY{ z0acLCJ<4PG{fcQb!@+j0Unku`C%uW5r4PCC)072s+|&0jtFmwpRQ#%1o!F4{bdRj4 zZ#Q)G3V8+mi?i77;i`MwGfEHEr%N|E;V0`bTesk)_{vT1h^8c&2z%fgKm&5mX+rPGa`!clEUXVjd-XoZfLPP8thI4+@e zopo7SAvvV;^lE%w`{()no_&A6_t`%0`~LB}JdfcqC7UmM@p^MCCdu|j*v03E9 zkB;Y$?<~6=b7W7p^O5qV4xbWoX3Kq-^464fI-#}IYrC>#tf_X7{m4|w6_ed(1YWNr zj&i$80eP=;TxVicvuRaRG?_7)rc_Vl%Vc@3_qVzx2~sl{L_bD0Qf?s`D7LP!D%KJE z(i0cZ2hP4qdZwV3n~K|4v-4RAg*ng77jRtrsI{@OmB$}Fw4ai&_NJhNlqT1=)3x2} zl*!3IeA@bNCt*_^s*W|OT;`L0bMx`j+>|3{wV&0J1gBLwLGmC@x2dm_=#4yjZWP4-dC8@Oxo;XHvvDhQZSDb6tEXv(= zt5D??N~nx{o1`62iVpnamG`F%Y2|QP%!JB|1}+VWp7M5nbWmf0maSB=a3tWaBq1e2 zS~)|0&2PZAWOT%Uzy1p4^U6o;oKUXt;Im~{bJG4yw!Xi~_x1;C`l%CdPrakp6mSK% z28SoJGPac@g}WjT_9FS$hWvV%E%u|nzqF)swmswoJ7w=?OOw3a)uvVL=5k9D z$(m7j_YYHd{~pkoMrJcD^m4|PL7!$?^4jaQ zrpn;5oCwk2LU!^_S?hJ14D+J!L;fDzG!f$t$G|(-(ZQn7Xn3H1SYH`_Ib5vgU*__m z@vrL@c_s9wx+rD+jxPb9Pfv^UAFBK(|D$wE!YQWee)T88zcV9KN|DLhbk5a$5--AJ zNm&4M7jt;-{w0Jsb%^ND%E22{8`%c4yw440AGHFf?Or)OfGOG_i`YyO#E>MJORowZ zdenPV+|F&cVM@V>&5-+?{PO%8X;PU)nm1yol6uvcH!*6y4j7saz03ycUOObz0<>j0fP_{e2vboIe=6Xq7|42SY+3#jVctq*f#MF>!g(Uw zj)NpnD<=ZeJ_@4aicPKUGeN(d;Q&KwW;nZ{uh19K6d>xGh5oqlvW6A%QkP-g#z4=) znLy_a5ykC-t0CbiqtDS#nVOL(_A;J~PianKCKS_+`I_-U}H z1qU%sVvxGsihz|DgSj1sNNEn7^a0!sB8n^h#94-)!7S@LtO;1n3>bx$Ck5D~Yo`^8 zD?7kho+tnnE(?ID(-QqL?W^I0yqxn8a>dqwOY>?7I0|{^i$EjY4M;nQ1T4u51PVi> z;3DRJEVrvr7!j~MS=MVqgnwy#-V(*K67WyE0iR`ioX7Ml*bjKQeEOJI6c?bzfo;VY zXt!bx2I2zLIMDbS1kFIK(hiBQ20bD3L7kF@9BzQ386bBpMlL)CfnDLqfhPcVSQ)MH VBfu2+*qg&~f-ihLS3eum{s(|${^$Sz diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 41dfb8790..37aef8d3f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.1.1-bin.zip +networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 1b6c78733..65dcd68d6 100755 --- a/gradlew +++ b/gradlew @@ -55,7 +55,7 @@ # Darwin, MinGW, and NonStop. # # (3) This script is generated from the Groovy template -# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt +# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt # within the Gradle project. # # You can find Gradle at https://github.com/gradle/gradle/. @@ -80,10 +80,10 @@ do esac done -APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit - -APP_NAME="Gradle" +# This is normally unused +# shellcheck disable=SC2034 APP_BASE_NAME=${0##*/} +APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' @@ -143,12 +143,16 @@ fi if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then case $MAX_FD in #( max*) + # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 MAX_FD=$( ulimit -H -n ) || warn "Could not query maximum file descriptor limit" esac case $MAX_FD in #( '' | soft) :;; #( *) + # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked. + # shellcheck disable=SC3045 ulimit -n "$MAX_FD" || warn "Could not set maximum file descriptor limit to $MAX_FD" esac @@ -205,6 +209,12 @@ set -- \ org.gradle.wrapper.GradleWrapperMain \ "$@" +# Stop when "xargs" is not available. +if ! command -v xargs >/dev/null 2>&1 +then + die "xargs is not available" +fi + # Use "xargs" to parse quoted args. # # With -n1 it outputs one arg per line, with the quotes and backslashes removed. diff --git a/gradlew.bat b/gradlew.bat index ac1b06f93..6689b85be 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -14,7 +14,7 @@ @rem limitations under the License. @rem -@if "%DEBUG%" == "" @echo off +@if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem @rem Gradle startup script for Windows @@ -25,7 +25,8 @@ if "%OS%"=="Windows_NT" setlocal set DIRNAME=%~dp0 -if "%DIRNAME%" == "" set DIRNAME=. +if "%DIRNAME%"=="" set DIRNAME=. +@rem This is normally unused set APP_BASE_NAME=%~n0 set APP_HOME=%DIRNAME% @@ -40,7 +41,7 @@ if defined JAVA_HOME goto findJavaFromJavaHome set JAVA_EXE=java.exe %JAVA_EXE% -version >NUL 2>&1 -if "%ERRORLEVEL%" == "0" goto execute +if %ERRORLEVEL% equ 0 goto execute echo. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. @@ -75,13 +76,15 @@ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar :end @rem End local scope for the variables with windows NT shell -if "%ERRORLEVEL%"=="0" goto mainEnd +if %ERRORLEVEL% equ 0 goto mainEnd :fail rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem the _cmd.exe /c_ return code! -if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 -exit /b 1 +set EXIT_CODE=%ERRORLEVEL% +if %EXIT_CODE% equ 0 set EXIT_CODE=1 +if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% +exit /b %EXIT_CODE% :mainEnd if "%OS%"=="Windows_NT" endlocal diff --git a/settings.gradle b/settings.gradle new file mode 100644 index 000000000..b7fe2dc86 --- /dev/null +++ b/settings.gradle @@ -0,0 +1,14 @@ +pluginManagement { + repositories { + gradlePluginPortal() + maven { + name = 'MinecraftForge' + url = 'https://maven.minecraftforge.net/' + } + maven { url = 'https://maven.parchmentmc.org' } + } +} + +plugins { + id 'org.gradle.toolchains.foojay-resolver-convention' version '0.5.0' +} \ No newline at end of file diff --git a/src/generated/resources/.cache/27a06cb38e627c3bacb7787d001fbadd6becbe3f b/src/generated/resources/.cache/27a06cb38e627c3bacb7787d001fbadd6becbe3f new file mode 100644 index 000000000..9d2a0a073 --- /dev/null +++ b/src/generated/resources/.cache/27a06cb38e627c3bacb7787d001fbadd6becbe3f @@ -0,0 +1,229 @@ +// 1.20.1 2024-03-03T00:40:33.018052 Block States: actuallyadditions +23a6aa86c3f14e6a61fc8b17b65063f1995c8592 assets/actuallyadditions/blockstates/atomic_reconstructor.json +88f479927d1abdf16e24a0950ccffa86b5af8b3f assets/actuallyadditions/blockstates/battery_box.json +5c96fc287e63f5bdd31864bdab698ce34817fd9d assets/actuallyadditions/blockstates/black_quartz_block.json +f88640ab3aa81ae4a027948d94386c83dd488d3f assets/actuallyadditions/blockstates/black_quartz_brick_block.json +76275adac938c575565d4aeb21b9994a7f561f88 assets/actuallyadditions/blockstates/black_quartz_brick_slab.json +07c0ecee63ce0d642ad6e638c5d52ab65585ad97 assets/actuallyadditions/blockstates/black_quartz_brick_stair.json +477b822f7e986108f6d45e1fd9ab5f9b4bd5bc9b assets/actuallyadditions/blockstates/black_quartz_brick_wall.json +92c2e6bea5f60d01734851fa1cfc4cc9406cc9ac assets/actuallyadditions/blockstates/black_quartz_ore.json +8c0b0f586d13bd2c77f0c21022d6e769785c66db assets/actuallyadditions/blockstates/black_quartz_pillar_block.json +9f526618577abc9e92d2cbe48e7c7047c397b732 assets/actuallyadditions/blockstates/black_quartz_pillar_slab.json +6b814125b5f3133ff49299cebbdb4ef0899d7fdd assets/actuallyadditions/blockstates/black_quartz_pillar_stair.json +e5b01044b394170337ce4bbb7bfcd3adfa3f55bc assets/actuallyadditions/blockstates/black_quartz_pillar_wall.json +8d4399c1fd02d43ecdd71d76c3cedbb3b729f219 assets/actuallyadditions/blockstates/black_quartz_slab.json +2b7ed073577ea09621ca75cc667fadfece2b617b assets/actuallyadditions/blockstates/black_quartz_stair.json +a386ce6a9b4f27928de1429390fc11e41062ee0b assets/actuallyadditions/blockstates/black_quartz_wall.json +3da58a578a16fb902dff325963f1183db63a87df assets/actuallyadditions/blockstates/breaker.json +1f73309d78577b84a9e572762f603176cdd389d0 assets/actuallyadditions/blockstates/canola.json +e4c77f5137865f083d2db69211bfc71e73442835 assets/actuallyadditions/blockstates/canola_press.json +0b3c4fa29984d3683e140761242fbdc2c585fd54 assets/actuallyadditions/blockstates/chiseled_black_quartz_block.json +8764f9e9fdc822116bbd9ab1ffc0063514c49dec assets/actuallyadditions/blockstates/chiseled_black_quartz_slab.json +4d1fc1bcfe65a87e0ae3574b1f6615d18746af48 assets/actuallyadditions/blockstates/chiseled_black_quartz_stair.json +f2783b39f74a65956ca6a5182261248242b732ff assets/actuallyadditions/blockstates/chiseled_black_quartz_wall.json +fadd7a142bfcc99f99a98c35d08377c460fadea7 assets/actuallyadditions/blockstates/coal_generator.json +277af68c27a4479a1302a130a6940d7451b661bf assets/actuallyadditions/blockstates/coffee.json +8216c4ee7c9c96fb1fe394946835480bc9847270 assets/actuallyadditions/blockstates/coffee_machine.json +1c8cc1435e5d981057fd2710962b7acfca073de1 assets/actuallyadditions/blockstates/crusher.json +838dee5482cdeca7ce520e1dd56ce7fd8ebccd1a assets/actuallyadditions/blockstates/crusher_double.json +d0281928d609b5391356d7f088f54f1cbc65ed09 assets/actuallyadditions/blockstates/diamatine_crystal_block.json +cc5bb0c50e86b6dc64f1761bad43d636eee312b2 assets/actuallyadditions/blockstates/diamatine_crystal_cluster.json +d8ad60132f734570466b36171c9cc8a695122fac assets/actuallyadditions/blockstates/display_stand.json +4ffab17c5add0bcca802ff2d621504e81a6c6422 assets/actuallyadditions/blockstates/dropper.json +10f6731a2b5e7f520565924fbd709c411ea0b2d4 assets/actuallyadditions/blockstates/emeradic_crystal_block.json +d3afd98974e13f837133543deeafdc8988c9f23b assets/actuallyadditions/blockstates/emeradic_crystal_cluster.json +7e2f1831718c2cf181691a6cbae6021d906bbaee assets/actuallyadditions/blockstates/empowered_diamatine_crystal_block.json +e9bd75a9f1d95686b39185a57b10b1aa0ae6489f assets/actuallyadditions/blockstates/empowered_emeradic_crystal_block.json +dbeaea40dbb69b9fbd3c0a9030b6ff85fb7fc82e assets/actuallyadditions/blockstates/empowered_enori_crystal_block.json +bb2557ee2f04ed1c0a69f51d4ea7562ca648508d assets/actuallyadditions/blockstates/empowered_palis_crystal_block.json +42f9cf5a7abefe37dc306a9d3301be14b299ab0b assets/actuallyadditions/blockstates/empowered_restonia_crystal_block.json +39c7b1589f92481ae292f57dfab6fae6925b35e9 assets/actuallyadditions/blockstates/empowered_void_crystal_block.json +980f0053f9c062d87e790b24a8fa4375b90b1e52 assets/actuallyadditions/blockstates/empowerer.json +ddf1dd482fb99ccdf3f403919dfc1e9f402a5bcf assets/actuallyadditions/blockstates/ender_casing.json +64ecbc138b60a9b2397c9811612d5b0282a49b41 assets/actuallyadditions/blockstates/energizer.json +46c8311a4147786f1850fafd206692500c29ef77 assets/actuallyadditions/blockstates/enervator.json +b35e439a9f9f9c0b27c03ac808d97ef42646fc9a assets/actuallyadditions/blockstates/enori_crystal_block.json +cf2960b928f8869d6f3239a2e0181171e7022450 assets/actuallyadditions/blockstates/enori_crystal_cluster.json +f56196e04d4f0388e6ce3c583201b94824a5b579 assets/actuallyadditions/blockstates/ethetic_green_block.json +4370c6dfdfd44c95d5d54a412ba51402ae23d854 assets/actuallyadditions/blockstates/ethetic_green_slab.json +f76f1562b7577aed3f1abae054f443915ab15d4e assets/actuallyadditions/blockstates/ethetic_green_stairs.json +276679666dbc1c3ad2f7487cc990310d5f4e059d assets/actuallyadditions/blockstates/ethetic_green_wall.json +e917e83319852db6aeefd77711b3b3c39971b8f5 assets/actuallyadditions/blockstates/ethetic_white_block.json +6d39be997e221d1453f07707df7446922bf4d178 assets/actuallyadditions/blockstates/ethetic_white_slab.json +2b8a19ce4cecf53f877620ea793e7b2f94f76102 assets/actuallyadditions/blockstates/ethetic_white_stairs.json +4a89ca5b7b3d4e2aadee5696e3ae1b7516870d3b assets/actuallyadditions/blockstates/ethetic_white_wall.json +a428d5f4a59646d4105db8c3de72b84a13244a0c assets/actuallyadditions/blockstates/farmer.json +b184656f09cac215faa6f40b246551f6644a8f4d assets/actuallyadditions/blockstates/feeder.json +9b4d1b8e764fb0e82e960f91dc27a0b71ae29239 assets/actuallyadditions/blockstates/fermenting_barrel.json +403011543eac5fcafbbeaf107d38be51ac5cdb87 assets/actuallyadditions/blockstates/firework_box.json +fbf67b632113c65332560069a3d4a902dac6c852 assets/actuallyadditions/blockstates/flax.json +89b85c152e7b62da19ebf07bfc50969947dcc79d assets/actuallyadditions/blockstates/fluid_collector.json +f5ead8189b5a82609d64f801e0dce918309ae003 assets/actuallyadditions/blockstates/fluid_placer.json +f495a1b10121a36507645f82136d9ad596847a88 assets/actuallyadditions/blockstates/greenhouse_glass.json +da76083e9c8983d31a82424409e61ad408bb05c7 assets/actuallyadditions/blockstates/heat_collector.json +95ff995066c84cab57a8fc2e1419555d61b74636 assets/actuallyadditions/blockstates/hopping_item_interface.json +5c68a76188e9d4d4e540294a299eea52b4ce2eef assets/actuallyadditions/blockstates/iron_casing.json +0b4e9004006aa395684c89fd522ae1f07c522026 assets/actuallyadditions/blockstates/item_interface.json +1fd7152bd623843d980a1a4e07d026598f893169 assets/actuallyadditions/blockstates/lamp_black.json +b888f1bcb09d9956f82ac07d80316bb036deddf9 assets/actuallyadditions/blockstates/lamp_blue.json +edd922e78fcbb42beb48a3ae3fd2b09639417f2c assets/actuallyadditions/blockstates/lamp_brown.json +5ad6bb845c5d22948adb2be3c52de0390af8f380 assets/actuallyadditions/blockstates/lamp_controller.json +9ba44d3e1810ff9e01fd387a7e5d4405a09e226f assets/actuallyadditions/blockstates/lamp_cyan.json +3b73bc3a431fce9a5209f211624733918aad6f46 assets/actuallyadditions/blockstates/lamp_gray.json +8564b44f7b20f94672e89c319d129af3a6743f91 assets/actuallyadditions/blockstates/lamp_green.json +885c702397e146898ec1ba5348467c7047484e67 assets/actuallyadditions/blockstates/lamp_light_blue.json +175c711b002cb5e86887ab5cd559c245abc5b87b assets/actuallyadditions/blockstates/lamp_light_gray.json +f2a3391c56ade29544a15a011b4ab4d7ca727e83 assets/actuallyadditions/blockstates/lamp_lime.json +07858194a222d0102278f50e00d564184c374282 assets/actuallyadditions/blockstates/lamp_magenta.json +e14f03a7533b56c66641a17957bdc139e2c8aa10 assets/actuallyadditions/blockstates/lamp_orange.json +a4b6f97cd4e1c47b82f1a6c580e60b0a1493b320 assets/actuallyadditions/blockstates/lamp_pink.json +3d1386f53b8e80622fcd95eb36293a34b9a2f149 assets/actuallyadditions/blockstates/lamp_purple.json +8ace678f68bb005b81bb462420a565c0887c208a assets/actuallyadditions/blockstates/lamp_red.json +d60af8068da5a971b2545e4f8e6adcb0113cf020 assets/actuallyadditions/blockstates/lamp_white.json +facb01a0b96b9a0c4178a7def560fc2cac9e9494 assets/actuallyadditions/blockstates/lamp_yellow.json +b3418edc0f7f68cc028a20553f1bfb2702ca20cb assets/actuallyadditions/blockstates/laser_relay.json +f56d78c23253dadd608ef4f083b26e2c8bbc092b assets/actuallyadditions/blockstates/laser_relay_advanced.json +129d3527541bdcd3075abcce0090efa77e19fb4b assets/actuallyadditions/blockstates/laser_relay_extreme.json +7028ce8e2fb064deb6caf24079c46a6ae4127266 assets/actuallyadditions/blockstates/laser_relay_fluids.json +cfc214d80cacbdf785c482107f9b1eea45a66023 assets/actuallyadditions/blockstates/laser_relay_item.json +583522367e5707edbfbb43393cde0c86d212bfe1 assets/actuallyadditions/blockstates/laser_relay_item_advanced.json +1fe49f564612e44c44ee4a990d46181290bcf328 assets/actuallyadditions/blockstates/lava_factory_casing.json +b67cbe7ded0d3f27e6f4017b589b2bb4ff0fbd0b assets/actuallyadditions/blockstates/lava_factory_controller.json +aa4bb0bc28bbc42aa3e8b032b007d18db5966bcf assets/actuallyadditions/blockstates/leaf_generator.json +ad36c89cf1523e13c2b8e23d9080b684e766bc3f assets/actuallyadditions/blockstates/long_range_breaker.json +1c21cb983fcd3b754ab08cbc934b36a718bdfd33 assets/actuallyadditions/blockstates/oil_generator.json +f253b8b82371939db3e2ab866bfe89659898a1e6 assets/actuallyadditions/blockstates/palis_crystal_block.json +b2182c4b8b8c6bdc829289f5e46e74b8811a1b44 assets/actuallyadditions/blockstates/palis_crystal_cluster.json +ebba5097e96eb35bb9d1d388bd40a4a3490144f2 assets/actuallyadditions/blockstates/phantom_booster.json +d0b6d0e81edb6cad389dcf78bafd7d626d01fc3c assets/actuallyadditions/blockstates/phantom_breaker.json +ae9406a5abc7cceea635c710d6442d5c7daf32d3 assets/actuallyadditions/blockstates/phantom_energyface.json +442837cc2d80f30c59baf156426a1b680f72b1e5 assets/actuallyadditions/blockstates/phantom_itemface.json +fb910494347a5b09b7fde0349f53d902a6559813 assets/actuallyadditions/blockstates/phantom_liquiface.json +205a395947e0401d7927798154ef1513463c203a assets/actuallyadditions/blockstates/phantom_placer.json +b5f689d334c1867556e1a5c11f62362cbc1bf3e6 assets/actuallyadditions/blockstates/phantom_redstoneface.json +dfd50672d38f19133bce4de9773b8506ca7cc648 assets/actuallyadditions/blockstates/placer.json +6ed6e0c571a60d96038120c02c6934729a38944e assets/actuallyadditions/blockstates/player_interface.json +27f02d5fdc9d8e08242ff99165e97bf23e27c4e3 assets/actuallyadditions/blockstates/powered_furnace.json +81bbd2c7a66a4797eb1236f701ab23583867dd54 assets/actuallyadditions/blockstates/ranged_collector.json +f6a348866fd8a22e3f97e3ed281a679eeea927d7 assets/actuallyadditions/blockstates/restonia_crystal_block.json +779bce8e2148d6085d6d782feb6824ecff1b2369 assets/actuallyadditions/blockstates/restonia_crystal_cluster.json +b572ac51d7c6fc1a28d762d728e682eee2f20334 assets/actuallyadditions/blockstates/rice.json +b3d5e4a006bd2a2126ed81803a4cd7dc976542ae assets/actuallyadditions/blockstates/shock_suppressor.json +76d2077145b994cc8c51a1438934461fd1c11feb assets/actuallyadditions/blockstates/smooth_black_quartz_block.json +c34fa31f1f9888dac79b210d8e78e818c6ce7d8c assets/actuallyadditions/blockstates/smooth_black_quartz_slab.json +c2f07f07d6dc0c8134e92e81f41eef9f9c2a1f18 assets/actuallyadditions/blockstates/smooth_black_quartz_stair.json +c04bbda2945960887da98121afe3b170abe3006f assets/actuallyadditions/blockstates/smooth_black_quartz_wall.json +c355c87874ca6b88b8bda48903cc1989808352da assets/actuallyadditions/blockstates/tiny_torch.json +93868ba257844c7b666ce600799fcc0c89ca8dd9 assets/actuallyadditions/blockstates/vertical_digger.json +08797aa1d132142e78947b38bb1ce0e9e6260450 assets/actuallyadditions/blockstates/void_crystal_block.json +6072c1955309c670d75f3bdf9076ca7fafe7b5fd assets/actuallyadditions/blockstates/void_crystal_cluster.json +77f68c08f48f9c407db7f648185e9df1c66d2db1 assets/actuallyadditions/blockstates/wood_casing.json +81b4fcdb4510ff154bac92c977120a5ed41e9323 assets/actuallyadditions/blockstates/xp_solidifier.json +3e47b24f7b4fec20aab3504f649e308e5af4d755 assets/actuallyadditions/models/block/black_quartz_brick_block.json +034dcf4a8a81cece7c9f323d0789c79e9e1403b7 assets/actuallyadditions/models/block/black_quartz_brick_slab.json +e030d9385b8e6405913058bc14d01be73ea7656f assets/actuallyadditions/models/block/black_quartz_brick_slab_top.json +1c0a1e6451bc3c02e8ce23b82afa9661468c1b89 assets/actuallyadditions/models/block/black_quartz_brick_stair.json +72896482622329e9c03a92b31ad572a7cfbfbace assets/actuallyadditions/models/block/black_quartz_brick_stair_inner.json +8273a81cc5435d7626ef9e7766c51c2bd6082795 assets/actuallyadditions/models/block/black_quartz_brick_stair_outer.json +071c31c99d956835c47ccb1c9955293e6fb16a34 assets/actuallyadditions/models/block/black_quartz_brick_wall_post.json +6c8d8df60b8af620f1ac02bfc6deffe94eb6b824 assets/actuallyadditions/models/block/black_quartz_brick_wall_side.json +47513a1464dfb14cce1297b273c2d2b56643e2e3 assets/actuallyadditions/models/block/black_quartz_brick_wall_side_tall.json +acb2df6f957e949b1c84465ae6e8711ccedbbfb4 assets/actuallyadditions/models/block/black_quartz_ore.json +d78c50f233b9a7b7bd56ba2c88275701668342e3 assets/actuallyadditions/models/block/black_quartz_pillar_slab.json +ffb108234f8d20ed734b61ba82b6c43cf13c9f14 assets/actuallyadditions/models/block/black_quartz_pillar_slab_top.json +5f7c7d2215e34c57a22ab5b34b87d9d7e9c67874 assets/actuallyadditions/models/block/black_quartz_pillar_stair.json +a8698d5b1443eb99fa214c7c52c76d22e3548cf6 assets/actuallyadditions/models/block/black_quartz_pillar_stair_inner.json +122d053e615d36cf9fbf26caf7462cad977e4414 assets/actuallyadditions/models/block/black_quartz_pillar_stair_outer.json +07c691666058375fb0de08ca41a099a288e66915 assets/actuallyadditions/models/block/black_quartz_pillar_wall_post.json +c32d1e52e5625d78464fa96a26a476a9c02f8e48 assets/actuallyadditions/models/block/black_quartz_pillar_wall_side.json +386ff5808da4e2303df0c3ad31e150717a305367 assets/actuallyadditions/models/block/black_quartz_pillar_wall_side_tall.json +2c9983c88195764b957b089e8089f7398c1d3475 assets/actuallyadditions/models/block/black_quartz_slab.json +ef692aa091c605a8ec7061501b8de2ba011ab0db assets/actuallyadditions/models/block/black_quartz_slab_top.json +9827e1fff70ae550f8e5ee0039d38ed299f2633f assets/actuallyadditions/models/block/black_quartz_stair.json +6589be28f6fff4cb0ad8d2d52284f56572b80b45 assets/actuallyadditions/models/block/black_quartz_stair_inner.json +7c43e0b2c39676c1981674bb515f373e0df3b11d assets/actuallyadditions/models/block/black_quartz_stair_outer.json +9117d3ca0fe52203ccd263d90c2f55cef1dced4a assets/actuallyadditions/models/block/black_quartz_wall_post.json +21573cc6ac697c5c6d0157ed70dabfceea4752ab assets/actuallyadditions/models/block/black_quartz_wall_side.json +7310841211e064cf20a06015583d26b0d06c8c81 assets/actuallyadditions/models/block/black_quartz_wall_side_tall.json +a0bf9af78013e01e2cc903d08550e8bad83c8a91 assets/actuallyadditions/models/block/canola_1.json +9451060710755566da0160a6e6ebbac80e17e3ad assets/actuallyadditions/models/block/canola_2.json +a86651fb05cf501a53fa1db80e7ca1db683ea652 assets/actuallyadditions/models/block/canola_3.json +c5e8cab86e4b4dead3af7359fa8e0ee57b99ba57 assets/actuallyadditions/models/block/canola_4.json +49c020b959327159236a01d42634e722bfa6a10b assets/actuallyadditions/models/block/chiseled_black_quartz_slab.json +ccc4941328803d39f7953dadc99e843768ea684e assets/actuallyadditions/models/block/chiseled_black_quartz_slab_top.json +0978e6845641abb4778f5eb769ee96f8d3ef800f assets/actuallyadditions/models/block/chiseled_black_quartz_stair.json +878815410dba81d70ab298ea12419e267871521e assets/actuallyadditions/models/block/chiseled_black_quartz_stair_inner.json +c6da383335271d06ea703665ef89f2752c7d6a32 assets/actuallyadditions/models/block/chiseled_black_quartz_stair_outer.json +7836a9f8d62741b94476a52aef697ec0d9d19a65 assets/actuallyadditions/models/block/chiseled_black_quartz_wall_post.json +205a2abf24ef8b3d3ce854e42a1382de8616188c assets/actuallyadditions/models/block/chiseled_black_quartz_wall_side.json +29d5932afc6a6d4bb89f28a970166c1609fe89da assets/actuallyadditions/models/block/chiseled_black_quartz_wall_side_tall.json +3eda08a8f6b5dc113186debf0c8da244b137a5a6 assets/actuallyadditions/models/block/coffee_1.json +17c4df59313901a5ba7559159a13e043e4b3d706 assets/actuallyadditions/models/block/coffee_2.json +069d1284f427f9ba269c3eaa62171f39948a8541 assets/actuallyadditions/models/block/coffee_3.json +9312b68e6fe152019de67451229e067fc0b2f181 assets/actuallyadditions/models/block/coffee_4.json +0f5e8d59d2021944eaefc6f9ea13d09e6822f1f1 assets/actuallyadditions/models/block/diamatine_crystal_block.json +4737de603e9b5f0612529f4a987af159c033e914 assets/actuallyadditions/models/block/emeradic_crystal_block.json +fbbc3ad45d52d38444dc094fe58ef23268f459a1 assets/actuallyadditions/models/block/empowered_diamatine_crystal_block.json +0000183fc438238d11c863239767e7c0173b9778 assets/actuallyadditions/models/block/empowered_emeradic_crystal_block.json +48d60f87edbe00e193e8a0520ed7c3b724a325db assets/actuallyadditions/models/block/empowered_enori_crystal_block.json +32714eca2983bf3656655bed6c84f1a3193c5310 assets/actuallyadditions/models/block/empowered_palis_crystal_block.json +4d300eeb826b4f3be66d3253b5b4755031390cc9 assets/actuallyadditions/models/block/empowered_restonia_crystal_block.json +5b6f155262e8e9d9e3da9e931311d4a07aa624c2 assets/actuallyadditions/models/block/empowered_void_crystal_block.json +e406faf558afe69613b33c336f73e4d64ab6b997 assets/actuallyadditions/models/block/ender_casing.json +244cfc718d5bd7809001496d480d4611166b4ad2 assets/actuallyadditions/models/block/enori_crystal_block.json +57080075deda728a1a17e55ff28bc55aabda9430 assets/actuallyadditions/models/block/ethetic_green_block.json +421c041fe10d98ad2f02a29e7265c21a110ac21b assets/actuallyadditions/models/block/ethetic_green_slab.json +1a2d6ae598e84d327334eae6010da950a4db9d46 assets/actuallyadditions/models/block/ethetic_green_slab_top.json +d1488d4305290b44f82246c1566ff8e3893a2c7b assets/actuallyadditions/models/block/ethetic_green_stairs.json +29acde3876405638261cfc73e7f58b9db27dd45e assets/actuallyadditions/models/block/ethetic_green_stairs_inner.json +83798978250b2f70660dbc5221b072209d621d16 assets/actuallyadditions/models/block/ethetic_green_stairs_outer.json +991a8aef9f074ffb5dda40af4712f3a7707bc379 assets/actuallyadditions/models/block/ethetic_green_wall_post.json +c626f9e3c02978ca591d6a13ff2c557b5498e4b7 assets/actuallyadditions/models/block/ethetic_green_wall_side.json +68f457ca33f3adc97995b1c984243fe58a6898c5 assets/actuallyadditions/models/block/ethetic_green_wall_side_tall.json +fff542a12e03f28af13b7f1ed8b7535a7b656d2a assets/actuallyadditions/models/block/ethetic_white_block.json +c74ea183c3cf693337492ca50764145802c1023c assets/actuallyadditions/models/block/ethetic_white_slab.json +2ebdfd27cd00d234dea65f5f588e9cdf4d1647e9 assets/actuallyadditions/models/block/ethetic_white_slab_top.json +dd0c00bac5a34e082ee684b3b1fe0d8b5c1732df assets/actuallyadditions/models/block/ethetic_white_stairs.json +e43fb787403c75309030780ca89b36719e6a52fe assets/actuallyadditions/models/block/ethetic_white_stairs_inner.json +e1c0b3daa481abf0436e281507b00781c15b110e assets/actuallyadditions/models/block/ethetic_white_stairs_outer.json +e7e506073363b52d34a7ebb0d53e595838a2d809 assets/actuallyadditions/models/block/ethetic_white_wall_post.json +38b8e90785221f892d47dcb3d88bf9177b764820 assets/actuallyadditions/models/block/ethetic_white_wall_side.json +f44be9b3805792e67d95dd649dbe6e77b7106b35 assets/actuallyadditions/models/block/ethetic_white_wall_side_tall.json +e7144ef52d0e76e6fe683242589a71539311519c assets/actuallyadditions/models/block/flax_1.json +358fa90c122fa9589b7f5fb458dced2722b040c7 assets/actuallyadditions/models/block/flax_2.json +646fd2eda0238e8ddf35f1208781ff430e3763e4 assets/actuallyadditions/models/block/flax_3.json +62358e5dd86ea015ebbed607045d7cb72f3301fa assets/actuallyadditions/models/block/flax_4.json +402e7e76f54d81f96b3a9f1ad5aff2570415a18e assets/actuallyadditions/models/block/iron_casing.json +0839cdce8e285345ddef93068319da0005e37d29 assets/actuallyadditions/models/block/lamp_black.json +1f4100eb3c45a368512a4b5ebb9ae570f8be6f8a assets/actuallyadditions/models/block/lamp_blue.json +0ca8497fca73a0d2a8b79cee48b82e0b20db7e2a assets/actuallyadditions/models/block/lamp_brown.json +43d3c5cf0121479bf17742237dd8c247d5fe31f6 assets/actuallyadditions/models/block/lamp_cyan.json +3f44adb23638f14e120e63cace9e3199da19a67a assets/actuallyadditions/models/block/lamp_gray.json +2359f5206a30b7dabf206f7bd5297e6f9f90a12e assets/actuallyadditions/models/block/lamp_green.json +7066bd469e231d194658b9cf42f433f3856d3ee4 assets/actuallyadditions/models/block/lamp_light_blue.json +c8080834962c61c7f29e273bad3de88b271d22f3 assets/actuallyadditions/models/block/lamp_light_gray.json +1162277f11f1523d6a0c451bddff5487a37e552d assets/actuallyadditions/models/block/lamp_lime.json +d236be154263bc0d0f368c5f9539885f6652c27d assets/actuallyadditions/models/block/lamp_magenta.json +19b19f5124dd408d7d93bf0955c9e28a2e2a9f2a assets/actuallyadditions/models/block/lamp_orange.json +64b0312bdfefd48a42ccb2246339cbf800b65618 assets/actuallyadditions/models/block/lamp_pink.json +194733ef5a0184b2b529c9acee9c6996204823dc assets/actuallyadditions/models/block/lamp_purple.json +7c639749c1843f0a5e5679f64d3785f9bf6f2439 assets/actuallyadditions/models/block/lamp_red.json +830208d8bb83bf56df080d7f7246b0e310259a0c assets/actuallyadditions/models/block/lamp_white.json +e9f8b43d10f6c9dd0b105ee3d4bf82fd9366d300 assets/actuallyadditions/models/block/lamp_yellow.json +59691e057ec8ae9f83477a3932ac25b49b175bc7 assets/actuallyadditions/models/block/palis_crystal_block.json +58d4c88e8f7533d3e943a7253814093e24303032 assets/actuallyadditions/models/block/restonia_crystal_block.json +7f0e4c034d807a3049bb2f92f78c2b82d97c4de5 assets/actuallyadditions/models/block/rice_1.json +a04264a3fe830df25c50e499a8ff7f3745b5d90e assets/actuallyadditions/models/block/rice_2.json +2d45f1a0e8ef94bd5b3b9e298ebff4ccce13cb3f assets/actuallyadditions/models/block/rice_3.json +62ed7fce050484dade4dc60824d6e0c4b47c016b assets/actuallyadditions/models/block/rice_4.json +3d710199a99324077b4fffab49df908fdd9e2c45 assets/actuallyadditions/models/block/smooth_black_quartz_block.json +b4d79c3364274a4eb4e60325340bdb8580e87a35 assets/actuallyadditions/models/block/smooth_black_quartz_slab.json +80e72f5732b6a94218f1ce05866d839adc528ffb assets/actuallyadditions/models/block/smooth_black_quartz_slab_top.json +7c7e938772437734bd92e85a7ba948dd3eaee3df assets/actuallyadditions/models/block/smooth_black_quartz_stair.json +589c9239afd28ef665f36a872e742c01df65f750 assets/actuallyadditions/models/block/smooth_black_quartz_stair_inner.json +cf61c8f0bf0b43cde6e58b7ae6c50bdbf8181635 assets/actuallyadditions/models/block/smooth_black_quartz_stair_outer.json +c86aa92b52138474b46a95ff1f9419e4b10c2ed3 assets/actuallyadditions/models/block/smooth_black_quartz_wall_post.json +922f6501e927004e4d48fa525e8a6a0c1ab3d8fe assets/actuallyadditions/models/block/smooth_black_quartz_wall_side.json +27f7ef9c119dc1c317af89c5931485d88adeba5d assets/actuallyadditions/models/block/smooth_black_quartz_wall_side_tall.json +8cc3c113faa6d8e07b7b95828cf9dc06788ac153 assets/actuallyadditions/models/block/void_crystal_block.json +925701ab41fe0fc872bd5390e093412f5e88afe1 assets/actuallyadditions/models/block/wood_casing.json diff --git a/src/generated/resources/.cache/2a0621f54729484bb667bdf33a347c218c756998 b/src/generated/resources/.cache/2a0621f54729484bb667bdf33a347c218c756998 new file mode 100644 index 000000000..65cdcdaaa --- /dev/null +++ b/src/generated/resources/.cache/2a0621f54729484bb667bdf33a347c218c756998 @@ -0,0 +1,11 @@ +// 1.20.1 2024-03-03T00:40:33.0160523 Fuel Recipes +467d2455c32764a394ead4d2795c7a69ae37d6cd data/actuallyadditions/recipes/liquid_fuel/canola_oil.json +926f48589c82ca7061c51b82ee27667125565e70 data/actuallyadditions/recipes/liquid_fuel/crystallized_canola_oil.json +90e3ff181329ee4a476198d44684e694b13ffc31 data/actuallyadditions/recipes/liquid_fuel/empowered_canola_oil.json +23eb84239efb2f950d6140444dc2e327423369d6 data/actuallyadditions/recipes/liquid_fuel/refined_canola_oil.json +0732b5aebc03718a2adf8710c149021b1bc05eb7 data/actuallyadditions/recipes/solid_fuel/charcoal.json +5a8956fa96bf886b5b13d3359ee58dcaee9b87cc data/actuallyadditions/recipes/solid_fuel/coal-block.json +d6dbd4428a27289d3407a7609c5e8342a0c72b1a data/actuallyadditions/recipes/solid_fuel/coal.json +50885f04b21b6cdb4a1d41b8d4f1210762c21db9 data/actuallyadditions/recipes/solid_fuel/lava.json +5bc9490d9ce3874d628644059d2ab3738b267242 data/actuallyadditions/recipes/solid_fuel/stick.json +df8a71b8bd2bc3594381e1337c65a0963dd06714 data/actuallyadditions/recipes/solid_fuel/tiny-coal.json diff --git a/src/generated/resources/.cache/3425a48f50a5cfd73d65d933e25ea9828512dab8 b/src/generated/resources/.cache/3425a48f50a5cfd73d65d933e25ea9828512dab8 new file mode 100644 index 000000000..cae7f52d5 --- /dev/null +++ b/src/generated/resources/.cache/3425a48f50a5cfd73d65d933e25ea9828512dab8 @@ -0,0 +1,14 @@ +// 1.20.1 2024-03-03T00:40:33.0170512 Empowering Recipes +5888efd3bdc3ee6e52e02bb5d788261fe59a1de3 data/actuallyadditions/recipes/empowering/diamatine.json +cf9ac990c2f399981c7ba05d95cc856cd07a48a1 data/actuallyadditions/recipes/empowering/diamatine_block.json +d7b72485169dc016137a4834e92b7c46dc6ac6e3 data/actuallyadditions/recipes/empowering/emeradic.json +f6ba1716eebf6006bf21c9512e0f0239b537920e data/actuallyadditions/recipes/empowering/emeradic_block.json +fba64a4cb4f90e2b493e37310ddc97c4166dcca2 data/actuallyadditions/recipes/empowering/empowered_canola.json +660b85467edd2403dd28b8e61c46fbcb85c45be8 data/actuallyadditions/recipes/empowering/enori.json +0bc2d3b05fb19d8954919d19f701a3d62c2edea3 data/actuallyadditions/recipes/empowering/enori_block.json +24ace7dd2b0b7e49f3d0ac125a1385d7195ffc09 data/actuallyadditions/recipes/empowering/palis.json +d477e550b32aa174e51a3f7adfbd747495a3a914 data/actuallyadditions/recipes/empowering/palis_block.json +9fa2e022199ff53adf72fb038c4b9166edff9559 data/actuallyadditions/recipes/empowering/restonia.json +2af9a47743e88c46f3c7239a4ae11e4e5dcf43a7 data/actuallyadditions/recipes/empowering/restonia_block.json +07161c01b88cef9afa90e9b67d389147e924e3ad data/actuallyadditions/recipes/empowering/void.json +ef84faa27fd894dae8e64c67679465c96f689ba5 data/actuallyadditions/recipes/empowering/void_block.json diff --git a/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d b/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d new file mode 100644 index 000000000..66771bc0e --- /dev/null +++ b/src/generated/resources/.cache/59eb3dbb5f86130e09b3c62d89b9525ee01cf52d @@ -0,0 +1,122 @@ +// 1.20.1 2024-03-03T00:40:33.0140517 Loot Tables +f6655bb234dbcf1041fe8ad95c976ddddda2b02a data/actuallyadditions/loot_tables/blocks/atomic_reconstructor.json +e15c868b26b669c30365bfb93e7d9274e07df16d data/actuallyadditions/loot_tables/blocks/battery_box.json +745d64af3b0203a138f9eca7de21ed4988b35c95 data/actuallyadditions/loot_tables/blocks/bio_reactor.json +35b8659ab4d6203d29e2dc4e387316af79ef8578 data/actuallyadditions/loot_tables/blocks/black_quartz_block.json +628eed867614594d56c01b5785e59cd9f214806b data/actuallyadditions/loot_tables/blocks/black_quartz_brick_block.json +7ccaec2a308c46c91faaddf6c529e867a39a7b48 data/actuallyadditions/loot_tables/blocks/black_quartz_brick_slab.json +1281fecab9def4da2bb659354623b91704f8663e data/actuallyadditions/loot_tables/blocks/black_quartz_brick_stair.json +7d6c3fd126003b42e84c2159cf07b8c78ff1f729 data/actuallyadditions/loot_tables/blocks/black_quartz_brick_wall.json +88e3daf6fc127c809adab583ebfc292dd6fd8142 data/actuallyadditions/loot_tables/blocks/black_quartz_ore.json +ad0d7ffd625d3bec74e52e1384c67120649c1108 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_block.json +c49b30e8d893f67866d0a47cf8682502468e9864 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_slab.json +32fc64201d29c1a319808ac3bcef4fbab1ad2632 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_stair.json +0d8f0f1aa81b6108fe9757c03be499b6c0d2ae85 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_wall.json +38ae78b75ed66ec8e2df8f292ada90ac352e8f88 data/actuallyadditions/loot_tables/blocks/black_quartz_slab.json +e4f42700948abba5991c961ee5b2c0ab6839d437 data/actuallyadditions/loot_tables/blocks/black_quartz_stair.json +0d7396ec2071fcdd2df045b20c9b5a5a2692cc80 data/actuallyadditions/loot_tables/blocks/black_quartz_wall.json +eca894a5b2e0c19418d95ffb072e51359a60fe3e data/actuallyadditions/loot_tables/blocks/breaker.json +6543b2f46d8c4e81c3b3efb8aff3cb3216c4acda data/actuallyadditions/loot_tables/blocks/canola.json +1e482a0dec0dffade2a63d57fd58e1b154a513dd data/actuallyadditions/loot_tables/blocks/canola_press.json +37edff6a4dd2975276e73be28cf2490bd91700a9 data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_block.json +967afd8eaa3169037502ac72985ddba7b3670087 data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_slab.json +b598ece027ef00e9ed0457a7f9542ebe8b89538c data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_stair.json +584c40d2867ad0376823c1a4f37f1d901721ae4f data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_wall.json +6416e24b52f6a361efa8c9955b20fdeb1c623d79 data/actuallyadditions/loot_tables/blocks/coal_generator.json +afab93747299dba6783292e5949ea7e0cd5d5b13 data/actuallyadditions/loot_tables/blocks/coffee.json +ef604b6cc4ac21ee792ab7df41b77578b4d213db data/actuallyadditions/loot_tables/blocks/coffee_machine.json +7767779372fd1929d1d818e00d8a3d869f2d4a87 data/actuallyadditions/loot_tables/blocks/crusher.json +9f549621d659a42dcb71516dd1d97cb347611094 data/actuallyadditions/loot_tables/blocks/crusher_double.json +25b7a44418e2858552dd5150d67bffe1f30269a8 data/actuallyadditions/loot_tables/blocks/diamatine_crystal_block.json +e22890b48eaf91862f5dede7b9c1480f41657e7f data/actuallyadditions/loot_tables/blocks/diamatine_crystal_cluster.json +203dbacf8a62735c646305fc914b20b884107674 data/actuallyadditions/loot_tables/blocks/display_stand.json +3f9aa8b99fad7066fd3a6118a499e3237920cc7e data/actuallyadditions/loot_tables/blocks/dropper.json +a8183cf6b77bbac91f09ea485f5eaadf70aa8fb0 data/actuallyadditions/loot_tables/blocks/emeradic_crystal_block.json +39851863a99bf21d48df61350f1ae1e0e25dbeaa data/actuallyadditions/loot_tables/blocks/emeradic_crystal_cluster.json +4811fb48ac8e17ed71d0e42016ccfd7f244026d4 data/actuallyadditions/loot_tables/blocks/empowered_diamatine_crystal_block.json +e02f5203b700239638e4fafb9915e6873f1b76bc data/actuallyadditions/loot_tables/blocks/empowered_emeradic_crystal_block.json +00fa7d2d85a41d1834d016cd232d92a8dad1a81f data/actuallyadditions/loot_tables/blocks/empowered_enori_crystal_block.json +bab8f64d69ec78ab2f32fa084d95a2875b62778f data/actuallyadditions/loot_tables/blocks/empowered_palis_crystal_block.json +acada2cb6400090f925065bb7c1a83bdb6dbe1b3 data/actuallyadditions/loot_tables/blocks/empowered_restonia_crystal_block.json +6c334eb0d55d5ea98201ecb2817171f67571d5ee data/actuallyadditions/loot_tables/blocks/empowered_void_crystal_block.json +a8b055792b0064b29e4c6732ccfa440e8baf9b5b data/actuallyadditions/loot_tables/blocks/empowerer.json +bb7c77182bd147e1189d865c5a992fbf19a629f4 data/actuallyadditions/loot_tables/blocks/ender_casing.json +6990098510a0dcb1961a80f00d5f71d4b2bc3f46 data/actuallyadditions/loot_tables/blocks/energizer.json +f3c68d58b25c3dbb6d4a65c14dd6d2c28e53814f data/actuallyadditions/loot_tables/blocks/enervator.json +47d7dd8175c672b8568b8863c6b65ab26168fd5f data/actuallyadditions/loot_tables/blocks/enori_crystal_block.json +03330e1ee2c22c017c3bd55c880e979f1a4bb3d4 data/actuallyadditions/loot_tables/blocks/enori_crystal_cluster.json +aca50008d47da6a89a41421752329fc108b74caa data/actuallyadditions/loot_tables/blocks/ethetic_green_block.json +2898af59e57ae6b6400a02e56baaf5af796fe971 data/actuallyadditions/loot_tables/blocks/ethetic_green_slab.json +011939f5b508413a3827de5b12ff58dd1c875ca7 data/actuallyadditions/loot_tables/blocks/ethetic_green_stairs.json +816eb5010ccb0147b79f3e6a43c13c4364bd4476 data/actuallyadditions/loot_tables/blocks/ethetic_green_wall.json +04da571b4aeae7e0c7fdbd7aa801f7252fbb413e data/actuallyadditions/loot_tables/blocks/ethetic_white_block.json +d4eeacb9036343a75ba390acb912c294db3bbdb6 data/actuallyadditions/loot_tables/blocks/ethetic_white_slab.json +358bf32510a08de204f61e668588ee58460e1321 data/actuallyadditions/loot_tables/blocks/ethetic_white_stairs.json +0b05b4ba5b76e887bfba59740383f63287adc78d data/actuallyadditions/loot_tables/blocks/ethetic_white_wall.json +6b88e7795b82affdb3f24b4b9c62e99458836f77 data/actuallyadditions/loot_tables/blocks/farmer.json +4f60395b41acdd21a5e8e8592fb6141a230ffdde data/actuallyadditions/loot_tables/blocks/feeder.json +18f0f3130da03f20277f843f3b8c4e4282efb65c data/actuallyadditions/loot_tables/blocks/fermenting_barrel.json +c02726c670fccfa57d403272b9c96e3ad9cf4cc9 data/actuallyadditions/loot_tables/blocks/firework_box.json +4bd34fdd919b12992acbfe81b6aa79cadb7f2774 data/actuallyadditions/loot_tables/blocks/flax.json +ad1acc54d462b7bd1355fda6b05a9cc6ffa26418 data/actuallyadditions/loot_tables/blocks/fluid_collector.json +4e3bec1c890dbeb36175c0905a7e6a5a6108ec45 data/actuallyadditions/loot_tables/blocks/fluid_placer.json +8f15a45992ecb1be2ce326702c204c190a0aad14 data/actuallyadditions/loot_tables/blocks/greenhouse_glass.json +4f3d2255de5aff7857911d138eb334bb9d9753ba data/actuallyadditions/loot_tables/blocks/heat_collector.json +ed7443ee9e9956b1fc8ac87728201d88ccea755e data/actuallyadditions/loot_tables/blocks/hopping_item_interface.json +197f1835bc3bdd7268e22440891bc12e8c6ee3da data/actuallyadditions/loot_tables/blocks/iron_casing.json +2128eb452ad7fb77d8f279a1005e2542753055c9 data/actuallyadditions/loot_tables/blocks/item_interface.json +86e6ee457d3ada8c1709baba9e7ff79f590823ca data/actuallyadditions/loot_tables/blocks/lamp_black.json +4cd4b13fab59cf0064dc4d97880bf10128847aec data/actuallyadditions/loot_tables/blocks/lamp_blue.json +8c59350ed501dd06eb5904451dcef1a6ca3a717c data/actuallyadditions/loot_tables/blocks/lamp_brown.json +ab04e4392fa427b8bed612a6c64b9dec86ab9ed9 data/actuallyadditions/loot_tables/blocks/lamp_controller.json +5a7cf730a18ed5760d58a8a173ed5f5e06ca83bd data/actuallyadditions/loot_tables/blocks/lamp_cyan.json +d83e067881513d8c4223faf4d2d26e9a1c5db5ff data/actuallyadditions/loot_tables/blocks/lamp_gray.json +bc14272591aee6a340307caccc1037bf0f81fadc data/actuallyadditions/loot_tables/blocks/lamp_green.json +4a8d82e9a0b5eaacb6e67422027c430b0db510a0 data/actuallyadditions/loot_tables/blocks/lamp_light_blue.json +1fa17a72c9f630e91d0503cabaaa0183cc697b41 data/actuallyadditions/loot_tables/blocks/lamp_light_gray.json +d0f317612d2407245551f4e4d15c778efcce34ce data/actuallyadditions/loot_tables/blocks/lamp_lime.json +5f8249246d98bdd65c39cf7131e6a052f803e20d data/actuallyadditions/loot_tables/blocks/lamp_magenta.json +3556617de82a2864903a24f57bfaea46a105bbaf data/actuallyadditions/loot_tables/blocks/lamp_orange.json +5075c9c8447bd433d72f5c2dae1cda9d4637f922 data/actuallyadditions/loot_tables/blocks/lamp_pink.json +3ec501e57ec5aeac85722e0964f890c38390a22b data/actuallyadditions/loot_tables/blocks/lamp_purple.json +40a7ab819aca471a8ffffdfc2a282c2dfb67513b data/actuallyadditions/loot_tables/blocks/lamp_red.json +99e553d21ff6a5e46fa3733e634f834875222aab data/actuallyadditions/loot_tables/blocks/lamp_white.json +ba4c3f87f29e72a6bc95f202a00d41372621b842 data/actuallyadditions/loot_tables/blocks/lamp_yellow.json +f50259991b8a5ba9d3eb9aee75afb5172913c155 data/actuallyadditions/loot_tables/blocks/laser_relay.json +8ec828ad8c18251f50df50a853bb2d46c7b26d08 data/actuallyadditions/loot_tables/blocks/laser_relay_advanced.json +af0cb5ad3473b274da2873d3e08da0f4085e6699 data/actuallyadditions/loot_tables/blocks/laser_relay_extreme.json +1c88df46ff3b62b051fe7b10be78928b9193962e data/actuallyadditions/loot_tables/blocks/laser_relay_fluids.json +20d05d184f07b17974fd7fc560d11750d9f77c48 data/actuallyadditions/loot_tables/blocks/laser_relay_item.json +04f2ec311197a6e8770d30704448ee6abba70e32 data/actuallyadditions/loot_tables/blocks/laser_relay_item_advanced.json +395d67efbd229f614c51bd96f637797f035cc7e3 data/actuallyadditions/loot_tables/blocks/lava_factory_casing.json +f8a03e56a032e858126f1b1861ea0b759a3e517d data/actuallyadditions/loot_tables/blocks/lava_factory_controller.json +82e3d0039b6702d62c5460953426812d798cdc37 data/actuallyadditions/loot_tables/blocks/leaf_generator.json +27ba42bb0f2dca72e29393944b61e566d758a2dc data/actuallyadditions/loot_tables/blocks/long_range_breaker.json +3ef604fd64d3f98acff10b9213f37b31c32f7f91 data/actuallyadditions/loot_tables/blocks/oil_generator.json +f0905fdc46775bb0d7382375b0a1109d125175e7 data/actuallyadditions/loot_tables/blocks/palis_crystal_block.json +ec28c8a70911ac7e3cf621d19aa06443a9da3ebf data/actuallyadditions/loot_tables/blocks/palis_crystal_cluster.json +dadc9a4648ff9cfa77840405384be4937cea991b data/actuallyadditions/loot_tables/blocks/phantom_booster.json +7ca8e4e140407dc71416289d293319748d6074a5 data/actuallyadditions/loot_tables/blocks/phantom_breaker.json +c020a9e28f95800f7eb064fc557afe3cd78ee77a data/actuallyadditions/loot_tables/blocks/phantom_energyface.json +9ce6fa8855e586447f45321f9a54495bfd8a0aad data/actuallyadditions/loot_tables/blocks/phantom_itemface.json +8be6d5b0ebb76e4122b1a91893cf8e1a2c34fc59 data/actuallyadditions/loot_tables/blocks/phantom_liquiface.json +75eb64c44741c6d010ed2b226ebc8edec30ee151 data/actuallyadditions/loot_tables/blocks/phantom_placer.json +999e9a1cf6a2c5409ac719ee9d9497954cff5921 data/actuallyadditions/loot_tables/blocks/phantom_redstoneface.json +10649f4e8c6315e1c28877dd2d74519b374c2aef data/actuallyadditions/loot_tables/blocks/placer.json +f0a5b8a9ef9e878baa8e1792605ecb6371bf6262 data/actuallyadditions/loot_tables/blocks/player_interface.json +ed338d8a5909bf4d48bfc2e5f698dabd7831c9ef data/actuallyadditions/loot_tables/blocks/powered_furnace.json +8f51bc016a6797bfdf81973a21509e14bd47f245 data/actuallyadditions/loot_tables/blocks/ranged_collector.json +0cff315b834058c90a7f26425565e086fb833305 data/actuallyadditions/loot_tables/blocks/restonia_crystal_block.json +0e6bc03f897b89999df775595eae662728617604 data/actuallyadditions/loot_tables/blocks/restonia_crystal_cluster.json +247ec0004cfa51a635f305aed06f6a8f2d0cd0c4 data/actuallyadditions/loot_tables/blocks/rice.json +d9337537495eb5b2d5288c6df81125594522e5b7 data/actuallyadditions/loot_tables/blocks/shock_suppressor.json +a534077796cbfbcf0c66f986db3abd037c2d14d6 data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_block.json +5018c69cc3e6c87b0080ed3ea914e47744088ab7 data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_slab.json +a33803a54b60eb930713929368729dbd01fa77f0 data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_stair.json +7e8b01ddeca1446e40e16254afc145c738802a62 data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_wall.json +b457272e382a377d7e55f2b74d49683a14d62825 data/actuallyadditions/loot_tables/blocks/tiny_torch.json +d43769e7f20448bf87952664a3ddd12db0804627 data/actuallyadditions/loot_tables/blocks/vertical_digger.json +16963296de38141657d91d76d0458313529e4033 data/actuallyadditions/loot_tables/blocks/void_crystal_block.json +58ebb57d3470800107617d0cc84250750834b675 data/actuallyadditions/loot_tables/blocks/void_crystal_cluster.json +d3498d690b7d9170fecdc2dd9825519b680cfeec data/actuallyadditions/loot_tables/blocks/wood_casing.json +e1ebdde950a7f730c423a16143ad5598e3b6e3a7 data/actuallyadditions/loot_tables/blocks/xp_solidifier.json diff --git a/src/generated/resources/.cache/67661e0cbb74e53678db18185e51bbcd4d93f3a2 b/src/generated/resources/.cache/67661e0cbb74e53678db18185e51bbcd4d93f3a2 new file mode 100644 index 000000000..713dbe3ad --- /dev/null +++ b/src/generated/resources/.cache/67661e0cbb74e53678db18185e51bbcd4d93f3a2 @@ -0,0 +1,2 @@ +// 1.20.1 2024-03-03T00:40:33.0115512 Tags for minecraft:damage_type mod id actuallyadditions +3a8b958fa1ed1a54ee9729180ef290e2ac270b41 data/minecraft/tags/damage_type/bypasses_armor.json diff --git a/src/generated/resources/.cache/68e357711f2c2ca6f18b64025293f52db04fd591 b/src/generated/resources/.cache/68e357711f2c2ca6f18b64025293f52db04fd591 new file mode 100644 index 000000000..d32286815 --- /dev/null +++ b/src/generated/resources/.cache/68e357711f2c2ca6f18b64025293f52db04fd591 @@ -0,0 +1,129 @@ +// 1.20.1 2024-03-03T00:40:33.0160523 Color Change Recipes +9e5e084fa9623a67cd24128ee2c6583ac8aed579 data/actuallyadditions/recipes/colorchange/black_carpet.json +58636e81d1f7994c0de726cd33d6cfd04caa9961 data/actuallyadditions/recipes/colorchange/black_dye.json +55d6fc5cdbd8f1a93266e02e5b385410d9dbb570 data/actuallyadditions/recipes/colorchange/black_glazed_terracotta.json +828c4addc268eca51442e1f5910a2290933d6b4b data/actuallyadditions/recipes/colorchange/black_stained_glass.json +ddaf6143e34f33b7fe07f214e8aefb37b6704f84 data/actuallyadditions/recipes/colorchange/black_stained_glass_pane.json +e396366d202c6a7b02ea9fd5f7f384fbf83bb710 data/actuallyadditions/recipes/colorchange/black_terracotta.json +60f24e135af6ca91b824ccc5ef7cfb9df3061817 data/actuallyadditions/recipes/colorchange/black_wool.json +55b83e4a68bb9d267d339daebf5d1dd5316edbaf data/actuallyadditions/recipes/colorchange/blue_carpet.json +3b2194457c7d548f568933f777bc8c7e7cf82e09 data/actuallyadditions/recipes/colorchange/blue_dye.json +5743bb5ccd443c127af0e37e9123f5442a8369ad data/actuallyadditions/recipes/colorchange/blue_glazed_terracotta.json +c49d98312c5007ba4eacb1c5a477214d2e1141d9 data/actuallyadditions/recipes/colorchange/blue_stained_glass.json +17bc4870361a9c4fd8e1b20bd75875d355da1239 data/actuallyadditions/recipes/colorchange/blue_stained_glass_pane.json +b65515c0ebe7149da8734a2cd26c41a0b7416cab data/actuallyadditions/recipes/colorchange/blue_terracotta.json +37b6e1f485232a9c6e6c95fa74624997f3f50647 data/actuallyadditions/recipes/colorchange/blue_wool.json +fd7514752b9244902d789178108a047e0ad177ea data/actuallyadditions/recipes/colorchange/brown_carpet.json +9a7ed67d6a3d1ec6527278aa40b229c807885805 data/actuallyadditions/recipes/colorchange/brown_dye.json +eda1caa9d2a0ae90dc533aba772c47a365498946 data/actuallyadditions/recipes/colorchange/brown_glazed_terracotta.json +fecd34f2c27a7cbccc8889aa012a28f8206c687f data/actuallyadditions/recipes/colorchange/brown_stained_glass.json +1a8b1503d79dab0aa1776e9f0639dcf450fd7a8c data/actuallyadditions/recipes/colorchange/brown_stained_glass_pane.json +54ca3ed5fad800b972eb76d279050ea14865413a data/actuallyadditions/recipes/colorchange/brown_terracotta.json +d4054150d4de075f1a29a81a3c8fef37bbccc1a2 data/actuallyadditions/recipes/colorchange/brown_wool.json +823815f571e19364e696f85ed1a8f36bae9b5f1e data/actuallyadditions/recipes/colorchange/cyan_carpet.json +b531946a0440936d172a08b9af3ea40503af7181 data/actuallyadditions/recipes/colorchange/cyan_dye.json +19089e0f42bf8a444b9f43d5ffbac5054cdb6364 data/actuallyadditions/recipes/colorchange/cyan_glazed_terracotta.json +baad0fa339120bacdaa64b01322e9e4dd922ce96 data/actuallyadditions/recipes/colorchange/cyan_stained_glass.json +23ac54420a3f4c1ed622ce7b3c0a020a915efec4 data/actuallyadditions/recipes/colorchange/cyan_stained_glass_pane.json +5a034b6a11cd1a510d4e86ad90f81bcabe572e65 data/actuallyadditions/recipes/colorchange/cyan_terracotta.json +80cb6d3da75e4471c4cb6c05c822069aa0d7bb2c data/actuallyadditions/recipes/colorchange/cyan_wool.json +4dbcb7f218a750690cd548abc9b53d86381ce77e data/actuallyadditions/recipes/colorchange/gray_carpet.json +6e3347ffb33cceb7f726fdcecec373c606a6597e data/actuallyadditions/recipes/colorchange/gray_dye.json +fd711b9274a438de886784ad9ecf26210c949683 data/actuallyadditions/recipes/colorchange/gray_glazed_terracotta.json +c8f3c9f35e60c6491a02bbc41678367fbee87ba0 data/actuallyadditions/recipes/colorchange/gray_stained_glass.json +5b7de68aadf6e5bab21968a15c425c0f94965b13 data/actuallyadditions/recipes/colorchange/gray_stained_glass_pane.json +d7aca8a5abf5bf6df4e2d4b7ae3fb28593220a51 data/actuallyadditions/recipes/colorchange/gray_terracotta.json +01a2ebf82f1bdacfb32532abd64c6305d46843bd data/actuallyadditions/recipes/colorchange/gray_wool.json +aa3e49516a663bdbecd8a8f40625ba2e3355fb5e data/actuallyadditions/recipes/colorchange/green_carpet.json +6bd5af8dff2fde950cfee9d99d33f57a6fcf4ca3 data/actuallyadditions/recipes/colorchange/green_dye.json +6814e27d3dcc5edd4e9886373c882a6e9e506e51 data/actuallyadditions/recipes/colorchange/green_glazed_terracotta.json +d21be9bcac756fcaf3466b5335ed7823aa859164 data/actuallyadditions/recipes/colorchange/green_stained_glass.json +5af6c434cb776ada43e2b1fcbce773ff6ce3d123 data/actuallyadditions/recipes/colorchange/green_stained_glass_pane.json +dad6433fcdf8eeb5395828b8763e4827404e5930 data/actuallyadditions/recipes/colorchange/green_terracotta.json +6c5925055d305363136657ebac33707f9d94d66e data/actuallyadditions/recipes/colorchange/green_wool.json +f54d013f6e0ae3852d70a9533e9cdc85958e4cef data/actuallyadditions/recipes/colorchange/lamp_black.json +19c43f7b1c2b4780f675ff7e84cf34a0531fd122 data/actuallyadditions/recipes/colorchange/lamp_blue.json +7622698aab62c23473942ed0a4809ee4e57cb867 data/actuallyadditions/recipes/colorchange/lamp_brown.json +686f3da7d143b7a1c16326f8c046909c4a3f6f7f data/actuallyadditions/recipes/colorchange/lamp_cyan.json +ebc55cd60eef7fbf7b12368c7fffb8169a1f156a data/actuallyadditions/recipes/colorchange/lamp_gray.json +560b8001302192f8f14da123f97adad414064077 data/actuallyadditions/recipes/colorchange/lamp_green.json +b0583477215dab208276bb78540d8b75407af1c5 data/actuallyadditions/recipes/colorchange/lamp_light_blue.json +7814ab82ae0c7336ea0dca17d3fa182c80d6a4c6 data/actuallyadditions/recipes/colorchange/lamp_light_gray.json +f45301e25870dcc733b834ed836b1cddb3d714a9 data/actuallyadditions/recipes/colorchange/lamp_lime.json +86233798ae0163cbe30fae3bc63c363f0f5e8462 data/actuallyadditions/recipes/colorchange/lamp_magenta.json +a2e54962d65d8a5bd090fde292cef8a6217062f5 data/actuallyadditions/recipes/colorchange/lamp_orange.json +7b64f8373989b875a41c208cf80d51d999778752 data/actuallyadditions/recipes/colorchange/lamp_pink.json +d528b1dcfee69b1a83db19b1760ce08e633c4125 data/actuallyadditions/recipes/colorchange/lamp_purple.json +37828bd62ece82ccfbf3e955da394ed9e423cc4b data/actuallyadditions/recipes/colorchange/lamp_red.json +5e8f68cd625960cb48da624033cde1df14debe51 data/actuallyadditions/recipes/colorchange/lamp_white.json +92bdabda3ecc66e8c4a7dc2b613528e45a388a56 data/actuallyadditions/recipes/colorchange/lamp_yellow.json +ffd3dab16c499465174b18ea21175c38cc172d3d data/actuallyadditions/recipes/colorchange/light_blue_carpet.json +4eb1eb5b43279b3feec88e76684e475c234bcbea data/actuallyadditions/recipes/colorchange/light_blue_dye.json +cc3d653d1c3c74f8aa123651e63a7a1b04ebf2df data/actuallyadditions/recipes/colorchange/light_blue_glazed_terracotta.json +0996b9e4c806cc264eafb5f07bb395e64e9cb30d data/actuallyadditions/recipes/colorchange/light_blue_stained_glass.json +f9cc5c5262e4d1b9a12890073f4f7650a2626a3c data/actuallyadditions/recipes/colorchange/light_blue_stained_glass_pane.json +fc2c8ce98e0bd430bb6bcaa1605a75e8dcbbeec9 data/actuallyadditions/recipes/colorchange/light_blue_terracotta.json +d2c11b5c706f045efc59720dae1d52583ab8123a data/actuallyadditions/recipes/colorchange/light_blue_wool.json +1b76c8c4e5333051fc5de414f7475cbcf774544d data/actuallyadditions/recipes/colorchange/light_gray_carpet.json +0d5eca885903b3f681c9892f64c533f923048850 data/actuallyadditions/recipes/colorchange/light_gray_dye.json +ed7cea4d3c87843a2dd99509a105159c012688c7 data/actuallyadditions/recipes/colorchange/light_gray_glazed_terracotta.json +6143020d3f419282c07f234197fc088beb37ece9 data/actuallyadditions/recipes/colorchange/light_gray_stained_glass.json +bc859171e00065cfdca6f4d89a1df74a60df1c66 data/actuallyadditions/recipes/colorchange/light_gray_stained_glass_pane.json +693194b0001873f264f1e449253990d43d1dc549 data/actuallyadditions/recipes/colorchange/light_gray_terracotta.json +c4d3a2c552f771cfb602b220fd3d28e1170fcab1 data/actuallyadditions/recipes/colorchange/light_gray_wool.json +2afe469152444d341b09c16d2c56b261732d2891 data/actuallyadditions/recipes/colorchange/lime_carpet.json +2b8c65975414e9320d8aae8101535a14e0470d1d data/actuallyadditions/recipes/colorchange/lime_dye.json +37936ca8e720e79e93d7ceef67a0c2286827719c data/actuallyadditions/recipes/colorchange/lime_glazed_terracotta.json +ff5eaa1cc212a5d7b9d9afef52b89d640993baf8 data/actuallyadditions/recipes/colorchange/lime_stained_glass.json +1bb853651349214a749458e258b6ba74fbefec74 data/actuallyadditions/recipes/colorchange/lime_stained_glass_pane.json +b1a5d3deb17d3d76fca4c8518c332864665d028e data/actuallyadditions/recipes/colorchange/lime_terracotta.json +188fd4b6cd298994001e9a91981fa18de19e1b57 data/actuallyadditions/recipes/colorchange/lime_wool.json +949c1fe27e829f196bdeeca14dc52305e5cf95a0 data/actuallyadditions/recipes/colorchange/magenta_carpet.json +d22f92cdedc31af94c61f5d1426da1948565a6c2 data/actuallyadditions/recipes/colorchange/magenta_dye.json +5eeba506dc25a336bc3ad3babaab4f66ec3ec1f3 data/actuallyadditions/recipes/colorchange/magenta_glazed_terracotta.json +608f039dcd21d0e902b4af4ded3dd263c7d4fe9c data/actuallyadditions/recipes/colorchange/magenta_stained_glass.json +454eee554dcae68c770ca0f25303c45232d270a9 data/actuallyadditions/recipes/colorchange/magenta_stained_glass_pane.json +81cb91966b294bfd9fc65318133bb9f5720e9de3 data/actuallyadditions/recipes/colorchange/magenta_terracotta.json +c29910a374c275efe1c410817d4db149b6e08d4d data/actuallyadditions/recipes/colorchange/magenta_wool.json +de163a37aba693d582815beeb7b1a233e49b211f data/actuallyadditions/recipes/colorchange/orange_carpet.json +a5634c269b12f4303a8b50dc86044b58ef11cf94 data/actuallyadditions/recipes/colorchange/orange_dye.json +52b8a3aa8012a0436d09694f43dc54b1f4b4c255 data/actuallyadditions/recipes/colorchange/orange_glazed_terracotta.json +30b8b63c61083b7639ac873536e54d384cf4c4fa data/actuallyadditions/recipes/colorchange/orange_stained_glass.json +dd8198d5ccc5b99847f1707a9be658ed4c5734ee data/actuallyadditions/recipes/colorchange/orange_stained_glass_pane.json +e6d0f2b2a1d1cb32c9c0109f12d736425dddb8cb data/actuallyadditions/recipes/colorchange/orange_terracotta.json +88a3e37b1bba89fed8deaf75c09e03979bb29b32 data/actuallyadditions/recipes/colorchange/orange_wool.json +c4fe9ca6b40fbc5f553412ba3aac6f1189e7ab62 data/actuallyadditions/recipes/colorchange/pink_carpet.json +7101cf6616c929c2a9dcdeef4291cf846f159571 data/actuallyadditions/recipes/colorchange/pink_dye.json +1567d6d0072ad74daea1efffae48391ad3d6377e data/actuallyadditions/recipes/colorchange/pink_glazed_terracotta.json +7d13944e0e72cf2108d86d62d49eb871b143af80 data/actuallyadditions/recipes/colorchange/pink_stained_glass.json +81da64899b3031cc030d39e4bfbb2b2220f06094 data/actuallyadditions/recipes/colorchange/pink_stained_glass_pane.json +b0982da8d283465bcdb37d167532f94e3f2baef7 data/actuallyadditions/recipes/colorchange/pink_terracotta.json +5a8fc86f4abe8e23f80ce372e9eb5ae796eda543 data/actuallyadditions/recipes/colorchange/pink_wool.json +94a67f8b8cb492b0cd3c30505b4b15fb66ab45fa data/actuallyadditions/recipes/colorchange/purple_carpet.json +9ceea19aee2b4c95f693aefeda8908a75f0858c8 data/actuallyadditions/recipes/colorchange/purple_dye.json +57a0723547ebddc1d50eb1dfe39510c4dde55a28 data/actuallyadditions/recipes/colorchange/purple_glazed_terracotta.json +db02b55041b3a30a2f49c6c9527b5985eda8ecea data/actuallyadditions/recipes/colorchange/purple_stained_glass.json +a223321ec04bfb2ed7e8b4657b81d7e61c4bc8b5 data/actuallyadditions/recipes/colorchange/purple_stained_glass_pane.json +3523244224d2a165a5235d8b570ddf0413be6837 data/actuallyadditions/recipes/colorchange/purple_terracotta.json +fd92f014d8347f5d2a2f021061560d94466d4dfb data/actuallyadditions/recipes/colorchange/purple_wool.json +167d76635d3f514e4d3c7069076f1abe8aa677c2 data/actuallyadditions/recipes/colorchange/red_carpet.json +a3fef4db1b23789cdba86f8315edd5c54bfcaff2 data/actuallyadditions/recipes/colorchange/red_dye.json +51cf48cf4b01b645a31b44019715d4bbd72d6b65 data/actuallyadditions/recipes/colorchange/red_glazed_terracotta.json +356da6f73332294d310cd72c50efee2b662ad7fd data/actuallyadditions/recipes/colorchange/red_stained_glass.json +308bacf5045b8be2b5dcb131b43d450441e296a7 data/actuallyadditions/recipes/colorchange/red_stained_glass_pane.json +c4b07c14b274fc11664f3ae61868ea54d0301eb8 data/actuallyadditions/recipes/colorchange/red_terracotta.json +4c0553f711d08262d29647c561e59051b2199db5 data/actuallyadditions/recipes/colorchange/red_wool.json +466e1fdcf454e002ff773ee92a6e16d3ea95d5b4 data/actuallyadditions/recipes/colorchange/white_carpet.json +a8191ab6489a780eff80784dcf7daa13eb27e101 data/actuallyadditions/recipes/colorchange/white_dye.json +2202b82d1c61a782aa832529519b191ca1ea5a87 data/actuallyadditions/recipes/colorchange/white_glazed_terracotta.json +2f6d14fd331d006f20fd5ece6ac61c8e1fba1ff8 data/actuallyadditions/recipes/colorchange/white_stained_glass.json +2761445362f57ce3dd84c4edf244d0928e74d368 data/actuallyadditions/recipes/colorchange/white_stained_glass_pane.json +39a1054ef97f8399872fb710741a14479caa942b data/actuallyadditions/recipes/colorchange/white_terracotta.json +abdafe14606e6c4fc2af618167d5302d16e6735c data/actuallyadditions/recipes/colorchange/white_wool.json +f124471bf621b480a0b8f692e8f6ce4b1104df50 data/actuallyadditions/recipes/colorchange/yellow_carpet.json +59d8f883be523721aee0f871be0d204553272b5a data/actuallyadditions/recipes/colorchange/yellow_dye.json +11ec45124be1e072f606c1a410ff8ecc448ba8fb data/actuallyadditions/recipes/colorchange/yellow_glazed_terracotta.json +76adc136cfa6394d697dd544e1ff43524f473f4b data/actuallyadditions/recipes/colorchange/yellow_stained_glass.json +ad9f37b3cb18e2b14ecd2e9153262384ddeb2579 data/actuallyadditions/recipes/colorchange/yellow_stained_glass_pane.json +14627f776e55dea3ae32b5108fbaabaf5548ddb8 data/actuallyadditions/recipes/colorchange/yellow_terracotta.json +ae2a49c206e8983dec184965d6915b4114eaefc7 data/actuallyadditions/recipes/colorchange/yellow_wool.json diff --git a/src/generated/resources/.cache/70af3238de42da66beb5f354425347f373dca837 b/src/generated/resources/.cache/70af3238de42da66beb5f354425347f373dca837 new file mode 100644 index 000000000..1ec2332bc --- /dev/null +++ b/src/generated/resources/.cache/70af3238de42da66beb5f354425347f373dca837 @@ -0,0 +1,7 @@ +// 1.20.1 2024-03-03T00:40:33.021051 Block Tags +8665de82dd3d3a1351ce58f78108214f359104b0 data/actuallyadditions/tags/blocks/mineable/aio.json +f7dc293929a2176bc6e428c765f6bf49fbeccdb5 data/actuallyadditions/tags/blocks/mineable/drill.json +8dbaf9b7bd6774bc7c01a47a72b8a7fdaee51f87 data/minecraft/tags/blocks/mineable/axe.json +58c611cbaae2a0a5dd6f82f183b7d0f5dc2d09e6 data/minecraft/tags/blocks/mineable/pickaxe.json +fab721a4fe7ece1d0e019ce36c4d2862f70ee53b data/minecraft/tags/blocks/needs_stone_tool.json +f74407e86c92d0d9435d62ff0f95999f3a84c674 data/minecraft/tags/blocks/walls.json diff --git a/src/generated/resources/.cache/735031f3addf80804addae5e3f53249900116f1e b/src/generated/resources/.cache/735031f3addf80804addae5e3f53249900116f1e new file mode 100644 index 000000000..4e822fd8e --- /dev/null +++ b/src/generated/resources/.cache/735031f3addf80804addae5e3f53249900116f1e @@ -0,0 +1,2 @@ +// 1.20.1 2024-03-03T00:40:33.0225515 Sound Definitions +5492914eb97f792a830608d663aaf3148987ed3e assets/actuallyadditions/sounds.json diff --git a/src/generated/resources/.cache/74807d958079a027731c973b9550985af6711175 b/src/generated/resources/.cache/74807d958079a027731c973b9550985af6711175 new file mode 100644 index 000000000..2487c8e18 --- /dev/null +++ b/src/generated/resources/.cache/74807d958079a027731c973b9550985af6711175 @@ -0,0 +1,5 @@ +// 1.20.1 2024-03-03T00:40:33.0135528 Tags for minecraft:item mod id actuallyadditions +87327118c2f16da245b76de4fdcaab149456d9b8 data/actuallyadditions/tags/items/coffee_beans.json +f3ee78cd8c9563bd1828de2b4b336735f289f9f2 data/actuallyadditions/tags/items/crystals.json +7e6e49c3eb5302af147a2d6ba439e83bd4831cbc data/actuallyadditions/tags/items/drills.json +ae55da193b94fd6375c05d5aa46cafdda9d335cd data/actuallyadditions/tags/items/tiny_coals.json diff --git a/src/generated/resources/.cache/7f59a03675256e210e43fea84b89db21b9eccf0d b/src/generated/resources/.cache/7f59a03675256e210e43fea84b89db21b9eccf0d new file mode 100644 index 000000000..77d0bb16a --- /dev/null +++ b/src/generated/resources/.cache/7f59a03675256e210e43fea84b89db21b9eccf0d @@ -0,0 +1,27 @@ +// 1.20.1 2024-03-03T00:40:33.0215514 Laser Recipes +4967c8919720a63508019a3f391b628a36835a21 data/actuallyadditions/recipes/laser/crystalize_diamatine_crystal.json +64f310e4da3eab4cff7b926126037d407bab56fd data/actuallyadditions/recipes/laser/crystalize_diamatine_crystal_block.json +a65531dec5a7af3350ecee1685f6e3b557c212a9 data/actuallyadditions/recipes/laser/crystalize_emeradic_crystal.json +f58c02e8ac5d0d282f1de5f2211e579b7cef2a6b data/actuallyadditions/recipes/laser/crystalize_emeradic_crystal_block.json +49758e3e018d65a92b7d97a3590ba21547c4b005 data/actuallyadditions/recipes/laser/crystalize_enori_crystal.json +e4230a9a44e53ad82484f0556880e5a73e4eab05 data/actuallyadditions/recipes/laser/crystalize_enori_crystal_block.json +35fcc93b9a784eea821308c893ec1f2d4f8308b7 data/actuallyadditions/recipes/laser/crystalize_palis_crystal.json +44f462ad887ca190ae89323a6f4cec907822a8c1 data/actuallyadditions/recipes/laser/crystalize_palis_crystal_block.json +9a82e0b29eceb0897c9250710cfb3c61e88b263a data/actuallyadditions/recipes/laser/crystalize_restonia_crystal.json +347f58ea589cc1616eaa26bf9350e87f278a5a10 data/actuallyadditions/recipes/laser/crystalize_restonia_crystal_block.json +86ccbca78335b93382ae57076c42535c79314582 data/actuallyadditions/recipes/laser/crystalize_void_crystal.json +3da32ddf55b6202b76a6ea061c405635ac74d193 data/actuallyadditions/recipes/laser/crystalize_void_crystal_block.json +c9799357ec49a5cd4f26485bb1da0fb8fba82e37 data/actuallyadditions/recipes/laser/crystallized_canola_seed.json +4fad7df1418bb4d4597107af27b9468a6959a2bf data/actuallyadditions/recipes/laser/ethetic_green_block.json +7c68dcb8b22e3b02d7e0b491be833d688a6875a8 data/actuallyadditions/recipes/laser/ethetic_white_block.json +13ff594c66502cc923f8f0a7431d0e3616279a54 data/actuallyadditions/recipes/laser/laser_relay.json +9759559b6bf31bbcca30c1a2594dc525e76fd135 data/actuallyadditions/recipes/laser/laser_relay_fluids.json +851385e0092174a06cd478afdbee1436bc93c715 data/actuallyadditions/recipes/laser/laser_relay_item.json +707ddd242be9091e1ea0f139904587824de469cc data/actuallyadditions/recipes/laser/leather.json +796875134a2b4cac4a7b9bc4c6b0553b1a3968ee data/actuallyadditions/recipes/laser/lens.json +ab2e96bf7e50f21c8a085d92e43da9168d6fbbbf data/actuallyadditions/recipes/laser/lens_of_certain_death.json +1d76020ff38b4c8363084c6bce7c246784cca74e data/actuallyadditions/recipes/laser/lens_of_color.json +45a7411bd58cd14a54c6aeba87441d02959eb56e data/actuallyadditions/recipes/laser/lens_of_detonation.json +3a3a2007685d19c6e7240622a36334090be88855 data/actuallyadditions/recipes/laser/nether_wart.json +1b0b6c9e81fba30bacc8564960e4cc4d4ed6d1c5 data/actuallyadditions/recipes/laser/prismarine_shard.json +1b094b2f4779bdf59b5e7b28732d791414e590cd data/actuallyadditions/recipes/laser/soul_sand.json diff --git a/src/generated/resources/.cache/9cf54cdf67e16111ec482a2a3b607e8fd75a4246 b/src/generated/resources/.cache/9cf54cdf67e16111ec482a2a3b607e8fd75a4246 new file mode 100644 index 000000000..2de5c7e24 --- /dev/null +++ b/src/generated/resources/.cache/9cf54cdf67e16111ec482a2a3b607e8fd75a4246 @@ -0,0 +1,72 @@ +// 1.20.1 2024-03-03T00:40:33.0175516 Item Recipes +04119c9f71a93d6c45d47246706fa224822959f0 data/actuallyadditions/recipes/advanced_coil.json +3b2562135f11981fa20bc3588e2cb884a9307c3e data/actuallyadditions/recipes/advanced_leaf_blower.json +03e73d9726655a6ad8cb23f8e214ac278aadf0f2 data/actuallyadditions/recipes/basic_coil.json +b59bc713a54b6398730e5a1ef105479a7e58cf3e data/actuallyadditions/recipes/booklet.json +29e79a47f752d85438b06efefdc1eef2e09c0be6 data/actuallyadditions/recipes/canola_seeds.json +b1b09322d9fb4ee5e205272edabb5ddb825eff05 data/actuallyadditions/recipes/charcoal_to_tiny.json +0a9be8e4e905bed74aa576877cf509ebc3819f80 data/actuallyadditions/recipes/coal_to_tiny.json +4ef19c03913190fb958cecc78acb8b6dd390c7e9 data/actuallyadditions/recipes/compress/diamatine_crystal.json +4f87c571fe00787dc99764a3464bfdb7ed2889a0 data/actuallyadditions/recipes/compress/emeradic_crystal.json +cdbd207ca3ffdaf0f3393a37a1217e837689ec0c data/actuallyadditions/recipes/compress/enori_crystal.json +fde910912a147d8bd75eb23b034583b0deef9d0b data/actuallyadditions/recipes/compress/palis_crystal.json +206ef8a1dce9049b806e70ecde3a3a0762f3f41b data/actuallyadditions/recipes/compress/restonia_crystal.json +0023452c4ca53a801a2294a95ff07cb62c519579 data/actuallyadditions/recipes/compress/void_crystal.json +0d432cc6d29538e2f6f56d0a6c663ff63c4cc4f7 data/actuallyadditions/recipes/crafter_on_a_stick.json +045bb509055f768ec50e5b3dbe87949c12e6a84a data/actuallyadditions/recipes/crate_keeper.json +70e759da4a394a68c8757007c59a4de44b8efaa5 data/actuallyadditions/recipes/decompress/diamatine_crystal_shard.json +ca592294f026cda8d02c808ea3b41b2333b089de data/actuallyadditions/recipes/decompress/emeradic_crystal_shard.json +314c1a08f7114ce75ba9ce18d76d0baa5b049a9b data/actuallyadditions/recipes/decompress/enori_crystal_shard.json +d99beb290a2a5944af948d2fb31f6b64a96c6e7f data/actuallyadditions/recipes/decompress/palis_crystal_shard.json +2ae505e12a390dfb07b3d0e034dfc445ec67e0aa data/actuallyadditions/recipes/decompress/restonia_crystal_shard.json +823c7188829eb50975d857f61e33bc5c2780bb12 data/actuallyadditions/recipes/decompress/void_crystal_shard.json +c3592647a1b6de17893a80eeb9ed214f719cc4eb data/actuallyadditions/recipes/diamond_aiot.json +611eb6bc5dbc9b70a18837209ce130722c702bb2 data/actuallyadditions/recipes/double_battery.json +f5ef4dfddc68a1c3836cfd70fa01a85bc2d3b6a0 data/actuallyadditions/recipes/drill_core.json +e68a6570bdf0d22094b81947691beabeba236fcb data/actuallyadditions/recipes/drill_light_blue.json +6cc31125109f8555a6f5f60cc356b9bd69b4998a data/actuallyadditions/recipes/drill_upgrade_block_placing.json +5988e6878cc8a2fc3cc9148d9718386143709f08 data/actuallyadditions/recipes/drill_upgrade_five_by_five.json +790bd4771f222c0859d7df00014f883caf0a2514 data/actuallyadditions/recipes/drill_upgrade_fortune.json +87e85d27ff73922d5f94275467f8fe22ac0b2599 data/actuallyadditions/recipes/drill_upgrade_fortune_ii.json +725d79bd103f8795fd77b2d3e16066e7f8254cf1 data/actuallyadditions/recipes/drill_upgrade_silk_touch.json +4e7f9ed20e953020b2e39737583da369f9c28cf1 data/actuallyadditions/recipes/drill_upgrade_speed.json +8a894695a5db9a702611fb5bb52ed5623f034300 data/actuallyadditions/recipes/drill_upgrade_speed_ii.json +f2f0aca63f914caf6571a531d8c4f78f7f5d3990 data/actuallyadditions/recipes/drill_upgrade_speed_iii.json +059a1961e798961b17a13b0eee3332c35e20150a data/actuallyadditions/recipes/drill_upgrade_three_by_three.json +81d6f30dc688b638029a2c4c234b0d7906d3670a data/actuallyadditions/recipes/empty_cup.json +db918ae7fa77d2765a21453a669b6a61b76054c7 data/actuallyadditions/recipes/engineers_goggles.json +932414870e796d30c135faf79cd1c2bd4282128c data/actuallyadditions/recipes/engineers_goggles_advanced.json +1fbefc5c32409f324d7139841494c121f844d12c data/actuallyadditions/recipes/filter.json +811730c9a8496dd65e208a36d015b0671e86df1b data/actuallyadditions/recipes/gold_aiot.json +635700a6c4660fa6c56c93c71758f612c37c45de data/actuallyadditions/recipes/handheld_filler.json +a4e0e3bb72d472302f2ab4e5d282cbc7fd6882a6 data/actuallyadditions/recipes/iron_aiot.json +1db3128aa6369612b65234747ae092b80e14ede5 data/actuallyadditions/recipes/laser_upgrade_invisibility.json +34ba0807c83396705abf0c89078318f9ad156bc7 data/actuallyadditions/recipes/laser_upgrade_range.json +c0e69d8b79573ea3113616df9dbbac0b29be4705 data/actuallyadditions/recipes/laser_wrench.json +04ffdbe566efb77088f7223c5d0445e906be16b6 data/actuallyadditions/recipes/laser_wrench_nbt.json +14d13fc7de83a2fdac3220173d9f3e4fb5d65d85 data/actuallyadditions/recipes/leaf_blower.json +201252b77e76a97dc966f04a3d024d775ef6b355 data/actuallyadditions/recipes/lens.json +1fafe233864d0a6917fd84579d7c5a3cccf25c2a data/actuallyadditions/recipes/lens_of_disenchanting.json +41bad4f9930c6d52064f1c2a3b7d69d067239b88 data/actuallyadditions/recipes/lens_of_the_killer.json +16f113bd476377354e53d5f0cfbfa55761337c40 data/actuallyadditions/recipes/lens_of_the_miner.json +9c59763d7c18df2173dab694d0be2682db45f1c5 data/actuallyadditions/recipes/netherite_aiot.json +6e70b532fcfd3809938d0483acb3da13041e1663 data/actuallyadditions/recipes/phantom_clearing.json +3ca4f5fcd907a2ea1a725fb4c05c5ba6552df641 data/actuallyadditions/recipes/phantom_connector.json +4f0543a9b5ad596d431a59698abfb3fb6491255b data/actuallyadditions/recipes/player_probe.json +e9b5284d33da974b44353a6402ac31e30b4a1b8f data/actuallyadditions/recipes/quadruple_battery.json +bf5f14cffc4a2f37a6c34e28689648af3823e445 data/actuallyadditions/recipes/quintuple_battery.json +5958ff2fb37430660fb22012212336320ee83dd8 data/actuallyadditions/recipes/rice_seeds.json +4149bde5189fb77a22862be333b5f417e41d00aa data/actuallyadditions/recipes/rice_slime.json +db9511393131da1f0636eff597dac3f9e8028f4c data/actuallyadditions/recipes/rice_slime_potion.json +168badc19bde6446959c4f4992359fb270b3e0a2 data/actuallyadditions/recipes/ring_of_growth.json +8fd9da4c145cec21d1be3aef6c8025dc07eb6984 data/actuallyadditions/recipes/ring_of_magnetizing.json +fa1b04e4806c6b02b56bfe2eb3fea2f9292afca5 data/actuallyadditions/recipes/single_battery.json +cb0454ccb8e918d506a1dd488187453678f82751 data/actuallyadditions/recipes/stone_aiot.json +99ec7f2bd20673691e51f8052440000e5a705021 data/actuallyadditions/recipes/teleport_staff.json +612619645bf419a2de69a51a1b6b4cf139079563 data/actuallyadditions/recipes/tiny_to_charcoal.json +5b842d8d10661238bd1d0c2c9e90092d783ac734 data/actuallyadditions/recipes/tiny_to_coal.json +6b529ff0b42faa785f52fa9c23b632c1b577bdcd data/actuallyadditions/recipes/travelers_sack.json +ad278bd74bb8c61a2b95aebe80f235bdbc3bbae3 data/actuallyadditions/recipes/triple_battery.json +babb9a9e8a18d124c235df9214265c84738b0c1d data/actuallyadditions/recipes/void_sack.json +598bf3cbdd2cc520aec789d44605a155d35569b1 data/actuallyadditions/recipes/wings_of_the_bats.json +c80073fcade3cdcb15f28c4a1cb12df4ae6cf4ec data/actuallyadditions/recipes/wooden_aiot.json diff --git a/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e new file mode 100644 index 000000000..b113bc9d2 --- /dev/null +++ b/src/generated/resources/.cache/9fb1092f32d4fcbf9e061ffd718d4ec689c6c95e @@ -0,0 +1,40 @@ +// 1.20.1 2024-03-03T00:40:33.0215514 Recipes +4de296ae548e8eb110bbb662cf53e2310b54ab33 data/actuallyadditions/recipes/atomic_reconstructor.json +b0367f5012651764931e8b8fd0c5bcca4e8614c0 data/actuallyadditions/recipes/battery_box.json +f780dd05734b4d5ef7cc930c406fa1d3c8400143 data/actuallyadditions/recipes/black_quartz_brick_slab.json +bf70d371df42904da7ebf153a262ad59d670123a data/actuallyadditions/recipes/black_quartz_brick_stair.json +3b9cf87df299cec64c243cd893ba5ccb0b1f6d1f data/actuallyadditions/recipes/black_quartz_brick_wall.json +2f1fcbc69de8d914089071406bd2bcb2425d7cd9 data/actuallyadditions/recipes/black_quartz_pillar_slab.json +ab0869f0105b58a3a2505dfab16397fb0ab5c08b data/actuallyadditions/recipes/black_quartz_pillar_stair.json +d15668aa8e2249e6459a6b49ca06502ad099eef8 data/actuallyadditions/recipes/black_quartz_pillar_wall.json +99d846eef237b7a25bbeabe81108f449197b8b9c data/actuallyadditions/recipes/black_quartz_slab.json +b99920c6e525c26c4257a9d3400c224b9c2d6127 data/actuallyadditions/recipes/black_quartz_stair.json +661bad344b4cccf35540eee90862f3b8a4c51ceb data/actuallyadditions/recipes/black_quartz_wall.json +0dfe8779439ca31d7b917b6509cb7dd99a99df60 data/actuallyadditions/recipes/chiseled_black_quartz_slab.json +947921ac9bffff5e54847ffc9c6b79f56ce31d9a data/actuallyadditions/recipes/chiseled_black_quartz_stair.json +36f458f41cf188e1800abdf3b879f7932d289bbe data/actuallyadditions/recipes/chiseled_black_quartz_wall.json +613a00e50d85131115f6ae50064dea74db45cd5d data/actuallyadditions/recipes/display_stand.json +0c4a01aaf3773457199127f9311c0c97b6de89f9 data/actuallyadditions/recipes/empowerer.json +e6fef04b166a881330b57026b427b725e0aed492 data/actuallyadditions/recipes/ender_casing.json +6ac939d0e1c1a2c8b2050ceebd646b92c608acd4 data/actuallyadditions/recipes/ethetic_green_slab.json +b687b18c8b930741cbe951bcc5746de728359a3e data/actuallyadditions/recipes/ethetic_green_stairs.json +abdf6bf2cc6119ff2c4f57af92f546243a79ca96 data/actuallyadditions/recipes/ethetic_green_wall.json +9d75d0872a696a597f4ed79dffe84d09e32a8f8e data/actuallyadditions/recipes/ethetic_white_slab.json +d06aaf98f6b8179ae1d75bf94f349d68174e7460 data/actuallyadditions/recipes/ethetic_white_stairs.json +57f22de83d338742f64754a6b32cb87fb4405d30 data/actuallyadditions/recipes/ethetic_white_wall.json +3bc21ad9e4e9a143ded8c492ea9b3504ebb0c368 data/actuallyadditions/recipes/farmer.json +bd65b02a09d0b7bc9dbed5c1da44e49c832ebdf7 data/actuallyadditions/recipes/firework_box.json +ff81da8a0f6632779414c0512100696a11771814 data/actuallyadditions/recipes/hopping_item_interface.json +e95ec4e288c3dcc7383a2f4d86e881619b9eccd5 data/actuallyadditions/recipes/iron_casing.json +2cf7185fb18db75e95bfba9da3d5c56a2f8ff7d7 data/actuallyadditions/recipes/item_interface.json +f4b49b6338d2165519deb3d997f287d7eff53c32 data/actuallyadditions/recipes/laser_relay.json +0f7600693d983fc2690c16742b271622e5d45862 data/actuallyadditions/recipes/laser_relay_advanced.json +af6ec611aeb7b500c5cf615b5329e94f7d102cea data/actuallyadditions/recipes/laser_relay_extreme.json +4acb117a6727554073a78ed81bcd2b0b1af53bec data/actuallyadditions/recipes/laser_relay_item_advanced.json +3aba28d0e29b82b173b4ff7515c9eb70d9f1f737 data/actuallyadditions/recipes/shock_suppressor.json +a5b1d9772ef412d339ef0888d881af071cb4d942 data/actuallyadditions/recipes/smooth_black_quartz_slab.json +b7d95fe7cd73171f061ec1df286d534171e92f82 data/actuallyadditions/recipes/smooth_black_quartz_stair.json +060188b252365b8859ed56cef71fde4741cf2e5c data/actuallyadditions/recipes/smooth_black_quartz_wall.json +769a21af2dcdaa46bcddc1317284dacc9adc7dc5 data/actuallyadditions/recipes/tiny_torch.json +e7b5cee1a98df90c7a5666377444fc5364c7e5bf data/actuallyadditions/recipes/vertical_digger.json +6ee12ecf5402c30aa314428907ceee8bd53ffb4f data/actuallyadditions/recipes/wood_casing.json diff --git a/src/generated/resources/.cache/ac8a02941a4e34649db8b388fb528d3ed610c50f b/src/generated/resources/.cache/ac8a02941a4e34649db8b388fb528d3ed610c50f new file mode 100644 index 000000000..a0a22a47c --- /dev/null +++ b/src/generated/resources/.cache/ac8a02941a4e34649db8b388fb528d3ed610c50f @@ -0,0 +1,3 @@ +// 1.20.1 2024-03-03T00:40:33.0120517 Misc Recipes +8f72d48fd5d27855c388705c17c1687a77f0ed7f data/actuallyadditions/recipes/fermenting/refined_canola.json +1440511bbbc16cf339434fd83288c05901f079c9 data/actuallyadditions/recipes/pressing/canola.json diff --git a/src/generated/resources/.cache/b3ca5dca15f867120b82824364d3156b7fdfd666 b/src/generated/resources/.cache/b3ca5dca15f867120b82824364d3156b7fdfd666 new file mode 100644 index 000000000..12484d68d --- /dev/null +++ b/src/generated/resources/.cache/b3ca5dca15f867120b82824364d3156b7fdfd666 @@ -0,0 +1,228 @@ +// 1.20.1 2024-03-03T00:40:33.0195512 Item Models: actuallyadditions +1966de13838437bc6035f3649976a44797cf5144 assets/actuallyadditions/models/item/advanced_coil.json +24594fc68e66011dc2d7b79b92c94b387e710318 assets/actuallyadditions/models/item/advanced_leaf_blower.json +ba2d814e269cdef72e1045f200b3c20ed6961517 assets/actuallyadditions/models/item/atomic_reconstructor.json +1190a64abe6cf6343cb1e88dfdfc7a1a21c36782 assets/actuallyadditions/models/item/basic_coil.json +e2fe5d1b097cd539015027cb0affa11710295478 assets/actuallyadditions/models/item/bats_wing.json +7e87d33f54fa5aaa0f57f30a16038d9290f9ae99 assets/actuallyadditions/models/item/battery_box.json +4898aa83002493eef70df16d4a5f7a9fa1584dee assets/actuallyadditions/models/item/bio_reactor.json +14e4bf7491b745af1502ed6faf5a8c055e64b039 assets/actuallyadditions/models/item/black_quartz.json +81d6647c902bced925a4311ada26e18db0d5826a assets/actuallyadditions/models/item/black_quartz_block.json +0f826350c1a3dd7172476ef27d059bce95a2a434 assets/actuallyadditions/models/item/black_quartz_brick_block.json +e4f0168005ef994fbcd66f87cc7b7a82dbce99aa assets/actuallyadditions/models/item/black_quartz_brick_slab.json +b956a8aae9de652cf961b56e6eb0f9e8cc46da2d assets/actuallyadditions/models/item/black_quartz_brick_stair.json +d0f371985cfdbc8dbd93d4f58f2d7a0245edd03b assets/actuallyadditions/models/item/black_quartz_brick_wall.json +384947f2a16b16859cfddb6a669ea7aba0ece9df assets/actuallyadditions/models/item/black_quartz_ore.json +06f30c5eab42ad4cc8228322ae9ad1c7d0c8f7e2 assets/actuallyadditions/models/item/black_quartz_pillar_block.json +56ef7ec11853b867bf39b29fc714bb631d713a95 assets/actuallyadditions/models/item/black_quartz_pillar_slab.json +4dfa84b403aa3cfebfc1bb0eaae2a3010891ee8e assets/actuallyadditions/models/item/black_quartz_pillar_stair.json +a41a81204caeddaaeaba35a5d1087361d7df5eae assets/actuallyadditions/models/item/black_quartz_pillar_wall.json +c8974657e959db31495382cf6a86a3367df5d8c9 assets/actuallyadditions/models/item/black_quartz_slab.json +74aaa894cd68cf64f8ad5aac0e7c0b26cdb0a021 assets/actuallyadditions/models/item/black_quartz_stair.json +7e8476e561bd4854b54ce79cb798fd9b2915efb4 assets/actuallyadditions/models/item/black_quartz_wall.json +8f1232a569a12d54b1053fae05dc85d23b28ed42 assets/actuallyadditions/models/item/breaker.json +d376ad8923f1f63c1ed4429288b479cfbb235d44 assets/actuallyadditions/models/item/canola.json +c9667ca1fa849e8d519f45298d7ad5bfc7d157d0 assets/actuallyadditions/models/item/canola_oil_bucket.json +73ff7de0094bcc2b89106282f99ef1e2384a05c5 assets/actuallyadditions/models/item/canola_press.json +b365258e10f1f99b66f01d78c49039701e6093fb assets/actuallyadditions/models/item/canola_seeds.json +290bc294c4475cc55b0ed30a9039ab01c7c25e1a assets/actuallyadditions/models/item/chiseled_black_quartz_block.json +c73981382d646e4a0186b26fcfad817d39252055 assets/actuallyadditions/models/item/chiseled_black_quartz_slab.json +2da8ce13d0dff36eb41cdd5304a5f12e3a2c3b05 assets/actuallyadditions/models/item/chiseled_black_quartz_stair.json +7d4d97ae9522f6948c87038688e6127656585011 assets/actuallyadditions/models/item/chiseled_black_quartz_wall.json +5552f28e9045f34bcd21185104328e63ffea4482 assets/actuallyadditions/models/item/coal_generator.json +53e89635c6330cc40b83a1ec1b0a1b97111e1301 assets/actuallyadditions/models/item/coffee_beans.json +2f943a7dfad9dee932b0c943c52a1490a625fdb9 assets/actuallyadditions/models/item/coffee_cup.json +a67f1795e1ad1d6ed19f2a35f176f39e00dbb9c3 assets/actuallyadditions/models/item/coffee_machine.json +523148eac33929fb0d2892856a5ddcb784043bb5 assets/actuallyadditions/models/item/crafter_on_a_stick.json +9bc734dadf9d5b85b8cc5685b673a1d074cf3d6d assets/actuallyadditions/models/item/crusher.json +4b7ef5dd15d930d4b0b5507cd08c27cb5ee1498a assets/actuallyadditions/models/item/crusher_double.json +a38461a8a2056640674708a32548701b9c77bac3 assets/actuallyadditions/models/item/crystallized_canola_seed.json +641b780d7c8a42714a82591522b709674b1adc95 assets/actuallyadditions/models/item/crystallized_oil_bucket.json +c118f704bbf138e4a81b2acdb5e776a422559358 assets/actuallyadditions/models/item/diamatine_crystal.json +41096b470637e0ef8fd4db2376d26fe61daf8384 assets/actuallyadditions/models/item/diamatine_crystal_block.json +6559ba1ebc7abc0e75693e085f3e85624a17b79f assets/actuallyadditions/models/item/diamatine_crystal_cluster.json +e669eeb5832e40fd782df0f3ba89a27d3cadb9d3 assets/actuallyadditions/models/item/diamatine_crystal_shard.json +3318c3bb118ee0bb1008a936c72ec80dcaf59b8c assets/actuallyadditions/models/item/diamond_aiot.json +11e4961bde9e6900dc90a833108060a774783df6 assets/actuallyadditions/models/item/display_stand.json +2ed3d6a7d3b292d765616e09ca0fe03810ad80eb assets/actuallyadditions/models/item/double_battery.json +21407d7ee7e6a9afd4841e0c5f335166d00c8edc assets/actuallyadditions/models/item/dough.json +2669dbeb32101f50763c9cd7f71f5b401461dc18 assets/actuallyadditions/models/item/drill_black.json +1b836004c51c7730cb9e2b21f6e6deb036d2274e assets/actuallyadditions/models/item/drill_blue.json +aa33fb2f609dfd580a0170bf59472b42430aec44 assets/actuallyadditions/models/item/drill_brown.json +c3e846a9b5d20893947b654f13da81bb1a8370bd assets/actuallyadditions/models/item/drill_core.json +80ac2161c43623c7e0cc4a9cf456229d3b3adba3 assets/actuallyadditions/models/item/drill_cyan.json +ec5271390d19a8f654a039ce484c687f23a67ef5 assets/actuallyadditions/models/item/drill_gray.json +19c8303f3d33482f543a4e4346948962ba8b4503 assets/actuallyadditions/models/item/drill_green.json +64bd52ecac64de40f151612351e1850ca5da01f2 assets/actuallyadditions/models/item/drill_light_blue.json +23fe074980dc4fc5b5f0fb4a824a92346b10a88b assets/actuallyadditions/models/item/drill_light_gray.json +d1a9bbc0f92cf264b361cd392b192e5eba191b15 assets/actuallyadditions/models/item/drill_lime.json +b451f12814595ac7b06ffee06eaa93249c2c0075 assets/actuallyadditions/models/item/drill_magenta.json +c5be173ce3f3c5fdc376eacbefb2e3d913a2ecc4 assets/actuallyadditions/models/item/drill_orange.json +26a3683600670d1733f0e0be80528e1b01d1c94a assets/actuallyadditions/models/item/drill_pink.json +086647e21977dff542f6cb09c4b0f3f826f874c5 assets/actuallyadditions/models/item/drill_purple.json +a1dae4b66cce762b355ef2b5bbf399693f09b141 assets/actuallyadditions/models/item/drill_red.json +2b0cb027a0b20f1bd60bb67e40efa6de22c42cb1 assets/actuallyadditions/models/item/drill_upgrade_block_placing.json +08d4499548fcccd74a6180efd1f057cba89c2b1a assets/actuallyadditions/models/item/drill_upgrade_five_by_five.json +0cd04516791a0ee270caa739d9f819db25829878 assets/actuallyadditions/models/item/drill_upgrade_fortune.json +d115acaf444990d488350e41ef23348749027ac3 assets/actuallyadditions/models/item/drill_upgrade_fortune_ii.json +e478ede0635caf397241d7ce1e25076def0d7fbd assets/actuallyadditions/models/item/drill_upgrade_silk_touch.json +9894ba07aabe2737ec2e0248171fca599d210caf assets/actuallyadditions/models/item/drill_upgrade_speed.json +e7b8dc084673ed90c13fe0e97cae25421b4548da assets/actuallyadditions/models/item/drill_upgrade_speed_ii.json +dcaf08676b9a5fd061ba16773f459ffa00c3b725 assets/actuallyadditions/models/item/drill_upgrade_speed_iii.json +8f8a0099f2c3b9c4ed69efed617091831db0f905 assets/actuallyadditions/models/item/drill_upgrade_three_by_three.json +b23de462f3fd72a64945ee497ac10b2663579ce8 assets/actuallyadditions/models/item/drill_white.json +3b770ac5928a24cbb7a9632eed889c771b6d7af4 assets/actuallyadditions/models/item/drill_yellow.json +184e0b97cf0ba0fdded5f60154e452bae9d8cfec assets/actuallyadditions/models/item/dropper.json +b9b0ed6bd949a45680304dbfa61ddbb57a21d9bf assets/actuallyadditions/models/item/emeradic_crystal.json +c27e8b54522ff17d84f01a6d3a0303a4b3c1a1eb assets/actuallyadditions/models/item/emeradic_crystal_block.json +41ad224d53871c009b459e939cac046248f95d88 assets/actuallyadditions/models/item/emeradic_crystal_cluster.json +36fe21488381452005c843accaac78484aea50a0 assets/actuallyadditions/models/item/emeradic_crystal_shard.json +ac22746fa100230791503f36e2ff4814c40e8b57 assets/actuallyadditions/models/item/empowered_canola_seed.json +50e4de32fcf4387f6b7a053c0fa183b837f77699 assets/actuallyadditions/models/item/empowered_diamatine_crystal.json +db59980eb72833c10b2831415f2ee03dd89cf760 assets/actuallyadditions/models/item/empowered_diamatine_crystal_block.json +4554dd917554f5fc2d171ca9d5b0cd9f3c6c861a assets/actuallyadditions/models/item/empowered_emeradic_crystal.json +383cd73169c029abcb2241761350f74a20f561f5 assets/actuallyadditions/models/item/empowered_emeradic_crystal_block.json +6799e9cffe078fca3ba2ecbd3ddeb33d1f029969 assets/actuallyadditions/models/item/empowered_enori_crystal.json +ddb1c951b2ed6c366f1e3eb2e70397e07507298b assets/actuallyadditions/models/item/empowered_enori_crystal_block.json +162102e61b536e206a9065d9f8cdb7536d5d7bd3 assets/actuallyadditions/models/item/empowered_oil_bucket.json +2e0ae0f720e942fe912e894c70bd22390e7ae2ec assets/actuallyadditions/models/item/empowered_palis_crystal.json +8ec9b589485c06f0222ba62e987ca9ffeaebddcb assets/actuallyadditions/models/item/empowered_palis_crystal_block.json +eac6b151e494ca2e4c6254af9d77da18a8369980 assets/actuallyadditions/models/item/empowered_restonia_crystal.json +dcf453d18ae115ea027798c509ab0097d3638460 assets/actuallyadditions/models/item/empowered_restonia_crystal_block.json +02f3ad988327fcb9c0f919e9c1b43476c17f0f3f assets/actuallyadditions/models/item/empowered_void_crystal.json +d126b338cdc9ea161afaa8cf238c2e6432210ab2 assets/actuallyadditions/models/item/empowered_void_crystal_block.json +1da3311ae660be5c5802f7f1593d340ed785f7a1 assets/actuallyadditions/models/item/empowerer.json +29e1c910cd026a3d07dc5a626cddacceeeb7c33d assets/actuallyadditions/models/item/empty_cup.json +44120a0c34c1e7d180761db7db790d2d42f4421b assets/actuallyadditions/models/item/ender_casing.json +cd900e73feab240739ae6eac436b77e97b71c77b assets/actuallyadditions/models/item/ender_star.json +4f30d8d31f0657644876c0ce45218ca052c76f6d assets/actuallyadditions/models/item/energizer.json +2ea6d1faeeb6996538dda7abf14a62817ffc0058 assets/actuallyadditions/models/item/enervator.json +3f58028673cfa1d8390b392f610b369e0c002bbc assets/actuallyadditions/models/item/engineers_goggles.json +ce726f1d661e57e2cd690cb809027b3467ed4e64 assets/actuallyadditions/models/item/engineers_goggles_advanced.json +7908f379c130467f565e8ed1a671e81691328e29 assets/actuallyadditions/models/item/enori_crystal.json +e69c4c1c9d155f3e14320584800bb723e31f4c3f assets/actuallyadditions/models/item/enori_crystal_block.json +402c503501ac74e7505db48d4271df30baafbd74 assets/actuallyadditions/models/item/enori_crystal_cluster.json +678e9037e2f28d11dc33c2559ce4be936be6abfb assets/actuallyadditions/models/item/enori_crystal_shard.json +5105aae5fc7416276770b15e8f709c2b9aa37661 assets/actuallyadditions/models/item/ethetic_green_block.json +461c0ce7e29062bd746edd6f1489c3c56fc9fba7 assets/actuallyadditions/models/item/ethetic_green_slab.json +bb6f5392796c0adb55fe8c05d241e100a582216b assets/actuallyadditions/models/item/ethetic_green_stairs.json +0c73aca9b3e356896ff50dab363a62981d8e14da assets/actuallyadditions/models/item/ethetic_green_wall.json +d63c6b082f37ce7fdefceaf23b27ce1304e462a8 assets/actuallyadditions/models/item/ethetic_white_block.json +45e8d6f385a72912908866c63c01a8ed5cd121c4 assets/actuallyadditions/models/item/ethetic_white_slab.json +17348e065fc131ee393ca706e5fb67e27446a697 assets/actuallyadditions/models/item/ethetic_white_stairs.json +f280eb6cd443cc9ad0373bcea0e32bfd9612ce32 assets/actuallyadditions/models/item/ethetic_white_wall.json +cb75ec3d4e570f7b7e15148b4deda9d4c248e22a assets/actuallyadditions/models/item/farmer.json +180b9bac03a2b7e6e0765f2911ca12ba66f9ffe1 assets/actuallyadditions/models/item/feeder.json +fa6ecbf0d5de9c36ca72da31becf2dff0dbea2af assets/actuallyadditions/models/item/fermenting_barrel.json +f888bf0b0b8eb3091cca1f6dd2a8e246880cd471 assets/actuallyadditions/models/item/filter.json +bea6d0047a8f59a3612752e09f17bed9cb247394 assets/actuallyadditions/models/item/firework_box.json +74e708e32c0405201448efbe3415a932e8ed86d3 assets/actuallyadditions/models/item/flax_seeds.json +7139a6ac99026c6e9577aacdb2d3d1259bd1f138 assets/actuallyadditions/models/item/fluid_collector.json +b47cfe22bd714502624e39b3d8e825616152b4c7 assets/actuallyadditions/models/item/fluid_placer.json +6d914cb6ef8083ccb4835ccb275b4ee43d4e4f5f assets/actuallyadditions/models/item/gold_aiot.json +a6e2106885c833e549bd7ba533dbc0ae71bd07a0 assets/actuallyadditions/models/item/greenhouse_glass.json +b08483a789d525b90808638a497ff43947454dfa assets/actuallyadditions/models/item/handheld_filler.json +d058286787b169cd09245f2cae6606bfedeb4813 assets/actuallyadditions/models/item/heat_collector.json +44b520347755bcb5308187153fe3e902ab666fae assets/actuallyadditions/models/item/hopping_item_interface.json +f9f045a7713addffc4c419d1a3acdc9eac176065 assets/actuallyadditions/models/item/iron_aiot.json +bd9be4f8d1235d6a418280c0a9a585c53360a99e assets/actuallyadditions/models/item/iron_casing.json +4b742b7bf9df6b8f745ed00ac29860959ff6f076 assets/actuallyadditions/models/item/item_interface.json +a0545bce8530d20e0d87775144ed47f2df070219 assets/actuallyadditions/models/item/lamp_black.json +ddecd4c60d4d0f77175eaa0178f6397afd7ee98f assets/actuallyadditions/models/item/lamp_blue.json +53e733a0cf113affea99490724efd72ee28cf823 assets/actuallyadditions/models/item/lamp_brown.json +6da0f6b4b5902b6edfceb1ad1da68d2eedd4fd1f assets/actuallyadditions/models/item/lamp_controller.json +318dfa2d59143dcfa0c80c5737c2be615de36775 assets/actuallyadditions/models/item/lamp_cyan.json +87b4f790502f49966402065f78c741bcba13dd4a assets/actuallyadditions/models/item/lamp_gray.json +2c94699dabd27108f5b91649368da0f13a6ebfee assets/actuallyadditions/models/item/lamp_green.json +4d55a64d1ea22a1f98793d6bbc0494d4c8da64e1 assets/actuallyadditions/models/item/lamp_light_blue.json +745c21cbcad8ea5497bdbefdd02329995ce34add assets/actuallyadditions/models/item/lamp_light_gray.json +94a023517d8fc7010674ca35bd97c1f06f20a7d7 assets/actuallyadditions/models/item/lamp_lime.json +1dd547f6ed02f9e9aa003a6fce8a99723233e147 assets/actuallyadditions/models/item/lamp_magenta.json +0859c5175dc283ad8f4b6c775d056719df2b0fe8 assets/actuallyadditions/models/item/lamp_orange.json +42feb4551b5195c43a857740f7d43bf649a9c806 assets/actuallyadditions/models/item/lamp_pink.json +ecca7ae3b8be9bd3cc4bb03fc67f953dc0457565 assets/actuallyadditions/models/item/lamp_purple.json +48f7aa99f0b23062ebd8786263d50b735543abb9 assets/actuallyadditions/models/item/lamp_red.json +9e3a7b59adc5027d02d670336edbd976d6542b45 assets/actuallyadditions/models/item/lamp_white.json +5954f2cf5ce36bc62fa48319468ba3071c0a56a8 assets/actuallyadditions/models/item/lamp_yellow.json +0564b3476e14a666482189debf313fe5b7b8e471 assets/actuallyadditions/models/item/laser_relay.json +8d445961de532602ca6c7ac32c65ab8191a9daad assets/actuallyadditions/models/item/laser_relay_advanced.json +b7ca5de0aa839ed3ef4f81392666a639a3ad9dba assets/actuallyadditions/models/item/laser_relay_extreme.json +675bfd2749745ecd2fb7d5cac73d5534bb446ab1 assets/actuallyadditions/models/item/laser_relay_fluids.json +f930964ba83e5dbc8f2080659704f0917b51a823 assets/actuallyadditions/models/item/laser_relay_item.json +b35a25719115ddb587b6172c2ba9769ecf29ad4d assets/actuallyadditions/models/item/laser_relay_item_advanced.json +bc092585f6dd338af880a49748e5d35adf36963f assets/actuallyadditions/models/item/laser_upgrade_invisibility.json +7bc26132432f8b33516929f34d6f3e12a4e32a1f assets/actuallyadditions/models/item/laser_upgrade_range.json +9872092852b1fe5f338e71d726111d713d652b3a assets/actuallyadditions/models/item/laser_wrench.json +05e3583ade09c7d90ddb536c5be6d3df1ce786c7 assets/actuallyadditions/models/item/lava_factory_casing.json +34573ebef541f5d9f7d62ba95205f81e1de234b4 assets/actuallyadditions/models/item/lava_factory_controller.json +df17f763590bf5c883eec492e4ab4d8dc4bdeb97 assets/actuallyadditions/models/item/leaf_blower.json +4a349378c423823c42c3075e145ca6e5b31631ad assets/actuallyadditions/models/item/leaf_generator.json +8fc79c0e276a95869288300bcc940d9d268d75db assets/actuallyadditions/models/item/lens.json +120beb881f92b6f07f94832d73a9ec93c80258e9 assets/actuallyadditions/models/item/lens_of_certain_death.json +cf5417e23f9eab2ce0560c4fd4c6b53940ba01b1 assets/actuallyadditions/models/item/lens_of_color.json +1a1f4b045d1600202a790285a9e68406c4fb2a10 assets/actuallyadditions/models/item/lens_of_detonation.json +0fdd61872facfdc102e7fcb0343c21f42f7f0e3f assets/actuallyadditions/models/item/lens_of_disenchanting.json +57474e37be369718adcb564a4e32264c8f0f9be1 assets/actuallyadditions/models/item/lens_of_the_killer.json +519f44cb73f95dbd0f27d4ae8ca27f0c0c1a85a8 assets/actuallyadditions/models/item/lens_of_the_miner.json +2052ba8678a2cb0784b0a87b77b8724e24fb2d03 assets/actuallyadditions/models/item/long_range_breaker.json +36acda859585d2953c8c557c56fbcccd43196de6 assets/actuallyadditions/models/item/netherite_aiot.json +1770c8bcbbdcdcb00b7b8dbb0345f824802a40fa assets/actuallyadditions/models/item/oil_generator.json +872b7d881417cb152b7c54ed7f52dfde09246ee6 assets/actuallyadditions/models/item/palis_crystal.json +1a4ec0f6ed3b9b741438be7d4388676c92d0d3c1 assets/actuallyadditions/models/item/palis_crystal_block.json +df692efd0af52a6b3eef1332cb2e6b5469e47dbf assets/actuallyadditions/models/item/palis_crystal_cluster.json +046fa6e050fdaeadca8da1335be501705fa84723 assets/actuallyadditions/models/item/palis_crystal_shard.json +29958f60555c7c12e36831dcc69504c8d8b52357 assets/actuallyadditions/models/item/paper_cone.json +158760d91cbb130b57b457e673e4b936b337ffc1 assets/actuallyadditions/models/item/phantom_booster.json +b393ea03ae008aca117e8f7aa5a2d69ef36b827b assets/actuallyadditions/models/item/phantom_breaker.json +2e3aa5aed20b31941e10b8ae868153f25aeadde4 assets/actuallyadditions/models/item/phantom_connector.json +3b84ebf4b2a84e972dabde604bb7e11222fccacf assets/actuallyadditions/models/item/phantom_energyface.json +4e96f842b302c570d739c38610abcda5f2766cf9 assets/actuallyadditions/models/item/phantom_itemface.json +57c38461980802bef0a353a335eb470d36afd803 assets/actuallyadditions/models/item/phantom_liquiface.json +974194113a4b6bf1e101cc4a2b826cdc067204ef assets/actuallyadditions/models/item/phantom_placer.json +3eb4d917b6a1ad3a5512b505853cb2bc361e9942 assets/actuallyadditions/models/item/phantom_redstoneface.json +bc0ddfda095c4b5ee092c5a3e4d0b6ba920c2d63 assets/actuallyadditions/models/item/placer.json +39c58314ca0c6a71223dd2e52e91ec1371831a74 assets/actuallyadditions/models/item/player_interface.json +6bd69a7b1644ed47ebc115b3e3168f78b47a5609 assets/actuallyadditions/models/item/player_probe.json +2d75896d58ab8ff3f312beb28f069587839a54e7 assets/actuallyadditions/models/item/powered_furnace.json +36424d918b51bb3ab16dfa2310c7dd15149cb545 assets/actuallyadditions/models/item/quadruple_battery.json +491c3aae5c73fe127773af252a5c7b3ec7f80a74 assets/actuallyadditions/models/item/quintuple_battery.json +ccc770adced6451c185235528211a9e88b613ab3 assets/actuallyadditions/models/item/ranged_collector.json +e972bcd9ee48979990a0337b9437e4a7f981cf36 assets/actuallyadditions/models/item/refined_canola_oil_bucket.json +baa9586d2336cf25ff6718c25f02759c35e074a0 assets/actuallyadditions/models/item/restonia_crystal.json +3bb9ebbc33d28dc27715dab6d8326ff20414a1c4 assets/actuallyadditions/models/item/restonia_crystal_block.json +e87ad7ddf4132057650bd86861b9530fba03afed assets/actuallyadditions/models/item/restonia_crystal_cluster.json +47b4a8eb6ace3cb1559c0dbd373c2eb972fbc398 assets/actuallyadditions/models/item/restonia_crystal_shard.json +2b1468f3008de7b2bf1b014ffc82d53d654a47e9 assets/actuallyadditions/models/item/rice.json +e72dc8e8f02bb4aa81e75481457774ed2f5e43d1 assets/actuallyadditions/models/item/rice_dough.json +617bb511cbf99795b1f8969124c5828f1c5c311b assets/actuallyadditions/models/item/rice_seeds.json +eab7d9d6dd842031a70acf73fae798c3f6a0359d assets/actuallyadditions/models/item/rice_slimeball.json +723202dc7d439ea6479632b10699dee4a4845ba9 assets/actuallyadditions/models/item/ring.json +a74394b664fc2787f2635b1981c3c7b1abad0172 assets/actuallyadditions/models/item/ring_of_growth.json +4e2da52440b5284413a50abe6b04b61154149c8d assets/actuallyadditions/models/item/ring_of_magnetizing.json +9d4bfba1a6fdd2f24e84ad6d06db1550d0d5afaa assets/actuallyadditions/models/item/shock_suppressor.json +6bf60c19c00abd795b6749220137d856c9cfdd4f assets/actuallyadditions/models/item/single_battery.json +b4e1e094bca9bcaf35f617aa9a8be6e73ff60ebe assets/actuallyadditions/models/item/smooth_black_quartz_block.json +0ef621fa8f28b2dfa677f4a3837c6ac82cb060b7 assets/actuallyadditions/models/item/smooth_black_quartz_slab.json +a7ad3c2505d68d88cc72d440596ade6f9b1ca46b assets/actuallyadditions/models/item/smooth_black_quartz_stair.json +f0f6f38089487a184603f8aebed7b6fe0e660ca0 assets/actuallyadditions/models/item/smooth_black_quartz_wall.json +c1023d8b9b8bcfd41a95d24601096681d799e67a assets/actuallyadditions/models/item/snail.json +42f55269cdf8a3ba4e7a3c41b67c49ded053ff44 assets/actuallyadditions/models/item/solidified_experience.json +f4f238229a72372ad2d6fd862a5f2b7789196f01 assets/actuallyadditions/models/item/stone_aiot.json +0f91c0cf92a346bccd1142ac7b6ab37bee7822e5 assets/actuallyadditions/models/item/teleport_staff.json +86863a1c74a9bebd1ea7524e0ad3435f4e83cafb assets/actuallyadditions/models/item/tiny_charcoal.json +3b23a8a33dbe5fd8f965a8d76dbd181e7a52ca78 assets/actuallyadditions/models/item/tiny_coal.json +7d7f92fd44743414cc193cec9880c05530c597e0 assets/actuallyadditions/models/item/tiny_torch.json +37c33ee537ada74f1ba2bfe2b53ae42677be1dc9 assets/actuallyadditions/models/item/travelers_sack.json +3ac4b97ae2690d645087d6872d39d7f35070b947 assets/actuallyadditions/models/item/triple_battery.json +a2d656d1974443483eb69de4d8a738a6d02ea32a assets/actuallyadditions/models/item/vertical_digger.json +23ff6913a871df43d2eb91fcebdce949082503ac assets/actuallyadditions/models/item/void_crystal.json +424f9dc0fab6a071a8d96712293958d62223816f assets/actuallyadditions/models/item/void_crystal_block.json +60ded841dd22dd153d6e71ee5bdb4ae2bc26ee28 assets/actuallyadditions/models/item/void_crystal_cluster.json +9e060e1990e8228ba25f6ab31934e1a1335132df assets/actuallyadditions/models/item/void_crystal_shard.json +033fee24fdc1f52b5257a3a72bf50cb5ab1d460e assets/actuallyadditions/models/item/void_sack.json +a9c047be2422aa5854bbc5d98065b628153de4c6 assets/actuallyadditions/models/item/water_bowl.json +fa67aa422701af36457ce6512e9975851298fc27 assets/actuallyadditions/models/item/wings_of_the_bats.json +223779f0008613f103c90922a8c8fa3f0bb437b6 assets/actuallyadditions/models/item/wooden_aiot.json +b1765120b498ca056ba4a3ffc2860f1362339ca8 assets/actuallyadditions/models/item/wood_casing.json +b8f3729fc5d615c0e4d13180ee5952f8819f318f assets/actuallyadditions/models/item/worm.json +6225be93ce8fd43d627f1bfdfea565f8ee986e4a assets/actuallyadditions/models/item/xp_solidifier.json diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache deleted file mode 100644 index 6851543b7..000000000 --- a/src/generated/resources/.cache/cache +++ /dev/null @@ -1,904 +0,0 @@ -ad5241a0fb20fbe1d724786a426855ab0ec07b39 assets/actuallyadditions/blockstates/atomic_reconstructor.json -dd693edf46ec7e4423ccb6afeacd866ed2bafe14 assets/actuallyadditions/blockstates/battery_box.json -f4b3482fd851ad2e0071caf4aedbd7ee45fe0a31 assets/actuallyadditions/blockstates/black_quartz_block.json -6c1294add602decc8439b820042d721b4790e428 assets/actuallyadditions/blockstates/black_quartz_brick_block.json -c35de34900af2424569caedd4d331e4fbca086df assets/actuallyadditions/blockstates/black_quartz_brick_slab.json -7ddec82b65e9ded21ce7660667de04d57d4aee2e assets/actuallyadditions/blockstates/black_quartz_brick_stair.json -25d8557a7efa16df9937a8716bf92587a96fef3f assets/actuallyadditions/blockstates/black_quartz_brick_wall.json -033a5ecdf1811e684ddd8b80e1ff5fd9f1757cce assets/actuallyadditions/blockstates/black_quartz_ore.json -31b696d84e073be37ae3ce210463fd1568cdce47 assets/actuallyadditions/blockstates/black_quartz_pillar_block.json -f89956366d02b0f1e5122ea0fdb23813ebac8858 assets/actuallyadditions/blockstates/black_quartz_pillar_slab.json -73a53fb6db64ec85e180e9d493f7dca51d29da62 assets/actuallyadditions/blockstates/black_quartz_pillar_stair.json -c93b89c4b673b6063148666b2eb13dec98918532 assets/actuallyadditions/blockstates/black_quartz_pillar_wall.json -93fa4eb3c85c9d1abade9e6aa46ff60d28b37e7e assets/actuallyadditions/blockstates/black_quartz_slab.json -ac5d75bda4dc24894fb380d5e3ec751a0aa5c498 assets/actuallyadditions/blockstates/black_quartz_stair.json -146faa2ebbb31f320f8b336f6e675fce6faac2db assets/actuallyadditions/blockstates/black_quartz_wall.json -5dea2f0e554a5ecb9b7f547526d745ff85353a40 assets/actuallyadditions/blockstates/breaker.json -e3b6949dc703f984bc10cb5794171ab1623f7bad assets/actuallyadditions/blockstates/canola.json -5101139337dd4e5a057333e9e424df47f7138c93 assets/actuallyadditions/blockstates/canola_press.json -998b11d1f63e153ab2f8bd11830405611c8886a2 assets/actuallyadditions/blockstates/chiseled_black_quartz_block.json -84525ecc49bdb7285b34ff5028fc25c198f03ccd assets/actuallyadditions/blockstates/chiseled_black_quartz_slab.json -c2fe87cf0b2fea00b52ab59cd6a90d3d876b1218 assets/actuallyadditions/blockstates/chiseled_black_quartz_stair.json -72431d7f0f3e60f7c9f4b7d611f8bea899be67e2 assets/actuallyadditions/blockstates/chiseled_black_quartz_wall.json -c1000550e4021ad6cc2aabcc1f3ecf8abfdd8f8e assets/actuallyadditions/blockstates/coal_generator.json -d84f7378fbcb5449997ea34bf2654408dbb812ec assets/actuallyadditions/blockstates/coffee.json -033082834217900e98bd37dc5d6f09c484bd374a assets/actuallyadditions/blockstates/coffee_machine.json -756eed31de6b7c02e246b90741a0ed372c629c88 assets/actuallyadditions/blockstates/crusher.json -6a558853975a855b8fcae301d3e0ccf2357e5ee9 assets/actuallyadditions/blockstates/crusher_double.json -156669e8e8907d7db17c3a28a00006a594005958 assets/actuallyadditions/blockstates/diamatine_crystal_block.json -bcab0f0cf3ab29da5c66025f99f0c07f53e7ff1d assets/actuallyadditions/blockstates/diamatine_crystal_cluster.json -e6b4d6327ad71e7885e24d41601f0f1e238d4951 assets/actuallyadditions/blockstates/display_stand.json -a72f08f5b39d2bc66e5de566019376a8997aa7e4 assets/actuallyadditions/blockstates/dropper.json -931bd39cad66a056e04723286b5c0ba3d60041e0 assets/actuallyadditions/blockstates/emeradic_crystal_block.json -c1eca5de5c70d5b51695f4000d9351450dfef876 assets/actuallyadditions/blockstates/emeradic_crystal_cluster.json -1b3f59a3c2353c4de28a12b65c9df4eeab7f66dc assets/actuallyadditions/blockstates/empowered_diamatine_crystal_block.json -7072c3813719637b10f34f5c8fc70629aecaaa65 assets/actuallyadditions/blockstates/empowered_emeradic_crystal_block.json -a937aaa11c6f4975af476e3b3c61b2d598ada01c assets/actuallyadditions/blockstates/empowered_enori_crystal_block.json -0e937cdceb4c4d51f39886fedc9f3a50c8774b25 assets/actuallyadditions/blockstates/empowered_palis_crystal_block.json -fac9e12aa8a752acf65ccba51ffedaa3c3354427 assets/actuallyadditions/blockstates/empowered_restonia_crystal_block.json -b6284a46d822974f2226585c89746091b238ead2 assets/actuallyadditions/blockstates/empowered_void_crystal_block.json -e0dc3c1b041fcfb6508bebb1c15f07fcdf297241 assets/actuallyadditions/blockstates/empowerer.json -8e3e99cd4fd18762ceac1b265543976fc904225c assets/actuallyadditions/blockstates/ender_casing.json -32f6644e58fcab052e406837056f882a7754ac74 assets/actuallyadditions/blockstates/energizer.json -a3c46ac1c997e30f9fb4ecff56dbd573ddf8135d assets/actuallyadditions/blockstates/enervator.json -ac4f3f406105875df9f544407fa90ea309b0fc0e assets/actuallyadditions/blockstates/enori_crystal_block.json -0c2bad99ce171f7d39b08337581622884fb4590c assets/actuallyadditions/blockstates/enori_crystal_cluster.json -35b61ff98befecc8b05f7dee0e637e826b84f7ed assets/actuallyadditions/blockstates/ethetic_green_block.json -846bf3588de509fc8a1a65d1e8a1776160437372 assets/actuallyadditions/blockstates/ethetic_green_slab.json -ac57e23465b05691acc847791a842373d5dafdd9 assets/actuallyadditions/blockstates/ethetic_green_stairs.json -3130a8cd65712b849d65a7c5b8318ae700ff2a38 assets/actuallyadditions/blockstates/ethetic_green_wall.json -8cea4e84d6ef2a891eb674ea233483d6cfd7f489 assets/actuallyadditions/blockstates/ethetic_white_block.json -23a86c5593ed0b99cd817389d7d6ce27dc9fa199 assets/actuallyadditions/blockstates/ethetic_white_slab.json -14b1cd50b24403a138788acdaa712ac68d063ad9 assets/actuallyadditions/blockstates/ethetic_white_stairs.json -86182c30409bd728f24ea88329f7a336a37c5fe2 assets/actuallyadditions/blockstates/ethetic_white_wall.json -43d7b4a1155efbb3c3a12a93386acea7a478be7e assets/actuallyadditions/blockstates/farmer.json -d3d487fb2552edd781c69e01a03a8f527ee850af assets/actuallyadditions/blockstates/feeder.json -04dad3573abb79b915c577134f7f3ce630470b6d assets/actuallyadditions/blockstates/fermenting_barrel.json -f2a85c0cd664f17cef8aa41432ca8bc54088b155 assets/actuallyadditions/blockstates/firework_box.json -94ef784f639fd49b0debd8a1370894fc42c7640b assets/actuallyadditions/blockstates/flax.json -56c3978ead1ef836cbd61aed56e491c032b28a14 assets/actuallyadditions/blockstates/fluid_collector.json -4b8bd1dd56edbffa0478a287d8c07925ce18b0da assets/actuallyadditions/blockstates/fluid_placer.json -03e4a9e1203c4325eed9f1178bf935f1578a0f34 assets/actuallyadditions/blockstates/greenhouse_glass.json -573131431fb2e4ce5d2c2bf1f5aa76a6b9f8b996 assets/actuallyadditions/blockstates/heat_collector.json -9547fc14c9420044e90419645248426c4462fb19 assets/actuallyadditions/blockstates/hopping_item_interface.json -877d2ceed901ad947704e6c4496f75400bb55701 assets/actuallyadditions/blockstates/iron_casing.json -0454474609a1f121e53b9350798c82f28eb3e97c assets/actuallyadditions/blockstates/item_interface.json -78e22fe7ed75763a0b1380f6bbdf6d2ee75349c8 assets/actuallyadditions/blockstates/lamp_black.json -e7303f1950c105585a232e129c08aec4ba4757b4 assets/actuallyadditions/blockstates/lamp_blue.json -91a5344f0a56cf0f627545aeb280c1d3c078805b assets/actuallyadditions/blockstates/lamp_brown.json -1034f9883987c9df684a447b84acca4a4c905b12 assets/actuallyadditions/blockstates/lamp_controller.json -00d376e464b080c481b754f2c63e7c3232976ad0 assets/actuallyadditions/blockstates/lamp_cyan.json -1d48ed205dd8ce6d73bc2b86126a77f915ac92f1 assets/actuallyadditions/blockstates/lamp_gray.json -02bd872e78ea21af959d17854461d61678e76eaf assets/actuallyadditions/blockstates/lamp_green.json -7bfffcd7febce15e3fcf55b78409e89d45742b10 assets/actuallyadditions/blockstates/lamp_light_blue.json -8bad71deeab5390d73f71a0d7964829cd9e7abab assets/actuallyadditions/blockstates/lamp_light_gray.json -bf6421ca2e5f5ec5169017bba55268a8bad568e0 assets/actuallyadditions/blockstates/lamp_lime.json -a1383458a8fe6d8a01da1b0e40289e749caf8fff assets/actuallyadditions/blockstates/lamp_magenta.json -be35e553fca4856c0c5db405944995a4d434732b assets/actuallyadditions/blockstates/lamp_orange.json -f03fc3f6983755f0c8d231554a92acfcef9e90a0 assets/actuallyadditions/blockstates/lamp_pink.json -215800a01c69db104dd997095628f4cf4e4494e2 assets/actuallyadditions/blockstates/lamp_purple.json -04e242e27c9debdcf924adc4e7e85e8879c8d9ba assets/actuallyadditions/blockstates/lamp_red.json -7cfadd0f25de8b5035641238a8e18ffac1ef356c assets/actuallyadditions/blockstates/lamp_white.json -5e526bf21366f7382a19261b71c73f96d62a3a0c assets/actuallyadditions/blockstates/lamp_yellow.json -9a80b2d1281ed112a7e1a3b9639c5dc872ccf8b8 assets/actuallyadditions/blockstates/laser_relay.json -aa09a7e86d9bf3ad1bad45c9f9b9d5f0c13afcc9 assets/actuallyadditions/blockstates/laser_relay_advanced.json -95f8ec3018d85b3c99065a913a73217d5ea3a086 assets/actuallyadditions/blockstates/laser_relay_extreme.json -e18d4ba1f8eedefbdf0c6b86bc77511130ced533 assets/actuallyadditions/blockstates/laser_relay_fluids.json -a5bd1eb03cecd98679f49205efcc9276ec3092da assets/actuallyadditions/blockstates/laser_relay_item.json -fb19f1e3140a2481745c6bb844a75344b3aa642d assets/actuallyadditions/blockstates/laser_relay_item_advanced.json -eae81ba22d5b7761dd5a03d909d857007a40c9e2 assets/actuallyadditions/blockstates/lava_factory_casing.json -9bcb5be7108d01028f654dcc8698b801a1663117 assets/actuallyadditions/blockstates/lava_factory_controller.json -27a1c7620994f8f4b325e9323003e9a8ea9ee931 assets/actuallyadditions/blockstates/leaf_generator.json -524d0f4b3f3da99d6160e762ed0d150dba3b1ddb assets/actuallyadditions/blockstates/long_range_breaker.json -2e6fb6a93071194b948b6b652231fc53da7afbfc assets/actuallyadditions/blockstates/oil_generator.json -5b68d0df00167ca673d86b2bb345691fd60fd561 assets/actuallyadditions/blockstates/palis_crystal_block.json -d9899e68b82cac7d080427d291799d5ccc461b79 assets/actuallyadditions/blockstates/palis_crystal_cluster.json -2ba22d62db1fff55423aae3d5fc0516c37403a34 assets/actuallyadditions/blockstates/phantom_booster.json -d2c3ca80de761bdcc085de38df3d644d441fedbf assets/actuallyadditions/blockstates/phantom_breaker.json -3a8fefcca9ded096e3dd3c778607530d0c74d779 assets/actuallyadditions/blockstates/phantom_energyface.json -12e45c6581b0514f083d4873755d1d0c63d9c5bf assets/actuallyadditions/blockstates/phantom_itemface.json -99db69ad81d96eadd687468a7b3003d8bd989354 assets/actuallyadditions/blockstates/phantom_liquiface.json -702fe3d15cff19bf608471a79a6c6147f67316a2 assets/actuallyadditions/blockstates/phantom_placer.json -de3892995f3291404547487cccfb1a46cb92a591 assets/actuallyadditions/blockstates/phantom_redstoneface.json -7a0986bbbed6384a092d144ab160e5b2ce76d984 assets/actuallyadditions/blockstates/placer.json -5b5d96cc80294bab8326589bbfb26f259e6b4e46 assets/actuallyadditions/blockstates/player_interface.json -50923317f8a38d90fab4a1750652f4598ea8309c assets/actuallyadditions/blockstates/powered_furnace.json -ffd1562cb05c8b16dd91bad96312550e9735d0ea assets/actuallyadditions/blockstates/ranged_collector.json -d89ce6c2187bf08f01097ce02c32aeacfb467bbf assets/actuallyadditions/blockstates/restonia_crystal_block.json -3c9ed33d3ed07283e498550cd6a1a2f08511dee9 assets/actuallyadditions/blockstates/restonia_crystal_cluster.json -125c83bfc1972a92f532eafcac001791935277cb assets/actuallyadditions/blockstates/rice.json -32b6a5617cdd7da766baf9493225b5c7e23b9379 assets/actuallyadditions/blockstates/shock_suppressor.json -33fb8c960fa03e6276404529e2f3ed8b33758bbb assets/actuallyadditions/blockstates/smooth_black_quartz_block.json -5181efc30c831609b06eff4e433518da7d778f7e assets/actuallyadditions/blockstates/smooth_black_quartz_slab.json -2c9ae5d0f4abad246bd917ba75f590cf2450a64e assets/actuallyadditions/blockstates/smooth_black_quartz_stair.json -f3eed009d0b974f21e8b7d451db6781d425d7a77 assets/actuallyadditions/blockstates/smooth_black_quartz_wall.json -31c02c33e5dd66cec77d882380ad6ab9b065a50b assets/actuallyadditions/blockstates/tiny_torch.json -105225ba331191bf67a62584497e16bcbaf19ff6 assets/actuallyadditions/blockstates/vertical_digger.json -685e310c4658c3b04fc7cf87a88e03e529343bf0 assets/actuallyadditions/blockstates/void_crystal_block.json -29f829ee8c128ac0d280a77754529d956ae3fb23 assets/actuallyadditions/blockstates/void_crystal_cluster.json -955f5fa11ac48e71a3052082b293e8b01d428b74 assets/actuallyadditions/blockstates/wood_casing.json -244e220702a65c286381d576de62772c2d509cc5 assets/actuallyadditions/blockstates/xp_solidifier.json -81329915bef4e65eb630fc601897e56b1fc5292c assets/actuallyadditions/models/block/black_quartz_brick_block.json -997ea09e934d491608895093fc7ba8d2022a50f5 assets/actuallyadditions/models/block/black_quartz_brick_slab.json -fa8ed5a44ee7475368eaa6c8afcd2fdcc0342a4f assets/actuallyadditions/models/block/black_quartz_brick_slab_top.json -00fe865b4ff89f2a82cc40bf11c806fd5ef22130 assets/actuallyadditions/models/block/black_quartz_brick_stair.json -580f25f9337bb254a0b8196d1c5dfb606982cf74 assets/actuallyadditions/models/block/black_quartz_brick_stair_inner.json -1184939a1b76e16190f1c4c5014be5b61253830c assets/actuallyadditions/models/block/black_quartz_brick_stair_outer.json -49ac4ea10c1957475125ded8689aae1f03399514 assets/actuallyadditions/models/block/black_quartz_brick_wall_post.json -6ecc97ef2aa8e958f1c21a67e54fc4516087bba7 assets/actuallyadditions/models/block/black_quartz_brick_wall_side.json -f783b35710afcb46e17bf5d5c02025910cc35b3a assets/actuallyadditions/models/block/black_quartz_brick_wall_side_tall.json -471a4ad9bb44c62639353cb26e275463654cb1f6 assets/actuallyadditions/models/block/black_quartz_ore.json -0c025b6788abd7f33eb7a15cac85933dbe119596 assets/actuallyadditions/models/block/black_quartz_pillar_slab.json -b87c74333526c7b52df48a4a09591f6116fe4b03 assets/actuallyadditions/models/block/black_quartz_pillar_slab_top.json -480c94b0c400ccea983bac8d23662fb8cbe84da2 assets/actuallyadditions/models/block/black_quartz_pillar_stair.json -a1c50e555b7742b8215806214ceb6bfc5b728155 assets/actuallyadditions/models/block/black_quartz_pillar_stair_inner.json -d229a8d1ae3e1644d83c85ef1edafb7a0d923e70 assets/actuallyadditions/models/block/black_quartz_pillar_stair_outer.json -5e370e4176e71c8755c84c9b0cd3ae4994501aac assets/actuallyadditions/models/block/black_quartz_pillar_wall_post.json -b89da02bf59fe8c49c1fdbc436219bfc202151f9 assets/actuallyadditions/models/block/black_quartz_pillar_wall_side.json -a4dfc98dbd73ba2759b0cd6f20d7e21eb9d0ee0a assets/actuallyadditions/models/block/black_quartz_pillar_wall_side_tall.json -83d41e95a7d032dc6ce960ebbaa9d808a1d44126 assets/actuallyadditions/models/block/black_quartz_slab.json -02b5f964815edb299171a220b104042fe793a837 assets/actuallyadditions/models/block/black_quartz_slab_top.json -7f3141ee52fe873a17a5d0210a43d4a94fb3465a assets/actuallyadditions/models/block/black_quartz_stair.json -72d00d5d8723ec0d3b953a9ccac5f09e0ffedf4d assets/actuallyadditions/models/block/black_quartz_stair_inner.json -f277709029801d7292d300b13876189a32d1b3a4 assets/actuallyadditions/models/block/black_quartz_stair_outer.json -93b61ddd8e53f61ca25c4768de3a3b95a23297b4 assets/actuallyadditions/models/block/black_quartz_wall_post.json -1c617e7845d3211b4f7cda38a9bee59208de8c23 assets/actuallyadditions/models/block/black_quartz_wall_side.json -46c7aa812a7af600d4f927eba5fa3f5b4956fa28 assets/actuallyadditions/models/block/black_quartz_wall_side_tall.json -ee7cee63dc7889fac05160a97ab0664920269ed7 assets/actuallyadditions/models/block/canola_1.json -981ceb96a82d90cdf636fd5c763c39dae7c923b5 assets/actuallyadditions/models/block/canola_2.json -ca75d2ce24c66949daf7cd966a89a3a6e19d6ac5 assets/actuallyadditions/models/block/canola_3.json -ead34cc4f003d8b748dc723f2bbff74e03f90270 assets/actuallyadditions/models/block/canola_4.json -48a6232ced27b9a35fc236705adb2ea817a03b3f assets/actuallyadditions/models/block/chiseled_black_quartz_slab.json -85a969896c0aad4f70878d4c075c6c0885a5ade4 assets/actuallyadditions/models/block/chiseled_black_quartz_slab_top.json -f0ee4cd74049c6a00f62166335348602f7b8972d assets/actuallyadditions/models/block/chiseled_black_quartz_stair.json -111946795395d1dbfc9c5ed736891cecff7e699d assets/actuallyadditions/models/block/chiseled_black_quartz_stair_inner.json -ff558f957d7dbfd96dd849bb28da1c837dcb96f8 assets/actuallyadditions/models/block/chiseled_black_quartz_stair_outer.json -de346812e4c3b3101fdd0f8e47d411bf716a69c3 assets/actuallyadditions/models/block/chiseled_black_quartz_wall_post.json -e21749906643418a3d104ce1482cdff1b746d009 assets/actuallyadditions/models/block/chiseled_black_quartz_wall_side.json -a9c4dc2850881cc15ab026c279af5caf35458971 assets/actuallyadditions/models/block/chiseled_black_quartz_wall_side_tall.json -abdcdf800449d0bfa632cd392346cd7cb684365a assets/actuallyadditions/models/block/coffee_1.json -b7ff656723c7f313582a4d75ec66bafcebb91d78 assets/actuallyadditions/models/block/coffee_2.json -f3830cb376525e054654595c9707df51d709ad1f assets/actuallyadditions/models/block/coffee_3.json -bbec9b8314657a3835917a1aee1ff495eb410809 assets/actuallyadditions/models/block/coffee_4.json -f24ca8230a335b41da86c330f3336f13fcdf4d4d assets/actuallyadditions/models/block/diamatine_crystal_block.json -bc00149f995b4169127b072a2a123a2c8d747d8e assets/actuallyadditions/models/block/emeradic_crystal_block.json -b2cb85be4c4939aa3e47627ba8e6edff602279a4 assets/actuallyadditions/models/block/empowered_diamatine_crystal_block.json -c0057069962a7fc59ecd0f37160e55ede2f581e4 assets/actuallyadditions/models/block/empowered_emeradic_crystal_block.json -65f9f23ef65a4f8073403d60bb7abed54b9281e5 assets/actuallyadditions/models/block/empowered_enori_crystal_block.json -424ec3122f411090a616e014caa36bcbac4f6cd3 assets/actuallyadditions/models/block/empowered_palis_crystal_block.json -8d49c44b137a3d59a4128acfdffaf78553148a72 assets/actuallyadditions/models/block/empowered_restonia_crystal_block.json -a45f3846f8637a6b66d613d5a185a792e25ac77d assets/actuallyadditions/models/block/empowered_void_crystal_block.json -915095a6b35cf3bc2cf8b501c06e3fb8847cbeae assets/actuallyadditions/models/block/ender_casing.json -17e75d9c9dd4c1e5de89bbd69c8f145b7c05cec0 assets/actuallyadditions/models/block/enori_crystal_block.json -5b274d745475e1f01d9f0565531447e9da86ad6a assets/actuallyadditions/models/block/ethetic_green_block.json -4ad1c0a88d09f1f0dc670ba69b76ba0afea2ae94 assets/actuallyadditions/models/block/ethetic_green_slab.json -3c29a340cb62c56e786d8ec53e02f9a9013b48c6 assets/actuallyadditions/models/block/ethetic_green_slab_top.json -f7bd1a7bd3e54ab93b91a2ea4dd597d6d032d3af assets/actuallyadditions/models/block/ethetic_green_stairs.json -b032d447e7318be73e2bbbf9790a5cec7a493c92 assets/actuallyadditions/models/block/ethetic_green_stairs_inner.json -bb8022c64188b68f86a6b2ff206c9587748f1626 assets/actuallyadditions/models/block/ethetic_green_stairs_outer.json -c2e07fab2f2edc7480b34c34223f9579f810dcea assets/actuallyadditions/models/block/ethetic_green_wall_post.json -e1973714592859182479b2789d30f6276db076ff assets/actuallyadditions/models/block/ethetic_green_wall_side.json -abdea771a10db33f477bf3ff95ff323ae736d485 assets/actuallyadditions/models/block/ethetic_green_wall_side_tall.json -3f5f9a6ad3d87756e54af6a2bc0c8a44038343dc assets/actuallyadditions/models/block/ethetic_white_block.json -6397a5fc0bd16d484bc1e4faaf2f9f1e6db455eb assets/actuallyadditions/models/block/ethetic_white_slab.json -d66675857ded930ff3acde3f221bc5b83e5815ef assets/actuallyadditions/models/block/ethetic_white_slab_top.json -6e5a4afcbb86f14741d38bfc4310fa0ffe029b57 assets/actuallyadditions/models/block/ethetic_white_stairs.json -2dea7573ae915cac1e367f92ec9f55355394098f assets/actuallyadditions/models/block/ethetic_white_stairs_inner.json -35c33a1aa42722c645008f4d555aec476d910951 assets/actuallyadditions/models/block/ethetic_white_stairs_outer.json -f895e4a41bb6aec09b1ee345ee217b302a42657a assets/actuallyadditions/models/block/ethetic_white_wall_post.json -b86818bb91d27799c350e7bbd30d6d53638eec0d assets/actuallyadditions/models/block/ethetic_white_wall_side.json -07e66f431a2729354d3420667532616591cd2c4e assets/actuallyadditions/models/block/ethetic_white_wall_side_tall.json -2b65818b7df42af8ef67e93c296fd251a96a8080 assets/actuallyadditions/models/block/flax_1.json -a7a9e027357c1e8c917a1f64b366582fbbfa51c6 assets/actuallyadditions/models/block/flax_2.json -2298c556731a920124343793fee1375570f5f3aa assets/actuallyadditions/models/block/flax_3.json -cc5e519d94c1ad1dbe9bd751d3fa63a137456796 assets/actuallyadditions/models/block/flax_4.json -b23b86dd6bf3d1e9790ce97bb309765d738bc8fe assets/actuallyadditions/models/block/iron_casing.json -fec26190d66a1a3e309e195cfcbd8e84c5d2683a assets/actuallyadditions/models/block/lamp_black.json -2995f2108fc28eae5b33e290fd459f3cd08cecbd assets/actuallyadditions/models/block/lamp_blue.json -ddd8aa305a7de0de6192ff32c8de440f19e316e2 assets/actuallyadditions/models/block/lamp_brown.json -5522f3e7871f166ae6f5e03f41f16f16406a71bc assets/actuallyadditions/models/block/lamp_cyan.json -61a4d0868bce376de6453b459b949713cba74f43 assets/actuallyadditions/models/block/lamp_gray.json -4672736a5b8c3f175871709cd4ebbc2cb7b36e07 assets/actuallyadditions/models/block/lamp_green.json -c6c4a7a7c6340b4ff111afa252c384452546bd29 assets/actuallyadditions/models/block/lamp_light_blue.json -61418a47c621abc6774551726dab6d6831225b9c assets/actuallyadditions/models/block/lamp_light_gray.json -5862857def7fd10280e779338bf110b5cb7f8ce8 assets/actuallyadditions/models/block/lamp_lime.json -303be3869df06dda7efc6ceb790de0fc8944e5a7 assets/actuallyadditions/models/block/lamp_magenta.json -00efef589de3fc9ba2034f01488ad732cec074d4 assets/actuallyadditions/models/block/lamp_orange.json -edd10c0408589b5f350193471324e7b0fafd2a93 assets/actuallyadditions/models/block/lamp_pink.json -e48e76012740860d213f33ecffc49317f18a42e1 assets/actuallyadditions/models/block/lamp_purple.json -32693eb441f9bc1fcb5c5c285502eaccc8b00e3a assets/actuallyadditions/models/block/lamp_red.json -0fa207b710d9ebcff7a0fa565ecea4cead6f745c assets/actuallyadditions/models/block/lamp_white.json -0dd86fd376a934beb8a6499dd7d2181111259980 assets/actuallyadditions/models/block/lamp_yellow.json -fa0040bf5801821cde761a2b959235756aa004e9 assets/actuallyadditions/models/block/palis_crystal_block.json -0d22ae782351d009d7329ba954e54921a207a64b assets/actuallyadditions/models/block/restonia_crystal_block.json -b9981efc09c9f00495789bf694866f308c15000d assets/actuallyadditions/models/block/rice_1.json -d3dad8796034227322b9d6987a60f78176b7ebc3 assets/actuallyadditions/models/block/rice_2.json -9e08eef9355a82eef3bcf5cdc73b5f5848ff51db assets/actuallyadditions/models/block/rice_3.json -eedefbbac82c688feba7637721e31d7741eaa9d3 assets/actuallyadditions/models/block/rice_4.json -e664e958458c70f8235a5369c0534d0860b94e12 assets/actuallyadditions/models/block/smooth_black_quartz_block.json -82e69d1c8d5124e946d3e7db204cf3cd4696e52e assets/actuallyadditions/models/block/smooth_black_quartz_slab.json -d28a3773b87ec0ca47945be824c9845155dfad36 assets/actuallyadditions/models/block/smooth_black_quartz_slab_top.json -b9c799b04f8eabe14f89f8574deb24c573c2384f assets/actuallyadditions/models/block/smooth_black_quartz_stair.json -b86c520299c25758ca9d1be94b38ad02c72a5344 assets/actuallyadditions/models/block/smooth_black_quartz_stair_inner.json -c6e95a88b55f955ef55942b19ab04421bf21d3c3 assets/actuallyadditions/models/block/smooth_black_quartz_stair_outer.json -6f3932add3be23b8d6b9fb7a748df0c7225aa71c assets/actuallyadditions/models/block/smooth_black_quartz_wall_post.json -ec9fa5a527a295dff5372ebd0df98372874c77fe assets/actuallyadditions/models/block/smooth_black_quartz_wall_side.json -5781b830bc868540f74c86eb65b792afaa06495e assets/actuallyadditions/models/block/smooth_black_quartz_wall_side_tall.json -292e546009c16dc7d5e38b4faa8ce84baaaa2242 assets/actuallyadditions/models/block/void_crystal_block.json -83da16f21abc2ec8361ecc3b1bda2852d48dbd97 assets/actuallyadditions/models/block/wood_casing.json -0753c814deb4cc275d0fce0b87ec12ba1b12c0eb assets/actuallyadditions/models/item/advanced_coil.json -637043b066b31f811a9ed94de66d965333f35dd3 assets/actuallyadditions/models/item/advanced_leaf_blower.json -c2e3b2291b34f85eab9907c9266c6198d8478001 assets/actuallyadditions/models/item/atomic_reconstructor.json -8c837329c79dd9f611a860f32b0184674ad8fb3c assets/actuallyadditions/models/item/basic_coil.json -bbd32f2ac5a2a55332aa9b73fd06aa1462fdd29a assets/actuallyadditions/models/item/bats_wing.json -50f7c08aa8725f8c33c54290d58b65cb293f9529 assets/actuallyadditions/models/item/battery_box.json -44c0a208ef528d296e7532a834d6563d7cd90922 assets/actuallyadditions/models/item/bio_reactor.json -08f5dfde00eed3a0686cfd09efae9b08c3d1a28a assets/actuallyadditions/models/item/black_quartz.json -37d49b21bf16128d58a5d63d742508891a114ece assets/actuallyadditions/models/item/black_quartz_block.json -2c92f3fcba4b43cd015e324afede794b6f4935a0 assets/actuallyadditions/models/item/black_quartz_brick_block.json -14391f4c4d029a354d40a7aa26af4f279dba6684 assets/actuallyadditions/models/item/black_quartz_brick_slab.json -c3cf76ca67515c059d3eaf6b70369151a4f29831 assets/actuallyadditions/models/item/black_quartz_brick_stair.json -fb3f2411b48e77c8230b9c9316ac7d214e505032 assets/actuallyadditions/models/item/black_quartz_brick_wall.json -cd408ce9d0cc7ab33fe7327af3ebcc177fef6690 assets/actuallyadditions/models/item/black_quartz_ore.json -50075e8e8b428b161113d45d583f6eae5e8360f3 assets/actuallyadditions/models/item/black_quartz_pillar_block.json -5614453539110f6214c52d47c12aa1ce05447d53 assets/actuallyadditions/models/item/black_quartz_pillar_slab.json -3bd2d755493ff85b07dff3cb31d0cc040e6150c5 assets/actuallyadditions/models/item/black_quartz_pillar_stair.json -9d655753b4257e272902c27c2bb92706b0663a2c assets/actuallyadditions/models/item/black_quartz_pillar_wall.json -dfb8604b25fc7a671c371a81e3384410c69cc7b1 assets/actuallyadditions/models/item/black_quartz_slab.json -ea2f5b2bf99670f4df05889ab67c73686a26a58b assets/actuallyadditions/models/item/black_quartz_stair.json -be227e074a54982e1e9f9f304e63df3095006955 assets/actuallyadditions/models/item/black_quartz_wall.json -3679056a9aee03821a997a2616b8808af7bfe4b7 assets/actuallyadditions/models/item/breaker.json -e1b2c741f6da5cfb51392b1a722c4d664ae2400e assets/actuallyadditions/models/item/canola.json -e4b8fbed9602c0cf96eff84111586799412982fc assets/actuallyadditions/models/item/canola_oil_bucket.json -08c70d561c219bb4c6d21b5f56192df81f054e0a assets/actuallyadditions/models/item/canola_press.json -0507025fadef30e363cbc825265576c782880f7b assets/actuallyadditions/models/item/canola_seeds.json -36179c5cc77dc38364a1931f2fabbf846ef9c39d assets/actuallyadditions/models/item/chiseled_black_quartz_block.json -27c8ed9e39b600161a6a327db0ac53e10acc13bb assets/actuallyadditions/models/item/chiseled_black_quartz_slab.json -0b574626d1648584c3afa6ee0ccc974fb68bb425 assets/actuallyadditions/models/item/chiseled_black_quartz_stair.json -6147bc1e58f6080c8e7c47452a98fcd9ef7b187d assets/actuallyadditions/models/item/chiseled_black_quartz_wall.json -bbf723238f6536295339f0b0b5b052cf89b92d5b assets/actuallyadditions/models/item/coal_generator.json -1d676d4abc4c67c3da2d15499ecb585f436f3893 assets/actuallyadditions/models/item/coffee_beans.json -28fc61074cb1a60ef5904e4bba7f6ad3c42b55fd assets/actuallyadditions/models/item/coffee_cup.json -082ecd5232059fadaa447a99a623437e3adab3ef assets/actuallyadditions/models/item/coffee_machine.json -7698ec0e672b1209e6a664dfee5c3bbaa1a612c7 assets/actuallyadditions/models/item/crafter_on_a_stick.json -1e7e61701473dbf3dfc18bb5b9fa7be91b443dd8 assets/actuallyadditions/models/item/crusher.json -aeacd7ca465c19d6cbcef25e61023397c4472ab3 assets/actuallyadditions/models/item/crusher_double.json -3a9cfcb0a3bec43f6556b3bdab09731758a36cc2 assets/actuallyadditions/models/item/crystallized_canola_seed.json -326668d58f3ba7ba650f0ebb604c6994356972a8 assets/actuallyadditions/models/item/crystallized_oil_bucket.json -71adfaafb36d576dd765201c529acfc0658066ce assets/actuallyadditions/models/item/diamatine_crystal.json -491736b20e628a539c9bb2472d499c03cdbc3760 assets/actuallyadditions/models/item/diamatine_crystal_block.json -297827c231b1ef558dc89085993b270014730c51 assets/actuallyadditions/models/item/diamatine_crystal_cluster.json -000679e52c9ef83a874d53c2df83d4f79db4b2f0 assets/actuallyadditions/models/item/diamatine_crystal_shard.json -6f5307c394a079b45f70e8f08cc3e370aeca5f52 assets/actuallyadditions/models/item/diamond_aiot.json -57d05111bf8aa9c36234a4dbaecaa9fe86126331 assets/actuallyadditions/models/item/display_stand.json -830e1315602d6dd7ccc4b38860895ce4790c145c assets/actuallyadditions/models/item/double_battery.json -e854b0c11915e363f5c7e9052ac3afa2bca0a47a assets/actuallyadditions/models/item/dough.json -aabeafebcb8f5d9290b5414da4b41abbf245b107 assets/actuallyadditions/models/item/drill_black.json -75b95f08897a7898f6f3c957a10c902f7a4c29a6 assets/actuallyadditions/models/item/drill_blue.json -d240c122f6901e3137d53e3835582484008636c4 assets/actuallyadditions/models/item/drill_brown.json -a4bce6204f1a53bd4ddf84480ce057d795d4cff7 assets/actuallyadditions/models/item/drill_core.json -948653afaa8303d64f63708d8ef3f1679543c92e assets/actuallyadditions/models/item/drill_cyan.json -cacee622ba8c4c345c4059876b452d1b39fd3a86 assets/actuallyadditions/models/item/drill_gray.json -ccf64bc6b6b3b41227318c09b18bec9496e3c73c assets/actuallyadditions/models/item/drill_green.json -f3fc6ee086e900a86d3940c5881a47de1b5d3e81 assets/actuallyadditions/models/item/drill_light_blue.json -bf970616f648d8e05048f297f56fad96626875af assets/actuallyadditions/models/item/drill_light_gray.json -d5c4a2c158dbce46d30c8bd2386a012f1a27b818 assets/actuallyadditions/models/item/drill_lime.json -b2cedb019edc65d3901e83712da6e0b0dc4d2687 assets/actuallyadditions/models/item/drill_magenta.json -fae0c03a118f76c0368a13837d55783de35cbf49 assets/actuallyadditions/models/item/drill_orange.json -ed9b155498b1efbced4c8e1c26a69b5b9f5abe30 assets/actuallyadditions/models/item/drill_pink.json -a7a88b0e5100fc411f43cc969af5135609c032c8 assets/actuallyadditions/models/item/drill_purple.json -9e306bc4b229af324d45382a469caf06e4c2c8e4 assets/actuallyadditions/models/item/drill_red.json -b8ccba28aa43349108bb82a6296635a9086ae45e assets/actuallyadditions/models/item/drill_upgrade_block_placing.json -081a9d5455b81baeab2fe59589608703db87305e assets/actuallyadditions/models/item/drill_upgrade_five_by_five.json -11d733dc8f253f229d81d4dbc154ac1d6b644b7d assets/actuallyadditions/models/item/drill_upgrade_fortune.json -87d026217fa2fe9ce2279fcf1b2798696254eaca assets/actuallyadditions/models/item/drill_upgrade_fortune_ii.json -981f2bb8c8a5e9d2f0e7f36f479e7cb92289ad14 assets/actuallyadditions/models/item/drill_upgrade_silk_touch.json -de8f613e18a36c391fc5ff0353573f8df0c9cba7 assets/actuallyadditions/models/item/drill_upgrade_speed.json -590b23b77c7296c7cd41e0d4d7c5f973192f40f8 assets/actuallyadditions/models/item/drill_upgrade_speed_ii.json -baa03369b781f4ca7bd9fac5ba1b7d1075566832 assets/actuallyadditions/models/item/drill_upgrade_speed_iii.json -a89b2e2adef696116e8fa9cfd3a76686a45bcfff assets/actuallyadditions/models/item/drill_upgrade_three_by_three.json -92b01e19a49bb23c379c29955a0438e1eb8dd8c1 assets/actuallyadditions/models/item/drill_white.json -7824efe710d936cef44998e197b49a8433c1c1f9 assets/actuallyadditions/models/item/drill_yellow.json -ef9ec5b31db12805460edb62f611c67973ac18ba assets/actuallyadditions/models/item/dropper.json -98dbddad6525f949e17613d12047d18537f841fa assets/actuallyadditions/models/item/emeradic_crystal.json -083818321ae732cb35a63b5cc78c99df16d649f4 assets/actuallyadditions/models/item/emeradic_crystal_block.json -282f140a42261eaabd2096e3562d7919faf331a0 assets/actuallyadditions/models/item/emeradic_crystal_cluster.json -23c126fbe081d6eba753aa26dfe70b6753562453 assets/actuallyadditions/models/item/emeradic_crystal_shard.json -687455af97a8ed03a26c457c86e3c5ef89052b06 assets/actuallyadditions/models/item/empowered_canola_seed.json -76c232f0aca82d81b1cbe48a1710ba68a9e274ef assets/actuallyadditions/models/item/empowered_diamatine_crystal.json -d7948c3ad4bf22f0efa6e669de7a559c27b52aae assets/actuallyadditions/models/item/empowered_diamatine_crystal_block.json -1d291b8168aec5663da7fab21ba2895b6c31dad8 assets/actuallyadditions/models/item/empowered_emeradic_crystal.json -cfabdb67ce0ccaaea437cfbbac68f0e0c8e7d890 assets/actuallyadditions/models/item/empowered_emeradic_crystal_block.json -3a339996daf88347e2abf829eb9f7d0e1915ed32 assets/actuallyadditions/models/item/empowered_enori_crystal.json -42bfc556aa4e9f0861855b4eee58397b75bd85f8 assets/actuallyadditions/models/item/empowered_enori_crystal_block.json -31ecbb82c3d2fb06d1da4dcbd229a689e0b6f251 assets/actuallyadditions/models/item/empowered_oil_bucket.json -0670cc4d0a2ab1561ea68603a078cf50f5cf2431 assets/actuallyadditions/models/item/empowered_palis_crystal.json -d019c764e87de9f1856dc8d12b880d874e215fac assets/actuallyadditions/models/item/empowered_palis_crystal_block.json -7155b098b6f6bf5fe03f6546dd00217d8fa02721 assets/actuallyadditions/models/item/empowered_restonia_crystal.json -f7c65e8d77b723f4fd5b7349c7f8ec23f2e6440b assets/actuallyadditions/models/item/empowered_restonia_crystal_block.json -9b80be9493b12d8a5c05469055204128df718901 assets/actuallyadditions/models/item/empowered_void_crystal.json -c70272562c084ce2a04933ca04e270f9b3493cf4 assets/actuallyadditions/models/item/empowered_void_crystal_block.json -88457aa73c273fb512b5c4103a1183e93dcec412 assets/actuallyadditions/models/item/empowerer.json -8c5fb751f1795df8cec1100368b153ab02d003d4 assets/actuallyadditions/models/item/empty_cup.json -0d0fd6b7df3a378a58cd35168fb0e1c3d54c6b03 assets/actuallyadditions/models/item/ender_casing.json -ae5bd154f7863b88fab008caca78867dd4d29aa5 assets/actuallyadditions/models/item/ender_star.json -9d011453796b6a4aa0ac86679fe27fad6b0e3337 assets/actuallyadditions/models/item/energizer.json -df3d37e900946dc1198f04c837de897089528847 assets/actuallyadditions/models/item/enervator.json -accc66e54be6fcc7b86a7ce166ed15a5dd24e2fe assets/actuallyadditions/models/item/engineers_goggles.json -16e04b03519bf74512b27670eba0be85159be60d assets/actuallyadditions/models/item/engineers_goggles_advanced.json -ce947ce66c2f81aa41e5659b6341d44c07705525 assets/actuallyadditions/models/item/enori_crystal.json -8111195e2a23422d407f962d588e9cda39f3a0ce assets/actuallyadditions/models/item/enori_crystal_block.json -c3af20ba50f5e6db6a5f13bc94c5b85646e938fa assets/actuallyadditions/models/item/enori_crystal_cluster.json -56a05bd6769e0d392a2532da911254e5cf0d05c5 assets/actuallyadditions/models/item/enori_crystal_shard.json -547a18a0434aa8526dce6ab2727bc05674480611 assets/actuallyadditions/models/item/ethetic_green_block.json -29c5b35219bfb4bb1276297b0c92d235a39c9d2b assets/actuallyadditions/models/item/ethetic_green_slab.json -661f1b449d78ea517012204f1c2a47bd0f892fca assets/actuallyadditions/models/item/ethetic_green_stairs.json -56919d344146f4336492c723c9a9c89943d5197f assets/actuallyadditions/models/item/ethetic_green_wall.json -95e377e9e9d0b78ef9e122f9f9d3aa80334014b0 assets/actuallyadditions/models/item/ethetic_white_block.json -506ffae6797b6088f902adbc787e2b4c80468b3c assets/actuallyadditions/models/item/ethetic_white_slab.json -894f042b3426007d2c87e4ccc9002dc2bac48801 assets/actuallyadditions/models/item/ethetic_white_stairs.json -a8a6a7b651721f6218ae46ec272961b2c0941bfa assets/actuallyadditions/models/item/ethetic_white_wall.json -8bcb533ef0b7c42b3218e2cf52c752fef283c267 assets/actuallyadditions/models/item/farmer.json -d4338f09f71dd9bc75babcb7cebba80ab57eee01 assets/actuallyadditions/models/item/feeder.json -bb4fc4a881ec4b949fb657b112826731988cdaf8 assets/actuallyadditions/models/item/fermenting_barrel.json -66dfca0e0ef8e04d76acddab3efbd294d3588d38 assets/actuallyadditions/models/item/filter.json -bc83a5a96df045a0c005637ec1cb8f0e66de69a5 assets/actuallyadditions/models/item/firework_box.json -a09cf83500fa2357cd5be2cb896014dfb4310ac9 assets/actuallyadditions/models/item/flax_seeds.json -1e296d34f5c206b7a741df29a7e1f3718f583267 assets/actuallyadditions/models/item/fluid_collector.json -9197cf2c197f5116a5fc98fd58b5766677ef76e8 assets/actuallyadditions/models/item/fluid_placer.json -668a71327161393ba5b3bbe236e8158ebec5585d assets/actuallyadditions/models/item/gold_aiot.json -cb44cc7dc93b234b6173bdf4d5152eb639c945b0 assets/actuallyadditions/models/item/greenhouse_glass.json -0d5a4fcc37d925f2adc52d7d3ddda708871dc4b8 assets/actuallyadditions/models/item/handheld_filler.json -340d0e0eca2fe4be4577a40ba9f530186828cd4b assets/actuallyadditions/models/item/heat_collector.json -aac45de00a0838a7a955e2bc56e125ef29c19a47 assets/actuallyadditions/models/item/hopping_item_interface.json -5513baa5bd2d53702880a1ab6bb23d7159ebbd89 assets/actuallyadditions/models/item/iron_aiot.json -a4bc0e00bec22d8a0da612b6dfe4dba7688a2758 assets/actuallyadditions/models/item/iron_casing.json -971f45a5a05b2c399e8075597b0826965f6b6f0b assets/actuallyadditions/models/item/item_interface.json -1e3d4970b8a5ed46ed72deedc5c38d8347658d2f assets/actuallyadditions/models/item/lamp_black.json -8b730988dfb2cb6caa448647d245f9a4160c4247 assets/actuallyadditions/models/item/lamp_blue.json -42df4aeb9a27d43da2c3a47cafd4f3fac1f3c0fa assets/actuallyadditions/models/item/lamp_brown.json -a2e5d07b26b794b759e6a0cac9b1c8c9b7d5edae assets/actuallyadditions/models/item/lamp_controller.json -a7ab5171e74fdeafa04ed27b300248bb9c2c35e5 assets/actuallyadditions/models/item/lamp_cyan.json -c9e9aec4973eeeb08f7ed65a808f96ab48aed81c assets/actuallyadditions/models/item/lamp_gray.json -8819c0d6b76c7fdb1c6bf167e009b7b544a834ae assets/actuallyadditions/models/item/lamp_green.json -22460d93e1496b99576e46b24141ffae3afaeddb assets/actuallyadditions/models/item/lamp_light_blue.json -f8e9e058860f6b1f99d0859e70cf0e8a04fa9463 assets/actuallyadditions/models/item/lamp_light_gray.json -67fb621bd2e40e3fe9a7678b2ce02783037ac3b0 assets/actuallyadditions/models/item/lamp_lime.json -c88ca523161a3447a1c9a4feb38fe0b24a5b94e1 assets/actuallyadditions/models/item/lamp_magenta.json -c8f8905f57f473ec0ad34e87ad14e78638564710 assets/actuallyadditions/models/item/lamp_orange.json -20818b50f1749e51548754059ec13fe8579691b4 assets/actuallyadditions/models/item/lamp_pink.json -a346185f550e8a0bc36382d3a8c11737747f65c1 assets/actuallyadditions/models/item/lamp_purple.json -0da789e3cbe0cf917c931e93d8269fd1c0848c2a assets/actuallyadditions/models/item/lamp_red.json -13645100bd0fa18851918dd20bbf3b015b2155d0 assets/actuallyadditions/models/item/lamp_white.json -21c68ce4e823db63ec79c32fe0f0e2b50910907c assets/actuallyadditions/models/item/lamp_yellow.json -4d228100e72f5cf16c03eb50ebace24230e2021c assets/actuallyadditions/models/item/laser_relay.json -fe3c77543d11ac86cf7f25f46140ec1a86421145 assets/actuallyadditions/models/item/laser_relay_advanced.json -1ebb9b5e9fe9f82ec4deafc4829ae1dba66cdbfb assets/actuallyadditions/models/item/laser_relay_extreme.json -96b5e768b5d813ba6d278322301b64002ec8c296 assets/actuallyadditions/models/item/laser_relay_fluids.json -32268082e079a09d791ef953bae0288119a94bb8 assets/actuallyadditions/models/item/laser_relay_item.json -e9236fdb3ac03dceaa8697b26a6762ed983265da assets/actuallyadditions/models/item/laser_relay_item_advanced.json -60fdbe643d98fae2576671d36d4e43d42fcfc566 assets/actuallyadditions/models/item/laser_upgrade_invisibility.json -9f2437da8116f1631aa2040b9a4e50fc00e47484 assets/actuallyadditions/models/item/laser_upgrade_range.json -8836b8954db2778b1a9ac3baca9baed4b41e9f47 assets/actuallyadditions/models/item/laser_wrench.json -f3866a691bfbeccf2f0ce2c77e07eae3b5e4d8c5 assets/actuallyadditions/models/item/lava_factory_casing.json -2220fec34569b35a5c3ff06bde4edbb87b673b96 assets/actuallyadditions/models/item/lava_factory_controller.json -b4cd7ab571dc72bb2588984258d23fb9c9fd82e7 assets/actuallyadditions/models/item/leaf_blower.json -c7fdd35353e69e5df8437757520e96083682470a assets/actuallyadditions/models/item/leaf_generator.json -6db963902c4d6aa4f652a70390d5b1fb7da5b320 assets/actuallyadditions/models/item/lens.json -d3ef5005e52ec0b9ea04d579e7826c9debc5d733 assets/actuallyadditions/models/item/lens_of_certain_death.json -fad02970d504f675d2f20a70839108d04130e2b9 assets/actuallyadditions/models/item/lens_of_color.json -957870ab7fe4a286b5ae98554a2cae445d9efd99 assets/actuallyadditions/models/item/lens_of_detonation.json -1397562e04099c8b44fec910962aaea4a967e6bd assets/actuallyadditions/models/item/lens_of_disenchanting.json -a1da5a212c8f8454a1e632e083986fc86cbe8de7 assets/actuallyadditions/models/item/lens_of_the_killer.json -3247178d5c1350c2a93e544687c12a88cf28a363 assets/actuallyadditions/models/item/lens_of_the_miner.json -55ce74cb71c0db54712382cd61f2c27214201c94 assets/actuallyadditions/models/item/long_range_breaker.json -abf136ca89e5d896fd9ae6f89d0113d5793b3b1c assets/actuallyadditions/models/item/netherite_aiot.json -cec09548b75f7f3e2079e75e1aaf5253e2f318ba assets/actuallyadditions/models/item/oil_generator.json -2efd31a4444f9ee02724c541f3935b3dca0060d1 assets/actuallyadditions/models/item/palis_crystal.json -cd1128cdfd0de67aed5e2f18fbc04252300758d1 assets/actuallyadditions/models/item/palis_crystal_block.json -d504e45345c3edde0c3ce18df5c49bbf8638c91d assets/actuallyadditions/models/item/palis_crystal_cluster.json -7532d0658f9d7d266ebaa9b4e19ab1f8fa40b3df assets/actuallyadditions/models/item/palis_crystal_shard.json -03fa340861a47433fcf4d70e617e7cf359c98d19 assets/actuallyadditions/models/item/paper_cone.json -a0e9339d3e9cdd9dcb28e5053f4017c6f13ee22d assets/actuallyadditions/models/item/phantom_booster.json -b5470f03099362062e21d0d9dcb045da8d7b29d4 assets/actuallyadditions/models/item/phantom_breaker.json -ce0155d7e30e1170cc4e0cbd2cef6d9287073765 assets/actuallyadditions/models/item/phantom_connector.json -545dbd33d3afa630cf5f5a8aefaa43bf16372529 assets/actuallyadditions/models/item/phantom_energyface.json -8f1697d57a2cdd6144d7bc5f10ac9636ab325d61 assets/actuallyadditions/models/item/phantom_itemface.json -77f8324fd0fc9192a894cbb129b41968571869fb assets/actuallyadditions/models/item/phantom_liquiface.json -d9739be2a8b1709805d1076ff524933b054482d4 assets/actuallyadditions/models/item/phantom_placer.json -ead41eb85786ee32e480cd9e63b5f261150782ec assets/actuallyadditions/models/item/phantom_redstoneface.json -9851fbdbd1e175f5ddbc85b07d3a9f6a2540ea51 assets/actuallyadditions/models/item/placer.json -983248f2dae457870e042a9a220434a1572fe78f assets/actuallyadditions/models/item/player_interface.json -9321683e08cd6615f2f0950625607eb81e9d0c26 assets/actuallyadditions/models/item/player_probe.json -070e1d9e4bfb52dffc7d2bbf02f504374d97c502 assets/actuallyadditions/models/item/powered_furnace.json -5bd39a6929e7aae1ea79ae43886375a87c99ede8 assets/actuallyadditions/models/item/quadruple_battery.json -7f7a44a1afcbfbe63bc55be016a81dc265515b24 assets/actuallyadditions/models/item/quintuple_battery.json -d8cf56e92afa1ea98eead8af208cc6281c815ede assets/actuallyadditions/models/item/ranged_collector.json -fb9960a7f3f2488166e8e82ea664fdf08e3a9456 assets/actuallyadditions/models/item/refined_canola_oil_bucket.json -44330b1183805e9e9961cedf7f5693e833c45509 assets/actuallyadditions/models/item/restonia_crystal.json -e1ac2543ec64ac16a79eb40ece195c260911d9bb assets/actuallyadditions/models/item/restonia_crystal_block.json -b7162b0c606ec8d39ebf2012fc0316a390f23c6d assets/actuallyadditions/models/item/restonia_crystal_cluster.json -abb3269b59d79295ac25bc1d89eb223ea0ee454a assets/actuallyadditions/models/item/restonia_crystal_shard.json -5c1a40846a469f0729efeb2f88bc907367070579 assets/actuallyadditions/models/item/rice.json -01fab8eae5a0823bbafd4834dce65a8a427de320 assets/actuallyadditions/models/item/rice_dough.json -dcfcded1a57642706d6fc9bc7bdcf5338b18d183 assets/actuallyadditions/models/item/rice_seeds.json -18087d4ee31e7ced9db334fe0036acd890f2f974 assets/actuallyadditions/models/item/rice_slimeball.json -f8563b3660b69decda6e510e589c55ae568e941e assets/actuallyadditions/models/item/ring.json -c48d9fe3a0051a30496348f7dc22dc142be3a063 assets/actuallyadditions/models/item/ring_of_growth.json -6d2c70e9d473147c72b70fbea292f90dd50ab5c2 assets/actuallyadditions/models/item/ring_of_magnetizing.json -8334f0d8c5364b930a8d674cfe86f8b4461b03f3 assets/actuallyadditions/models/item/shock_suppressor.json -ef7f9a92f8b47c3de7f732172f7bb0d996b38718 assets/actuallyadditions/models/item/single_battery.json -9f4437d75b9112335d96ca928da9d4e73a573f50 assets/actuallyadditions/models/item/smooth_black_quartz_block.json -8c66fd0c6618256da1e66524ebb1261f3ec34faa assets/actuallyadditions/models/item/smooth_black_quartz_slab.json -db82f63202197fa244540886e29d283df392afee assets/actuallyadditions/models/item/smooth_black_quartz_stair.json -5c2c9f1f8d8d7a58b3aa3f66f11a85e2f649a602 assets/actuallyadditions/models/item/smooth_black_quartz_wall.json -9e857ec4a49be55e365e2390078af1d45144899c assets/actuallyadditions/models/item/snail.json -90f07fa285908351a3a486bcab320352b4697500 assets/actuallyadditions/models/item/solidified_experience.json -1ba6c5a40ec762bae26cbca11afea7a76a24f85c assets/actuallyadditions/models/item/stone_aiot.json -1905e7a72f7b8dfebbe177105540c57d9b365385 assets/actuallyadditions/models/item/teleport_staff.json -35d62238b8fadb4bff4c99162b85710a6809e924 assets/actuallyadditions/models/item/tiny_charcoal.json -dabc22d7872bd1ee124e387b8d5c7fc36d1856fc assets/actuallyadditions/models/item/tiny_coal.json -ab1238b9d05cf387edf8f82d984eff7e8f050390 assets/actuallyadditions/models/item/tiny_torch.json -f6c37b58efbc2db0451fc7f373979635be37358a assets/actuallyadditions/models/item/travelers_sack.json -181f54a35065333fef383f61d837b83d57dfbf5f assets/actuallyadditions/models/item/triple_battery.json -15e8675d650eb7639154dc7730207c33c8c05f29 assets/actuallyadditions/models/item/vertical_digger.json -a42cb031c408a93ddbf94a5b7f1b496b3cc18086 assets/actuallyadditions/models/item/void_crystal.json -5ecd8ffdb80cd831e4997489e1126cf62dcfe554 assets/actuallyadditions/models/item/void_crystal_block.json -637116b594ddef84e14b6fb0e8bcc1a562bb2bdf assets/actuallyadditions/models/item/void_crystal_cluster.json -2f41506237d3707d2f87b6b37df2e03467091d8b assets/actuallyadditions/models/item/void_crystal_shard.json -1c0eb44eca6ed5e0b36dcd783f81b4e3557ff5b4 assets/actuallyadditions/models/item/void_sack.json -1e696d711eb5de97f86aa70c53e915369deb38fb assets/actuallyadditions/models/item/water_bowl.json -4309a1169749dc7b9e79ba5a37c4f4f7a8206dea assets/actuallyadditions/models/item/wings_of_the_bats.json -f68d37fcdaf57ec06518d5974cbf540e6c45d271 assets/actuallyadditions/models/item/wood_casing.json -f657eabc7321de0b05cf92d9ebdd6f5215a685b5 assets/actuallyadditions/models/item/wooden_aiot.json -09674f706bebd8f2631450f1c07f1376b2c3ba01 assets/actuallyadditions/models/item/worm.json -0b1ab8963077c90a5104b516eab36e56c8a07057 assets/actuallyadditions/models/item/xp_solidifier.json -ecf1cc8efe1f425334e8e07a6c747641c714c92c assets/actuallyadditions/sounds.json -78a1e3bec8bf9830c1ca098af7e2a9213426f75b data/actuallyadditions/advancements/craft_coal_generator.json -2c8657e98263866b87520fe3de4aaa900cee1758 data/actuallyadditions/advancements/craft_coffee_machine.json -8746592eda56b4027e896c20fe1a6d0dbcb24bc9 data/actuallyadditions/advancements/craft_crusher.json -0c699699a50df43acac86490b3d238c04984c6bb data/actuallyadditions/advancements/craft_double_crusher.json -367027f64ba66fd1757c3391c3cd27336ff954c5 data/actuallyadditions/advancements/craft_empowerer.json -0f1e0ac963635b25299c99ebcbe66823985f0f1b data/actuallyadditions/advancements/craft_energyface.json -c5ed52b759d2a4d61b12d07b57c859c9c0ce8e3a data/actuallyadditions/advancements/craft_item_interface.json -8fcb90f479e353a6b251c62cb323a151a12182c0 data/actuallyadditions/advancements/craft_laser_relay.json -8010e063762d9ad376ef6efd02bc9c6bd30004b9 data/actuallyadditions/advancements/craft_laser_relay_advanced.json -1f9f9b227ebea65d04b3c448bb06c875cfcc746a data/actuallyadditions/advancements/craft_laser_relay_extreme.json -5fef10815f29597800e9015e95af190ca8501bf7 data/actuallyadditions/advancements/craft_laser_relay_item.json -c72fcdc4c2b6dc7f757b41b61f6e5063c7dcf49a data/actuallyadditions/advancements/craft_leaf_generator.json -d8a218723094bc01575a7e0b197f1676347bce57 data/actuallyadditions/advancements/craft_liquiface.json -9d1f0abf32f1200920ba83933511f01cfc7ac203 data/actuallyadditions/advancements/craft_phantom_face.json -d476883cb50537b8058c08df2d8b2ee42cd66c7a data/actuallyadditions/advancements/craft_reconstructor.json -d09f28dfb125fc0d58f4e23287d19877db73c0b7 data/actuallyadditions/advancements/make_first_crystal.json -4d77ce02dec4e2092a6e9e739e85dc0768928a4a data/actuallyadditions/advancements/pickup_coffee.json -1326c214451f5fef68e330a37bfa0433de723f4c data/actuallyadditions/advancements/root.json -7c476ba0444784e06a50633e488f20deac84b989 data/actuallyadditions/loot_tables/blocks/atomic_reconstructor.json -bb5d55da383e21ce9cd6c05703ae9b16ff59b085 data/actuallyadditions/loot_tables/blocks/battery_box.json -3c4661088ed15818d8c4b4c63f74175a8b7f5b91 data/actuallyadditions/loot_tables/blocks/bio_reactor.json -67c5066a4cc1de2775574bb70707b179489511a7 data/actuallyadditions/loot_tables/blocks/black_quartz_block.json -74a0519c8b958bbcf26ede292849a8e5435f381f data/actuallyadditions/loot_tables/blocks/black_quartz_brick_block.json -d91bbca6576c922b016299fa88c7a89c9c1fbdc0 data/actuallyadditions/loot_tables/blocks/black_quartz_brick_slab.json -0d91d745894803c2a0ee7fae8242fff85b63bfbb data/actuallyadditions/loot_tables/blocks/black_quartz_brick_stair.json -6e60f0b3ba9672668a9bb017f39ded02774d64f0 data/actuallyadditions/loot_tables/blocks/black_quartz_brick_wall.json -51eb09f165b4e7f9221823ff1a7b1398042dd5fc data/actuallyadditions/loot_tables/blocks/black_quartz_ore.json -ad79549ec1bb16cb81b1c17efd3cc24d901c0d66 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_block.json -e3e0187a5a3c56469f4719450673fa6f8ed013e5 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_slab.json -ccb53f7ab56df2dc28c290dd996e3c317346d146 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_stair.json -8e2fe41c346ca3cba6d98bdd41a00feafaf2fad7 data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_wall.json -e6e88f9aa1a0ee0171b96ab327e4faf58ab93fbb data/actuallyadditions/loot_tables/blocks/black_quartz_slab.json -41bbe28a14e07beccfa18914bf2e95410265ebf5 data/actuallyadditions/loot_tables/blocks/black_quartz_stair.json -d4b51e2228f12cfd5aa51d4e72b83307656f8607 data/actuallyadditions/loot_tables/blocks/black_quartz_wall.json -57031055419efa50a97d1653c3227afe9cf8ceed data/actuallyadditions/loot_tables/blocks/breaker.json -83319db556d5b892ff8ab33bce62c8282d1bbf08 data/actuallyadditions/loot_tables/blocks/canola.json -6d7c7d717df570c9b661db11a861483b4fa253e8 data/actuallyadditions/loot_tables/blocks/canola_press.json -195eab69b32f2e36f815c66e0f2e88b653fedb0f data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_block.json -6b640079b13b9f20bd883df17f763d086e64d11d data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_slab.json -2acba6eb2a214292df2d0db3fa46701ca7c9508a data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_stair.json -b1998a958433d4e5f9ff2a5aa49b4d7cea198393 data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_wall.json -6eb4516ae49ddc777468da4adffb2fd3b562a9cc data/actuallyadditions/loot_tables/blocks/coal_generator.json -3c5adae363db644f6e24c9bab93f8b98e58debeb data/actuallyadditions/loot_tables/blocks/coffee.json -3a5fb14238fded1a5bd33163328d02f334a4a5fc data/actuallyadditions/loot_tables/blocks/coffee_machine.json -56f4a5c8420dc8b69782204a2e7af552e37cd5ab data/actuallyadditions/loot_tables/blocks/crusher.json -17d4d4e009c822f4dc4617ff1a8d51fcf9933429 data/actuallyadditions/loot_tables/blocks/crusher_double.json -4c6d8c53c2ac6ee0a08a4c9e7f0f0a046bf19e18 data/actuallyadditions/loot_tables/blocks/diamatine_crystal_block.json -83ae77fd9d3cd2c7c38d3a9f30ef555b4507ac52 data/actuallyadditions/loot_tables/blocks/diamatine_crystal_cluster.json -c69a0c113a49beda5c4a7721d4a7af5b9d2c452c data/actuallyadditions/loot_tables/blocks/display_stand.json -e5a3c083bef3c3819599d6c71ddce4a3d0f257b4 data/actuallyadditions/loot_tables/blocks/dropper.json -3bb4d9f95ddd88b7e4a004fa8f4727a0e613efde data/actuallyadditions/loot_tables/blocks/emeradic_crystal_block.json -eec807466d0e33b52685a8d9bc776317a013303b data/actuallyadditions/loot_tables/blocks/emeradic_crystal_cluster.json -ebae1c4d56e3b5dd5d213ccae4a1ac8237780aa6 data/actuallyadditions/loot_tables/blocks/empowered_diamatine_crystal_block.json -a2d6ac504f0a09bca011f704ca2f25be6ebb0962 data/actuallyadditions/loot_tables/blocks/empowered_emeradic_crystal_block.json -a7162ee24237ef45f265c5c473da53cede9ff4c8 data/actuallyadditions/loot_tables/blocks/empowered_enori_crystal_block.json -cab369964320a3b66f90a835919e669cb0a5ec9a data/actuallyadditions/loot_tables/blocks/empowered_palis_crystal_block.json -fcd1cbd35d0bbc06e3e71303476857cae5e40c68 data/actuallyadditions/loot_tables/blocks/empowered_restonia_crystal_block.json -b7b4cd0a896af8a6df7233427040c094afc7889e data/actuallyadditions/loot_tables/blocks/empowered_void_crystal_block.json -95fcc7dcb49d7a35ff73d6978e97394034a5a219 data/actuallyadditions/loot_tables/blocks/empowerer.json -9e52c96a713a82d3589cd52b7d43544d1d927d3e data/actuallyadditions/loot_tables/blocks/ender_casing.json -e83a71b615f0e1b1972a819395296e13c7be56be data/actuallyadditions/loot_tables/blocks/energizer.json -be35fcd78bcb7eb299625c3a62456c34184ec21f data/actuallyadditions/loot_tables/blocks/enervator.json -6ce6b9e6ae9ee02906cd9410d53bf9b975c628b2 data/actuallyadditions/loot_tables/blocks/enori_crystal_block.json -0c8c4e819bced6cdc1a887d6b00a07b76452fe36 data/actuallyadditions/loot_tables/blocks/enori_crystal_cluster.json -e9ad8228fa30d5f8d56088d57c445073fa9d380b data/actuallyadditions/loot_tables/blocks/ethetic_green_block.json -9ef0bf1effdb5f3732fbd27617f50fb1672b3ee3 data/actuallyadditions/loot_tables/blocks/ethetic_green_slab.json -23656b1068400b349adf5ed3fb62265beae1b4ec data/actuallyadditions/loot_tables/blocks/ethetic_green_stairs.json -dcf88d90a7c0aaed3745222140dd7762285e4a99 data/actuallyadditions/loot_tables/blocks/ethetic_green_wall.json -3817a07ac3d8e6b7295185b5b30e945c836bd86e data/actuallyadditions/loot_tables/blocks/ethetic_white_block.json -6560b21185ffa6fdc540136cf8e223bc6883202b data/actuallyadditions/loot_tables/blocks/ethetic_white_slab.json -cc80737398b55d3244a76b461fcbe71520a1584a data/actuallyadditions/loot_tables/blocks/ethetic_white_stairs.json -49605a5bbb985781710584647b3e8c7e4b5a5813 data/actuallyadditions/loot_tables/blocks/ethetic_white_wall.json -f4cc5421009f16223f505379189260b4b6204ec2 data/actuallyadditions/loot_tables/blocks/farmer.json -08959a6e9cdac1b59d8015db38d36fb24a04bc7f data/actuallyadditions/loot_tables/blocks/feeder.json -650409e01fc826b133e41e1041c8d1d521b9fd40 data/actuallyadditions/loot_tables/blocks/fermenting_barrel.json -c91f4678917231a691a00716f8cc76f7c0511627 data/actuallyadditions/loot_tables/blocks/firework_box.json -096fc3f758f0b02557bce73588c5f143e908544d data/actuallyadditions/loot_tables/blocks/flax.json -88fa30109d1ae55999ded8ff6559cc624d9c98fb data/actuallyadditions/loot_tables/blocks/fluid_collector.json -cf193f4e8ff7cd8ad3a1a1b1101bcf5445814ecb data/actuallyadditions/loot_tables/blocks/fluid_placer.json -390934605a8630a35993bfa30e47cc3aca2ad595 data/actuallyadditions/loot_tables/blocks/greenhouse_glass.json -dc57d4928bf987ce6a3ca4f10201bbd9dfeccb60 data/actuallyadditions/loot_tables/blocks/heat_collector.json -6d711189bf7dc33281d08f8a90c8383233e3217c data/actuallyadditions/loot_tables/blocks/hopping_item_interface.json -733e0d4226ae2775e8c619e8bba71f1515906b31 data/actuallyadditions/loot_tables/blocks/iron_casing.json -251b67acc2885871d7f9f3e90bb58653028221e1 data/actuallyadditions/loot_tables/blocks/item_interface.json -616213a5f05126c426b9c086fbd80b7c417a0676 data/actuallyadditions/loot_tables/blocks/lamp_black.json -0882989c2d2fa73d9b7eb1134b3bdd39931f7461 data/actuallyadditions/loot_tables/blocks/lamp_blue.json -695c0d10ab6b8dee27e21154a84e24e758560da5 data/actuallyadditions/loot_tables/blocks/lamp_brown.json -1462d92d68a90eb29c71c0925ba13cbd7ceb3aec data/actuallyadditions/loot_tables/blocks/lamp_controller.json -b057482b4f89b58b92271b88977e6238a3ebe2f9 data/actuallyadditions/loot_tables/blocks/lamp_cyan.json -cffcbd28f1980e562962ea005f8c58b1e5ad9fd0 data/actuallyadditions/loot_tables/blocks/lamp_gray.json -41be9d52cfee4ef7b84253bddab902f51924ffa7 data/actuallyadditions/loot_tables/blocks/lamp_green.json -7a971b3c9384a24ba199b5fad794a7a381dc6fa9 data/actuallyadditions/loot_tables/blocks/lamp_light_blue.json -3638cb431eccbadb84af54a04643324780da45e9 data/actuallyadditions/loot_tables/blocks/lamp_light_gray.json -4bc4f90b90b378a1e5bd4ac3af7452f11733cae5 data/actuallyadditions/loot_tables/blocks/lamp_lime.json -9a1301e0d404659ce76e178d198a61e79dbf48a8 data/actuallyadditions/loot_tables/blocks/lamp_magenta.json -6321365d03d3d9e89e00ce956206d919fb34fe70 data/actuallyadditions/loot_tables/blocks/lamp_orange.json -363ca3423176fd84e4ed0e2f754755340064119a data/actuallyadditions/loot_tables/blocks/lamp_pink.json -bd78ccea95b84d4274e1a1837c5a93982624742b data/actuallyadditions/loot_tables/blocks/lamp_purple.json -7793353acbcdcf245efa93e6d3d11be22a79a384 data/actuallyadditions/loot_tables/blocks/lamp_red.json -b3e7ddf1c7b1d464a265b4aa352e0b79126723f9 data/actuallyadditions/loot_tables/blocks/lamp_white.json -d30f652cdb2150ca9d0f47166dc00609f37f5581 data/actuallyadditions/loot_tables/blocks/lamp_yellow.json -2998b41fd240776f6b2f751cbbf21d1ca3c95820 data/actuallyadditions/loot_tables/blocks/laser_relay.json -dd5dc8470140a9b0f776b8058aa242e037ee0b04 data/actuallyadditions/loot_tables/blocks/laser_relay_advanced.json -3f2a6f0a5fb52bd916de8cd3a343526b21c9e6bc data/actuallyadditions/loot_tables/blocks/laser_relay_extreme.json -500635b445c60a503f8a920c672fb11fa890019a data/actuallyadditions/loot_tables/blocks/laser_relay_fluids.json -d1a32f911e62430f4fbd464775f6381d213d2d04 data/actuallyadditions/loot_tables/blocks/laser_relay_item.json -ddd6ee3c8820d67e5acc1e67acceb8ff99a9351a data/actuallyadditions/loot_tables/blocks/laser_relay_item_advanced.json -951f738b1ef07b6a626a3c5c39c5cb1c412f2edd data/actuallyadditions/loot_tables/blocks/lava_factory_casing.json -f3cf4d36f16e08e030c25de5cdfa93976d156a22 data/actuallyadditions/loot_tables/blocks/lava_factory_controller.json -ff91dda525da8b68aba564bfe88555d6c676d595 data/actuallyadditions/loot_tables/blocks/leaf_generator.json -1e745ced069d8181f0ea3d1b132bbb84db8efbac data/actuallyadditions/loot_tables/blocks/long_range_breaker.json -a339b6b2a9caa625029385e9604870f5a4f378ea data/actuallyadditions/loot_tables/blocks/oil_generator.json -47ab98d1402e17a205ec8865f6f7f0d704d9e7a1 data/actuallyadditions/loot_tables/blocks/palis_crystal_block.json -a1b2464021b0a0aa0401ace533dda2d92edacfc9 data/actuallyadditions/loot_tables/blocks/palis_crystal_cluster.json -72c97009f21477806dde65eff46eb1758ce224ee data/actuallyadditions/loot_tables/blocks/phantom_booster.json -1425c19c5cacf71294ddbb2c12383bb141fcc2f5 data/actuallyadditions/loot_tables/blocks/phantom_breaker.json -de00666ae75aa71f352d5b9d3c7c4ea9f62874c6 data/actuallyadditions/loot_tables/blocks/phantom_energyface.json -36746cc3164805ab46d34892c8206eee0212edb5 data/actuallyadditions/loot_tables/blocks/phantom_itemface.json -0eb15c4cdfdccb5207577be061b773852d715d93 data/actuallyadditions/loot_tables/blocks/phantom_liquiface.json -8bbc2c05cd1cc0d8cc1d5ec7230056f0691e3bed data/actuallyadditions/loot_tables/blocks/phantom_placer.json -27e84fefae09c6f00d88918223be693f43f8f754 data/actuallyadditions/loot_tables/blocks/phantom_redstoneface.json -51293067f66de14942faa14105f099d931b73885 data/actuallyadditions/loot_tables/blocks/placer.json -ba950fc805546f2ed7c2a4d229881dd1f93922a9 data/actuallyadditions/loot_tables/blocks/player_interface.json -f3a486718523a4cbfad968849e2e68433e629ec5 data/actuallyadditions/loot_tables/blocks/powered_furnace.json -91f5fc461c294bcb386fc207d5d286b0eb30dd48 data/actuallyadditions/loot_tables/blocks/ranged_collector.json -91bc0ca71f77559edeb53a1890a9101e705f69f8 data/actuallyadditions/loot_tables/blocks/restonia_crystal_block.json -03058b2216c8e6ba63b8d03d085958265177f767 data/actuallyadditions/loot_tables/blocks/restonia_crystal_cluster.json -7088d02cc3db67b5b0bdafb11238f70c46d8a1ec data/actuallyadditions/loot_tables/blocks/rice.json -5e5b0d4e5f14451d183eb1c62e824070532011fd data/actuallyadditions/loot_tables/blocks/shock_suppressor.json -0d1bb5c5ee2cbd625edd9696e4ec3112df41d800 data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_block.json -300ea1d06816038e03e2e6ec236b9bb6af757364 data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_slab.json -852df54c2c4b4409ee9fd5d9336f2bf6ce95951a data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_stair.json -2ab70e5e713d0cbb22a321d5f1862479bb692dfa data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_wall.json -fc971ee4bff8fbcca6cfc0e0ef5e0d5120be45c1 data/actuallyadditions/loot_tables/blocks/tiny_torch.json -a2ea79148f316e1c330774cc5b3de2f7fce0fa73 data/actuallyadditions/loot_tables/blocks/vertical_digger.json -e6ca4acfe5b66ae48056f102c2356ff78aecca64 data/actuallyadditions/loot_tables/blocks/void_crystal_block.json -03f30533040961eff84f574ddb7b546d185b9fc3 data/actuallyadditions/loot_tables/blocks/void_crystal_cluster.json -a3323427ca7c75ad3a86614f25eda7a9bd483814 data/actuallyadditions/loot_tables/blocks/wood_casing.json -818b5655b0c35661f41abb8f94b600f910f992be data/actuallyadditions/loot_tables/blocks/xp_solidifier.json -64711e28d6fb7579f1ba2fed4a46440e213a2fac data/actuallyadditions/recipes/advanced_coil.json -d2666ce077d5892a3bffde70ddf53492ec876900 data/actuallyadditions/recipes/advanced_leaf_blower.json -a91ac0f76c7b325ac3ef0eefe5614d17f1f533d3 data/actuallyadditions/recipes/atomic_reconstructor.json -3d899eb727ee209cce77eae52985ea8ed1fc2455 data/actuallyadditions/recipes/basic_coil.json -a4b4ff66a1d3387791b1bd72e461cdc62558a054 data/actuallyadditions/recipes/battery_box.json -cd00d32378f5ed0db08103936c9e2cc47b1771b7 data/actuallyadditions/recipes/black_quartz_brick_slab.json -9c0512a4bb87a8b845f5ed613462a327128dc2f3 data/actuallyadditions/recipes/black_quartz_brick_stair.json -2ea8d3c0f42d30f7b9959c308231f48210cd579a data/actuallyadditions/recipes/black_quartz_brick_wall.json -5ba46742bff7dbc31c3ef64a4b3ab021df4e1c79 data/actuallyadditions/recipes/black_quartz_pillar_slab.json -141bfc11e38b358e2c53f59e816509a25b61bccd data/actuallyadditions/recipes/black_quartz_pillar_stair.json -c6cb7541b7390b0af525b3b6854a943e461b1a03 data/actuallyadditions/recipes/black_quartz_pillar_wall.json -6c045ca364ea3483083fe3be01f15508d485402a data/actuallyadditions/recipes/black_quartz_slab.json -f1d41941b332faf0b495353f27ea83287643e044 data/actuallyadditions/recipes/black_quartz_stair.json -c9fc3f11f3bf5a928ea9f5900c344461d61fe9e5 data/actuallyadditions/recipes/black_quartz_wall.json -398ad1cb070aa294671f0294515fc7695042fd05 data/actuallyadditions/recipes/booklet.json -1374eebdd31930f25c5b952b1da5785c2209950d data/actuallyadditions/recipes/canola_seeds.json -bb052242ce10811ea68cf5bc649ef7a78c79d046 data/actuallyadditions/recipes/charcoal_to_tiny.json -7dc02da1ff58eb4ff48e305437d4857c31cbd5c9 data/actuallyadditions/recipes/chiseled_black_quartz_slab.json -bf1b5de98f29c2dabe25a143c8e63d2c0cd6ea72 data/actuallyadditions/recipes/chiseled_black_quartz_stair.json -9d779585266046738b4bcf7447b918ec09b65f95 data/actuallyadditions/recipes/chiseled_black_quartz_wall.json -dbd343ce63581f748ffd7664df83e55a174cd0ab data/actuallyadditions/recipes/coal_to_tiny.json -c4e98d1507f68d5524c737d4e63156aa476fd085 data/actuallyadditions/recipes/colorchange/black_carpet.json -fc68c61bed8857f42e762c750d85665b4ed88ed1 data/actuallyadditions/recipes/colorchange/black_dye.json -b62468a9f5be60ae05258bc4502faa78d9e4b034 data/actuallyadditions/recipes/colorchange/black_glazed_terracotta.json -6542541988d8e26d457a9cd37b85f067adbc1cef data/actuallyadditions/recipes/colorchange/black_stained_glass.json -96e818e3c023aff9cbce5476946bf9fd51cd3676 data/actuallyadditions/recipes/colorchange/black_stained_glass_pane.json -9ae6edaa50bf4c8ec0403a1072d74c7eef8d2e37 data/actuallyadditions/recipes/colorchange/black_terracotta.json -4c0d56c3a6db66bbeb74cb72ecedfbb115448d83 data/actuallyadditions/recipes/colorchange/black_wool.json -71b6acfb8ab23cd44f159ff344877c8a99cd3442 data/actuallyadditions/recipes/colorchange/blue_carpet.json -69a761f9ceb7f3bf052a67a2326a2e4ba8b6d219 data/actuallyadditions/recipes/colorchange/blue_dye.json -e5198a6a6eaa9c43ff82ac9d257b15ca570e55e0 data/actuallyadditions/recipes/colorchange/blue_glazed_terracotta.json -355e41364b5e2576f7200ed6a58213280eff2c70 data/actuallyadditions/recipes/colorchange/blue_stained_glass.json -b324f07dbde2581598fd5369e935efb5d3f835c2 data/actuallyadditions/recipes/colorchange/blue_stained_glass_pane.json -81f8415b25a813b19708154dbe75d4524b0bff18 data/actuallyadditions/recipes/colorchange/blue_terracotta.json -5c698c51d21723c8a13e329673a4c8d703da359d data/actuallyadditions/recipes/colorchange/blue_wool.json -285bb992795f78b7ad98321c8112e99e3fdcc025 data/actuallyadditions/recipes/colorchange/brown_carpet.json -f7e73bc34b2a7156ea15a214318edb8647a59ee0 data/actuallyadditions/recipes/colorchange/brown_dye.json -820d7dae9fb1cd6e493294fca4aa25a6028f82e6 data/actuallyadditions/recipes/colorchange/brown_glazed_terracotta.json -d958b165641b88491a34f21fc36c0db0655a5e1c data/actuallyadditions/recipes/colorchange/brown_stained_glass.json -812817ad102274e0f450e06afedbea85cc7e67a3 data/actuallyadditions/recipes/colorchange/brown_stained_glass_pane.json -dfc316d3e89e041fc4cdae2bd4dc1a60885f7ccb data/actuallyadditions/recipes/colorchange/brown_terracotta.json -818ab2ea65a94fa5ff8db6c5a5d106eec32816fd data/actuallyadditions/recipes/colorchange/brown_wool.json -aceb5f3b6c900b7489a31274b9e1335d2b08d46b data/actuallyadditions/recipes/colorchange/cyan_carpet.json -e8707c9e4d49c9247f2317bf1c14e0cca295c298 data/actuallyadditions/recipes/colorchange/cyan_dye.json -5d671fc651d06f54aafd3e296999cc7ffeb4673e data/actuallyadditions/recipes/colorchange/cyan_glazed_terracotta.json -e9f6e6c48a3ccca94dce89c21216a881b1951bd4 data/actuallyadditions/recipes/colorchange/cyan_stained_glass.json -8d5e6d66c04f621d70ccecaa5bf8dd784428a889 data/actuallyadditions/recipes/colorchange/cyan_stained_glass_pane.json -7342b7aa7b806555144517019adf915f112d5cbd data/actuallyadditions/recipes/colorchange/cyan_terracotta.json -37168cf7f51bdd26a1cb74d5fc3eccd835f7f566 data/actuallyadditions/recipes/colorchange/cyan_wool.json -1c2bd9d19db7cb209b6759b7bf67ce4822ccf74d data/actuallyadditions/recipes/colorchange/gray_carpet.json -b8be4f5fcd70f910b16bf25e6f1a42638def60b2 data/actuallyadditions/recipes/colorchange/gray_dye.json -a659b2fa678640fcfde75d5414073449e3742ad1 data/actuallyadditions/recipes/colorchange/gray_glazed_terracotta.json -5697ea3a2b02e02530667f092662f14bc14425ba data/actuallyadditions/recipes/colorchange/gray_stained_glass.json -ad5f7354fcd9a4e2fb30986e616f81a972a8bd0f data/actuallyadditions/recipes/colorchange/gray_stained_glass_pane.json -efbfc6feafce597e2895ce10216fe231e848b5f0 data/actuallyadditions/recipes/colorchange/gray_terracotta.json -e6fa0fd781c0deb18997b92237a097df2bfa14b7 data/actuallyadditions/recipes/colorchange/gray_wool.json -8ae7563109979ba061f7a5f369c49ebd2c549850 data/actuallyadditions/recipes/colorchange/green_carpet.json -65486086f293d01fbcbd6a35b7764e13fd8e9240 data/actuallyadditions/recipes/colorchange/green_dye.json -6d92d3d3d50e0ec759140c4027ee1725cfe31059 data/actuallyadditions/recipes/colorchange/green_glazed_terracotta.json -942f2bd392b317c9aa7cf5616209491fa981c7cf data/actuallyadditions/recipes/colorchange/green_stained_glass.json -0538912d40986cf783d4809c1b810413a2dfd402 data/actuallyadditions/recipes/colorchange/green_stained_glass_pane.json -d34a8458c98deb9fce2f84e29540d7a8f6949242 data/actuallyadditions/recipes/colorchange/green_terracotta.json -efb6a3385546c7c6b74e45f33d40dcdbfe7ad23a data/actuallyadditions/recipes/colorchange/green_wool.json -0f5f098506448c6b5ec68709fa007b78121365e4 data/actuallyadditions/recipes/colorchange/lamp_black.json -85f0eb3fa70b054d323219d3e91cd3048980bc26 data/actuallyadditions/recipes/colorchange/lamp_blue.json -595174fb62a65c91b61632d08347e3406fed3a65 data/actuallyadditions/recipes/colorchange/lamp_brown.json -81b72bff48b08fef5b7666536365cf5b695b3106 data/actuallyadditions/recipes/colorchange/lamp_cyan.json -5d85cff8b941449b250f84432b28a73f3d204891 data/actuallyadditions/recipes/colorchange/lamp_gray.json -193024c6bf697564796a161a81582238a7c54c1d data/actuallyadditions/recipes/colorchange/lamp_green.json -3d06efdaf5bae8145dc36002949255040e686897 data/actuallyadditions/recipes/colorchange/lamp_light_blue.json -a6fae6ea14155261e57ea815ff9d87260cf7f62a data/actuallyadditions/recipes/colorchange/lamp_light_gray.json -f4386567103c981e0d654b9271390b9dd7722a0c data/actuallyadditions/recipes/colorchange/lamp_lime.json -3ccd93751a0ff72ee1b9a922b41d864b35a0b64a data/actuallyadditions/recipes/colorchange/lamp_magenta.json -70a1342a78289a2c644d72db7fd2b4b32fc39ca4 data/actuallyadditions/recipes/colorchange/lamp_orange.json -b610a205de296ff7b4e77affff7358fa85276644 data/actuallyadditions/recipes/colorchange/lamp_pink.json -2c80dc146e001905d2bda57cff13e52ba64cd166 data/actuallyadditions/recipes/colorchange/lamp_purple.json -9c8759686555692f970292d81f85a72c817c24e7 data/actuallyadditions/recipes/colorchange/lamp_red.json -40fd6b842e4d9d08415bdbe741a523b97e026325 data/actuallyadditions/recipes/colorchange/lamp_white.json -798faea275af15e2644a4fb6f16ecfe67a6abecc data/actuallyadditions/recipes/colorchange/lamp_yellow.json -9858c3342e53d1d4b9efa0b506a5635294f7e565 data/actuallyadditions/recipes/colorchange/light_blue_carpet.json -3cdb80b440bedac76201995e68cb0e21c280b27a data/actuallyadditions/recipes/colorchange/light_blue_dye.json -101bd37efd167d02c7ac25d5cfff0f9aff29172c data/actuallyadditions/recipes/colorchange/light_blue_glazed_terracotta.json -af65d68f653994f581e70918aeb7291b34d5e149 data/actuallyadditions/recipes/colorchange/light_blue_stained_glass.json -d8bd82c98b8297effbea47a07017a84970a7f67f data/actuallyadditions/recipes/colorchange/light_blue_stained_glass_pane.json -43bd607996f9f2e09ba47100aabc1f899d62de77 data/actuallyadditions/recipes/colorchange/light_blue_terracotta.json -915d5ea71aa02d991a194574a085e7e41e733803 data/actuallyadditions/recipes/colorchange/light_blue_wool.json -8ad183a15c279600d86d33575589cb01336730ff data/actuallyadditions/recipes/colorchange/light_gray_carpet.json -fe161168300de53f18431039a1677903fcedaa29 data/actuallyadditions/recipes/colorchange/light_gray_dye.json -5920b24160484fa1107c3861ea30476ad54c1f67 data/actuallyadditions/recipes/colorchange/light_gray_glazed_terracotta.json -a3dedb4530b9b3e72566ed6fa69a2c3403db7fe6 data/actuallyadditions/recipes/colorchange/light_gray_stained_glass.json -b1e3eba6e666fa84930394948081ad8ebdd8dcd5 data/actuallyadditions/recipes/colorchange/light_gray_stained_glass_pane.json -923548480b4275eb872ac9e0bfe81694c8ef55b9 data/actuallyadditions/recipes/colorchange/light_gray_terracotta.json -9f5a91dc8b31444492fc77dcd2405375db1ba378 data/actuallyadditions/recipes/colorchange/light_gray_wool.json -d43280093a702004960273106f7e2f1a1337e97e data/actuallyadditions/recipes/colorchange/lime_carpet.json -b58615a624714b8107f6645c42cca321e46b5b03 data/actuallyadditions/recipes/colorchange/lime_dye.json -c567752df673f205968211a6c8840d211fd8a9c2 data/actuallyadditions/recipes/colorchange/lime_glazed_terracotta.json -2e91f59060e38988d349c0ec4846b11e5654195a data/actuallyadditions/recipes/colorchange/lime_stained_glass.json -9df173b0ffae73de6a0a39c8be99f63fce26a794 data/actuallyadditions/recipes/colorchange/lime_stained_glass_pane.json -01ce4ff3b098126aacf459becda6c3fff5c9e566 data/actuallyadditions/recipes/colorchange/lime_terracotta.json -41e623b3c6730f283a17ab9b293c3dbfb6688a4b data/actuallyadditions/recipes/colorchange/lime_wool.json -45255e8f2fcd9a7a4516071446030079e59bfd73 data/actuallyadditions/recipes/colorchange/magenta_carpet.json -06e539154408d379268e78475758ace15ce2f53e data/actuallyadditions/recipes/colorchange/magenta_dye.json -e3eb444ef0b2a3ad7a1d8c34d644efb2f65fa8f3 data/actuallyadditions/recipes/colorchange/magenta_glazed_terracotta.json -a4a6ee71b3a76b036eebdc7c2870ab3cfb341b66 data/actuallyadditions/recipes/colorchange/magenta_stained_glass.json -303eacf461723fa6f2f015c390c161be18d2685d data/actuallyadditions/recipes/colorchange/magenta_stained_glass_pane.json -ced5fcf725ed067e002ba321da93bf0fc999ec40 data/actuallyadditions/recipes/colorchange/magenta_terracotta.json -5754feb7b97b2e5bed1a44d6b6121d0e6b6d411c data/actuallyadditions/recipes/colorchange/magenta_wool.json -bcc8e26d51b470e80a37a72c838d0e9456a66e66 data/actuallyadditions/recipes/colorchange/orange_carpet.json -d21d1ce24a7d3840df92532260a535d38f4b8405 data/actuallyadditions/recipes/colorchange/orange_dye.json -2b744b6306b454adb9fdc3d38860c5af6e2036ab data/actuallyadditions/recipes/colorchange/orange_glazed_terracotta.json -2be65fa3a4bb68bb667f9405c4b1392971522f34 data/actuallyadditions/recipes/colorchange/orange_stained_glass.json -ede64b6d4b677b8ce01fabad1b9fad14439a8b4c data/actuallyadditions/recipes/colorchange/orange_stained_glass_pane.json -e16caf03c9111d59dcec3af3cd6333738e21866a data/actuallyadditions/recipes/colorchange/orange_terracotta.json -5d34d7ba1302af791ca85fd2f023470328e604b6 data/actuallyadditions/recipes/colorchange/orange_wool.json -9d639fc4cf714b5c28a90f625459a0c864e12f81 data/actuallyadditions/recipes/colorchange/pink_carpet.json -1012285ad07a093c648d59ccdadce4d575e8f52d data/actuallyadditions/recipes/colorchange/pink_dye.json -a973c89401c7be8f22603c912e07fd55ef93d346 data/actuallyadditions/recipes/colorchange/pink_glazed_terracotta.json -f72e63786af73bd6328c696389d1b9ee5ec85b09 data/actuallyadditions/recipes/colorchange/pink_stained_glass.json -f13a13196bb61b8ed377c52f742605c4fe6ab1e9 data/actuallyadditions/recipes/colorchange/pink_stained_glass_pane.json -35023e8f5439ccdb0dccbffafe487013a74652d0 data/actuallyadditions/recipes/colorchange/pink_terracotta.json -e3bf0e1777bd2d495162411424fd7aadcb72c96d data/actuallyadditions/recipes/colorchange/pink_wool.json -3be74c280cdd4485c673d68e2527e2c719efdb33 data/actuallyadditions/recipes/colorchange/purple_carpet.json -60a7040c2532351e8178a44882b2763d11b6c5f4 data/actuallyadditions/recipes/colorchange/purple_dye.json -05c83b0a263aaaa1506b4f4f36bca414aa33c2a0 data/actuallyadditions/recipes/colorchange/purple_glazed_terracotta.json -ca0ceb8ee561265223d12799c3976cf24f5bbd3d data/actuallyadditions/recipes/colorchange/purple_stained_glass.json -0450915ea1e139a25f71ecc73c3ebcfadac79957 data/actuallyadditions/recipes/colorchange/purple_stained_glass_pane.json -591ca7a1c99e34f681e61142e2af78662ffb55b7 data/actuallyadditions/recipes/colorchange/purple_terracotta.json -0ceb76358bfbc1e289e1d076683870978071a929 data/actuallyadditions/recipes/colorchange/purple_wool.json -f682afcc09086f0b90523dd5073145daf7c277b4 data/actuallyadditions/recipes/colorchange/red_carpet.json -46d44b98694ca7d07cd73a737b094d21f9980f84 data/actuallyadditions/recipes/colorchange/red_dye.json -f0ec1f1866e20c8c0d277dd1e47cc50c54d8ff4f data/actuallyadditions/recipes/colorchange/red_glazed_terracotta.json -c675e2f002271cbc8a63cd1757488e5398f65043 data/actuallyadditions/recipes/colorchange/red_stained_glass.json -f2149ed34ff6663a8b80c775fcf70d904201d127 data/actuallyadditions/recipes/colorchange/red_stained_glass_pane.json -4daf2593bce9b35dcc09c4fa14348ad3096c6255 data/actuallyadditions/recipes/colorchange/red_terracotta.json -a7fdacc3fe3040376fec72cb64efb48305044c6d data/actuallyadditions/recipes/colorchange/red_wool.json -cdaa223d59f5f81846c181680c0e732f1316baac data/actuallyadditions/recipes/colorchange/white_carpet.json -2dd9ceaf61bb7f426c30c9f73a82062652addcd3 data/actuallyadditions/recipes/colorchange/white_dye.json -a575e8a13c345ef36dc54ca1a1ec55ad8c0b67ed data/actuallyadditions/recipes/colorchange/white_glazed_terracotta.json -de6ac7119df13effca127c612f0221e5a8667ab9 data/actuallyadditions/recipes/colorchange/white_stained_glass.json -721d2fbac5961139b39f8bdfaf0d96b2a11d69ec data/actuallyadditions/recipes/colorchange/white_stained_glass_pane.json -3d887675f14a926b4045c70088e7d8f35d16f77e data/actuallyadditions/recipes/colorchange/white_terracotta.json -48142b653fd55f8cb373541d590d96c94fe182db data/actuallyadditions/recipes/colorchange/white_wool.json -e088aee52db067c15c72bfe743ac106b98ca4be2 data/actuallyadditions/recipes/colorchange/yellow_carpet.json -6139ed576e18471734f6042007381ee169b0df5d data/actuallyadditions/recipes/colorchange/yellow_dye.json -896d1ea3e682202a5df4dd10b79a8088a3bd8eaf data/actuallyadditions/recipes/colorchange/yellow_glazed_terracotta.json -86f41507f8176e5c0c60c059c30e42e88d26757a data/actuallyadditions/recipes/colorchange/yellow_stained_glass.json -11ddd815c96912369ee0d96fe719d5958370ed3c data/actuallyadditions/recipes/colorchange/yellow_stained_glass_pane.json -a4fb51f83c38bfebceeadde885d59632e355bf6d data/actuallyadditions/recipes/colorchange/yellow_terracotta.json -ca4f8d37d115eac5889542b04d1c01cd2e0cde43 data/actuallyadditions/recipes/colorchange/yellow_wool.json -2ea3fb111f855689ddf7a1422cad766f0ead708e data/actuallyadditions/recipes/compress/diamatine_crystal.json -0b88bc4b719117301ffcfd3655e7c39237fbc738 data/actuallyadditions/recipes/compress/emeradic_crystal.json -ad61df964db9f0888e4c62d6f2ed0b5d6dfc0bb7 data/actuallyadditions/recipes/compress/enori_crystal.json -e6a63e36ebe2a2eda42a47f74361d1eb0998270b data/actuallyadditions/recipes/compress/palis_crystal.json -06d403ccf527c0f8f344400e5cfb74ea46c0f60b data/actuallyadditions/recipes/compress/restonia_crystal.json -e692a96119d3011f3040c8faef64983805f1845c data/actuallyadditions/recipes/compress/void_crystal.json -6a7cf2e5eb1fd134328a182b8001fdf0e622c94a data/actuallyadditions/recipes/crafter_on_a_stick.json -160466dfd10fafc2ae4b4130ca35220d4c2d2342 data/actuallyadditions/recipes/crate_keeper.json -341c5816febc417a36e516986f6d1461cf38cfed data/actuallyadditions/recipes/crushing/bone_crusher.json -b686724fcedd5b0a4b18beecaa3e29efede221f6 data/actuallyadditions/recipes/decompress/diamatine_crystal_shard.json -110700fd24781a52ad42e21fb0f05f8a705de86f data/actuallyadditions/recipes/decompress/emeradic_crystal_shard.json -542ba53d09109c9dcbf7094634826c102dd09545 data/actuallyadditions/recipes/decompress/enori_crystal_shard.json -42dd68ff6218de4c11d7e41a361fde2a66d52f05 data/actuallyadditions/recipes/decompress/palis_crystal_shard.json -283db5fa2689b120f4a9050dca40e1f62df7a3ec data/actuallyadditions/recipes/decompress/restonia_crystal_shard.json -79bf1e6f79307cb1754d0deff57a9c8f8b82e0ad data/actuallyadditions/recipes/decompress/void_crystal_shard.json -293cecfa94d22e62bd817a3964e82dca4479d44d data/actuallyadditions/recipes/diamond_aiot.json -abb220fb19dea7cf9afcd30fbe533d21b7c4e9c0 data/actuallyadditions/recipes/display_stand.json -f3465f5a05a931f4e5933508c2bc56de9c9eafe5 data/actuallyadditions/recipes/double_battery.json -87c4d75a0dec26318530fec94b00c0e05727b3db data/actuallyadditions/recipes/drill_core.json -a53695aa069fdc09f3bf7d941896771baf8ad9fb data/actuallyadditions/recipes/drill_light_blue.json -b39949bb1fcfa2bba60108fec687234c2bba659f data/actuallyadditions/recipes/drill_upgrade_block_placing.json -aa86730bb0446a79eea7bf52aaa24ea7d4630d91 data/actuallyadditions/recipes/drill_upgrade_five_by_five.json -6385d8e13209de4fb34f18d6ff6b6c0cd5b83c30 data/actuallyadditions/recipes/drill_upgrade_fortune.json -2f73931a790fba13650aeb6919fb63d94b455ce7 data/actuallyadditions/recipes/drill_upgrade_fortune_ii.json -478b6bb23ae6c109f9b80b70ca709858e3d5da26 data/actuallyadditions/recipes/drill_upgrade_silk_touch.json -4439771fc5a7c8b8bd6007fb42641df6f7faf66c data/actuallyadditions/recipes/drill_upgrade_speed.json -d8b99c7f215d465fc850a1194592d013534a4f13 data/actuallyadditions/recipes/drill_upgrade_speed_ii.json -238aaff35e5be0de757ffa4a1fea021b6914744e data/actuallyadditions/recipes/drill_upgrade_speed_iii.json -3567c0f3b64bf514df969a0cbb10d531b61f81ee data/actuallyadditions/recipes/drill_upgrade_three_by_three.json -c1db85574a99e9e45e1ca2dd1703cc53d4699469 data/actuallyadditions/recipes/empowerer.json -954a9e18ac635eba114922203c0af8daf7aaa39f data/actuallyadditions/recipes/empowering/diamatine.json -539b7277fb268425ac6302a0ab9c53076f4b3096 data/actuallyadditions/recipes/empowering/diamatine_block.json -466bb9c977d91a7a43fdb77589a7618a727e86a7 data/actuallyadditions/recipes/empowering/emeradic.json -1228197667cccd15d8e35fadac0ac7582decbae5 data/actuallyadditions/recipes/empowering/emeradic_block.json -ecbc0d8107b656ce571c0f9114f4e7d310dd4ffe data/actuallyadditions/recipes/empowering/empowered_canola.json -213cd0104647e820a59001c970e0e529fc8aeb0a data/actuallyadditions/recipes/empowering/enori.json -b857d3d08f386b2f39bfe0d0f859ed09e626f617 data/actuallyadditions/recipes/empowering/enori_block.json -27f284d2e2d0121468d73dd60ffa5f25e8858920 data/actuallyadditions/recipes/empowering/palis.json -1e902cc67bb7bd65b7f6961c927071d47aca9a75 data/actuallyadditions/recipes/empowering/palis_block.json -db1b6e924352a7e097a5675bbf2a27888c6cbded data/actuallyadditions/recipes/empowering/restonia.json -1b59c946f4cfbfc9bc3a2e7562105cd3a0d09d69 data/actuallyadditions/recipes/empowering/restonia_block.json -74a9dc2b89805e5c232fa66da8db8e96af0b0703 data/actuallyadditions/recipes/empowering/void.json -d112aa7267600c2a55f5efb617cb574aaa56502e data/actuallyadditions/recipes/empowering/void_block.json -d7205e0d7796bdcdf7280117c821ec5c6c6d8fee data/actuallyadditions/recipes/empty_cup.json -7306e280d2cb9ef47fe1cf43a2a289752a09a488 data/actuallyadditions/recipes/ender_casing.json -3ade772cd50a533137dc1d27a2b060b85e525d8a data/actuallyadditions/recipes/engineers_goggles.json -f2c63622c99c5ff552e5ce408956d3fe40582e43 data/actuallyadditions/recipes/engineers_goggles_advanced.json -80df7dd9bc05ca5666c4945d632f9bfdb4cd6191 data/actuallyadditions/recipes/ethetic_green_slab.json -76aab0f5fb24fb96fe6c2a64a4d216b75cbae28c data/actuallyadditions/recipes/ethetic_green_stairs.json -e4d34fc15b29b452172b3c89b989570de83e20cc data/actuallyadditions/recipes/ethetic_green_wall.json -3c604000863e571d0c98cbb3cf82c3a8e69c330a data/actuallyadditions/recipes/ethetic_white_slab.json -c5ef6af5b4a1c108a1995e29f4889df68e4b1ee5 data/actuallyadditions/recipes/ethetic_white_stairs.json -1b15143d70ee7861ef1097e153b7d5713f7ed72a data/actuallyadditions/recipes/ethetic_white_wall.json -2d997a2f34d94b7199793d603e22d9b0421b3df9 data/actuallyadditions/recipes/farmer.json -de7aabbafa4ce535079baed363c8828bc4efbff3 data/actuallyadditions/recipes/fermenting/refined_canola.json -255265eb6b031195d086e58ea91c3a2d5e22f9f1 data/actuallyadditions/recipes/filter.json -6ed420df34b5b17fcef2ad2c3f4fb4ed35bf739d data/actuallyadditions/recipes/firework_box.json -7faeab31bd3d1e7a935a3f36d82cdd54466a72e4 data/actuallyadditions/recipes/gold_aiot.json -e86bd38ee24e97ed93d4b133af3850594e7b45de data/actuallyadditions/recipes/handheld_filler.json -9b8ee8f545ef898e993b897d422fc54492854d34 data/actuallyadditions/recipes/hopping_item_interface.json -a65757e5037582adc3b69b21b533af3f045c0eb8 data/actuallyadditions/recipes/iron_aiot.json -8875472a4076802d8c5ed2b7bcc03d01b131ad5c data/actuallyadditions/recipes/iron_casing.json -94353c0c347081fcd8060f5e6f5686556785cfd9 data/actuallyadditions/recipes/item_interface.json -64c7d859937622662bb7e029c0e6f1d62d45d3be data/actuallyadditions/recipes/laser/crystalize_diamatine_crystal.json -47add6ccc4dea960cd57fefc6081e6cd781225c2 data/actuallyadditions/recipes/laser/crystalize_diamatine_crystal_block.json -0888ceaedf3303126f9f0c7cb2cad2139a25bd81 data/actuallyadditions/recipes/laser/crystalize_emeradic_crystal.json -685fad0a93a9b27e40379e28f566b4b9e9b3fe8d data/actuallyadditions/recipes/laser/crystalize_emeradic_crystal_block.json -eb3c897762aa2093fba5f2915cd6fcdebab3155d data/actuallyadditions/recipes/laser/crystalize_enori_crystal.json -794f40cd7ea37636d2bc9c224744aac101687a49 data/actuallyadditions/recipes/laser/crystalize_enori_crystal_block.json -3802c69b7f8855da949f22e06887e493cbe4844a data/actuallyadditions/recipes/laser/crystalize_palis_crystal.json -202709f1dfd4bcf48f38224df0ca7a6020e5f88e data/actuallyadditions/recipes/laser/crystalize_palis_crystal_block.json -5fde669cb3fb45decc9f0b58c34dfd72bad0f2be data/actuallyadditions/recipes/laser/crystalize_restonia_crystal.json -3d5a372fe62e5f0cab1cb95cafd3d26f98f429e2 data/actuallyadditions/recipes/laser/crystalize_restonia_crystal_block.json -e896f65c335f164ee90908e6c44256e79536c6fc data/actuallyadditions/recipes/laser/crystalize_void_crystal.json -ff88021e8f20f7899e57dd39cb837b44cb1c4169 data/actuallyadditions/recipes/laser/crystalize_void_crystal_block.json -82956316d8a178fab9ff145bf5c7bd1aff121c81 data/actuallyadditions/recipes/laser/crystallized_canola_seed.json -8e41dd7c26223f939bef9ab8e67fa6681c0baf3a data/actuallyadditions/recipes/laser/ethetic_green_block.json -4078a2f4fafab1ccbc568870be410f15ce7f3baf data/actuallyadditions/recipes/laser/ethetic_white_block.json -4d1595d4d38781b0ae769667161b471ffc8fcaed data/actuallyadditions/recipes/laser/laser_relay.json -a9716317aefab25b018be62d1b97e99d376d0a79 data/actuallyadditions/recipes/laser/laser_relay_fluids.json -27646d551a4a2004341f11720b95b455b9d9ffd6 data/actuallyadditions/recipes/laser/laser_relay_item.json -d6f0843cf0a6ae5db0df5e9b4d6e1e02d4dd5eea data/actuallyadditions/recipes/laser/leather.json -23f3b24015fcc2e1929ca06a36c85dcd93c9623d data/actuallyadditions/recipes/laser/lens.json -606e99fe6ad318e289850d25f13e3cb398c2fc10 data/actuallyadditions/recipes/laser/lens_of_certain_death.json -a12dafc249c4288679cf33bdc6112bbf1199d9fb data/actuallyadditions/recipes/laser/lens_of_color.json -faeaa7c378aae5db5b5c88b5fdba581c8eae8ef4 data/actuallyadditions/recipes/laser/lens_of_detonation.json -732aa97f2091aba89866265fa85f0af03c055891 data/actuallyadditions/recipes/laser/nether_wart.json -e53142fdf926f6d0e4d4c440a89447cf0da8ebfd data/actuallyadditions/recipes/laser/prismarine_shard.json -005bbccc7e7c1b2ff2b284f6f22c53ef0dd75e94 data/actuallyadditions/recipes/laser/soul_sand.json -a8936b53ca3d14003e610077c47ae4e30cb490a7 data/actuallyadditions/recipes/laser_relay.json -62f45115182193b9f6a45095e30f6b0764dc59be data/actuallyadditions/recipes/laser_relay_advanced.json -d25889210fa5d51a38cb67457ed0371d7c15b828 data/actuallyadditions/recipes/laser_relay_extreme.json -643664b30944d61a79500f85b3f4fcd07a3fb50a data/actuallyadditions/recipes/laser_relay_item_advanced.json -9d2be3b8c2a8283f1775a80bb284bb8e0eb4dc1e data/actuallyadditions/recipes/laser_upgrade_invisibility.json -76350b31fd88f2eca84948302dba177d8d881180 data/actuallyadditions/recipes/laser_upgrade_range.json -4f62b97df15de5efd608b1d78156956e044347b7 data/actuallyadditions/recipes/laser_wrench.json -f2692c35f23f12a2468dd84a1e66c1c9219a7048 data/actuallyadditions/recipes/laser_wrench_nbt.json -e51e98b13f1949ce31485b93133568792745243c data/actuallyadditions/recipes/leaf_blower.json -ec31df01057ad65de89068b01f96b3fb9f837bb4 data/actuallyadditions/recipes/lens.json -634680e59ff81f293e3c44fd871e84fca96336ea data/actuallyadditions/recipes/lens_of_disenchanting.json -46bd3a03bb46db005c8de2dcb563d36c01a5210b data/actuallyadditions/recipes/lens_of_the_killer.json -1d560167a16962d870f0a4bf0cf9e74ac1431b3c data/actuallyadditions/recipes/lens_of_the_miner.json -701af1122ed158e5d162815a9f744169031698f4 data/actuallyadditions/recipes/liquid_fuel/canola_oil.json -0c908206a367aa9c04f751d1f69aa50d6d09ce3a data/actuallyadditions/recipes/liquid_fuel/crystallized_canola_oil.json -901f642d13b3768f2a00fbbdd3482c7b4866867f data/actuallyadditions/recipes/liquid_fuel/empowered_canola_oil.json -cce14618f9e39666e2858bf09c3cc7197e758b1c data/actuallyadditions/recipes/liquid_fuel/refined_canola_oil.json -a37d681793afbdafb245885ab96713ce3cba988d data/actuallyadditions/recipes/mininglens/nether_nether_gold_ore.json -7da4bcc3730868f48aab438f9e8b7c430d73876e data/actuallyadditions/recipes/mininglens/nether_nether_quartz_ore.json -07ff82ce86dee38e569726c64a2c7a072d187834 data/actuallyadditions/recipes/mininglens/stone_coal_ore.json -67e1ce2380778c700a9325497c8be90fdf0eb66e data/actuallyadditions/recipes/mininglens/stone_diamond_ore.json -1c0b8bdef6f1d66b64c2a96fbfe558209ca8a46a data/actuallyadditions/recipes/mininglens/stone_emerald_ore.json -6f74e1702e1b6ce18e19045133f0209831e80d80 data/actuallyadditions/recipes/mininglens/stone_gold_ore.json -6e55e07cac5e069cbeeca8fd6232e58c9ce0214d data/actuallyadditions/recipes/mininglens/stone_iron_ore.json -ccdc4ab92dc7c0aae4de1566435ef5d701e14934 data/actuallyadditions/recipes/mininglens/stone_lapis_ore.json -7d99d73a12a25056891a68a73cc4b93ce622e46a data/actuallyadditions/recipes/mininglens/stone_redstone_ore.json -7821b149dc37caa85b587a0276307f1b5cefaa03 data/actuallyadditions/recipes/netherite_aiot.json -4590b472dcb90700ea525a3c6ac3f325458fab19 data/actuallyadditions/recipes/phantom_clearing.json -2fbfcfa1d6330b9585a1eb1ffd4bedaf67754120 data/actuallyadditions/recipes/phantom_connector.json -68e330f212e20f2d0b46190d06d8f4ae3b0e6271 data/actuallyadditions/recipes/player_probe.json -6a1050a9aaadea6d3961b7e77ee17880404a56e0 data/actuallyadditions/recipes/pressing/canola.json -68e7d4bd5e6ea852ef57ff5032d922a9a703fd77 data/actuallyadditions/recipes/quadruple_battery.json -6797b2f74af9eb67a8ea6bdfa198cab7052db2a0 data/actuallyadditions/recipes/quintuple_battery.json -70fc9365035ac3642771f921513990c88618de8f data/actuallyadditions/recipes/rice_seeds.json -5b104e2c32eafdf802743d0e8d4c1a7e14071668 data/actuallyadditions/recipes/rice_slime.json -85d2537a973d520c9eaaf2f15109c265faa2df3a data/actuallyadditions/recipes/rice_slime_potion.json -77a4b16cceff940cbf18b49fab9a97d4aa8eef7d data/actuallyadditions/recipes/ring_of_growth.json -469f920b7b32f5d29c435cb73cec09776c882c3d data/actuallyadditions/recipes/ring_of_magnetizing.json -d4ca5d77d16ff6fdfc60e665694fdd97bce25463 data/actuallyadditions/recipes/shock_suppressor.json -655fab699bb97ec252deb61d91fbef6f4738fe1c data/actuallyadditions/recipes/single_battery.json -3e3c5cac5685f5637443d5bfc0c023f98217ebb3 data/actuallyadditions/recipes/smooth_black_quartz_slab.json -1da023c272bae872b88901e5fca5535d78a4772b data/actuallyadditions/recipes/smooth_black_quartz_stair.json -8b5b5288e7b80fd1c414379855e2d5e4e7eb4d5e data/actuallyadditions/recipes/smooth_black_quartz_wall.json -000ef9362f2202191f74132c3079ec4c1e2bfec8 data/actuallyadditions/recipes/solid_fuel/charcoal.json -64211ff8cd4ae617f3be4bc6d7e9ff1f73c46e7d data/actuallyadditions/recipes/solid_fuel/coal-block.json -340732fadc7be543ba9ae17f6f1c974022d31de3 data/actuallyadditions/recipes/solid_fuel/coal.json -2bfd72d945bdffcb4c3daf722c85fcbc66cd5caa data/actuallyadditions/recipes/solid_fuel/lava.json -7cea1293846d740cd9470ee0e86e12004ce36bd4 data/actuallyadditions/recipes/solid_fuel/stick.json -652b6e46c68cc83528e47b09a57bef3c91ccbb07 data/actuallyadditions/recipes/solid_fuel/tiny-coal.json -8ebd738f3968564e22ba6841eb821e5064c78588 data/actuallyadditions/recipes/stone_aiot.json -430e4d51767c86fe7824e7d92b260bc430c753c4 data/actuallyadditions/recipes/teleport_staff.json -1842427a08e134e2077bff91479f4d316a321f84 data/actuallyadditions/recipes/tiny_to_charcoal.json -a229210cc01ea031f1eeb09c9030b6f2440af412 data/actuallyadditions/recipes/tiny_to_coal.json -bdf7dbf563485903e444400d341e56d0bf308481 data/actuallyadditions/recipes/tiny_torch.json -b1761a179c6a6a45cc5a8246680d65c45651911d data/actuallyadditions/recipes/travelers_sack.json -aac4c1515b4751f768da8b374aa3e0299ff8c760 data/actuallyadditions/recipes/triple_battery.json -d8611ae9f616794678bb7f2d0c253383f09e8b27 data/actuallyadditions/recipes/vertical_digger.json -171ba8265e3578776d8cba1dda8a72033eeb3de4 data/actuallyadditions/recipes/void_sack.json -17503be947b6e654606f28e6d07d197eb91abc88 data/actuallyadditions/recipes/wings_of_the_bats.json -c562b938e29b85572f1b30952f5711bca2c9c899 data/actuallyadditions/recipes/wood_casing.json -5d0b3e0b27c0a7f82438fd24673866ce087d47f0 data/actuallyadditions/recipes/wooden_aiot.json -f25af32614eaea3e33bbbe473df3768ed1575261 data/actuallyadditions/tags/blocks/mineable/aio.json -f455b03ca55c4ab3e7b0e1e60a516332cfe41fa7 data/actuallyadditions/tags/blocks/mineable/drill.json -a18f00e11fa55ff1b767eeab7a4756c2e0e93429 data/actuallyadditions/tags/items/coffee_beans.json -1714cd34792c6448f7316094c105e2e953b36e73 data/actuallyadditions/tags/items/crystals.json -2290b1829e049ab3002f3576379ad58f6d7b6ace data/actuallyadditions/tags/items/drills.json -8c1e24d7377b6bdf64c13643d94c3826ac925c25 data/actuallyadditions/tags/items/tiny_coals.json -6d90fc27d45eb34ac60019b82494e90acba77135 data/minecraft/tags/blocks/mineable/axe.json -be19b436d177039f96f3dea1ce5a8e6e749d4844 data/minecraft/tags/blocks/mineable/pickaxe.json -925347d0ff7e8c38945bb9782564e5321f2846bd data/minecraft/tags/blocks/needs_stone_tool.json -84fb4202cf40368e8c1a1d36bca0a4952aa05866 data/minecraft/tags/blocks/walls.json diff --git a/src/generated/resources/.cache/cbced4962689e36cb386fe2a02f01561d1264b58 b/src/generated/resources/.cache/cbced4962689e36cb386fe2a02f01561d1264b58 new file mode 100644 index 000000000..ade21d91f --- /dev/null +++ b/src/generated/resources/.cache/cbced4962689e36cb386fe2a02f01561d1264b58 @@ -0,0 +1,2 @@ +// 1.20.1 2024-03-03T00:40:33.0100515 Crushing Recipes +89960a697ac8ce4444802cedf8bd7c97cbbcba7c data/actuallyadditions/recipes/crushing/bone_crusher.json diff --git a/src/generated/resources/.cache/e5c5eb35b4ba40351ecb7d9f04c3527f2f5779b0 b/src/generated/resources/.cache/e5c5eb35b4ba40351ecb7d9f04c3527f2f5779b0 new file mode 100644 index 000000000..2ae199631 --- /dev/null +++ b/src/generated/resources/.cache/e5c5eb35b4ba40351ecb7d9f04c3527f2f5779b0 @@ -0,0 +1,19 @@ +// 1.20.1 2024-03-03T00:40:33.0220509 Advancements +eecec685f69dc6f4e52ea08b4d99b2e5d41f003f data/actuallyadditions/advancements/craft_coal_generator.json +f7ba3b021b96fa8e159b142d20927853fc25a763 data/actuallyadditions/advancements/craft_coffee_machine.json +5a05d2883dc6c613d19135810bbaa9e86809f61f data/actuallyadditions/advancements/craft_crusher.json +b006b1018d43e760a93cb589f1cad6bda61d1977 data/actuallyadditions/advancements/craft_double_crusher.json +700f73f971f24f935be182daa0937c1ab0a22047 data/actuallyadditions/advancements/craft_empowerer.json +1de0b7b78528845a8d958287293ec2df7027e4d1 data/actuallyadditions/advancements/craft_energyface.json +869001898a430fbdd1787372784e7d074a100053 data/actuallyadditions/advancements/craft_item_interface.json +ae524ca63e031e7f00b26bc3c9dc7759b7109e5b data/actuallyadditions/advancements/craft_laser_relay.json +9732605c4e7baec683b5505ba227705cec237d70 data/actuallyadditions/advancements/craft_laser_relay_advanced.json +11933a1dde18d8a6ee4e73186023fd2042daccb2 data/actuallyadditions/advancements/craft_laser_relay_extreme.json +deea3ba3d3eb359cefe0560b63e3bf61802ca43b data/actuallyadditions/advancements/craft_laser_relay_item.json +5abe91e196a2de66bdb2263b0483ec55056ffbca data/actuallyadditions/advancements/craft_leaf_generator.json +0c78c0f7102f6cfabdd6e6bf4eb57142a51301a8 data/actuallyadditions/advancements/craft_liquiface.json +28c7df8353281e3b9cde3e7c666a1d53e316c1d3 data/actuallyadditions/advancements/craft_phantom_face.json +f3194f9c73e34f5b5e0e8b1eb09fabd676e549c1 data/actuallyadditions/advancements/craft_reconstructor.json +3f64f748da6a0979da8b7cd9121bea09f72030b2 data/actuallyadditions/advancements/make_first_crystal.json +61110157218e664b1a550a01ca10c7374be52f66 data/actuallyadditions/advancements/pickup_coffee.json +c049e6ede82a1daf169ff046999f63fc33d734a5 data/actuallyadditions/advancements/root.json diff --git a/src/generated/resources/.cache/fa43e5ef6ac83dd009de17d3b434e29660c4c3fc b/src/generated/resources/.cache/fa43e5ef6ac83dd009de17d3b434e29660c4c3fc new file mode 100644 index 000000000..75a908e9d --- /dev/null +++ b/src/generated/resources/.cache/fa43e5ef6ac83dd009de17d3b434e29660c4c3fc @@ -0,0 +1,10 @@ +// 1.20.1 2024-03-03T00:40:33.0125518 Mining Lens Recipes +411b455c637359f1f46df6fced8cd7558436e938 data/actuallyadditions/recipes/mininglens/nether_nether_gold_ore.json +7227ee2a53f520facb7fe8f7b34a1a74c9a49e85 data/actuallyadditions/recipes/mininglens/nether_nether_quartz_ore.json +550a0fe3577fcdaf0e1af1b2e3a518256992e00b data/actuallyadditions/recipes/mininglens/stone_coal_ore.json +869a51e0fc919b7a4577bb7c466ca07a6ae0370b data/actuallyadditions/recipes/mininglens/stone_diamond_ore.json +f74f71eb82bc63538662217d9b0eb136bd262618 data/actuallyadditions/recipes/mininglens/stone_emerald_ore.json +231db303e6f5b38fee1beec4dfb7e37932b50b8a data/actuallyadditions/recipes/mininglens/stone_gold_ore.json +a553a9ce2aed89eb4107d09933497225b0b3038b data/actuallyadditions/recipes/mininglens/stone_iron_ore.json +a2b6a72e29c23913016c4d24ef0a011ef211d035 data/actuallyadditions/recipes/mininglens/stone_lapis_ore.json +3aa5fea8318a2e330443e43785892fcfa82e60bf data/actuallyadditions/recipes/mininglens/stone_redstone_ore.json diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/atomic_reconstructor.json b/src/generated/resources/assets/actuallyadditions/blockstates/atomic_reconstructor.json index f73250747..401b7b33b 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/atomic_reconstructor.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/atomic_reconstructor.json @@ -4,8 +4,10 @@ "model": "actuallyadditions:block/atomic_reconstructor", "x": 180 }, - "facing=up": { - "model": "actuallyadditions:block/atomic_reconstructor" + "facing=east": { + "model": "actuallyadditions:block/atomic_reconstructor", + "x": 90, + "y": 90 }, "facing=north": { "model": "actuallyadditions:block/atomic_reconstructor", @@ -16,15 +18,13 @@ "x": 90, "y": 180 }, + "facing=up": { + "model": "actuallyadditions:block/atomic_reconstructor" + }, "facing=west": { "model": "actuallyadditions:block/atomic_reconstructor", "x": 90, "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/atomic_reconstructor", - "x": 90, - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_brick_slab.json b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_brick_slab.json index b5dba9e6d..8ba18357f 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_brick_slab.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_brick_slab.json @@ -1,13 +1,13 @@ { "variants": { - "type=top": { - "model": "actuallyadditions:block/black_quartz_brick_slab_top" - }, "type=bottom": { "model": "actuallyadditions:block/black_quartz_brick_slab" }, "type=double": { "model": "actuallyadditions:block/black_quartz_brick_block" + }, + "type=top": { + "model": "actuallyadditions:block/black_quartz_brick_slab_top" } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_brick_stair.json b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_brick_stair.json index a9816597f..4b567f8a6 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_brick_stair.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_brick_stair.json @@ -1,209 +1,209 @@ { "variants": { - "facing=north,half=top,shape=straight": { - "model": "actuallyadditions:block/black_quartz_brick_stair", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=south,half=top,shape=straight": { - "model": "actuallyadditions:block/black_quartz_brick_stair", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=west,half=top,shape=straight": { - "model": "actuallyadditions:block/black_quartz_brick_stair", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=east,half=top,shape=straight": { - "model": "actuallyadditions:block/black_quartz_brick_stair", - "x": 180, - "uvlock": true - }, - "facing=north,half=bottom,shape=straight": { - "model": "actuallyadditions:block/black_quartz_brick_stair", - "y": 270, - "uvlock": true - }, - "facing=south,half=bottom,shape=straight": { - "model": "actuallyadditions:block/black_quartz_brick_stair", - "y": 90, - "uvlock": true - }, - "facing=west,half=bottom,shape=straight": { - "model": "actuallyadditions:block/black_quartz_brick_stair", - "y": 180, - "uvlock": true - }, - "facing=east,half=bottom,shape=straight": { - "model": "actuallyadditions:block/black_quartz_brick_stair" - }, - "facing=north,half=top,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_brick_stair_inner", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=south,half=top,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_brick_stair_inner", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=west,half=top,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_brick_stair_inner", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=east,half=top,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_brick_stair_inner", - "x": 180, - "uvlock": true - }, - "facing=north,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_brick_stair_inner", - "y": 180, - "uvlock": true - }, - "facing=south,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_brick_stair_inner" - }, - "facing=west,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_brick_stair_inner", - "y": 90, - "uvlock": true - }, "facing=east,half=bottom,shape=inner_left": { "model": "actuallyadditions:block/black_quartz_brick_stair_inner", - "y": 270, - "uvlock": true - }, - "facing=north,half=top,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_brick_stair_inner", - "x": 180, - "uvlock": true - }, - "facing=south,half=top,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_brick_stair_inner", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=west,half=top,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_brick_stair_inner", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=east,half=top,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_brick_stair_inner", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=north,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_brick_stair_inner", - "y": 270, - "uvlock": true - }, - "facing=south,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_brick_stair_inner", - "y": 90, - "uvlock": true - }, - "facing=west,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_brick_stair_inner", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 270 }, "facing=east,half=bottom,shape=inner_right": { "model": "actuallyadditions:block/black_quartz_brick_stair_inner" }, - "facing=north,half=top,shape=outer_left": { + "facing=east,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_brick_stair_outer", - "x": 180, - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 }, - "facing=south,half=top,shape=outer_left": { - "model": "actuallyadditions:block/black_quartz_brick_stair_outer", - "x": 180, - "y": 90, - "uvlock": true + "facing=east,half=bottom,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_brick_stair_outer" }, - "facing=west,half=top,shape=outer_left": { - "model": "actuallyadditions:block/black_quartz_brick_stair_outer", + "facing=east,half=bottom,shape=straight": { + "model": "actuallyadditions:block/black_quartz_brick_stair" + }, + "facing=east,half=top,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_brick_stair_inner", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_brick_stair_inner", + "uvlock": true, "x": 180, - "y": 180, - "uvlock": true + "y": 90 }, "facing=east,half=top,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_brick_stair_outer", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_brick_stair_outer", + "uvlock": true, "x": 180, - "uvlock": true + "y": 90 + }, + "facing=east,half=top,shape=straight": { + "model": "actuallyadditions:block/black_quartz_brick_stair", + "uvlock": true, + "x": 180 + }, + "facing=north,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_brick_stair_inner", + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_brick_stair_inner", + "uvlock": true, + "y": 270 }, "facing=north,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_brick_stair_outer", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_brick_stair_outer", + "uvlock": true, + "y": 270 + }, + "facing=north,half=bottom,shape=straight": { + "model": "actuallyadditions:block/black_quartz_brick_stair", + "uvlock": true, + "y": 270 + }, + "facing=north,half=top,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_brick_stair_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_brick_stair_inner", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=outer_left": { + "model": "actuallyadditions:block/black_quartz_brick_stair_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_brick_stair_outer", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=straight": { + "model": "actuallyadditions:block/black_quartz_brick_stair", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=south,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_brick_stair_inner" + }, + "facing=south,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_brick_stair_inner", + "uvlock": true, + "y": 90 }, "facing=south,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_brick_stair_outer" }, - "facing=west,half=bottom,shape=outer_left": { + "facing=south,half=bottom,shape=outer_right": { "model": "actuallyadditions:block/black_quartz_brick_stair_outer", - "y": 90, - "uvlock": true + "uvlock": true, + "y": 90 }, - "facing=east,half=bottom,shape=outer_left": { - "model": "actuallyadditions:block/black_quartz_brick_stair_outer", - "y": 270, - "uvlock": true + "facing=south,half=bottom,shape=straight": { + "model": "actuallyadditions:block/black_quartz_brick_stair", + "uvlock": true, + "y": 90 }, - "facing=north,half=top,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_brick_stair_outer", + "facing=south,half=top,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_brick_stair_inner", + "uvlock": true, "x": 180, - "uvlock": true + "y": 90 + }, + "facing=south,half=top,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_brick_stair_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=south,half=top,shape=outer_left": { + "model": "actuallyadditions:block/black_quartz_brick_stair_outer", + "uvlock": true, + "x": 180, + "y": 90 }, "facing=south,half=top,shape=outer_right": { "model": "actuallyadditions:block/black_quartz_brick_stair_outer", + "uvlock": true, "x": 180, - "y": 180, - "uvlock": true + "y": 180 }, - "facing=west,half=top,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_brick_stair_outer", + "facing=south,half=top,shape=straight": { + "model": "actuallyadditions:block/black_quartz_brick_stair", + "uvlock": true, "x": 180, - "y": 270, - "uvlock": true + "y": 90 }, - "facing=east,half=top,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_brick_stair_outer", - "x": 180, - "y": 90, - "uvlock": true + "facing=west,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_brick_stair_inner", + "uvlock": true, + "y": 90 }, - "facing=north,half=bottom,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_brick_stair_outer", - "y": 270, - "uvlock": true + "facing=west,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_brick_stair_inner", + "uvlock": true, + "y": 180 }, - "facing=south,half=bottom,shape=outer_right": { + "facing=west,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_brick_stair_outer", - "y": 90, - "uvlock": true + "uvlock": true, + "y": 90 }, "facing=west,half=bottom,shape=outer_right": { "model": "actuallyadditions:block/black_quartz_brick_stair_outer", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 180 }, - "facing=east,half=bottom,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_brick_stair_outer" + "facing=west,half=bottom,shape=straight": { + "model": "actuallyadditions:block/black_quartz_brick_stair", + "uvlock": true, + "y": 180 + }, + "facing=west,half=top,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_brick_stair_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_brick_stair_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=outer_left": { + "model": "actuallyadditions:block/black_quartz_brick_stair_outer", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_brick_stair_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=straight": { + "model": "actuallyadditions:block/black_quartz_brick_stair", + "uvlock": true, + "x": 180, + "y": 180 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_brick_wall.json b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_brick_wall.json index 8e5bd11ae..ac792f9a5 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_brick_wall.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_brick_wall.json @@ -1,89 +1,89 @@ { "multipart": [ { - "when": { - "up": "true" - }, "apply": { "model": "actuallyadditions:block/black_quartz_brick_wall_post" + }, + "when": { + "up": "true" } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_brick_wall_side", + "uvlock": true, + "y": 90 + }, "when": { "east": "low" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_brick_wall_side", - "y": 90, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_brick_wall_side_tall", + "uvlock": true, + "y": 90 + }, "when": { "east": "tall" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_brick_wall_side_tall", - "y": 90, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_brick_wall_side", + "uvlock": true + }, "when": { "north": "low" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_brick_wall_side", - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_brick_wall_side_tall", + "uvlock": true + }, "when": { "north": "tall" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_brick_wall_side_tall", - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_brick_wall_side", + "uvlock": true, + "y": 180 + }, "when": { "south": "low" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_brick_wall_side", - "y": 180, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_brick_wall_side_tall", + "uvlock": true, + "y": 180 + }, "when": { "south": "tall" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_brick_wall_side_tall", - "y": 180, - "uvlock": true } }, { - "when": { - "west": "low" - }, "apply": { "model": "actuallyadditions:block/black_quartz_brick_wall_side", - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 + }, + "when": { + "west": "low" } }, { - "when": { - "west": "tall" - }, "apply": { "model": "actuallyadditions:block/black_quartz_brick_wall_side_tall", - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 + }, + "when": { + "west": "tall" } } ] diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_pillar_slab.json b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_pillar_slab.json index 0757c73f5..9c602bc4c 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_pillar_slab.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_pillar_slab.json @@ -1,13 +1,13 @@ { "variants": { - "type=top": { - "model": "actuallyadditions:block/black_quartz_pillar_slab_top" - }, "type=bottom": { "model": "actuallyadditions:block/black_quartz_pillar_slab" }, "type=double": { "model": "actuallyadditions:block/black_quartz_pillar_block" + }, + "type=top": { + "model": "actuallyadditions:block/black_quartz_pillar_slab_top" } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_pillar_stair.json b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_pillar_stair.json index d8eb0f56f..26e70799d 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_pillar_stair.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_pillar_stair.json @@ -1,209 +1,209 @@ { "variants": { - "facing=north,half=top,shape=straight": { - "model": "actuallyadditions:block/black_quartz_pillar_stair", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=south,half=top,shape=straight": { - "model": "actuallyadditions:block/black_quartz_pillar_stair", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=west,half=top,shape=straight": { - "model": "actuallyadditions:block/black_quartz_pillar_stair", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=east,half=top,shape=straight": { - "model": "actuallyadditions:block/black_quartz_pillar_stair", - "x": 180, - "uvlock": true - }, - "facing=north,half=bottom,shape=straight": { - "model": "actuallyadditions:block/black_quartz_pillar_stair", - "y": 270, - "uvlock": true - }, - "facing=south,half=bottom,shape=straight": { - "model": "actuallyadditions:block/black_quartz_pillar_stair", - "y": 90, - "uvlock": true - }, - "facing=west,half=bottom,shape=straight": { - "model": "actuallyadditions:block/black_quartz_pillar_stair", - "y": 180, - "uvlock": true - }, - "facing=east,half=bottom,shape=straight": { - "model": "actuallyadditions:block/black_quartz_pillar_stair" - }, - "facing=north,half=top,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=south,half=top,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=west,half=top,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=east,half=top,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", - "x": 180, - "uvlock": true - }, - "facing=north,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", - "y": 180, - "uvlock": true - }, - "facing=south,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_inner" - }, - "facing=west,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", - "y": 90, - "uvlock": true - }, "facing=east,half=bottom,shape=inner_left": { "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", - "y": 270, - "uvlock": true - }, - "facing=north,half=top,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", - "x": 180, - "uvlock": true - }, - "facing=south,half=top,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=west,half=top,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=east,half=top,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=north,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", - "y": 270, - "uvlock": true - }, - "facing=south,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", - "y": 90, - "uvlock": true - }, - "facing=west,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 270 }, "facing=east,half=bottom,shape=inner_right": { "model": "actuallyadditions:block/black_quartz_pillar_stair_inner" }, - "facing=north,half=top,shape=outer_left": { + "facing=east,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", - "x": 180, - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 }, - "facing=south,half=top,shape=outer_left": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", - "x": 180, - "y": 90, - "uvlock": true + "facing=east,half=bottom,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_outer" }, - "facing=west,half=top,shape=outer_left": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", + "facing=east,half=bottom,shape=straight": { + "model": "actuallyadditions:block/black_quartz_pillar_stair" + }, + "facing=east,half=top,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", + "uvlock": true, "x": 180, - "y": 180, - "uvlock": true + "y": 90 }, "facing=east,half=top,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", + "uvlock": true, "x": 180, - "uvlock": true + "y": 90 + }, + "facing=east,half=top,shape=straight": { + "model": "actuallyadditions:block/black_quartz_pillar_stair", + "uvlock": true, + "x": 180 + }, + "facing=north,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", + "uvlock": true, + "y": 270 }, "facing=north,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", + "uvlock": true, + "y": 270 + }, + "facing=north,half=bottom,shape=straight": { + "model": "actuallyadditions:block/black_quartz_pillar_stair", + "uvlock": true, + "y": 270 + }, + "facing=north,half=top,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=outer_left": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=straight": { + "model": "actuallyadditions:block/black_quartz_pillar_stair", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=south,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_inner" + }, + "facing=south,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", + "uvlock": true, + "y": 90 }, "facing=south,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_pillar_stair_outer" }, - "facing=west,half=bottom,shape=outer_left": { + "facing=south,half=bottom,shape=outer_right": { "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", - "y": 90, - "uvlock": true + "uvlock": true, + "y": 90 }, - "facing=east,half=bottom,shape=outer_left": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", - "y": 270, - "uvlock": true + "facing=south,half=bottom,shape=straight": { + "model": "actuallyadditions:block/black_quartz_pillar_stair", + "uvlock": true, + "y": 90 }, - "facing=north,half=top,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", + "facing=south,half=top,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", + "uvlock": true, "x": 180, - "uvlock": true + "y": 90 + }, + "facing=south,half=top,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=south,half=top,shape=outer_left": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", + "uvlock": true, + "x": 180, + "y": 90 }, "facing=south,half=top,shape=outer_right": { "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", + "uvlock": true, "x": 180, - "y": 180, - "uvlock": true + "y": 180 }, - "facing=west,half=top,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", + "facing=south,half=top,shape=straight": { + "model": "actuallyadditions:block/black_quartz_pillar_stair", + "uvlock": true, "x": 180, - "y": 270, - "uvlock": true + "y": 90 }, - "facing=east,half=top,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", - "x": 180, - "y": 90, - "uvlock": true + "facing=west,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", + "uvlock": true, + "y": 90 }, - "facing=north,half=bottom,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", - "y": 270, - "uvlock": true + "facing=west,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", + "uvlock": true, + "y": 180 }, - "facing=south,half=bottom,shape=outer_right": { + "facing=west,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", - "y": 90, - "uvlock": true + "uvlock": true, + "y": 90 }, "facing=west,half=bottom,shape=outer_right": { "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 180 }, - "facing=east,half=bottom,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_pillar_stair_outer" + "facing=west,half=bottom,shape=straight": { + "model": "actuallyadditions:block/black_quartz_pillar_stair", + "uvlock": true, + "y": 180 + }, + "facing=west,half=top,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=outer_left": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_pillar_stair_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=straight": { + "model": "actuallyadditions:block/black_quartz_pillar_stair", + "uvlock": true, + "x": 180, + "y": 180 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_pillar_wall.json b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_pillar_wall.json index cf99405d0..d7ed27a79 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_pillar_wall.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_pillar_wall.json @@ -1,89 +1,89 @@ { "multipart": [ { - "when": { - "up": "true" - }, "apply": { "model": "actuallyadditions:block/black_quartz_pillar_wall_post" + }, + "when": { + "up": "true" } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_pillar_wall_side", + "uvlock": true, + "y": 90 + }, "when": { "east": "low" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_pillar_wall_side", - "y": 90, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_pillar_wall_side_tall", + "uvlock": true, + "y": 90 + }, "when": { "east": "tall" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_pillar_wall_side_tall", - "y": 90, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_pillar_wall_side", + "uvlock": true + }, "when": { "north": "low" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_pillar_wall_side", - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_pillar_wall_side_tall", + "uvlock": true + }, "when": { "north": "tall" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_pillar_wall_side_tall", - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_pillar_wall_side", + "uvlock": true, + "y": 180 + }, "when": { "south": "low" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_pillar_wall_side", - "y": 180, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_pillar_wall_side_tall", + "uvlock": true, + "y": 180 + }, "when": { "south": "tall" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_pillar_wall_side_tall", - "y": 180, - "uvlock": true } }, { - "when": { - "west": "low" - }, "apply": { "model": "actuallyadditions:block/black_quartz_pillar_wall_side", - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 + }, + "when": { + "west": "low" } }, { - "when": { - "west": "tall" - }, "apply": { "model": "actuallyadditions:block/black_quartz_pillar_wall_side_tall", - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 + }, + "when": { + "west": "tall" } } ] diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_slab.json b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_slab.json index 657be44eb..74e60914a 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_slab.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_slab.json @@ -1,13 +1,13 @@ { "variants": { - "type=top": { - "model": "actuallyadditions:block/black_quartz_slab_top" - }, "type=bottom": { "model": "actuallyadditions:block/black_quartz_slab" }, "type=double": { "model": "actuallyadditions:block/black_quartz_block" + }, + "type=top": { + "model": "actuallyadditions:block/black_quartz_slab_top" } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_stair.json b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_stair.json index 9e038b4d5..672eb16a7 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_stair.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_stair.json @@ -1,209 +1,209 @@ { "variants": { - "facing=north,half=top,shape=straight": { - "model": "actuallyadditions:block/black_quartz_stair", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=south,half=top,shape=straight": { - "model": "actuallyadditions:block/black_quartz_stair", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=west,half=top,shape=straight": { - "model": "actuallyadditions:block/black_quartz_stair", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=east,half=top,shape=straight": { - "model": "actuallyadditions:block/black_quartz_stair", - "x": 180, - "uvlock": true - }, - "facing=north,half=bottom,shape=straight": { - "model": "actuallyadditions:block/black_quartz_stair", - "y": 270, - "uvlock": true - }, - "facing=south,half=bottom,shape=straight": { - "model": "actuallyadditions:block/black_quartz_stair", - "y": 90, - "uvlock": true - }, - "facing=west,half=bottom,shape=straight": { - "model": "actuallyadditions:block/black_quartz_stair", - "y": 180, - "uvlock": true - }, - "facing=east,half=bottom,shape=straight": { - "model": "actuallyadditions:block/black_quartz_stair" - }, - "facing=north,half=top,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_stair_inner", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=south,half=top,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_stair_inner", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=west,half=top,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_stair_inner", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=east,half=top,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_stair_inner", - "x": 180, - "uvlock": true - }, - "facing=north,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_stair_inner", - "y": 180, - "uvlock": true - }, - "facing=south,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_stair_inner" - }, - "facing=west,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/black_quartz_stair_inner", - "y": 90, - "uvlock": true - }, "facing=east,half=bottom,shape=inner_left": { "model": "actuallyadditions:block/black_quartz_stair_inner", - "y": 270, - "uvlock": true - }, - "facing=north,half=top,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_stair_inner", - "x": 180, - "uvlock": true - }, - "facing=south,half=top,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_stair_inner", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=west,half=top,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_stair_inner", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=east,half=top,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_stair_inner", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=north,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_stair_inner", - "y": 270, - "uvlock": true - }, - "facing=south,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_stair_inner", - "y": 90, - "uvlock": true - }, - "facing=west,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/black_quartz_stair_inner", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 270 }, "facing=east,half=bottom,shape=inner_right": { "model": "actuallyadditions:block/black_quartz_stair_inner" }, - "facing=north,half=top,shape=outer_left": { + "facing=east,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_stair_outer", - "x": 180, - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 }, - "facing=south,half=top,shape=outer_left": { - "model": "actuallyadditions:block/black_quartz_stair_outer", - "x": 180, - "y": 90, - "uvlock": true + "facing=east,half=bottom,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_stair_outer" }, - "facing=west,half=top,shape=outer_left": { - "model": "actuallyadditions:block/black_quartz_stair_outer", + "facing=east,half=bottom,shape=straight": { + "model": "actuallyadditions:block/black_quartz_stair" + }, + "facing=east,half=top,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_stair_inner", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_stair_inner", + "uvlock": true, "x": 180, - "y": 180, - "uvlock": true + "y": 90 }, "facing=east,half=top,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_stair_outer", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_stair_outer", + "uvlock": true, "x": 180, - "uvlock": true + "y": 90 + }, + "facing=east,half=top,shape=straight": { + "model": "actuallyadditions:block/black_quartz_stair", + "uvlock": true, + "x": 180 + }, + "facing=north,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_stair_inner", + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_stair_inner", + "uvlock": true, + "y": 270 }, "facing=north,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_stair_outer", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_stair_outer", + "uvlock": true, + "y": 270 + }, + "facing=north,half=bottom,shape=straight": { + "model": "actuallyadditions:block/black_quartz_stair", + "uvlock": true, + "y": 270 + }, + "facing=north,half=top,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_stair_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_stair_inner", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=outer_left": { + "model": "actuallyadditions:block/black_quartz_stair_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_stair_outer", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=straight": { + "model": "actuallyadditions:block/black_quartz_stair", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=south,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_stair_inner" + }, + "facing=south,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_stair_inner", + "uvlock": true, + "y": 90 }, "facing=south,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_stair_outer" }, - "facing=west,half=bottom,shape=outer_left": { + "facing=south,half=bottom,shape=outer_right": { "model": "actuallyadditions:block/black_quartz_stair_outer", - "y": 90, - "uvlock": true + "uvlock": true, + "y": 90 }, - "facing=east,half=bottom,shape=outer_left": { - "model": "actuallyadditions:block/black_quartz_stair_outer", - "y": 270, - "uvlock": true + "facing=south,half=bottom,shape=straight": { + "model": "actuallyadditions:block/black_quartz_stair", + "uvlock": true, + "y": 90 }, - "facing=north,half=top,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_stair_outer", + "facing=south,half=top,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_stair_inner", + "uvlock": true, "x": 180, - "uvlock": true + "y": 90 + }, + "facing=south,half=top,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_stair_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=south,half=top,shape=outer_left": { + "model": "actuallyadditions:block/black_quartz_stair_outer", + "uvlock": true, + "x": 180, + "y": 90 }, "facing=south,half=top,shape=outer_right": { "model": "actuallyadditions:block/black_quartz_stair_outer", + "uvlock": true, "x": 180, - "y": 180, - "uvlock": true + "y": 180 }, - "facing=west,half=top,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_stair_outer", + "facing=south,half=top,shape=straight": { + "model": "actuallyadditions:block/black_quartz_stair", + "uvlock": true, "x": 180, - "y": 270, - "uvlock": true + "y": 90 }, - "facing=east,half=top,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_stair_outer", - "x": 180, - "y": 90, - "uvlock": true + "facing=west,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_stair_inner", + "uvlock": true, + "y": 90 }, - "facing=north,half=bottom,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_stair_outer", - "y": 270, - "uvlock": true + "facing=west,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_stair_inner", + "uvlock": true, + "y": 180 }, - "facing=south,half=bottom,shape=outer_right": { + "facing=west,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/black_quartz_stair_outer", - "y": 90, - "uvlock": true + "uvlock": true, + "y": 90 }, "facing=west,half=bottom,shape=outer_right": { "model": "actuallyadditions:block/black_quartz_stair_outer", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 180 }, - "facing=east,half=bottom,shape=outer_right": { - "model": "actuallyadditions:block/black_quartz_stair_outer" + "facing=west,half=bottom,shape=straight": { + "model": "actuallyadditions:block/black_quartz_stair", + "uvlock": true, + "y": 180 + }, + "facing=west,half=top,shape=inner_left": { + "model": "actuallyadditions:block/black_quartz_stair_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=inner_right": { + "model": "actuallyadditions:block/black_quartz_stair_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=outer_left": { + "model": "actuallyadditions:block/black_quartz_stair_outer", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=outer_right": { + "model": "actuallyadditions:block/black_quartz_stair_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=straight": { + "model": "actuallyadditions:block/black_quartz_stair", + "uvlock": true, + "x": 180, + "y": 180 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_wall.json b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_wall.json index a7d772606..ef65f7377 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_wall.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/black_quartz_wall.json @@ -1,89 +1,89 @@ { "multipart": [ { - "when": { - "up": "true" - }, "apply": { "model": "actuallyadditions:block/black_quartz_wall_post" + }, + "when": { + "up": "true" } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_wall_side", + "uvlock": true, + "y": 90 + }, "when": { "east": "low" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_wall_side", - "y": 90, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_wall_side_tall", + "uvlock": true, + "y": 90 + }, "when": { "east": "tall" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_wall_side_tall", - "y": 90, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_wall_side", + "uvlock": true + }, "when": { "north": "low" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_wall_side", - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_wall_side_tall", + "uvlock": true + }, "when": { "north": "tall" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_wall_side_tall", - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_wall_side", + "uvlock": true, + "y": 180 + }, "when": { "south": "low" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_wall_side", - "y": 180, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/black_quartz_wall_side_tall", + "uvlock": true, + "y": 180 + }, "when": { "south": "tall" - }, - "apply": { - "model": "actuallyadditions:block/black_quartz_wall_side_tall", - "y": 180, - "uvlock": true } }, { - "when": { - "west": "low" - }, "apply": { "model": "actuallyadditions:block/black_quartz_wall_side", - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 + }, + "when": { + "west": "low" } }, { - "when": { - "west": "tall" - }, "apply": { "model": "actuallyadditions:block/black_quartz_wall_side_tall", - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 + }, + "when": { + "west": "tall" } } ] diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/breaker.json b/src/generated/resources/assets/actuallyadditions/blockstates/breaker.json index 71d55086e..a36f0f1ea 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/breaker.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/breaker.json @@ -4,8 +4,10 @@ "model": "actuallyadditions:block/breaker", "x": 180 }, - "facing=up": { - "model": "actuallyadditions:block/breaker" + "facing=east": { + "model": "actuallyadditions:block/breaker", + "x": 90, + "y": 90 }, "facing=north": { "model": "actuallyadditions:block/breaker", @@ -16,15 +18,13 @@ "x": 90, "y": 180 }, + "facing=up": { + "model": "actuallyadditions:block/breaker" + }, "facing=west": { "model": "actuallyadditions:block/breaker", "x": 90, "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/breaker", - "x": 90, - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/chiseled_black_quartz_slab.json b/src/generated/resources/assets/actuallyadditions/blockstates/chiseled_black_quartz_slab.json index b9dfe36c2..88e245623 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/chiseled_black_quartz_slab.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/chiseled_black_quartz_slab.json @@ -1,13 +1,13 @@ { "variants": { - "type=top": { - "model": "actuallyadditions:block/chiseled_black_quartz_slab_top" - }, "type=bottom": { "model": "actuallyadditions:block/chiseled_black_quartz_slab" }, "type=double": { "model": "actuallyadditions:block/chiseled_black_quartz_block" + }, + "type=top": { + "model": "actuallyadditions:block/chiseled_black_quartz_slab_top" } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/chiseled_black_quartz_stair.json b/src/generated/resources/assets/actuallyadditions/blockstates/chiseled_black_quartz_stair.json index 1c47f18e2..1c00619b5 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/chiseled_black_quartz_stair.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/chiseled_black_quartz_stair.json @@ -1,209 +1,209 @@ { "variants": { - "facing=north,half=top,shape=straight": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=south,half=top,shape=straight": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=west,half=top,shape=straight": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=east,half=top,shape=straight": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair", - "x": 180, - "uvlock": true - }, - "facing=north,half=bottom,shape=straight": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair", - "y": 270, - "uvlock": true - }, - "facing=south,half=bottom,shape=straight": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair", - "y": 90, - "uvlock": true - }, - "facing=west,half=bottom,shape=straight": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair", - "y": 180, - "uvlock": true - }, - "facing=east,half=bottom,shape=straight": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair" - }, - "facing=north,half=top,shape=inner_left": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=south,half=top,shape=inner_left": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=west,half=top,shape=inner_left": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=east,half=top,shape=inner_left": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", - "x": 180, - "uvlock": true - }, - "facing=north,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", - "y": 180, - "uvlock": true - }, - "facing=south,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner" - }, - "facing=west,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", - "y": 90, - "uvlock": true - }, "facing=east,half=bottom,shape=inner_left": { "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", - "y": 270, - "uvlock": true - }, - "facing=north,half=top,shape=inner_right": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", - "x": 180, - "uvlock": true - }, - "facing=south,half=top,shape=inner_right": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=west,half=top,shape=inner_right": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=east,half=top,shape=inner_right": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=north,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", - "y": 270, - "uvlock": true - }, - "facing=south,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", - "y": 90, - "uvlock": true - }, - "facing=west,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 270 }, "facing=east,half=bottom,shape=inner_right": { "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner" }, - "facing=north,half=top,shape=outer_left": { + "facing=east,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", - "x": 180, - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 }, - "facing=south,half=top,shape=outer_left": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", - "x": 180, - "y": 90, - "uvlock": true + "facing=east,half=bottom,shape=outer_right": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer" }, - "facing=west,half=top,shape=outer_left": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", + "facing=east,half=bottom,shape=straight": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair" + }, + "facing=east,half=top,shape=inner_left": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=inner_right": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", + "uvlock": true, "x": 180, - "y": 180, - "uvlock": true + "y": 90 }, "facing=east,half=top,shape=outer_left": { "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=outer_right": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", + "uvlock": true, "x": 180, - "uvlock": true + "y": 90 + }, + "facing=east,half=top,shape=straight": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair", + "uvlock": true, + "x": 180 + }, + "facing=north,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", + "uvlock": true, + "y": 270 }, "facing=north,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=outer_right": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", + "uvlock": true, + "y": 270 + }, + "facing=north,half=bottom,shape=straight": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair", + "uvlock": true, + "y": 270 + }, + "facing=north,half=top,shape=inner_left": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=inner_right": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=outer_left": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=outer_right": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=straight": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=south,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner" + }, + "facing=south,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", + "uvlock": true, + "y": 90 }, "facing=south,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer" }, - "facing=west,half=bottom,shape=outer_left": { + "facing=south,half=bottom,shape=outer_right": { "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", - "y": 90, - "uvlock": true + "uvlock": true, + "y": 90 }, - "facing=east,half=bottom,shape=outer_left": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", - "y": 270, - "uvlock": true + "facing=south,half=bottom,shape=straight": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair", + "uvlock": true, + "y": 90 }, - "facing=north,half=top,shape=outer_right": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", + "facing=south,half=top,shape=inner_left": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", + "uvlock": true, "x": 180, - "uvlock": true + "y": 90 + }, + "facing=south,half=top,shape=inner_right": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=south,half=top,shape=outer_left": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", + "uvlock": true, + "x": 180, + "y": 90 }, "facing=south,half=top,shape=outer_right": { "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", + "uvlock": true, "x": 180, - "y": 180, - "uvlock": true + "y": 180 }, - "facing=west,half=top,shape=outer_right": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", + "facing=south,half=top,shape=straight": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair", + "uvlock": true, "x": 180, - "y": 270, - "uvlock": true + "y": 90 }, - "facing=east,half=top,shape=outer_right": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", - "x": 180, - "y": 90, - "uvlock": true + "facing=west,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", + "uvlock": true, + "y": 90 }, - "facing=north,half=bottom,shape=outer_right": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", - "y": 270, - "uvlock": true + "facing=west,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", + "uvlock": true, + "y": 180 }, - "facing=south,half=bottom,shape=outer_right": { + "facing=west,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", - "y": 90, - "uvlock": true + "uvlock": true, + "y": 90 }, "facing=west,half=bottom,shape=outer_right": { "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 180 }, - "facing=east,half=bottom,shape=outer_right": { - "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer" + "facing=west,half=bottom,shape=straight": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair", + "uvlock": true, + "y": 180 + }, + "facing=west,half=top,shape=inner_left": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=inner_right": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=outer_left": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=outer_right": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=straight": { + "model": "actuallyadditions:block/chiseled_black_quartz_stair", + "uvlock": true, + "x": 180, + "y": 180 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/chiseled_black_quartz_wall.json b/src/generated/resources/assets/actuallyadditions/blockstates/chiseled_black_quartz_wall.json index 28547424c..12295efe3 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/chiseled_black_quartz_wall.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/chiseled_black_quartz_wall.json @@ -1,89 +1,89 @@ { "multipart": [ { - "when": { - "up": "true" - }, "apply": { "model": "actuallyadditions:block/chiseled_black_quartz_wall_post" + }, + "when": { + "up": "true" } }, { + "apply": { + "model": "actuallyadditions:block/chiseled_black_quartz_wall_side", + "uvlock": true, + "y": 90 + }, "when": { "east": "low" - }, - "apply": { - "model": "actuallyadditions:block/chiseled_black_quartz_wall_side", - "y": 90, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/chiseled_black_quartz_wall_side_tall", + "uvlock": true, + "y": 90 + }, "when": { "east": "tall" - }, - "apply": { - "model": "actuallyadditions:block/chiseled_black_quartz_wall_side_tall", - "y": 90, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/chiseled_black_quartz_wall_side", + "uvlock": true + }, "when": { "north": "low" - }, - "apply": { - "model": "actuallyadditions:block/chiseled_black_quartz_wall_side", - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/chiseled_black_quartz_wall_side_tall", + "uvlock": true + }, "when": { "north": "tall" - }, - "apply": { - "model": "actuallyadditions:block/chiseled_black_quartz_wall_side_tall", - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/chiseled_black_quartz_wall_side", + "uvlock": true, + "y": 180 + }, "when": { "south": "low" - }, - "apply": { - "model": "actuallyadditions:block/chiseled_black_quartz_wall_side", - "y": 180, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/chiseled_black_quartz_wall_side_tall", + "uvlock": true, + "y": 180 + }, "when": { "south": "tall" - }, - "apply": { - "model": "actuallyadditions:block/chiseled_black_quartz_wall_side_tall", - "y": 180, - "uvlock": true } }, { - "when": { - "west": "low" - }, "apply": { "model": "actuallyadditions:block/chiseled_black_quartz_wall_side", - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 + }, + "when": { + "west": "low" } }, { - "when": { - "west": "tall" - }, "apply": { "model": "actuallyadditions:block/chiseled_black_quartz_wall_side_tall", - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 + }, + "when": { + "west": "tall" } } ] diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/coal_generator.json b/src/generated/resources/assets/actuallyadditions/blockstates/coal_generator.json index 0f352fa77..557f00e4a 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/coal_generator.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/coal_generator.json @@ -1,5 +1,9 @@ { "variants": { + "facing=east": { + "model": "actuallyadditions:block/coal_generator", + "y": 90 + }, "facing=north": { "model": "actuallyadditions:block/coal_generator" }, @@ -10,10 +14,6 @@ "facing=west": { "model": "actuallyadditions:block/coal_generator", "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/coal_generator", - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/coffee_machine.json b/src/generated/resources/assets/actuallyadditions/blockstates/coffee_machine.json index 06ae3836f..f998a5e54 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/coffee_machine.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/coffee_machine.json @@ -1,5 +1,9 @@ { "variants": { + "facing=east": { + "model": "actuallyadditions:block/coffee_machine", + "y": 90 + }, "facing=north": { "model": "actuallyadditions:block/coffee_machine" }, @@ -10,10 +14,6 @@ "facing=west": { "model": "actuallyadditions:block/coffee_machine", "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/coffee_machine", - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/crusher.json b/src/generated/resources/assets/actuallyadditions/blockstates/crusher.json index 48132904d..1c6047baf 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/crusher.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/crusher.json @@ -1,34 +1,34 @@ { "variants": { + "facing=east,lit=false": { + "model": "actuallyadditions:block/crusher", + "y": 90 + }, + "facing=east,lit=true": { + "model": "actuallyadditions:block/crusher", + "y": 90 + }, "facing=north,lit=false": { "model": "actuallyadditions:block/crusher" }, + "facing=north,lit=true": { + "model": "actuallyadditions:block/crusher" + }, "facing=south,lit=false": { "model": "actuallyadditions:block/crusher", "y": 180 }, + "facing=south,lit=true": { + "model": "actuallyadditions:block/crusher", + "y": 180 + }, "facing=west,lit=false": { "model": "actuallyadditions:block/crusher", "y": 270 }, - "facing=east,lit=false": { - "model": "actuallyadditions:block/crusher", - "y": 90 - }, - "facing=north,lit=true": { - "model": "actuallyadditions:block/crusher" - }, - "facing=south,lit=true": { - "model": "actuallyadditions:block/crusher", - "y": 180 - }, "facing=west,lit=true": { "model": "actuallyadditions:block/crusher", "y": 270 - }, - "facing=east,lit=true": { - "model": "actuallyadditions:block/crusher", - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/crusher_double.json b/src/generated/resources/assets/actuallyadditions/blockstates/crusher_double.json index 44c84ac43..8faba22a5 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/crusher_double.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/crusher_double.json @@ -1,34 +1,34 @@ { "variants": { + "facing=east,lit=false": { + "model": "actuallyadditions:block/crusher_double", + "y": 90 + }, + "facing=east,lit=true": { + "model": "actuallyadditions:block/crusher_double", + "y": 90 + }, "facing=north,lit=false": { "model": "actuallyadditions:block/crusher_double" }, + "facing=north,lit=true": { + "model": "actuallyadditions:block/crusher_double" + }, "facing=south,lit=false": { "model": "actuallyadditions:block/crusher_double", "y": 180 }, + "facing=south,lit=true": { + "model": "actuallyadditions:block/crusher_double", + "y": 180 + }, "facing=west,lit=false": { "model": "actuallyadditions:block/crusher_double", "y": 270 }, - "facing=east,lit=false": { - "model": "actuallyadditions:block/crusher_double", - "y": 90 - }, - "facing=north,lit=true": { - "model": "actuallyadditions:block/crusher_double" - }, - "facing=south,lit=true": { - "model": "actuallyadditions:block/crusher_double", - "y": 180 - }, "facing=west,lit=true": { "model": "actuallyadditions:block/crusher_double", "y": 270 - }, - "facing=east,lit=true": { - "model": "actuallyadditions:block/crusher_double", - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/dropper.json b/src/generated/resources/assets/actuallyadditions/blockstates/dropper.json index 079234440..8185de0e8 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/dropper.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/dropper.json @@ -4,8 +4,10 @@ "model": "actuallyadditions:block/dropper", "x": 180 }, - "facing=up": { - "model": "actuallyadditions:block/dropper" + "facing=east": { + "model": "actuallyadditions:block/dropper", + "x": 90, + "y": 90 }, "facing=north": { "model": "actuallyadditions:block/dropper", @@ -16,15 +18,13 @@ "x": 90, "y": 180 }, + "facing=up": { + "model": "actuallyadditions:block/dropper" + }, "facing=west": { "model": "actuallyadditions:block/dropper", "x": 90, "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/dropper", - "x": 90, - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_green_slab.json b/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_green_slab.json index 2d48ddb62..84ec2d829 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_green_slab.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_green_slab.json @@ -1,13 +1,13 @@ { "variants": { - "type=top": { - "model": "actuallyadditions:block/ethetic_green_slab_top" - }, "type=bottom": { "model": "actuallyadditions:block/ethetic_green_slab" }, "type=double": { "model": "actuallyadditions:block/ethetic_green_block" + }, + "type=top": { + "model": "actuallyadditions:block/ethetic_green_slab_top" } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_green_stairs.json b/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_green_stairs.json index c01ae553a..a3c984d77 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_green_stairs.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_green_stairs.json @@ -1,209 +1,209 @@ { "variants": { - "facing=north,half=top,shape=straight": { - "model": "actuallyadditions:block/ethetic_green_stairs", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=south,half=top,shape=straight": { - "model": "actuallyadditions:block/ethetic_green_stairs", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=west,half=top,shape=straight": { - "model": "actuallyadditions:block/ethetic_green_stairs", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=east,half=top,shape=straight": { - "model": "actuallyadditions:block/ethetic_green_stairs", - "x": 180, - "uvlock": true - }, - "facing=north,half=bottom,shape=straight": { - "model": "actuallyadditions:block/ethetic_green_stairs", - "y": 270, - "uvlock": true - }, - "facing=south,half=bottom,shape=straight": { - "model": "actuallyadditions:block/ethetic_green_stairs", - "y": 90, - "uvlock": true - }, - "facing=west,half=bottom,shape=straight": { - "model": "actuallyadditions:block/ethetic_green_stairs", - "y": 180, - "uvlock": true - }, - "facing=east,half=bottom,shape=straight": { - "model": "actuallyadditions:block/ethetic_green_stairs" - }, - "facing=north,half=top,shape=inner_left": { - "model": "actuallyadditions:block/ethetic_green_stairs_inner", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=south,half=top,shape=inner_left": { - "model": "actuallyadditions:block/ethetic_green_stairs_inner", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=west,half=top,shape=inner_left": { - "model": "actuallyadditions:block/ethetic_green_stairs_inner", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=east,half=top,shape=inner_left": { - "model": "actuallyadditions:block/ethetic_green_stairs_inner", - "x": 180, - "uvlock": true - }, - "facing=north,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/ethetic_green_stairs_inner", - "y": 180, - "uvlock": true - }, - "facing=south,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/ethetic_green_stairs_inner" - }, - "facing=west,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/ethetic_green_stairs_inner", - "y": 90, - "uvlock": true - }, "facing=east,half=bottom,shape=inner_left": { "model": "actuallyadditions:block/ethetic_green_stairs_inner", - "y": 270, - "uvlock": true - }, - "facing=north,half=top,shape=inner_right": { - "model": "actuallyadditions:block/ethetic_green_stairs_inner", - "x": 180, - "uvlock": true - }, - "facing=south,half=top,shape=inner_right": { - "model": "actuallyadditions:block/ethetic_green_stairs_inner", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=west,half=top,shape=inner_right": { - "model": "actuallyadditions:block/ethetic_green_stairs_inner", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=east,half=top,shape=inner_right": { - "model": "actuallyadditions:block/ethetic_green_stairs_inner", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=north,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/ethetic_green_stairs_inner", - "y": 270, - "uvlock": true - }, - "facing=south,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/ethetic_green_stairs_inner", - "y": 90, - "uvlock": true - }, - "facing=west,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/ethetic_green_stairs_inner", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 270 }, "facing=east,half=bottom,shape=inner_right": { "model": "actuallyadditions:block/ethetic_green_stairs_inner" }, - "facing=north,half=top,shape=outer_left": { + "facing=east,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/ethetic_green_stairs_outer", - "x": 180, - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 }, - "facing=south,half=top,shape=outer_left": { - "model": "actuallyadditions:block/ethetic_green_stairs_outer", - "x": 180, - "y": 90, - "uvlock": true + "facing=east,half=bottom,shape=outer_right": { + "model": "actuallyadditions:block/ethetic_green_stairs_outer" }, - "facing=west,half=top,shape=outer_left": { - "model": "actuallyadditions:block/ethetic_green_stairs_outer", + "facing=east,half=bottom,shape=straight": { + "model": "actuallyadditions:block/ethetic_green_stairs" + }, + "facing=east,half=top,shape=inner_left": { + "model": "actuallyadditions:block/ethetic_green_stairs_inner", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=inner_right": { + "model": "actuallyadditions:block/ethetic_green_stairs_inner", + "uvlock": true, "x": 180, - "y": 180, - "uvlock": true + "y": 90 }, "facing=east,half=top,shape=outer_left": { "model": "actuallyadditions:block/ethetic_green_stairs_outer", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=outer_right": { + "model": "actuallyadditions:block/ethetic_green_stairs_outer", + "uvlock": true, "x": 180, - "uvlock": true + "y": 90 + }, + "facing=east,half=top,shape=straight": { + "model": "actuallyadditions:block/ethetic_green_stairs", + "uvlock": true, + "x": 180 + }, + "facing=north,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/ethetic_green_stairs_inner", + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/ethetic_green_stairs_inner", + "uvlock": true, + "y": 270 }, "facing=north,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/ethetic_green_stairs_outer", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=outer_right": { + "model": "actuallyadditions:block/ethetic_green_stairs_outer", + "uvlock": true, + "y": 270 + }, + "facing=north,half=bottom,shape=straight": { + "model": "actuallyadditions:block/ethetic_green_stairs", + "uvlock": true, + "y": 270 + }, + "facing=north,half=top,shape=inner_left": { + "model": "actuallyadditions:block/ethetic_green_stairs_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=inner_right": { + "model": "actuallyadditions:block/ethetic_green_stairs_inner", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=outer_left": { + "model": "actuallyadditions:block/ethetic_green_stairs_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=outer_right": { + "model": "actuallyadditions:block/ethetic_green_stairs_outer", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=straight": { + "model": "actuallyadditions:block/ethetic_green_stairs", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=south,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/ethetic_green_stairs_inner" + }, + "facing=south,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/ethetic_green_stairs_inner", + "uvlock": true, + "y": 90 }, "facing=south,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/ethetic_green_stairs_outer" }, - "facing=west,half=bottom,shape=outer_left": { + "facing=south,half=bottom,shape=outer_right": { "model": "actuallyadditions:block/ethetic_green_stairs_outer", - "y": 90, - "uvlock": true + "uvlock": true, + "y": 90 }, - "facing=east,half=bottom,shape=outer_left": { - "model": "actuallyadditions:block/ethetic_green_stairs_outer", - "y": 270, - "uvlock": true + "facing=south,half=bottom,shape=straight": { + "model": "actuallyadditions:block/ethetic_green_stairs", + "uvlock": true, + "y": 90 }, - "facing=north,half=top,shape=outer_right": { - "model": "actuallyadditions:block/ethetic_green_stairs_outer", + "facing=south,half=top,shape=inner_left": { + "model": "actuallyadditions:block/ethetic_green_stairs_inner", + "uvlock": true, "x": 180, - "uvlock": true + "y": 90 + }, + "facing=south,half=top,shape=inner_right": { + "model": "actuallyadditions:block/ethetic_green_stairs_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=south,half=top,shape=outer_left": { + "model": "actuallyadditions:block/ethetic_green_stairs_outer", + "uvlock": true, + "x": 180, + "y": 90 }, "facing=south,half=top,shape=outer_right": { "model": "actuallyadditions:block/ethetic_green_stairs_outer", + "uvlock": true, "x": 180, - "y": 180, - "uvlock": true + "y": 180 }, - "facing=west,half=top,shape=outer_right": { - "model": "actuallyadditions:block/ethetic_green_stairs_outer", + "facing=south,half=top,shape=straight": { + "model": "actuallyadditions:block/ethetic_green_stairs", + "uvlock": true, "x": 180, - "y": 270, - "uvlock": true + "y": 90 }, - "facing=east,half=top,shape=outer_right": { - "model": "actuallyadditions:block/ethetic_green_stairs_outer", - "x": 180, - "y": 90, - "uvlock": true + "facing=west,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/ethetic_green_stairs_inner", + "uvlock": true, + "y": 90 }, - "facing=north,half=bottom,shape=outer_right": { - "model": "actuallyadditions:block/ethetic_green_stairs_outer", - "y": 270, - "uvlock": true + "facing=west,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/ethetic_green_stairs_inner", + "uvlock": true, + "y": 180 }, - "facing=south,half=bottom,shape=outer_right": { + "facing=west,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/ethetic_green_stairs_outer", - "y": 90, - "uvlock": true + "uvlock": true, + "y": 90 }, "facing=west,half=bottom,shape=outer_right": { "model": "actuallyadditions:block/ethetic_green_stairs_outer", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 180 }, - "facing=east,half=bottom,shape=outer_right": { - "model": "actuallyadditions:block/ethetic_green_stairs_outer" + "facing=west,half=bottom,shape=straight": { + "model": "actuallyadditions:block/ethetic_green_stairs", + "uvlock": true, + "y": 180 + }, + "facing=west,half=top,shape=inner_left": { + "model": "actuallyadditions:block/ethetic_green_stairs_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=inner_right": { + "model": "actuallyadditions:block/ethetic_green_stairs_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=outer_left": { + "model": "actuallyadditions:block/ethetic_green_stairs_outer", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=outer_right": { + "model": "actuallyadditions:block/ethetic_green_stairs_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=straight": { + "model": "actuallyadditions:block/ethetic_green_stairs", + "uvlock": true, + "x": 180, + "y": 180 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_green_wall.json b/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_green_wall.json index 6f8fa3182..e8081c9be 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_green_wall.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_green_wall.json @@ -1,89 +1,89 @@ { "multipart": [ { - "when": { - "up": "true" - }, "apply": { "model": "actuallyadditions:block/ethetic_green_wall_post" + }, + "when": { + "up": "true" } }, { + "apply": { + "model": "actuallyadditions:block/ethetic_green_wall_side", + "uvlock": true, + "y": 90 + }, "when": { "east": "low" - }, - "apply": { - "model": "actuallyadditions:block/ethetic_green_wall_side", - "y": 90, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/ethetic_green_wall_side_tall", + "uvlock": true, + "y": 90 + }, "when": { "east": "tall" - }, - "apply": { - "model": "actuallyadditions:block/ethetic_green_wall_side_tall", - "y": 90, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/ethetic_green_wall_side", + "uvlock": true + }, "when": { "north": "low" - }, - "apply": { - "model": "actuallyadditions:block/ethetic_green_wall_side", - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/ethetic_green_wall_side_tall", + "uvlock": true + }, "when": { "north": "tall" - }, - "apply": { - "model": "actuallyadditions:block/ethetic_green_wall_side_tall", - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/ethetic_green_wall_side", + "uvlock": true, + "y": 180 + }, "when": { "south": "low" - }, - "apply": { - "model": "actuallyadditions:block/ethetic_green_wall_side", - "y": 180, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/ethetic_green_wall_side_tall", + "uvlock": true, + "y": 180 + }, "when": { "south": "tall" - }, - "apply": { - "model": "actuallyadditions:block/ethetic_green_wall_side_tall", - "y": 180, - "uvlock": true } }, { - "when": { - "west": "low" - }, "apply": { "model": "actuallyadditions:block/ethetic_green_wall_side", - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 + }, + "when": { + "west": "low" } }, { - "when": { - "west": "tall" - }, "apply": { "model": "actuallyadditions:block/ethetic_green_wall_side_tall", - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 + }, + "when": { + "west": "tall" } } ] diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_white_slab.json b/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_white_slab.json index 198473a47..71678197d 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_white_slab.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_white_slab.json @@ -1,13 +1,13 @@ { "variants": { - "type=top": { - "model": "actuallyadditions:block/ethetic_white_slab_top" - }, "type=bottom": { "model": "actuallyadditions:block/ethetic_white_slab" }, "type=double": { "model": "actuallyadditions:block/ethetic_white_block" + }, + "type=top": { + "model": "actuallyadditions:block/ethetic_white_slab_top" } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_white_stairs.json b/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_white_stairs.json index b04f0ed62..af45ad255 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_white_stairs.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_white_stairs.json @@ -1,209 +1,209 @@ { "variants": { - "facing=north,half=top,shape=straight": { - "model": "actuallyadditions:block/ethetic_white_stairs", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=south,half=top,shape=straight": { - "model": "actuallyadditions:block/ethetic_white_stairs", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=west,half=top,shape=straight": { - "model": "actuallyadditions:block/ethetic_white_stairs", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=east,half=top,shape=straight": { - "model": "actuallyadditions:block/ethetic_white_stairs", - "x": 180, - "uvlock": true - }, - "facing=north,half=bottom,shape=straight": { - "model": "actuallyadditions:block/ethetic_white_stairs", - "y": 270, - "uvlock": true - }, - "facing=south,half=bottom,shape=straight": { - "model": "actuallyadditions:block/ethetic_white_stairs", - "y": 90, - "uvlock": true - }, - "facing=west,half=bottom,shape=straight": { - "model": "actuallyadditions:block/ethetic_white_stairs", - "y": 180, - "uvlock": true - }, - "facing=east,half=bottom,shape=straight": { - "model": "actuallyadditions:block/ethetic_white_stairs" - }, - "facing=north,half=top,shape=inner_left": { - "model": "actuallyadditions:block/ethetic_white_stairs_inner", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=south,half=top,shape=inner_left": { - "model": "actuallyadditions:block/ethetic_white_stairs_inner", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=west,half=top,shape=inner_left": { - "model": "actuallyadditions:block/ethetic_white_stairs_inner", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=east,half=top,shape=inner_left": { - "model": "actuallyadditions:block/ethetic_white_stairs_inner", - "x": 180, - "uvlock": true - }, - "facing=north,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/ethetic_white_stairs_inner", - "y": 180, - "uvlock": true - }, - "facing=south,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/ethetic_white_stairs_inner" - }, - "facing=west,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/ethetic_white_stairs_inner", - "y": 90, - "uvlock": true - }, "facing=east,half=bottom,shape=inner_left": { "model": "actuallyadditions:block/ethetic_white_stairs_inner", - "y": 270, - "uvlock": true - }, - "facing=north,half=top,shape=inner_right": { - "model": "actuallyadditions:block/ethetic_white_stairs_inner", - "x": 180, - "uvlock": true - }, - "facing=south,half=top,shape=inner_right": { - "model": "actuallyadditions:block/ethetic_white_stairs_inner", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=west,half=top,shape=inner_right": { - "model": "actuallyadditions:block/ethetic_white_stairs_inner", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=east,half=top,shape=inner_right": { - "model": "actuallyadditions:block/ethetic_white_stairs_inner", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=north,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/ethetic_white_stairs_inner", - "y": 270, - "uvlock": true - }, - "facing=south,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/ethetic_white_stairs_inner", - "y": 90, - "uvlock": true - }, - "facing=west,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/ethetic_white_stairs_inner", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 270 }, "facing=east,half=bottom,shape=inner_right": { "model": "actuallyadditions:block/ethetic_white_stairs_inner" }, - "facing=north,half=top,shape=outer_left": { + "facing=east,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/ethetic_white_stairs_outer", - "x": 180, - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 }, - "facing=south,half=top,shape=outer_left": { - "model": "actuallyadditions:block/ethetic_white_stairs_outer", - "x": 180, - "y": 90, - "uvlock": true + "facing=east,half=bottom,shape=outer_right": { + "model": "actuallyadditions:block/ethetic_white_stairs_outer" }, - "facing=west,half=top,shape=outer_left": { - "model": "actuallyadditions:block/ethetic_white_stairs_outer", + "facing=east,half=bottom,shape=straight": { + "model": "actuallyadditions:block/ethetic_white_stairs" + }, + "facing=east,half=top,shape=inner_left": { + "model": "actuallyadditions:block/ethetic_white_stairs_inner", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=inner_right": { + "model": "actuallyadditions:block/ethetic_white_stairs_inner", + "uvlock": true, "x": 180, - "y": 180, - "uvlock": true + "y": 90 }, "facing=east,half=top,shape=outer_left": { "model": "actuallyadditions:block/ethetic_white_stairs_outer", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=outer_right": { + "model": "actuallyadditions:block/ethetic_white_stairs_outer", + "uvlock": true, "x": 180, - "uvlock": true + "y": 90 + }, + "facing=east,half=top,shape=straight": { + "model": "actuallyadditions:block/ethetic_white_stairs", + "uvlock": true, + "x": 180 + }, + "facing=north,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/ethetic_white_stairs_inner", + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/ethetic_white_stairs_inner", + "uvlock": true, + "y": 270 }, "facing=north,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/ethetic_white_stairs_outer", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=outer_right": { + "model": "actuallyadditions:block/ethetic_white_stairs_outer", + "uvlock": true, + "y": 270 + }, + "facing=north,half=bottom,shape=straight": { + "model": "actuallyadditions:block/ethetic_white_stairs", + "uvlock": true, + "y": 270 + }, + "facing=north,half=top,shape=inner_left": { + "model": "actuallyadditions:block/ethetic_white_stairs_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=inner_right": { + "model": "actuallyadditions:block/ethetic_white_stairs_inner", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=outer_left": { + "model": "actuallyadditions:block/ethetic_white_stairs_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=outer_right": { + "model": "actuallyadditions:block/ethetic_white_stairs_outer", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=straight": { + "model": "actuallyadditions:block/ethetic_white_stairs", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=south,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/ethetic_white_stairs_inner" + }, + "facing=south,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/ethetic_white_stairs_inner", + "uvlock": true, + "y": 90 }, "facing=south,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/ethetic_white_stairs_outer" }, - "facing=west,half=bottom,shape=outer_left": { + "facing=south,half=bottom,shape=outer_right": { "model": "actuallyadditions:block/ethetic_white_stairs_outer", - "y": 90, - "uvlock": true + "uvlock": true, + "y": 90 }, - "facing=east,half=bottom,shape=outer_left": { - "model": "actuallyadditions:block/ethetic_white_stairs_outer", - "y": 270, - "uvlock": true + "facing=south,half=bottom,shape=straight": { + "model": "actuallyadditions:block/ethetic_white_stairs", + "uvlock": true, + "y": 90 }, - "facing=north,half=top,shape=outer_right": { - "model": "actuallyadditions:block/ethetic_white_stairs_outer", + "facing=south,half=top,shape=inner_left": { + "model": "actuallyadditions:block/ethetic_white_stairs_inner", + "uvlock": true, "x": 180, - "uvlock": true + "y": 90 + }, + "facing=south,half=top,shape=inner_right": { + "model": "actuallyadditions:block/ethetic_white_stairs_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=south,half=top,shape=outer_left": { + "model": "actuallyadditions:block/ethetic_white_stairs_outer", + "uvlock": true, + "x": 180, + "y": 90 }, "facing=south,half=top,shape=outer_right": { "model": "actuallyadditions:block/ethetic_white_stairs_outer", + "uvlock": true, "x": 180, - "y": 180, - "uvlock": true + "y": 180 }, - "facing=west,half=top,shape=outer_right": { - "model": "actuallyadditions:block/ethetic_white_stairs_outer", + "facing=south,half=top,shape=straight": { + "model": "actuallyadditions:block/ethetic_white_stairs", + "uvlock": true, "x": 180, - "y": 270, - "uvlock": true + "y": 90 }, - "facing=east,half=top,shape=outer_right": { - "model": "actuallyadditions:block/ethetic_white_stairs_outer", - "x": 180, - "y": 90, - "uvlock": true + "facing=west,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/ethetic_white_stairs_inner", + "uvlock": true, + "y": 90 }, - "facing=north,half=bottom,shape=outer_right": { - "model": "actuallyadditions:block/ethetic_white_stairs_outer", - "y": 270, - "uvlock": true + "facing=west,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/ethetic_white_stairs_inner", + "uvlock": true, + "y": 180 }, - "facing=south,half=bottom,shape=outer_right": { + "facing=west,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/ethetic_white_stairs_outer", - "y": 90, - "uvlock": true + "uvlock": true, + "y": 90 }, "facing=west,half=bottom,shape=outer_right": { "model": "actuallyadditions:block/ethetic_white_stairs_outer", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 180 }, - "facing=east,half=bottom,shape=outer_right": { - "model": "actuallyadditions:block/ethetic_white_stairs_outer" + "facing=west,half=bottom,shape=straight": { + "model": "actuallyadditions:block/ethetic_white_stairs", + "uvlock": true, + "y": 180 + }, + "facing=west,half=top,shape=inner_left": { + "model": "actuallyadditions:block/ethetic_white_stairs_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=inner_right": { + "model": "actuallyadditions:block/ethetic_white_stairs_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=outer_left": { + "model": "actuallyadditions:block/ethetic_white_stairs_outer", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=outer_right": { + "model": "actuallyadditions:block/ethetic_white_stairs_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=straight": { + "model": "actuallyadditions:block/ethetic_white_stairs", + "uvlock": true, + "x": 180, + "y": 180 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_white_wall.json b/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_white_wall.json index 675517d41..f44bad669 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_white_wall.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/ethetic_white_wall.json @@ -1,89 +1,89 @@ { "multipart": [ { - "when": { - "up": "true" - }, "apply": { "model": "actuallyadditions:block/ethetic_white_wall_post" + }, + "when": { + "up": "true" } }, { + "apply": { + "model": "actuallyadditions:block/ethetic_white_wall_side", + "uvlock": true, + "y": 90 + }, "when": { "east": "low" - }, - "apply": { - "model": "actuallyadditions:block/ethetic_white_wall_side", - "y": 90, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/ethetic_white_wall_side_tall", + "uvlock": true, + "y": 90 + }, "when": { "east": "tall" - }, - "apply": { - "model": "actuallyadditions:block/ethetic_white_wall_side_tall", - "y": 90, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/ethetic_white_wall_side", + "uvlock": true + }, "when": { "north": "low" - }, - "apply": { - "model": "actuallyadditions:block/ethetic_white_wall_side", - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/ethetic_white_wall_side_tall", + "uvlock": true + }, "when": { "north": "tall" - }, - "apply": { - "model": "actuallyadditions:block/ethetic_white_wall_side_tall", - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/ethetic_white_wall_side", + "uvlock": true, + "y": 180 + }, "when": { "south": "low" - }, - "apply": { - "model": "actuallyadditions:block/ethetic_white_wall_side", - "y": 180, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/ethetic_white_wall_side_tall", + "uvlock": true, + "y": 180 + }, "when": { "south": "tall" - }, - "apply": { - "model": "actuallyadditions:block/ethetic_white_wall_side_tall", - "y": 180, - "uvlock": true } }, { - "when": { - "west": "low" - }, "apply": { "model": "actuallyadditions:block/ethetic_white_wall_side", - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 + }, + "when": { + "west": "low" } }, { - "when": { - "west": "tall" - }, "apply": { "model": "actuallyadditions:block/ethetic_white_wall_side_tall", - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 + }, + "when": { + "west": "tall" } } ] diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/farmer.json b/src/generated/resources/assets/actuallyadditions/blockstates/farmer.json index 9d1c767a5..082aa8c22 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/farmer.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/farmer.json @@ -1,5 +1,9 @@ { "variants": { + "facing=east": { + "model": "actuallyadditions:block/farmer", + "y": 90 + }, "facing=north": { "model": "actuallyadditions:block/farmer" }, @@ -10,10 +14,6 @@ "facing=west": { "model": "actuallyadditions:block/farmer", "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/farmer", - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/fluid_collector.json b/src/generated/resources/assets/actuallyadditions/blockstates/fluid_collector.json index 2e7172afd..1fb3dc734 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/fluid_collector.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/fluid_collector.json @@ -4,8 +4,10 @@ "model": "actuallyadditions:block/fluid_collector", "x": 180 }, - "facing=up": { - "model": "actuallyadditions:block/fluid_collector" + "facing=east": { + "model": "actuallyadditions:block/fluid_collector", + "x": 90, + "y": 90 }, "facing=north": { "model": "actuallyadditions:block/fluid_collector", @@ -16,15 +18,13 @@ "x": 90, "y": 180 }, + "facing=up": { + "model": "actuallyadditions:block/fluid_collector" + }, "facing=west": { "model": "actuallyadditions:block/fluid_collector", "x": 90, "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/fluid_collector", - "x": 90, - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/fluid_placer.json b/src/generated/resources/assets/actuallyadditions/blockstates/fluid_placer.json index 0b30e80ba..c0ff49be2 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/fluid_placer.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/fluid_placer.json @@ -4,8 +4,10 @@ "model": "actuallyadditions:block/fluid_placer", "x": 180 }, - "facing=up": { - "model": "actuallyadditions:block/fluid_placer" + "facing=east": { + "model": "actuallyadditions:block/fluid_placer", + "x": 90, + "y": 90 }, "facing=north": { "model": "actuallyadditions:block/fluid_placer", @@ -16,15 +18,13 @@ "x": 90, "y": 180 }, + "facing=up": { + "model": "actuallyadditions:block/fluid_placer" + }, "facing=west": { "model": "actuallyadditions:block/fluid_placer", "x": 90, "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/fluid_placer", - "x": 90, - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/lamp_controller.json b/src/generated/resources/assets/actuallyadditions/blockstates/lamp_controller.json index 08d5c46ac..107ab1a66 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/lamp_controller.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/lamp_controller.json @@ -4,8 +4,10 @@ "model": "actuallyadditions:block/lamp_controller", "x": 180 }, - "facing=up": { - "model": "actuallyadditions:block/lamp_controller" + "facing=east": { + "model": "actuallyadditions:block/lamp_controller", + "x": 90, + "y": 90 }, "facing=north": { "model": "actuallyadditions:block/lamp_controller", @@ -16,15 +18,13 @@ "x": 90, "y": 180 }, + "facing=up": { + "model": "actuallyadditions:block/lamp_controller" + }, "facing=west": { "model": "actuallyadditions:block/lamp_controller", "x": 90, "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/lamp_controller", - "x": 90, - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay.json b/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay.json index dfa9bb4f7..1a88dd3eb 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay.json @@ -4,8 +4,10 @@ "model": "actuallyadditions:block/laser_relay", "x": 180 }, - "facing=up": { - "model": "actuallyadditions:block/laser_relay" + "facing=east": { + "model": "actuallyadditions:block/laser_relay", + "x": 90, + "y": 90 }, "facing=north": { "model": "actuallyadditions:block/laser_relay", @@ -16,15 +18,13 @@ "x": 90, "y": 180 }, + "facing=up": { + "model": "actuallyadditions:block/laser_relay" + }, "facing=west": { "model": "actuallyadditions:block/laser_relay", "x": 90, "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/laser_relay", - "x": 90, - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_advanced.json b/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_advanced.json index 2627dca6c..59386651a 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_advanced.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_advanced.json @@ -4,8 +4,10 @@ "model": "actuallyadditions:block/laser_relay_advanced", "x": 180 }, - "facing=up": { - "model": "actuallyadditions:block/laser_relay_advanced" + "facing=east": { + "model": "actuallyadditions:block/laser_relay_advanced", + "x": 90, + "y": 90 }, "facing=north": { "model": "actuallyadditions:block/laser_relay_advanced", @@ -16,15 +18,13 @@ "x": 90, "y": 180 }, + "facing=up": { + "model": "actuallyadditions:block/laser_relay_advanced" + }, "facing=west": { "model": "actuallyadditions:block/laser_relay_advanced", "x": 90, "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/laser_relay_advanced", - "x": 90, - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_extreme.json b/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_extreme.json index b3f28fa8f..8baba01c7 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_extreme.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_extreme.json @@ -4,8 +4,10 @@ "model": "actuallyadditions:block/laser_relay_extreme", "x": 180 }, - "facing=up": { - "model": "actuallyadditions:block/laser_relay_extreme" + "facing=east": { + "model": "actuallyadditions:block/laser_relay_extreme", + "x": 90, + "y": 90 }, "facing=north": { "model": "actuallyadditions:block/laser_relay_extreme", @@ -16,15 +18,13 @@ "x": 90, "y": 180 }, + "facing=up": { + "model": "actuallyadditions:block/laser_relay_extreme" + }, "facing=west": { "model": "actuallyadditions:block/laser_relay_extreme", "x": 90, "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/laser_relay_extreme", - "x": 90, - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_fluids.json b/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_fluids.json index e48e06e5e..f040a4156 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_fluids.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_fluids.json @@ -4,8 +4,10 @@ "model": "actuallyadditions:block/laser_relay_fluids", "x": 180 }, - "facing=up": { - "model": "actuallyadditions:block/laser_relay_fluids" + "facing=east": { + "model": "actuallyadditions:block/laser_relay_fluids", + "x": 90, + "y": 90 }, "facing=north": { "model": "actuallyadditions:block/laser_relay_fluids", @@ -16,15 +18,13 @@ "x": 90, "y": 180 }, + "facing=up": { + "model": "actuallyadditions:block/laser_relay_fluids" + }, "facing=west": { "model": "actuallyadditions:block/laser_relay_fluids", "x": 90, "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/laser_relay_fluids", - "x": 90, - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_item.json b/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_item.json index 3eaca76de..10fa1ce30 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_item.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_item.json @@ -4,8 +4,10 @@ "model": "actuallyadditions:block/laser_relay_item", "x": 180 }, - "facing=up": { - "model": "actuallyadditions:block/laser_relay_item" + "facing=east": { + "model": "actuallyadditions:block/laser_relay_item", + "x": 90, + "y": 90 }, "facing=north": { "model": "actuallyadditions:block/laser_relay_item", @@ -16,15 +18,13 @@ "x": 90, "y": 180 }, + "facing=up": { + "model": "actuallyadditions:block/laser_relay_item" + }, "facing=west": { "model": "actuallyadditions:block/laser_relay_item", "x": 90, "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/laser_relay_item", - "x": 90, - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_item_advanced.json b/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_item_advanced.json index c85fe8761..815cce214 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_item_advanced.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/laser_relay_item_advanced.json @@ -4,8 +4,10 @@ "model": "actuallyadditions:block/laser_relay_item_advanced", "x": 180 }, - "facing=up": { - "model": "actuallyadditions:block/laser_relay_item_advanced" + "facing=east": { + "model": "actuallyadditions:block/laser_relay_item_advanced", + "x": 90, + "y": 90 }, "facing=north": { "model": "actuallyadditions:block/laser_relay_item_advanced", @@ -16,15 +18,13 @@ "x": 90, "y": 180 }, + "facing=up": { + "model": "actuallyadditions:block/laser_relay_item_advanced" + }, "facing=west": { "model": "actuallyadditions:block/laser_relay_item_advanced", "x": 90, "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/laser_relay_item_advanced", - "x": 90, - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/lava_factory_controller.json b/src/generated/resources/assets/actuallyadditions/blockstates/lava_factory_controller.json index 3ce906884..1d5852857 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/lava_factory_controller.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/lava_factory_controller.json @@ -1,5 +1,9 @@ { "variants": { + "facing=east": { + "model": "actuallyadditions:block/lava_factory_controller", + "y": 90 + }, "facing=north": { "model": "actuallyadditions:block/lava_factory_controller" }, @@ -10,10 +14,6 @@ "facing=west": { "model": "actuallyadditions:block/lava_factory_controller", "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/lava_factory_controller", - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/leaf_generator.json b/src/generated/resources/assets/actuallyadditions/blockstates/leaf_generator.json index 8266ada86..4ee4398f9 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/leaf_generator.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/leaf_generator.json @@ -1,5 +1,9 @@ { "variants": { + "facing=east": { + "model": "actuallyadditions:block/leaf_generator", + "y": 90 + }, "facing=north": { "model": "actuallyadditions:block/leaf_generator" }, @@ -10,10 +14,6 @@ "facing=west": { "model": "actuallyadditions:block/leaf_generator", "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/leaf_generator", - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/long_range_breaker.json b/src/generated/resources/assets/actuallyadditions/blockstates/long_range_breaker.json index d84c392eb..f1af5f719 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/long_range_breaker.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/long_range_breaker.json @@ -4,8 +4,10 @@ "model": "actuallyadditions:block/long_range_breaker", "x": 180 }, - "facing=up": { - "model": "actuallyadditions:block/long_range_breaker" + "facing=east": { + "model": "actuallyadditions:block/long_range_breaker", + "x": 90, + "y": 90 }, "facing=north": { "model": "actuallyadditions:block/long_range_breaker", @@ -16,15 +18,13 @@ "x": 90, "y": 180 }, + "facing=up": { + "model": "actuallyadditions:block/long_range_breaker" + }, "facing=west": { "model": "actuallyadditions:block/long_range_breaker", "x": 90, "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/long_range_breaker", - "x": 90, - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/oil_generator.json b/src/generated/resources/assets/actuallyadditions/blockstates/oil_generator.json index 49f64c6a8..4a0490fdf 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/oil_generator.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/oil_generator.json @@ -1,5 +1,9 @@ { "variants": { + "facing=east": { + "model": "actuallyadditions:block/oil_generator", + "y": 90 + }, "facing=north": { "model": "actuallyadditions:block/oil_generator" }, @@ -10,10 +14,6 @@ "facing=west": { "model": "actuallyadditions:block/oil_generator", "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/oil_generator", - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/placer.json b/src/generated/resources/assets/actuallyadditions/blockstates/placer.json index a823617cf..a0a5560d6 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/placer.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/placer.json @@ -4,8 +4,10 @@ "model": "actuallyadditions:block/placer", "x": 180 }, - "facing=up": { - "model": "actuallyadditions:block/placer" + "facing=east": { + "model": "actuallyadditions:block/placer", + "x": 90, + "y": 90 }, "facing=north": { "model": "actuallyadditions:block/placer", @@ -16,15 +18,13 @@ "x": 90, "y": 180 }, + "facing=up": { + "model": "actuallyadditions:block/placer" + }, "facing=west": { "model": "actuallyadditions:block/placer", "x": 90, "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/placer", - "x": 90, - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/powered_furnace.json b/src/generated/resources/assets/actuallyadditions/blockstates/powered_furnace.json index 3ddb99ac1..60b87b8fe 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/powered_furnace.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/powered_furnace.json @@ -1,34 +1,34 @@ { "variants": { + "facing=east,lit=false": { + "model": "actuallyadditions:block/powered_furnace", + "y": 90 + }, + "facing=east,lit=true": { + "model": "actuallyadditions:block/powered_furnace", + "y": 90 + }, "facing=north,lit=false": { "model": "actuallyadditions:block/powered_furnace" }, + "facing=north,lit=true": { + "model": "actuallyadditions:block/powered_furnace" + }, "facing=south,lit=false": { "model": "actuallyadditions:block/powered_furnace", "y": 180 }, + "facing=south,lit=true": { + "model": "actuallyadditions:block/powered_furnace", + "y": 180 + }, "facing=west,lit=false": { "model": "actuallyadditions:block/powered_furnace", "y": 270 }, - "facing=east,lit=false": { - "model": "actuallyadditions:block/powered_furnace", - "y": 90 - }, - "facing=north,lit=true": { - "model": "actuallyadditions:block/powered_furnace" - }, - "facing=south,lit=true": { - "model": "actuallyadditions:block/powered_furnace", - "y": 180 - }, "facing=west,lit=true": { "model": "actuallyadditions:block/powered_furnace", "y": 270 - }, - "facing=east,lit=true": { - "model": "actuallyadditions:block/powered_furnace", - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/smooth_black_quartz_slab.json b/src/generated/resources/assets/actuallyadditions/blockstates/smooth_black_quartz_slab.json index dc1de80ac..6018ce0a1 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/smooth_black_quartz_slab.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/smooth_black_quartz_slab.json @@ -1,13 +1,13 @@ { "variants": { - "type=top": { - "model": "actuallyadditions:block/smooth_black_quartz_slab_top" - }, "type=bottom": { "model": "actuallyadditions:block/smooth_black_quartz_slab" }, "type=double": { "model": "actuallyadditions:block/smooth_black_quartz_block" + }, + "type=top": { + "model": "actuallyadditions:block/smooth_black_quartz_slab_top" } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/smooth_black_quartz_stair.json b/src/generated/resources/assets/actuallyadditions/blockstates/smooth_black_quartz_stair.json index efb2b0a45..c601478a0 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/smooth_black_quartz_stair.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/smooth_black_quartz_stair.json @@ -1,209 +1,209 @@ { "variants": { - "facing=north,half=top,shape=straight": { - "model": "actuallyadditions:block/smooth_black_quartz_stair", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=south,half=top,shape=straight": { - "model": "actuallyadditions:block/smooth_black_quartz_stair", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=west,half=top,shape=straight": { - "model": "actuallyadditions:block/smooth_black_quartz_stair", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=east,half=top,shape=straight": { - "model": "actuallyadditions:block/smooth_black_quartz_stair", - "x": 180, - "uvlock": true - }, - "facing=north,half=bottom,shape=straight": { - "model": "actuallyadditions:block/smooth_black_quartz_stair", - "y": 270, - "uvlock": true - }, - "facing=south,half=bottom,shape=straight": { - "model": "actuallyadditions:block/smooth_black_quartz_stair", - "y": 90, - "uvlock": true - }, - "facing=west,half=bottom,shape=straight": { - "model": "actuallyadditions:block/smooth_black_quartz_stair", - "y": 180, - "uvlock": true - }, - "facing=east,half=bottom,shape=straight": { - "model": "actuallyadditions:block/smooth_black_quartz_stair" - }, - "facing=north,half=top,shape=inner_left": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=south,half=top,shape=inner_left": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=west,half=top,shape=inner_left": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=east,half=top,shape=inner_left": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", - "x": 180, - "uvlock": true - }, - "facing=north,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", - "y": 180, - "uvlock": true - }, - "facing=south,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_inner" - }, - "facing=west,half=bottom,shape=inner_left": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", - "y": 90, - "uvlock": true - }, "facing=east,half=bottom,shape=inner_left": { "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", - "y": 270, - "uvlock": true - }, - "facing=north,half=top,shape=inner_right": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", - "x": 180, - "uvlock": true - }, - "facing=south,half=top,shape=inner_right": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", - "x": 180, - "y": 180, - "uvlock": true - }, - "facing=west,half=top,shape=inner_right": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", - "x": 180, - "y": 270, - "uvlock": true - }, - "facing=east,half=top,shape=inner_right": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", - "x": 180, - "y": 90, - "uvlock": true - }, - "facing=north,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", - "y": 270, - "uvlock": true - }, - "facing=south,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", - "y": 90, - "uvlock": true - }, - "facing=west,half=bottom,shape=inner_right": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 270 }, "facing=east,half=bottom,shape=inner_right": { "model": "actuallyadditions:block/smooth_black_quartz_stair_inner" }, - "facing=north,half=top,shape=outer_left": { + "facing=east,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", - "x": 180, - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 }, - "facing=south,half=top,shape=outer_left": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", - "x": 180, - "y": 90, - "uvlock": true + "facing=east,half=bottom,shape=outer_right": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_outer" }, - "facing=west,half=top,shape=outer_left": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", + "facing=east,half=bottom,shape=straight": { + "model": "actuallyadditions:block/smooth_black_quartz_stair" + }, + "facing=east,half=top,shape=inner_left": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=inner_right": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", + "uvlock": true, "x": 180, - "y": 180, - "uvlock": true + "y": 90 }, "facing=east,half=top,shape=outer_left": { "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", + "uvlock": true, + "x": 180 + }, + "facing=east,half=top,shape=outer_right": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", + "uvlock": true, "x": 180, - "uvlock": true + "y": 90 + }, + "facing=east,half=top,shape=straight": { + "model": "actuallyadditions:block/smooth_black_quartz_stair", + "uvlock": true, + "x": 180 + }, + "facing=north,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", + "uvlock": true, + "y": 270 }, "facing=north,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 180 + }, + "facing=north,half=bottom,shape=outer_right": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", + "uvlock": true, + "y": 270 + }, + "facing=north,half=bottom,shape=straight": { + "model": "actuallyadditions:block/smooth_black_quartz_stair", + "uvlock": true, + "y": 270 + }, + "facing=north,half=top,shape=inner_left": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=inner_right": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=outer_left": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=north,half=top,shape=outer_right": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", + "uvlock": true, + "x": 180 + }, + "facing=north,half=top,shape=straight": { + "model": "actuallyadditions:block/smooth_black_quartz_stair", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=south,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_inner" + }, + "facing=south,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", + "uvlock": true, + "y": 90 }, "facing=south,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/smooth_black_quartz_stair_outer" }, - "facing=west,half=bottom,shape=outer_left": { + "facing=south,half=bottom,shape=outer_right": { "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", - "y": 90, - "uvlock": true + "uvlock": true, + "y": 90 }, - "facing=east,half=bottom,shape=outer_left": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", - "y": 270, - "uvlock": true + "facing=south,half=bottom,shape=straight": { + "model": "actuallyadditions:block/smooth_black_quartz_stair", + "uvlock": true, + "y": 90 }, - "facing=north,half=top,shape=outer_right": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", + "facing=south,half=top,shape=inner_left": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", + "uvlock": true, "x": 180, - "uvlock": true + "y": 90 + }, + "facing=south,half=top,shape=inner_right": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=south,half=top,shape=outer_left": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", + "uvlock": true, + "x": 180, + "y": 90 }, "facing=south,half=top,shape=outer_right": { "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", + "uvlock": true, "x": 180, - "y": 180, - "uvlock": true + "y": 180 }, - "facing=west,half=top,shape=outer_right": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", + "facing=south,half=top,shape=straight": { + "model": "actuallyadditions:block/smooth_black_quartz_stair", + "uvlock": true, "x": 180, - "y": 270, - "uvlock": true + "y": 90 }, - "facing=east,half=top,shape=outer_right": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", - "x": 180, - "y": 90, - "uvlock": true + "facing=west,half=bottom,shape=inner_left": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", + "uvlock": true, + "y": 90 }, - "facing=north,half=bottom,shape=outer_right": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", - "y": 270, - "uvlock": true + "facing=west,half=bottom,shape=inner_right": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", + "uvlock": true, + "y": 180 }, - "facing=south,half=bottom,shape=outer_right": { + "facing=west,half=bottom,shape=outer_left": { "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", - "y": 90, - "uvlock": true + "uvlock": true, + "y": 90 }, "facing=west,half=bottom,shape=outer_right": { "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", - "y": 180, - "uvlock": true + "uvlock": true, + "y": 180 }, - "facing=east,half=bottom,shape=outer_right": { - "model": "actuallyadditions:block/smooth_black_quartz_stair_outer" + "facing=west,half=bottom,shape=straight": { + "model": "actuallyadditions:block/smooth_black_quartz_stair", + "uvlock": true, + "y": 180 + }, + "facing=west,half=top,shape=inner_left": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=inner_right": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_inner", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=outer_left": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", + "uvlock": true, + "x": 180, + "y": 180 + }, + "facing=west,half=top,shape=outer_right": { + "model": "actuallyadditions:block/smooth_black_quartz_stair_outer", + "uvlock": true, + "x": 180, + "y": 270 + }, + "facing=west,half=top,shape=straight": { + "model": "actuallyadditions:block/smooth_black_quartz_stair", + "uvlock": true, + "x": 180, + "y": 180 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/smooth_black_quartz_wall.json b/src/generated/resources/assets/actuallyadditions/blockstates/smooth_black_quartz_wall.json index cd40074cf..1592e6e53 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/smooth_black_quartz_wall.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/smooth_black_quartz_wall.json @@ -1,89 +1,89 @@ { "multipart": [ { - "when": { - "up": "true" - }, "apply": { "model": "actuallyadditions:block/smooth_black_quartz_wall_post" + }, + "when": { + "up": "true" } }, { + "apply": { + "model": "actuallyadditions:block/smooth_black_quartz_wall_side", + "uvlock": true, + "y": 90 + }, "when": { "east": "low" - }, - "apply": { - "model": "actuallyadditions:block/smooth_black_quartz_wall_side", - "y": 90, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/smooth_black_quartz_wall_side_tall", + "uvlock": true, + "y": 90 + }, "when": { "east": "tall" - }, - "apply": { - "model": "actuallyadditions:block/smooth_black_quartz_wall_side_tall", - "y": 90, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/smooth_black_quartz_wall_side", + "uvlock": true + }, "when": { "north": "low" - }, - "apply": { - "model": "actuallyadditions:block/smooth_black_quartz_wall_side", - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/smooth_black_quartz_wall_side_tall", + "uvlock": true + }, "when": { "north": "tall" - }, - "apply": { - "model": "actuallyadditions:block/smooth_black_quartz_wall_side_tall", - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/smooth_black_quartz_wall_side", + "uvlock": true, + "y": 180 + }, "when": { "south": "low" - }, - "apply": { - "model": "actuallyadditions:block/smooth_black_quartz_wall_side", - "y": 180, - "uvlock": true } }, { + "apply": { + "model": "actuallyadditions:block/smooth_black_quartz_wall_side_tall", + "uvlock": true, + "y": 180 + }, "when": { "south": "tall" - }, - "apply": { - "model": "actuallyadditions:block/smooth_black_quartz_wall_side_tall", - "y": 180, - "uvlock": true } }, { - "when": { - "west": "low" - }, "apply": { "model": "actuallyadditions:block/smooth_black_quartz_wall_side", - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 + }, + "when": { + "west": "low" } }, { - "when": { - "west": "tall" - }, "apply": { "model": "actuallyadditions:block/smooth_black_quartz_wall_side_tall", - "y": 270, - "uvlock": true + "uvlock": true, + "y": 270 + }, + "when": { + "west": "tall" } } ] diff --git a/src/generated/resources/assets/actuallyadditions/blockstates/vertical_digger.json b/src/generated/resources/assets/actuallyadditions/blockstates/vertical_digger.json index dd939baa3..6c5c76ba2 100644 --- a/src/generated/resources/assets/actuallyadditions/blockstates/vertical_digger.json +++ b/src/generated/resources/assets/actuallyadditions/blockstates/vertical_digger.json @@ -1,5 +1,9 @@ { "variants": { + "facing=east": { + "model": "actuallyadditions:block/vertical_digger", + "y": 90 + }, "facing=north": { "model": "actuallyadditions:block/vertical_digger" }, @@ -10,10 +14,6 @@ "facing=west": { "model": "actuallyadditions:block/vertical_digger", "y": 270 - }, - "facing=east": { - "model": "actuallyadditions:block/vertical_digger", - "y": 90 } } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_slab.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_slab.json index 16d7dd727..c8367ca0b 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_slab.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_slab.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/slab", "textures": { - "side": "actuallyadditions:block/black_quartz_brick_block", "bottom": "actuallyadditions:block/black_quartz_brick_block", + "side": "actuallyadditions:block/black_quartz_brick_block", "top": "actuallyadditions:block/black_quartz_brick_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_slab_top.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_slab_top.json index 7a52803ea..83432a452 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_slab_top.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_slab_top.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/slab_top", "textures": { - "side": "actuallyadditions:block/black_quartz_brick_block", "bottom": "actuallyadditions:block/black_quartz_brick_block", + "side": "actuallyadditions:block/black_quartz_brick_block", "top": "actuallyadditions:block/black_quartz_brick_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_stair.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_stair.json index 76679fb66..a429d1983 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_stair.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_stair.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/stairs", "textures": { - "side": "actuallyadditions:block/black_quartz_brick_block", "bottom": "actuallyadditions:block/black_quartz_brick_block", + "side": "actuallyadditions:block/black_quartz_brick_block", "top": "actuallyadditions:block/black_quartz_brick_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_stair_inner.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_stair_inner.json index 91e453290..0d207c7b1 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_stair_inner.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_stair_inner.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/inner_stairs", "textures": { - "side": "actuallyadditions:block/black_quartz_brick_block", "bottom": "actuallyadditions:block/black_quartz_brick_block", + "side": "actuallyadditions:block/black_quartz_brick_block", "top": "actuallyadditions:block/black_quartz_brick_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_stair_outer.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_stair_outer.json index 9a2fc0826..9e733c98f 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_stair_outer.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_brick_stair_outer.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/outer_stairs", "textures": { - "side": "actuallyadditions:block/black_quartz_brick_block", "bottom": "actuallyadditions:block/black_quartz_brick_block", + "side": "actuallyadditions:block/black_quartz_brick_block", "top": "actuallyadditions:block/black_quartz_brick_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_slab.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_slab.json index 0a0f23623..5c10a616a 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_slab.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_slab.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/slab", "textures": { - "side": "actuallyadditions:block/black_quartz_pillar_block", "bottom": "actuallyadditions:block/black_quartz_pillar_block", + "side": "actuallyadditions:block/black_quartz_pillar_block", "top": "actuallyadditions:block/black_quartz_pillar_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_slab_top.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_slab_top.json index d78688a40..78da30299 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_slab_top.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_slab_top.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/slab_top", "textures": { - "side": "actuallyadditions:block/black_quartz_pillar_block", "bottom": "actuallyadditions:block/black_quartz_pillar_block", + "side": "actuallyadditions:block/black_quartz_pillar_block", "top": "actuallyadditions:block/black_quartz_pillar_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_stair.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_stair.json index 4f2d05ff7..1ccb77d33 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_stair.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_stair.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/stairs", "textures": { - "side": "actuallyadditions:block/black_quartz_pillar_block", "bottom": "actuallyadditions:block/black_quartz_pillar_block", + "side": "actuallyadditions:block/black_quartz_pillar_block", "top": "actuallyadditions:block/black_quartz_pillar_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_stair_inner.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_stair_inner.json index 9260827f8..1b11e0714 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_stair_inner.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_stair_inner.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/inner_stairs", "textures": { - "side": "actuallyadditions:block/black_quartz_pillar_block", "bottom": "actuallyadditions:block/black_quartz_pillar_block", + "side": "actuallyadditions:block/black_quartz_pillar_block", "top": "actuallyadditions:block/black_quartz_pillar_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_stair_outer.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_stair_outer.json index 8f066f932..9c2a50734 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_stair_outer.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_pillar_stair_outer.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/outer_stairs", "textures": { - "side": "actuallyadditions:block/black_quartz_pillar_block", "bottom": "actuallyadditions:block/black_quartz_pillar_block", + "side": "actuallyadditions:block/black_quartz_pillar_block", "top": "actuallyadditions:block/black_quartz_pillar_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_slab.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_slab.json index 10b5c29ff..efef9b849 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_slab.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_slab.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/slab", "textures": { - "side": "actuallyadditions:block/black_quartz_block", "bottom": "actuallyadditions:block/black_quartz_block", + "side": "actuallyadditions:block/black_quartz_block", "top": "actuallyadditions:block/black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_slab_top.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_slab_top.json index b3c597dc9..568cc841c 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_slab_top.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_slab_top.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/slab_top", "textures": { - "side": "actuallyadditions:block/black_quartz_block", "bottom": "actuallyadditions:block/black_quartz_block", + "side": "actuallyadditions:block/black_quartz_block", "top": "actuallyadditions:block/black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_stair.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_stair.json index 285f6236b..544dad249 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_stair.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_stair.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/stairs", "textures": { - "side": "actuallyadditions:block/black_quartz_block", "bottom": "actuallyadditions:block/black_quartz_block", + "side": "actuallyadditions:block/black_quartz_block", "top": "actuallyadditions:block/black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_stair_inner.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_stair_inner.json index ca5a0895d..8272d781f 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_stair_inner.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_stair_inner.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/inner_stairs", "textures": { - "side": "actuallyadditions:block/black_quartz_block", "bottom": "actuallyadditions:block/black_quartz_block", + "side": "actuallyadditions:block/black_quartz_block", "top": "actuallyadditions:block/black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_stair_outer.json b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_stair_outer.json index 79039e653..2da4c5a67 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_stair_outer.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/black_quartz_stair_outer.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/outer_stairs", "textures": { - "side": "actuallyadditions:block/black_quartz_block", "bottom": "actuallyadditions:block/black_quartz_block", + "side": "actuallyadditions:block/black_quartz_block", "top": "actuallyadditions:block/black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_slab.json b/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_slab.json index 4acb79c05..26fb03dac 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_slab.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_slab.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/slab", "textures": { - "side": "actuallyadditions:block/chiseled_black_quartz_block", "bottom": "actuallyadditions:block/chiseled_black_quartz_block", + "side": "actuallyadditions:block/chiseled_black_quartz_block", "top": "actuallyadditions:block/chiseled_black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_slab_top.json b/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_slab_top.json index 97343517e..a3b2a6311 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_slab_top.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_slab_top.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/slab_top", "textures": { - "side": "actuallyadditions:block/chiseled_black_quartz_block", "bottom": "actuallyadditions:block/chiseled_black_quartz_block", + "side": "actuallyadditions:block/chiseled_black_quartz_block", "top": "actuallyadditions:block/chiseled_black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_stair.json b/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_stair.json index f9f82578b..62d8938da 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_stair.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_stair.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/stairs", "textures": { - "side": "actuallyadditions:block/chiseled_black_quartz_block", "bottom": "actuallyadditions:block/chiseled_black_quartz_block", + "side": "actuallyadditions:block/chiseled_black_quartz_block", "top": "actuallyadditions:block/chiseled_black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_stair_inner.json b/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_stair_inner.json index cda22aea8..75b4c7c64 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_stair_inner.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_stair_inner.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/inner_stairs", "textures": { - "side": "actuallyadditions:block/chiseled_black_quartz_block", "bottom": "actuallyadditions:block/chiseled_black_quartz_block", + "side": "actuallyadditions:block/chiseled_black_quartz_block", "top": "actuallyadditions:block/chiseled_black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_stair_outer.json b/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_stair_outer.json index e01f27b15..3814f2577 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_stair_outer.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/chiseled_black_quartz_stair_outer.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/outer_stairs", "textures": { - "side": "actuallyadditions:block/chiseled_black_quartz_block", "bottom": "actuallyadditions:block/chiseled_black_quartz_block", + "side": "actuallyadditions:block/chiseled_black_quartz_block", "top": "actuallyadditions:block/chiseled_black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_slab.json b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_slab.json index 35677cbb1..c314aed48 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_slab.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_slab.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/slab", "textures": { - "side": "actuallyadditions:block/ethetic_green_block", "bottom": "actuallyadditions:block/ethetic_green_block", + "side": "actuallyadditions:block/ethetic_green_block", "top": "actuallyadditions:block/ethetic_green_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_slab_top.json b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_slab_top.json index 39853e55d..29a15a989 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_slab_top.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_slab_top.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/slab_top", "textures": { - "side": "actuallyadditions:block/ethetic_green_block", "bottom": "actuallyadditions:block/ethetic_green_block", + "side": "actuallyadditions:block/ethetic_green_block", "top": "actuallyadditions:block/ethetic_green_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_stairs.json b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_stairs.json index 0cc3b8c69..b7e5b64c8 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_stairs.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_stairs.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/stairs", "textures": { - "side": "actuallyadditions:block/ethetic_green_block", "bottom": "actuallyadditions:block/ethetic_green_block", + "side": "actuallyadditions:block/ethetic_green_block", "top": "actuallyadditions:block/ethetic_green_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_stairs_inner.json b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_stairs_inner.json index 2a37c3183..028dacf4e 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_stairs_inner.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_stairs_inner.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/inner_stairs", "textures": { - "side": "actuallyadditions:block/ethetic_green_block", "bottom": "actuallyadditions:block/ethetic_green_block", + "side": "actuallyadditions:block/ethetic_green_block", "top": "actuallyadditions:block/ethetic_green_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_stairs_outer.json b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_stairs_outer.json index e5b25840a..75e725e41 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_stairs_outer.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_green_stairs_outer.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/outer_stairs", "textures": { - "side": "actuallyadditions:block/ethetic_green_block", "bottom": "actuallyadditions:block/ethetic_green_block", + "side": "actuallyadditions:block/ethetic_green_block", "top": "actuallyadditions:block/ethetic_green_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_slab.json b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_slab.json index bd3ca18e8..841dde016 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_slab.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_slab.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/slab", "textures": { - "side": "actuallyadditions:block/ethetic_white_block", "bottom": "actuallyadditions:block/ethetic_white_block", + "side": "actuallyadditions:block/ethetic_white_block", "top": "actuallyadditions:block/ethetic_white_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_slab_top.json b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_slab_top.json index f7d789668..789c8ff99 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_slab_top.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_slab_top.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/slab_top", "textures": { - "side": "actuallyadditions:block/ethetic_white_block", "bottom": "actuallyadditions:block/ethetic_white_block", + "side": "actuallyadditions:block/ethetic_white_block", "top": "actuallyadditions:block/ethetic_white_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_stairs.json b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_stairs.json index 6d1824d39..086f2113a 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_stairs.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_stairs.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/stairs", "textures": { - "side": "actuallyadditions:block/ethetic_white_block", "bottom": "actuallyadditions:block/ethetic_white_block", + "side": "actuallyadditions:block/ethetic_white_block", "top": "actuallyadditions:block/ethetic_white_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_stairs_inner.json b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_stairs_inner.json index cbaf8eb43..aafd0d14a 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_stairs_inner.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_stairs_inner.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/inner_stairs", "textures": { - "side": "actuallyadditions:block/ethetic_white_block", "bottom": "actuallyadditions:block/ethetic_white_block", + "side": "actuallyadditions:block/ethetic_white_block", "top": "actuallyadditions:block/ethetic_white_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_stairs_outer.json b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_stairs_outer.json index 9ccbfa1f6..eb71a82b3 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_stairs_outer.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/ethetic_white_stairs_outer.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/outer_stairs", "textures": { - "side": "actuallyadditions:block/ethetic_white_block", "bottom": "actuallyadditions:block/ethetic_white_block", + "side": "actuallyadditions:block/ethetic_white_block", "top": "actuallyadditions:block/ethetic_white_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_slab.json b/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_slab.json index 6ef3169dc..74b33d637 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_slab.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_slab.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/slab", "textures": { - "side": "actuallyadditions:block/smooth_black_quartz_block", "bottom": "actuallyadditions:block/smooth_black_quartz_block", + "side": "actuallyadditions:block/smooth_black_quartz_block", "top": "actuallyadditions:block/smooth_black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_slab_top.json b/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_slab_top.json index e6a94c73a..e75fc1886 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_slab_top.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_slab_top.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/slab_top", "textures": { - "side": "actuallyadditions:block/smooth_black_quartz_block", "bottom": "actuallyadditions:block/smooth_black_quartz_block", + "side": "actuallyadditions:block/smooth_black_quartz_block", "top": "actuallyadditions:block/smooth_black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_stair.json b/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_stair.json index 48446ef11..7861386ae 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_stair.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_stair.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/stairs", "textures": { - "side": "actuallyadditions:block/smooth_black_quartz_block", "bottom": "actuallyadditions:block/smooth_black_quartz_block", + "side": "actuallyadditions:block/smooth_black_quartz_block", "top": "actuallyadditions:block/smooth_black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_stair_inner.json b/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_stair_inner.json index d8ca26a30..2e7c4acf7 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_stair_inner.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_stair_inner.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/inner_stairs", "textures": { - "side": "actuallyadditions:block/smooth_black_quartz_block", "bottom": "actuallyadditions:block/smooth_black_quartz_block", + "side": "actuallyadditions:block/smooth_black_quartz_block", "top": "actuallyadditions:block/smooth_black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_stair_outer.json b/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_stair_outer.json index 2dfbc6bf3..34b30f842 100644 --- a/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_stair_outer.json +++ b/src/generated/resources/assets/actuallyadditions/models/block/smooth_black_quartz_stair_outer.json @@ -1,8 +1,8 @@ { "parent": "minecraft:block/outer_stairs", "textures": { - "side": "actuallyadditions:block/smooth_black_quartz_block", "bottom": "actuallyadditions:block/smooth_black_quartz_block", + "side": "actuallyadditions:block/smooth_black_quartz_block", "top": "actuallyadditions:block/smooth_black_quartz_block" } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/item/canola_oil_bucket.json b/src/generated/resources/assets/actuallyadditions/models/item/canola_oil_bucket.json index be298399d..49db370d0 100644 --- a/src/generated/resources/assets/actuallyadditions/models/item/canola_oil_bucket.json +++ b/src/generated/resources/assets/actuallyadditions/models/item/canola_oil_bucket.json @@ -1,5 +1,5 @@ { "parent": "forge:item/bucket", - "loader": "forge:bucket", - "fluid": "actuallyadditions:canola_oil" + "fluid": "actuallyadditions:canola_oil", + "loader": "forge:fluid_container" } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/item/crystallized_oil_bucket.json b/src/generated/resources/assets/actuallyadditions/models/item/crystallized_oil_bucket.json index c38723ad5..a266d57c1 100644 --- a/src/generated/resources/assets/actuallyadditions/models/item/crystallized_oil_bucket.json +++ b/src/generated/resources/assets/actuallyadditions/models/item/crystallized_oil_bucket.json @@ -1,5 +1,5 @@ { "parent": "forge:item/bucket", - "loader": "forge:bucket", - "fluid": "actuallyadditions:crystallized_oil" + "fluid": "actuallyadditions:crystallized_oil", + "loader": "forge:fluid_container" } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/item/empowered_oil_bucket.json b/src/generated/resources/assets/actuallyadditions/models/item/empowered_oil_bucket.json index 28f2b65e1..c5175d1ff 100644 --- a/src/generated/resources/assets/actuallyadditions/models/item/empowered_oil_bucket.json +++ b/src/generated/resources/assets/actuallyadditions/models/item/empowered_oil_bucket.json @@ -1,5 +1,5 @@ { "parent": "forge:item/bucket", - "loader": "forge:bucket", - "fluid": "actuallyadditions:empowered_oil" + "fluid": "actuallyadditions:empowered_oil", + "loader": "forge:fluid_container" } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/item/refined_canola_oil_bucket.json b/src/generated/resources/assets/actuallyadditions/models/item/refined_canola_oil_bucket.json index ad240464a..ccd277ac4 100644 --- a/src/generated/resources/assets/actuallyadditions/models/item/refined_canola_oil_bucket.json +++ b/src/generated/resources/assets/actuallyadditions/models/item/refined_canola_oil_bucket.json @@ -1,5 +1,5 @@ { "parent": "forge:item/bucket", - "loader": "forge:bucket", - "fluid": "actuallyadditions:refined_canola_oil" + "fluid": "actuallyadditions:refined_canola_oil", + "loader": "forge:fluid_container" } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/models/item/worm.json b/src/generated/resources/assets/actuallyadditions/models/item/worm.json index a53d3011f..4502367fa 100644 --- a/src/generated/resources/assets/actuallyadditions/models/item/worm.json +++ b/src/generated/resources/assets/actuallyadditions/models/item/worm.json @@ -1,14 +1,14 @@ { "parent": "minecraft:item/handheld", - "textures": { - "layer0": "actuallyadditions:item/worm" - }, "overrides": [ { + "model": "actuallyadditions:item/snail", "predicate": { "actuallyadditions:snail": 1.0 - }, - "model": "actuallyadditions:item/snail" + } } - ] + ], + "textures": { + "layer0": "actuallyadditions:item/worm" + } } \ No newline at end of file diff --git a/src/generated/resources/assets/actuallyadditions/sounds.json b/src/generated/resources/assets/actuallyadditions/sounds.json index afbf52404..db24c968b 100644 --- a/src/generated/resources/assets/actuallyadditions/sounds.json +++ b/src/generated/resources/assets/actuallyadditions/sounds.json @@ -1,7 +1,7 @@ { - "reconstructor": { + "coffee_machine": { "sounds": [ - "actuallyadditions:reconstructor" + "actuallyadditions:coffee_machine" ] }, "crusher": { @@ -9,14 +9,14 @@ "actuallyadditions:crusher" ] }, - "coffee_machine": { - "sounds": [ - "actuallyadditions:coffee_machine" - ] - }, "duh_duh_duh_duuuh": { "sounds": [ "actuallyadditions:duh_duh_duh_duuuh" ] + }, + "reconstructor": { + "sounds": [ + "actuallyadditions:reconstructor" + ] } } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_coal_generator.json b/src/generated/resources/data/actuallyadditions/advancements/craft_coal_generator.json index 31a04ed84..f656072e2 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_coal_generator.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_coal_generator.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:root", - "display": { - "icon": { - "item": "actuallyadditions:coal_generator" - }, - "title": { - "translate": "achievement.actuallyadditions.craftCoalGen" - }, - "description": { - "translate": "achievement.actuallyadditions.craftCoalGen.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "coal_generator": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.craftCoalGen.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:coal_generator" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftCoalGen" } }, "requirements": [ [ "coal_generator" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_coffee_machine.json b/src/generated/resources/data/actuallyadditions/advancements/craft_coffee_machine.json index e488c7c76..bef435b09 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_coffee_machine.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_coffee_machine.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:pickup_coffee", - "display": { - "icon": { - "item": "actuallyadditions:coffee_machine" - }, - "title": { - "translate": "achievement.actuallyadditions.craftCoffeeMachine" - }, - "description": { - "translate": "achievement.actuallyadditions.craftCoffeeMachine.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "coffee_machine": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.craftCoffeeMachine.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:coffee_machine" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftCoffeeMachine" } }, "requirements": [ [ "coffee_machine" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_crusher.json b/src/generated/resources/data/actuallyadditions/advancements/craft_crusher.json index 715e683ea..2b4694e65 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_crusher.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_crusher.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:craft_reconstructor", - "display": { - "icon": { - "item": "actuallyadditions:crusher" - }, - "title": { - "translate": "achievement.actuallyadditions.craftCrusher" - }, - "description": { - "translate": "achievement.actuallyadditions.craftCrusher.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "crystal": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.craftCrusher.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:crusher" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftCrusher" } }, "requirements": [ [ "crystal" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_double_crusher.json b/src/generated/resources/data/actuallyadditions/advancements/craft_double_crusher.json index 21094f45d..6941ad18f 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_double_crusher.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_double_crusher.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:craft_crusher", - "display": { - "icon": { - "item": "actuallyadditions:crusher_double" - }, - "title": { - "translate": "achievement.actuallyadditions.craftDoubleCrusher" - }, - "description": { - "translate": "achievement.actuallyadditions.craftDoubleCrusher.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "crystal": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.craftDoubleCrusher.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:crusher_double" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftDoubleCrusher" } }, "requirements": [ [ "crystal" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_empowerer.json b/src/generated/resources/data/actuallyadditions/advancements/craft_empowerer.json index 5353af633..ca85c8316 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_empowerer.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_empowerer.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:make_first_crystal", - "display": { - "icon": { - "item": "actuallyadditions:empowerer" - }, - "title": { - "translate": "achievement.actuallyadditions.craftEmpowerer" - }, - "description": { - "translate": "achievement.actuallyadditions.craftEmpowerer.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "empowerer": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.craftEmpowerer.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:empowerer" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftEmpowerer" } }, "requirements": [ [ "empowerer" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_energyface.json b/src/generated/resources/data/actuallyadditions/advancements/craft_energyface.json index 555e79de5..c19de8b83 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_energyface.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_energyface.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:craft_phantom_face", - "display": { - "icon": { - "item": "actuallyadditions:phantom_energyface" - }, - "title": { - "translate": "achievement.actuallyadditions.craftEnergyface" - }, - "description": { - "translate": "achievement.actuallyadditions.craftEnergyface.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "energyface": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.craftEnergyface.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:phantom_energyface" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftEnergyface" } }, "requirements": [ [ "energyface" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_item_interface.json b/src/generated/resources/data/actuallyadditions/advancements/craft_item_interface.json index fa6e38e5b..7325d68c3 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_item_interface.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_item_interface.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:craft_laser_relay", - "display": { - "icon": { - "item": "actuallyadditions:item_interface" - }, - "title": { - "translate": "achievement.actuallyadditions.craftItemInterface" - }, - "description": { - "translate": "achievement.actuallyadditions.craftItemInterface.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "item_interface": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.craftItemInterface.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:item_interface" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftItemInterface" } }, "requirements": [ [ "item_interface" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay.json b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay.json index 67dc9581d..496a45c59 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:craft_reconstructor", - "display": { - "icon": { - "item": "actuallyadditions:laser_relay" - }, - "title": { - "translate": "achievement.actuallyadditions.craftLaserRelay" - }, - "description": { - "translate": "achievement.actuallyadditions.craftLaserRelay.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "laser_relay": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.craftLaserRelay.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:laser_relay" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftLaserRelay" } }, "requirements": [ [ "laser_relay" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_advanced.json b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_advanced.json index 9fef2a695..6d0c37a50 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_advanced.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_advanced.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:craft_laser_relay", - "display": { - "icon": { - "item": "actuallyadditions:laser_relay_advanced" - }, - "title": { - "translate": "achievement.actuallyadditions.craftLaserRelayAdvanced" - }, - "description": { - "translate": "achievement.actuallyadditions.craftLaserRelayAdvanced.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "laser_relay_advanced": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.craftLaserRelayAdvanced.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:laser_relay_advanced" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftLaserRelayAdvanced" } }, "requirements": [ [ "laser_relay_advanced" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_extreme.json b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_extreme.json index ddf4e9caa..c981bb075 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_extreme.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_extreme.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:craft_laser_relay_advanced", - "display": { - "icon": { - "item": "actuallyadditions:laser_relay_extreme" - }, - "title": { - "translate": "achievement.actuallyadditions.craftLaserRelayExtreme" - }, - "description": { - "translate": "achievement.actuallyadditions.craftLaserRelayExtreme.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "laser_relay_extreme": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.craftLaserRelayExtreme.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:laser_relay_extreme" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftLaserRelayExtreme" } }, "requirements": [ [ "laser_relay_extreme" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_item.json b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_item.json index 9abffffba..0bf167bf0 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_item.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_laser_relay_item.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:craft_laser_relay", - "display": { - "icon": { - "item": "actuallyadditions:laser_relay_item" - }, - "title": { - "translate": "achievement.actuallyadditions.craftLaserRelayItem" - }, - "description": { - "translate": "achievement.actuallyadditions.craftLaserRelayItem.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "laser_relay_item": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.craftLaserRelayItem.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:laser_relay_item" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftLaserRelayItem" } }, "requirements": [ [ "laser_relay_item" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_leaf_generator.json b/src/generated/resources/data/actuallyadditions/advancements/craft_leaf_generator.json index 53685adc3..9f8e82dc9 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_leaf_generator.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_leaf_generator.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:craft_coal_generator", - "display": { - "icon": { - "item": "actuallyadditions:leaf_generator" - }, - "title": { - "translate": "achievement.actuallyadditions.craftLeafGen" - }, - "description": { - "translate": "achievement.actuallyadditions.craftLeafGen.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "leaf_generator": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.craftLeafGen.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:leaf_generator" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftLeafGen" } }, "requirements": [ [ "leaf_generator" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_liquiface.json b/src/generated/resources/data/actuallyadditions/advancements/craft_liquiface.json index 71d4f4903..56d79f259 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_liquiface.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_liquiface.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:craft_phantom_face", - "display": { - "icon": { - "item": "actuallyadditions:phantom_liquiface" - }, - "title": { - "translate": "achievement.actuallyadditions.craftLiquiface" - }, - "description": { - "translate": "achievement.actuallyadditions.craftLiquiface.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "liquiface": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.craftLiquiface.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:phantom_liquiface" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftLiquiface" } }, "requirements": [ [ "liquiface" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_phantom_face.json b/src/generated/resources/data/actuallyadditions/advancements/craft_phantom_face.json index adaa4936e..b0c24fd04 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_phantom_face.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_phantom_face.json @@ -1,24 +1,7 @@ { "parent": "actuallyadditions:root", - "display": { - "icon": { - "item": "actuallyadditions:phantom_itemface" - }, - "title": { - "translate": "achievement.actuallyadditions.craftPhantomface" - }, - "description": { - "translate": "achievement.actuallyadditions.craftPhantomface.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false, - "background": "minecraft:textures/blocks/stone.png" - }, "criteria": { "phantom_face": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -27,12 +10,30 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "background": "minecraft:textures/blocks/stone.png", + "description": { + "translate": "achievement.actuallyadditions.craftPhantomface.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:phantom_itemface" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftPhantomface" } }, "requirements": [ [ "phantom_face" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/craft_reconstructor.json b/src/generated/resources/data/actuallyadditions/advancements/craft_reconstructor.json index 6ce4cbf03..4d4e9e971 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/craft_reconstructor.json +++ b/src/generated/resources/data/actuallyadditions/advancements/craft_reconstructor.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:craft_coal_generator", - "display": { - "icon": { - "item": "actuallyadditions:atomic_reconstructor" - }, - "title": { - "translate": "achievement.actuallyadditions.craftReconstructor" - }, - "description": { - "translate": "achievement.actuallyadditions.craftReconstructor.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "atomic_reconstructor": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.craftReconstructor.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:atomic_reconstructor" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.craftReconstructor" } }, "requirements": [ [ "atomic_reconstructor" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/make_first_crystal.json b/src/generated/resources/data/actuallyadditions/advancements/make_first_crystal.json index a8ba7e37b..cfe4464f6 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/make_first_crystal.json +++ b/src/generated/resources/data/actuallyadditions/advancements/make_first_crystal.json @@ -1,35 +1,36 @@ { "parent": "actuallyadditions:craft_reconstructor", - "display": { - "icon": { - "item": "actuallyadditions:emeradic_crystal" - }, - "title": { - "translate": "achievement.actuallyadditions.makeCrystal" - }, - "description": { - "translate": "achievement.actuallyadditions.makeCrystal.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "crystal": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { "tag": "actuallyadditions:crystals" } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.makeCrystal.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:emeradic_crystal" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.makeCrystal" } }, "requirements": [ [ "crystal" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/pickup_coffee.json b/src/generated/resources/data/actuallyadditions/advancements/pickup_coffee.json index 07803b4fa..15c0f26a3 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/pickup_coffee.json +++ b/src/generated/resources/data/actuallyadditions/advancements/pickup_coffee.json @@ -1,23 +1,7 @@ { "parent": "actuallyadditions:craft_coal_generator", - "display": { - "icon": { - "item": "actuallyadditions:coffee_beans" - }, - "title": { - "translate": "achievement.actuallyadditions.pickUpCoffee" - }, - "description": { - "translate": "achievement.actuallyadditions.pickUpCoffee.desc" - }, - "frame": "task", - "show_toast": true, - "announce_to_chat": true, - "hidden": false - }, "criteria": { "coffee_beans": { - "trigger": "minecraft:inventory_changed", "conditions": { "items": [ { @@ -26,12 +10,29 @@ ] } ] - } + }, + "trigger": "minecraft:inventory_changed" + } + }, + "display": { + "announce_to_chat": true, + "description": { + "translate": "achievement.actuallyadditions.pickUpCoffee.desc" + }, + "frame": "task", + "hidden": false, + "icon": { + "item": "actuallyadditions:coffee_beans" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.pickUpCoffee" } }, "requirements": [ [ "coffee_beans" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/advancements/root.json b/src/generated/resources/data/actuallyadditions/advancements/root.json index 9f0b9dc15..69b86f24c 100644 --- a/src/generated/resources/data/actuallyadditions/advancements/root.json +++ b/src/generated/resources/data/actuallyadditions/advancements/root.json @@ -1,28 +1,29 @@ { + "criteria": { + "right_click": { + "trigger": "minecraft:impossible" + } + }, "display": { - "icon": { - "item": "actuallyadditions:booklet" - }, - "title": { - "translate": "achievement.actuallyadditions.openBooklet" - }, + "announce_to_chat": true, + "background": "minecraft:textures/gui/advancements/backgrounds/stone.png", "description": { "translate": "achievement.actuallyadditions.openBooklet.desc" }, "frame": "task", - "show_toast": true, - "announce_to_chat": true, "hidden": false, - "background": "minecraft:textures/gui/advancements/backgrounds/stone.png" - }, - "criteria": { - "right_click": { - "trigger": "minecraft:impossible" + "icon": { + "item": "actuallyadditions:booklet" + }, + "show_toast": true, + "title": { + "translate": "achievement.actuallyadditions.openBooklet" } }, "requirements": [ [ "right_click" ] - ] + ], + "sends_telemetry_event": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/atomic_reconstructor.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/atomic_reconstructor.json index 1054ce438..021c27529 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/atomic_reconstructor.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/atomic_reconstructor.json @@ -2,43 +2,44 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:atomic_reconstructor" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], "functions": [ { "function": "minecraft:copy_nbt", - "source": "block_entity", "ops": [ { + "op": "replace", "source": "Energy", - "target": "BlockEntityTag.Energy", - "op": "replace" + "target": "BlockEntityTag.Energy" } - ] + ], + "source": "block_entity" }, { "function": "minecraft:copy_nbt", - "source": "block_entity", "ops": [ { + "op": "replace", "source": "IsPulseMode", - "target": "BlockEntityTag.IsPulseMode", - "op": "replace" + "target": "BlockEntityTag.IsPulseMode" } - ] + ], + "source": "block_entity" } - ] + ], + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/atomic_reconstructor" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/battery_box.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/battery_box.json index 3f63c6924..a0fecab39 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/battery_box.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/battery_box.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:battery_box" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/battery_box" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/bio_reactor.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/bio_reactor.json index 60439a516..30f034004 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/bio_reactor.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/bio_reactor.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:bio_reactor" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/bio_reactor" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_block.json index 598323abb..40c8793f1 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:black_quartz_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/black_quartz_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_block.json index 7c650b89c..265be9b04 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:black_quartz_brick_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/black_quartz_brick_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_slab.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_slab.json index 6bbc59b94..d7274e221 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_slab.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_slab.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:black_quartz_brick_slab" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/black_quartz_brick_slab" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_stair.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_stair.json index d66d22c8a..419953846 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_stair.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_stair.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:black_quartz_brick_stair" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/black_quartz_brick_stair" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_wall.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_wall.json index 643e7c14f..3c89dae97 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_wall.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_brick_wall.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:black_quartz_brick_wall" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/black_quartz_brick_wall" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_ore.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_ore.json index d25ac3370..51f1edef2 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_ore.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_ore.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:black_quartz_ore" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/black_quartz_ore" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_block.json index 02033ad87..16bce0f58 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:black_quartz_pillar_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/black_quartz_pillar_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_slab.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_slab.json index 6798b9899..857bda135 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_slab.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_slab.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:black_quartz_pillar_slab" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/black_quartz_pillar_slab" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_stair.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_stair.json index bb3cf0d61..b8988b6a4 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_stair.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_stair.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:black_quartz_pillar_stair" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/black_quartz_pillar_stair" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_wall.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_wall.json index b20f0d41d..f63b0a42f 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_wall.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_pillar_wall.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:black_quartz_pillar_wall" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/black_quartz_pillar_wall" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_slab.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_slab.json index 1bd033119..78776464f 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_slab.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_slab.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:black_quartz_slab" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/black_quartz_slab" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_stair.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_stair.json index 26476d55f..7e628ae9c 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_stair.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_stair.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:black_quartz_stair" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/black_quartz_stair" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_wall.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_wall.json index 1c5410f66..b115d273f 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_wall.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/black_quartz_wall.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:black_quartz_wall" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/black_quartz_wall" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/breaker.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/breaker.json index 249eaaa8f..9b2b7301f 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/breaker.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/breaker.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:breaker" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/breaker" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola.json index b3b7a7828..e502ca0d5 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola.json @@ -1,8 +1,12 @@ { "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ], "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, "entries": [ { @@ -12,8 +16,8 @@ "type": "minecraft:item", "conditions": [ { - "condition": "minecraft:block_state_property", "block": "actuallyadditions:canola", + "condition": "minecraft:block_state_property", "properties": { "age": "7" } @@ -27,19 +31,28 @@ } ] } - ] + ], + "rolls": 1.0 }, { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "block": "actuallyadditions:canola", + "condition": "minecraft:block_state_property", + "properties": { + "age": "7" + } + } + ], "entries": [ { "type": "minecraft:item", "functions": [ { - "function": "minecraft:apply_bonus", "enchantment": "minecraft:fortune", "formula": "minecraft:binomial_with_bonus_count", + "function": "minecraft:apply_bonus", "parameters": { "extra": 3, "probability": 0.5714286 @@ -49,20 +62,8 @@ "name": "actuallyadditions:canola_seeds" } ], - "conditions": [ - { - "condition": "minecraft:block_state_property", - "block": "actuallyadditions:canola", - "properties": { - "age": "7" - } - } - ] + "rolls": 1.0 } ], - "functions": [ - { - "function": "minecraft:explosion_decay" - } - ] + "random_sequence": "actuallyadditions:blocks/canola" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola_press.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola_press.json index 015c84660..2c2ae3793 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola_press.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/canola_press.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:canola_press" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/canola_press" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_block.json index cb9d06fee..0e85f1f96 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:chiseled_black_quartz_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/chiseled_black_quartz_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_slab.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_slab.json index 7d6b111ca..c804cc97a 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_slab.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_slab.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:chiseled_black_quartz_slab" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/chiseled_black_quartz_slab" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_stair.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_stair.json index df0b9dbe8..0334fb277 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_stair.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_stair.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:chiseled_black_quartz_stair" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/chiseled_black_quartz_stair" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_wall.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_wall.json index 6b40fcadf..f7eac1ce2 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_wall.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/chiseled_black_quartz_wall.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:chiseled_black_quartz_wall" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/chiseled_black_quartz_wall" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coal_generator.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coal_generator.json index fa7efa496..6039cd769 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coal_generator.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coal_generator.json @@ -2,32 +2,33 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:coal_generator" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], "functions": [ { "function": "minecraft:copy_nbt", - "source": "block_entity", "ops": [ { + "op": "replace", "source": "Energy", - "target": "BlockEntityTag.Energy", - "op": "replace" + "target": "BlockEntityTag.Energy" } - ] + ], + "source": "block_entity" } - ] + ], + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/coal_generator" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee.json index 325f11ad2..b5f14e0e1 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee.json @@ -1,8 +1,12 @@ { "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ], "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, "entries": [ { @@ -12,8 +16,8 @@ "type": "minecraft:item", "conditions": [ { - "condition": "minecraft:block_state_property", "block": "actuallyadditions:coffee", + "condition": "minecraft:block_state_property", "properties": { "age": "7" } @@ -27,19 +31,28 @@ } ] } - ] + ], + "rolls": 1.0 }, { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "block": "actuallyadditions:coffee", + "condition": "minecraft:block_state_property", + "properties": { + "age": "7" + } + } + ], "entries": [ { "type": "minecraft:item", "functions": [ { - "function": "minecraft:apply_bonus", "enchantment": "minecraft:fortune", "formula": "minecraft:binomial_with_bonus_count", + "function": "minecraft:apply_bonus", "parameters": { "extra": 3, "probability": 0.5714286 @@ -49,20 +62,8 @@ "name": "actuallyadditions:coffee_beans" } ], - "conditions": [ - { - "condition": "minecraft:block_state_property", - "block": "actuallyadditions:coffee", - "properties": { - "age": "7" - } - } - ] + "rolls": 1.0 } ], - "functions": [ - { - "function": "minecraft:explosion_decay" - } - ] + "random_sequence": "actuallyadditions:blocks/coffee" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee_machine.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee_machine.json index efdfc9ebe..8984ee8e4 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee_machine.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/coffee_machine.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:coffee_machine" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/coffee_machine" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher.json index 2dc3ac2b1..d52592b1f 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher.json @@ -2,32 +2,33 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:crusher" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], "functions": [ { "function": "minecraft:copy_nbt", - "source": "block_entity", "ops": [ { + "op": "replace", "source": "Energy", - "target": "BlockEntityTag.Energy", - "op": "replace" + "target": "BlockEntityTag.Energy" } - ] + ], + "source": "block_entity" } - ] + ], + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/crusher" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher_double.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher_double.json index 16b1926cd..8e501df0a 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher_double.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/crusher_double.json @@ -2,32 +2,33 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:crusher_double" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], "functions": [ { "function": "minecraft:copy_nbt", - "source": "block_entity", "ops": [ { + "op": "replace", "source": "Energy", - "target": "BlockEntityTag.Energy", - "op": "replace" + "target": "BlockEntityTag.Energy" } - ] + ], + "source": "block_entity" } - ] + ], + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/crusher_double" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_block.json index 8d02e3718..e6805b371 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:diamatine_crystal_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/diamatine_crystal_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_cluster.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_cluster.json index f94a936cb..7441ec94a 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_cluster.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/diamatine_crystal_cluster.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:diamatine_crystal_cluster" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/diamatine_crystal_cluster" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/display_stand.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/display_stand.json index 1d2356135..f98c4b84a 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/display_stand.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/display_stand.json @@ -2,32 +2,33 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:display_stand" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], "functions": [ { "function": "minecraft:copy_nbt", - "source": "block_entity", "ops": [ { + "op": "replace", "source": "Energy", - "target": "BlockEntityTag.Energy", - "op": "replace" + "target": "BlockEntityTag.Energy" } - ] + ], + "source": "block_entity" } - ] + ], + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/display_stand" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/dropper.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/dropper.json index d037144f4..5f395320d 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/dropper.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/dropper.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:dropper" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/dropper" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_block.json index 39745aea1..7456237d4 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:emeradic_crystal_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/emeradic_crystal_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_cluster.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_cluster.json index f3c1e44e6..a9ea488c7 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_cluster.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/emeradic_crystal_cluster.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:emeradic_crystal_cluster" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/emeradic_crystal_cluster" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_diamatine_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_diamatine_crystal_block.json index adeb26142..1f41648b2 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_diamatine_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_diamatine_crystal_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:empowered_diamatine_crystal_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/empowered_diamatine_crystal_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_emeradic_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_emeradic_crystal_block.json index ebd0f62ed..37d53a108 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_emeradic_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_emeradic_crystal_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:empowered_emeradic_crystal_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/empowered_emeradic_crystal_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_enori_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_enori_crystal_block.json index 040b109e7..c087bbe6c 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_enori_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_enori_crystal_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:empowered_enori_crystal_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/empowered_enori_crystal_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_palis_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_palis_crystal_block.json index 66fb81542..05ac76eec 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_palis_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_palis_crystal_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:empowered_palis_crystal_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/empowered_palis_crystal_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_restonia_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_restonia_crystal_block.json index e635129bd..f60574dd1 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_restonia_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_restonia_crystal_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:empowered_restonia_crystal_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/empowered_restonia_crystal_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_void_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_void_crystal_block.json index 977f40f13..522518d45 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_void_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowered_void_crystal_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:empowered_void_crystal_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/empowered_void_crystal_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowerer.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowerer.json index 9784699f6..e52cc7a42 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowerer.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/empowerer.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:empowerer" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/empowerer" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ender_casing.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ender_casing.json index 8c0b34e27..3dc1b88d3 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ender_casing.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ender_casing.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:ender_casing" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/ender_casing" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/energizer.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/energizer.json index 2018794d8..988235bb1 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/energizer.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/energizer.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:energizer" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/energizer" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enervator.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enervator.json index a34c3c96c..87465fa21 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enervator.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enervator.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:enervator" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/enervator" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_block.json index 7b1c1d2f2..058a93b13 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:enori_crystal_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/enori_crystal_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_cluster.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_cluster.json index 3080e00b9..1cee71d51 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_cluster.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/enori_crystal_cluster.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:enori_crystal_cluster" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/enori_crystal_cluster" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_block.json index afb60f13f..3a9c1cbf6 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:ethetic_green_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/ethetic_green_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_slab.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_slab.json index 0855a601f..7b5151b9b 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_slab.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_slab.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:ethetic_green_slab" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/ethetic_green_slab" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_stairs.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_stairs.json index 4dd260e7f..b5d9f71cf 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_stairs.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_stairs.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:ethetic_green_stairs" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/ethetic_green_stairs" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_wall.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_wall.json index 3a9e14efe..a85215018 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_wall.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_green_wall.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:ethetic_green_wall" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/ethetic_green_wall" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_block.json index 17f2d1365..0097c9e68 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:ethetic_white_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/ethetic_white_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_slab.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_slab.json index da141db6d..8e7b1cc44 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_slab.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_slab.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:ethetic_white_slab" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/ethetic_white_slab" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_stairs.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_stairs.json index b57ea1d90..7f60531c3 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_stairs.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_stairs.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:ethetic_white_stairs" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/ethetic_white_stairs" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_wall.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_wall.json index 334165edb..bfef18a8a 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_wall.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ethetic_white_wall.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:ethetic_white_wall" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/ethetic_white_wall" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/farmer.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/farmer.json index cc7b4e28e..b4cd3448e 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/farmer.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/farmer.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:farmer" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/farmer" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/feeder.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/feeder.json index 0a5418e23..14e013018 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/feeder.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/feeder.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:feeder" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/feeder" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fermenting_barrel.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fermenting_barrel.json index 5f771aa63..90e24eedd 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fermenting_barrel.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fermenting_barrel.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:fermenting_barrel" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/fermenting_barrel" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/firework_box.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/firework_box.json index d4d996294..fd33a197f 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/firework_box.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/firework_box.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:firework_box" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/firework_box" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/flax.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/flax.json index 7025abdbe..b138746e8 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/flax.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/flax.json @@ -1,8 +1,12 @@ { "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ], "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, "entries": [ { @@ -12,8 +16,8 @@ "type": "minecraft:item", "conditions": [ { - "condition": "minecraft:block_state_property", "block": "actuallyadditions:flax", + "condition": "minecraft:block_state_property", "properties": { "age": "7" } @@ -27,19 +31,28 @@ } ] } - ] + ], + "rolls": 1.0 }, { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "block": "actuallyadditions:flax", + "condition": "minecraft:block_state_property", + "properties": { + "age": "7" + } + } + ], "entries": [ { "type": "minecraft:item", "functions": [ { - "function": "minecraft:apply_bonus", "enchantment": "minecraft:fortune", "formula": "minecraft:binomial_with_bonus_count", + "function": "minecraft:apply_bonus", "parameters": { "extra": 3, "probability": 0.5714286 @@ -49,20 +62,8 @@ "name": "actuallyadditions:flax_seeds" } ], - "conditions": [ - { - "condition": "minecraft:block_state_property", - "block": "actuallyadditions:flax", - "properties": { - "age": "7" - } - } - ] + "rolls": 1.0 } ], - "functions": [ - { - "function": "minecraft:explosion_decay" - } - ] + "random_sequence": "actuallyadditions:blocks/flax" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_collector.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_collector.json index d7f123c78..bfe76d9b2 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_collector.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_collector.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:fluid_collector" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/fluid_collector" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_placer.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_placer.json index 894e79fec..aeb469e6e 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_placer.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/fluid_placer.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:fluid_placer" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/fluid_placer" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/greenhouse_glass.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/greenhouse_glass.json index b0abe5f8d..2b41a00c3 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/greenhouse_glass.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/greenhouse_glass.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:greenhouse_glass" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/greenhouse_glass" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/heat_collector.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/heat_collector.json index 06fab2a33..299ec4a65 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/heat_collector.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/heat_collector.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:heat_collector" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/heat_collector" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/hopping_item_interface.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/hopping_item_interface.json index f3f59af62..391bce2ca 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/hopping_item_interface.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/hopping_item_interface.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:hopping_item_interface" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/hopping_item_interface" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/iron_casing.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/iron_casing.json index 157ca96d0..503ac20f1 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/iron_casing.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/iron_casing.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:iron_casing" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/iron_casing" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/item_interface.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/item_interface.json index 8609b8dab..aa7e12510 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/item_interface.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/item_interface.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:item_interface" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/item_interface" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_black.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_black.json index 10f140aee..dc1d0d5ec 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_black.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_black.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_black" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_black" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_blue.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_blue.json index 8ac9b4e3c..d51304261 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_blue.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_blue.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_blue" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_blue" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_brown.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_brown.json index bdfd31329..50c062499 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_brown.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_brown.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_brown" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_brown" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_controller.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_controller.json index 2544bf104..5a201a649 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_controller.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_controller.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_controller" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_cyan.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_cyan.json index 8e91bdcb9..51d88c1db 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_cyan.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_cyan.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_cyan" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_cyan" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_gray.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_gray.json index 7a3a6e072..e215fce77 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_gray.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_gray.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_gray" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_gray" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_green.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_green.json index 02f1fd2f2..b0c88d05a 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_green.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_green.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_green" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_green" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_blue.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_blue.json index 1364c84d4..68bcd0aa5 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_blue.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_blue.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_light_blue" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_light_blue" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_gray.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_gray.json index f0feae162..ee1d13a94 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_gray.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_light_gray.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_light_gray" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_light_gray" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_lime.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_lime.json index 40e4d6093..364cdd9b7 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_lime.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_lime.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_lime" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_lime" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_magenta.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_magenta.json index e031695ad..0f552715e 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_magenta.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_magenta.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_magenta" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_magenta" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_orange.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_orange.json index b1f7533d8..dc616a666 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_orange.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_orange.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_orange" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_orange" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_pink.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_pink.json index 155fcf4e6..03f6fab1b 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_pink.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_pink.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_pink" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_pink" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_purple.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_purple.json index 8f8561e41..eb857b3c4 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_purple.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_purple.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_purple" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_purple" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_red.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_red.json index e498e6d17..0a8472fb4 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_red.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_red.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_red" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_red" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_white.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_white.json index 819009386..757449f82 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_white.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_white.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_white" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_white" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_yellow.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_yellow.json index 8b42e5419..ce9607c72 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_yellow.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lamp_yellow.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lamp_yellow" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lamp_yellow" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay.json index a75c1c700..6b6621434 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:laser_relay" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/laser_relay" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_advanced.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_advanced.json index d1f1ab4e5..565378b86 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_advanced.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_advanced.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:laser_relay_advanced" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/laser_relay_advanced" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_extreme.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_extreme.json index 730316004..aa42c416a 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_extreme.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_extreme.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:laser_relay_extreme" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/laser_relay_extreme" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_fluids.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_fluids.json index d10694a22..974b45065 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_fluids.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_fluids.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:laser_relay_fluids" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/laser_relay_fluids" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item.json index a4001d3fe..e78d19ae9 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:laser_relay_item" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/laser_relay_item" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item_advanced.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item_advanced.json index c56f0f75c..d2ccda3e3 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item_advanced.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/laser_relay_item_advanced.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:laser_relay_item_advanced" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/laser_relay_item_advanced" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_casing.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_casing.json index d65699e50..be1db9f3d 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_casing.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_casing.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lava_factory_casing" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lava_factory_casing" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_controller.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_controller.json index ce43b4217..14ee3357b 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_controller.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/lava_factory_controller.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:lava_factory_controller" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/lava_factory_controller" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/leaf_generator.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/leaf_generator.json index abd380ec7..e8361b0d7 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/leaf_generator.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/leaf_generator.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:leaf_generator" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/leaf_generator" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/long_range_breaker.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/long_range_breaker.json index a0f462673..d37b56abf 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/long_range_breaker.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/long_range_breaker.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:long_range_breaker" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/long_range_breaker" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/oil_generator.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/oil_generator.json index c393f058a..e66c7eba0 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/oil_generator.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/oil_generator.json @@ -2,32 +2,33 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:oil_generator" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], "functions": [ { "function": "minecraft:copy_nbt", - "source": "block_entity", "ops": [ { + "op": "replace", "source": "Energy", - "target": "BlockEntityTag.Energy", - "op": "replace" + "target": "BlockEntityTag.Energy" } - ] + ], + "source": "block_entity" } - ] + ], + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/oil_generator" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_block.json index d17752cc9..71af6af2d 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:palis_crystal_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/palis_crystal_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_cluster.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_cluster.json index 34224fbc7..8c2acf0ce 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_cluster.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/palis_crystal_cluster.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:palis_crystal_cluster" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/palis_crystal_cluster" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_booster.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_booster.json index 6b7f3adf8..d881f91b1 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_booster.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_booster.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:phantom_booster" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/phantom_booster" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_breaker.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_breaker.json index f9a8780d4..092815aff 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_breaker.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_breaker.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:phantom_breaker" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/phantom_breaker" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_energyface.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_energyface.json index 9df709985..f2403e5fe 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_energyface.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_energyface.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:phantom_energyface" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/phantom_energyface" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_itemface.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_itemface.json index e4f4e5d83..5d70894eb 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_itemface.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_itemface.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:phantom_itemface" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/phantom_itemface" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_liquiface.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_liquiface.json index 7214352e8..4cd27d0ef 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_liquiface.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_liquiface.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:phantom_liquiface" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/phantom_liquiface" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_placer.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_placer.json index d07fedb09..7f6eb7c3c 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_placer.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_placer.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:phantom_placer" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/phantom_placer" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_redstoneface.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_redstoneface.json index 16a7eb941..dee738722 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_redstoneface.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/phantom_redstoneface.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:phantom_redstoneface" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/phantom_redstoneface" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/placer.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/placer.json index 441ddf30e..97c934c6e 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/placer.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/placer.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:placer" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/placer" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/player_interface.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/player_interface.json index 03c3a189d..f71f52af5 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/player_interface.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/player_interface.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:player_interface" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/player_interface" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/powered_furnace.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/powered_furnace.json index 8086e5274..135962a63 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/powered_furnace.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/powered_furnace.json @@ -2,32 +2,33 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:powered_furnace" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ], "functions": [ { "function": "minecraft:copy_nbt", - "source": "block_entity", "ops": [ { + "op": "replace", "source": "Energy", - "target": "BlockEntityTag.Energy", - "op": "replace" + "target": "BlockEntityTag.Energy" } - ] + ], + "source": "block_entity" } - ] + ], + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/powered_furnace" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ranged_collector.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ranged_collector.json index b0b03792f..fcf38ed99 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ranged_collector.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/ranged_collector.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:ranged_collector" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/ranged_collector" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_block.json index 315433d0c..21b9061a9 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:restonia_crystal_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/restonia_crystal_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_cluster.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_cluster.json index 99614b795..19d07fd64 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_cluster.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/restonia_crystal_cluster.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:restonia_crystal_cluster" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/restonia_crystal_cluster" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/rice.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/rice.json index 014ed3aab..f9c6a2600 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/rice.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/rice.json @@ -1,8 +1,12 @@ { "type": "minecraft:block", + "functions": [ + { + "function": "minecraft:explosion_decay" + } + ], "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, "entries": [ { @@ -12,8 +16,8 @@ "type": "minecraft:item", "conditions": [ { - "condition": "minecraft:block_state_property", "block": "actuallyadditions:rice", + "condition": "minecraft:block_state_property", "properties": { "age": "7" } @@ -27,19 +31,28 @@ } ] } - ] + ], + "rolls": 1.0 }, { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "block": "actuallyadditions:rice", + "condition": "minecraft:block_state_property", + "properties": { + "age": "7" + } + } + ], "entries": [ { "type": "minecraft:item", "functions": [ { - "function": "minecraft:apply_bonus", "enchantment": "minecraft:fortune", "formula": "minecraft:binomial_with_bonus_count", + "function": "minecraft:apply_bonus", "parameters": { "extra": 3, "probability": 0.5714286 @@ -49,20 +62,8 @@ "name": "actuallyadditions:rice_seeds" } ], - "conditions": [ - { - "condition": "minecraft:block_state_property", - "block": "actuallyadditions:rice", - "properties": { - "age": "7" - } - } - ] + "rolls": 1.0 } ], - "functions": [ - { - "function": "minecraft:explosion_decay" - } - ] + "random_sequence": "actuallyadditions:blocks/rice" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/shock_suppressor.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/shock_suppressor.json index a2ccdd18d..e59d01940 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/shock_suppressor.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/shock_suppressor.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:shock_suppressor" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/shock_suppressor" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_block.json index 5fc1b2f73..4cea5ed87 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:smooth_black_quartz_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/smooth_black_quartz_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_slab.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_slab.json index c99cb676c..003eb3f0d 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_slab.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_slab.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:smooth_black_quartz_slab" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/smooth_black_quartz_slab" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_stair.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_stair.json index 933a915d6..98737d3c7 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_stair.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_stair.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:smooth_black_quartz_stair" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/smooth_black_quartz_stair" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_wall.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_wall.json index f31422f41..735ca5feb 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_wall.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/smooth_black_quartz_wall.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:smooth_black_quartz_wall" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/smooth_black_quartz_wall" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/tiny_torch.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/tiny_torch.json index 6a1ef52e0..f4a1f6243 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/tiny_torch.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/tiny_torch.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:tiny_torch" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/tiny_torch" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/vertical_digger.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/vertical_digger.json index 91dc432a6..ce5e0f473 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/vertical_digger.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/vertical_digger.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:vertical_digger" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/vertical_digger" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_block.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_block.json index c3a95c3c9..3e355e7f6 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_block.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:void_crystal_block" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/void_crystal_block" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_cluster.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_cluster.json index bf676af26..1e148efe1 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_cluster.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/void_crystal_cluster.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:void_crystal_cluster" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/void_crystal_cluster" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/wood_casing.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/wood_casing.json index 8df18ba49..5b7474e66 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/wood_casing.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/wood_casing.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:wood_casing" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/wood_casing" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/xp_solidifier.json b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/xp_solidifier.json index 27d7de05f..a40bdb1fb 100644 --- a/src/generated/resources/data/actuallyadditions/loot_tables/blocks/xp_solidifier.json +++ b/src/generated/resources/data/actuallyadditions/loot_tables/blocks/xp_solidifier.json @@ -2,19 +2,20 @@ "type": "minecraft:block", "pools": [ { - "rolls": 1.0, "bonus_rolls": 0.0, + "conditions": [ + { + "condition": "minecraft:survives_explosion" + } + ], "entries": [ { "type": "minecraft:item", "name": "actuallyadditions:xp_solidifier" } ], - "conditions": [ - { - "condition": "minecraft:survives_explosion" - } - ] + "rolls": 1.0 } - ] + ], + "random_sequence": "actuallyadditions:blocks/xp_solidifier" } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/advanced_coil.json b/src/generated/resources/data/actuallyadditions/recipes/advanced_coil.json index 35166a959..4a4299fc2 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/advanced_coil.json +++ b/src/generated/resources/data/actuallyadditions/recipes/advanced_coil.json @@ -1,10 +1,6 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "GGG", - "GCG", - "GGG" - ], + "category": "misc", "key": { "C": { "item": "actuallyadditions:basic_coil" @@ -13,7 +9,13 @@ "item": "minecraft:gold_nugget" } }, + "pattern": [ + "GGG", + "GCG", + "GGG" + ], "result": { "item": "actuallyadditions:advanced_coil" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/advanced_leaf_blower.json b/src/generated/resources/data/actuallyadditions/recipes/advanced_leaf_blower.json index 3e46c3592..7fd81dfd2 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/advanced_leaf_blower.json +++ b/src/generated/resources/data/actuallyadditions/recipes/advanced_leaf_blower.json @@ -1,25 +1,27 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "C": { + "item": "actuallyadditions:advanced_coil" + }, + "D": { + "item": "actuallyadditions:diamatine_crystal" + }, + "F": { + "item": "minecraft:flint" + }, + "P": { + "item": "minecraft:piston" + } + }, "pattern": [ " F", "DP", "DC" ], - "key": { - "F": { - "item": "minecraft:flint" - }, - "D": { - "item": "actuallyadditions:diamatine_crystal" - }, - "P": { - "item": "minecraft:piston" - }, - "C": { - "item": "actuallyadditions:advanced_coil" - } - }, "result": { "item": "actuallyadditions:advanced_leaf_blower" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/atomic_reconstructor.json b/src/generated/resources/data/actuallyadditions/recipes/atomic_reconstructor.json index 17f86aec7..1728c247a 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/atomic_reconstructor.json +++ b/src/generated/resources/data/actuallyadditions/recipes/atomic_reconstructor.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "C": { + "item": "actuallyadditions:iron_casing" + }, + "I": { + "tag": "forge:ingots/iron" + }, + "R": { + "tag": "forge:dusts/redstone" + } + }, "pattern": [ "IRI", "RCR", "IRI" ], - "key": { - "R": { - "tag": "forge:dusts/redstone" - }, - "I": { - "tag": "forge:ingots/iron" - }, - "C": { - "item": "actuallyadditions:iron_casing" - } - }, "result": { "item": "actuallyadditions:atomic_reconstructor" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/basic_coil.json b/src/generated/resources/data/actuallyadditions/recipes/basic_coil.json index 4633a2985..c731f1739 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/basic_coil.json +++ b/src/generated/resources/data/actuallyadditions/recipes/basic_coil.json @@ -1,10 +1,6 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - " R ", - "RIR", - " R " - ], + "category": "misc", "key": { "I": { "item": "actuallyadditions:black_quartz" @@ -13,7 +9,13 @@ "item": "actuallyadditions:restonia_crystal" } }, + "pattern": [ + " R ", + "RIR", + " R " + ], "result": { "item": "actuallyadditions:basic_coil" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/battery_box.json b/src/generated/resources/data/actuallyadditions/recipes/battery_box.json index 8f4bcdbd0..a0650742d 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/battery_box.json +++ b/src/generated/resources/data/actuallyadditions/recipes/battery_box.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:energizer" diff --git a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_brick_slab.json b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_brick_slab.json index f5941a536..4327aea3e 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_brick_slab.json +++ b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_brick_slab.json @@ -1,14 +1,16 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:black_quartz_brick_block" } }, + "pattern": [ + "QQQ" + ], "result": { "item": "actuallyadditions:black_quartz_brick_slab" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_brick_stair.json b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_brick_stair.json index cdc934889..989842d26 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_brick_stair.json +++ b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_brick_stair.json @@ -1,16 +1,18 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "Q ", - "QQ ", - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:black_quartz_brick_block" } }, + "pattern": [ + "Q ", + "QQ ", + "QQQ" + ], "result": { "item": "actuallyadditions:black_quartz_brick_stair" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_brick_wall.json b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_brick_wall.json index a0ecafeb7..599550299 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_brick_wall.json +++ b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_brick_wall.json @@ -1,15 +1,17 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "QQQ", - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:black_quartz_brick_block" } }, + "pattern": [ + "QQQ", + "QQQ" + ], "result": { "item": "actuallyadditions:black_quartz_brick_wall" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_pillar_slab.json b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_pillar_slab.json index 6f4b41881..69a40c61b 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_pillar_slab.json +++ b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_pillar_slab.json @@ -1,14 +1,16 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:black_quartz_pillar_block" } }, + "pattern": [ + "QQQ" + ], "result": { "item": "actuallyadditions:black_quartz_pillar_slab" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_pillar_stair.json b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_pillar_stair.json index 9de42d733..311c6ca82 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_pillar_stair.json +++ b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_pillar_stair.json @@ -1,16 +1,18 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "Q ", - "QQ ", - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:black_quartz_pillar_block" } }, + "pattern": [ + "Q ", + "QQ ", + "QQQ" + ], "result": { "item": "actuallyadditions:black_quartz_pillar_stair" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_pillar_wall.json b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_pillar_wall.json index 1a17d094c..cefbba3c7 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_pillar_wall.json +++ b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_pillar_wall.json @@ -1,15 +1,17 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "QQQ", - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:black_quartz_pillar_block" } }, + "pattern": [ + "QQQ", + "QQQ" + ], "result": { "item": "actuallyadditions:black_quartz_pillar_wall" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_slab.json b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_slab.json index fb023fef0..1ca9b89ec 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_slab.json +++ b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_slab.json @@ -1,14 +1,16 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:black_quartz_pillar_block" } }, + "pattern": [ + "QQQ" + ], "result": { "item": "actuallyadditions:black_quartz_slab" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_stair.json b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_stair.json index 0e99ba405..dde5159b0 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_stair.json +++ b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_stair.json @@ -1,16 +1,18 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "Q ", - "QQ ", - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:black_quartz_pillar_block" } }, + "pattern": [ + "Q ", + "QQ ", + "QQQ" + ], "result": { "item": "actuallyadditions:black_quartz_stair" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_wall.json b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_wall.json index b5c296669..21d619611 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/black_quartz_wall.json +++ b/src/generated/resources/data/actuallyadditions/recipes/black_quartz_wall.json @@ -1,15 +1,17 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "QQQ", - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:black_quartz_pillar_block" } }, + "pattern": [ + "QQQ", + "QQQ" + ], "result": { "item": "actuallyadditions:black_quartz_wall" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/booklet.json b/src/generated/resources/data/actuallyadditions/recipes/booklet.json index 2ce2f3afb..b9d94114a 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/booklet.json +++ b/src/generated/resources/data/actuallyadditions/recipes/booklet.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:canola_seeds" diff --git a/src/generated/resources/data/actuallyadditions/recipes/canola_seeds.json b/src/generated/resources/data/actuallyadditions/recipes/canola_seeds.json index d1409d9b4..6771f8088 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/canola_seeds.json +++ b/src/generated/resources/data/actuallyadditions/recipes/canola_seeds.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:canola" diff --git a/src/generated/resources/data/actuallyadditions/recipes/charcoal_to_tiny.json b/src/generated/resources/data/actuallyadditions/recipes/charcoal_to_tiny.json index c9f0687dc..d23a9b610 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/charcoal_to_tiny.json +++ b/src/generated/resources/data/actuallyadditions/recipes/charcoal_to_tiny.json @@ -4,20 +4,21 @@ { "conditions": [ { - "config_name": "tinyCoalStuff", - "type": "actuallyadditions:bool_config_condition" + "type": "actuallyadditions:bool_config_condition", + "config_name": "tinyCoalStuff" } ], "recipe": { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "minecraft:charcoal" } ], "result": { - "item": "actuallyadditions:tiny_charcoal", - "count": 8 + "count": 8, + "item": "actuallyadditions:tiny_charcoal" } } } diff --git a/src/generated/resources/data/actuallyadditions/recipes/chiseled_black_quartz_slab.json b/src/generated/resources/data/actuallyadditions/recipes/chiseled_black_quartz_slab.json index b10a9b2d0..3117f022e 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/chiseled_black_quartz_slab.json +++ b/src/generated/resources/data/actuallyadditions/recipes/chiseled_black_quartz_slab.json @@ -1,14 +1,16 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:chiseled_black_quartz_block" } }, + "pattern": [ + "QQQ" + ], "result": { "item": "actuallyadditions:chiseled_black_quartz_slab" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/chiseled_black_quartz_stair.json b/src/generated/resources/data/actuallyadditions/recipes/chiseled_black_quartz_stair.json index 55547f6d9..4220f453d 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/chiseled_black_quartz_stair.json +++ b/src/generated/resources/data/actuallyadditions/recipes/chiseled_black_quartz_stair.json @@ -1,16 +1,18 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "Q ", - "QQ ", - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:chiseled_black_quartz_block" } }, + "pattern": [ + "Q ", + "QQ ", + "QQQ" + ], "result": { "item": "actuallyadditions:chiseled_black_quartz_stair" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/chiseled_black_quartz_wall.json b/src/generated/resources/data/actuallyadditions/recipes/chiseled_black_quartz_wall.json index 4834620a2..201dfa526 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/chiseled_black_quartz_wall.json +++ b/src/generated/resources/data/actuallyadditions/recipes/chiseled_black_quartz_wall.json @@ -1,15 +1,17 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "QQQ", - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:chiseled_black_quartz_block" } }, + "pattern": [ + "QQQ", + "QQQ" + ], "result": { "item": "actuallyadditions:chiseled_black_quartz_wall" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/coal_to_tiny.json b/src/generated/resources/data/actuallyadditions/recipes/coal_to_tiny.json index 85b16f120..8168780e2 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/coal_to_tiny.json +++ b/src/generated/resources/data/actuallyadditions/recipes/coal_to_tiny.json @@ -4,20 +4,21 @@ { "conditions": [ { - "config_name": "tinyCoalStuff", - "type": "actuallyadditions:bool_config_condition" + "type": "actuallyadditions:bool_config_condition", + "config_name": "tinyCoalStuff" } ], "recipe": { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "minecraft:coal" } ], "result": { - "item": "actuallyadditions:tiny_coal", - "count": 8 + "count": 8, + "item": "actuallyadditions:tiny_coal" } } } diff --git a/src/generated/resources/data/actuallyadditions/recipes/compress/diamatine_crystal.json b/src/generated/resources/data/actuallyadditions/recipes/compress/diamatine_crystal.json index f559dc7e6..8499047d7 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/compress/diamatine_crystal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/compress/diamatine_crystal.json @@ -1,16 +1,18 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "xxx", - "xxx", - "xxx" - ], + "category": "misc", "key": { "x": { "item": "actuallyadditions:diamatine_crystal_shard" } }, + "pattern": [ + "xxx", + "xxx", + "xxx" + ], "result": { "item": "actuallyadditions:diamatine_crystal" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/compress/emeradic_crystal.json b/src/generated/resources/data/actuallyadditions/recipes/compress/emeradic_crystal.json index 08a906ea7..46de5ef22 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/compress/emeradic_crystal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/compress/emeradic_crystal.json @@ -1,16 +1,18 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "xxx", - "xxx", - "xxx" - ], + "category": "misc", "key": { "x": { "item": "actuallyadditions:emeradic_crystal_shard" } }, + "pattern": [ + "xxx", + "xxx", + "xxx" + ], "result": { "item": "actuallyadditions:emeradic_crystal" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/compress/enori_crystal.json b/src/generated/resources/data/actuallyadditions/recipes/compress/enori_crystal.json index fdc9dfadc..95e2b7b63 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/compress/enori_crystal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/compress/enori_crystal.json @@ -1,16 +1,18 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "xxx", - "xxx", - "xxx" - ], + "category": "misc", "key": { "x": { "item": "actuallyadditions:enori_crystal_shard" } }, + "pattern": [ + "xxx", + "xxx", + "xxx" + ], "result": { "item": "actuallyadditions:enori_crystal" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/compress/palis_crystal.json b/src/generated/resources/data/actuallyadditions/recipes/compress/palis_crystal.json index 3bd3f5652..fae307abe 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/compress/palis_crystal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/compress/palis_crystal.json @@ -1,16 +1,18 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "xxx", - "xxx", - "xxx" - ], + "category": "misc", "key": { "x": { "item": "actuallyadditions:palis_crystal_shard" } }, + "pattern": [ + "xxx", + "xxx", + "xxx" + ], "result": { "item": "actuallyadditions:palis_crystal" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/compress/restonia_crystal.json b/src/generated/resources/data/actuallyadditions/recipes/compress/restonia_crystal.json index dd3754cf1..9aed68d92 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/compress/restonia_crystal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/compress/restonia_crystal.json @@ -1,16 +1,18 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "xxx", - "xxx", - "xxx" - ], + "category": "misc", "key": { "x": { "item": "actuallyadditions:restonia_crystal_shard" } }, + "pattern": [ + "xxx", + "xxx", + "xxx" + ], "result": { "item": "actuallyadditions:restonia_crystal" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/compress/void_crystal.json b/src/generated/resources/data/actuallyadditions/recipes/compress/void_crystal.json index 5f6f21f94..13b0a2f5b 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/compress/void_crystal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/compress/void_crystal.json @@ -1,16 +1,18 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "xxx", - "xxx", - "xxx" - ], + "category": "misc", "key": { "x": { "item": "actuallyadditions:void_crystal_shard" } }, + "pattern": [ + "xxx", + "xxx", + "xxx" + ], "result": { "item": "actuallyadditions:void_crystal" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/crafter_on_a_stick.json b/src/generated/resources/data/actuallyadditions/recipes/crafter_on_a_stick.json index 18a1ac56e..14fc17d1e 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/crafter_on_a_stick.json +++ b/src/generated/resources/data/actuallyadditions/recipes/crafter_on_a_stick.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "minecraft:crafting_table" diff --git a/src/generated/resources/data/actuallyadditions/recipes/crate_keeper.json b/src/generated/resources/data/actuallyadditions/recipes/crate_keeper.json index 323a262df..7ecb28a6e 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/crate_keeper.json +++ b/src/generated/resources/data/actuallyadditions/recipes/crate_keeper.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "I": { + "tag": "forge:ingots/iron" + }, + "Q": { + "item": "actuallyadditions:black_quartz" + }, + "W": { + "tag": "minecraft:planks" + } + }, "pattern": [ "WIW", "IQI", "WIW" ], - "key": { - "I": { - "tag": "forge:ingots/iron" - }, - "W": { - "tag": "minecraft:planks" - }, - "Q": { - "item": "actuallyadditions:black_quartz" - } - }, "result": { "item": "actuallyadditions:crate_keeper" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/crushing/bone_crusher.json b/src/generated/resources/data/actuallyadditions/recipes/crushing/bone_crusher.json index 61f45569b..17dbbf9ab 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/crushing/bone_crusher.json +++ b/src/generated/resources/data/actuallyadditions/recipes/crushing/bone_crusher.json @@ -5,14 +5,14 @@ }, "result": [ { - "item": "minecraft:bone_meal", + "chance": 1.0, "count": 6, - "chance": 1.0 + "item": "minecraft:bone_meal" }, { - "item": "minecraft:air", + "chance": 0.0, "count": 0, - "chance": 0.0 + "item": "minecraft:air" } ] } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/decompress/diamatine_crystal_shard.json b/src/generated/resources/data/actuallyadditions/recipes/decompress/diamatine_crystal_shard.json index 0a41010a9..166066825 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/decompress/diamatine_crystal_shard.json +++ b/src/generated/resources/data/actuallyadditions/recipes/decompress/diamatine_crystal_shard.json @@ -1,12 +1,13 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:diamatine_crystal" } ], "result": { - "item": "actuallyadditions:diamatine_crystal_shard", - "count": 9 + "count": 9, + "item": "actuallyadditions:diamatine_crystal_shard" } } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/decompress/emeradic_crystal_shard.json b/src/generated/resources/data/actuallyadditions/recipes/decompress/emeradic_crystal_shard.json index 184ac7096..a944406d1 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/decompress/emeradic_crystal_shard.json +++ b/src/generated/resources/data/actuallyadditions/recipes/decompress/emeradic_crystal_shard.json @@ -1,12 +1,13 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:emeradic_crystal" } ], "result": { - "item": "actuallyadditions:emeradic_crystal_shard", - "count": 9 + "count": 9, + "item": "actuallyadditions:emeradic_crystal_shard" } } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/decompress/enori_crystal_shard.json b/src/generated/resources/data/actuallyadditions/recipes/decompress/enori_crystal_shard.json index e55eec96d..026f36e4a 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/decompress/enori_crystal_shard.json +++ b/src/generated/resources/data/actuallyadditions/recipes/decompress/enori_crystal_shard.json @@ -1,12 +1,13 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:enori_crystal" } ], "result": { - "item": "actuallyadditions:enori_crystal_shard", - "count": 9 + "count": 9, + "item": "actuallyadditions:enori_crystal_shard" } } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/decompress/palis_crystal_shard.json b/src/generated/resources/data/actuallyadditions/recipes/decompress/palis_crystal_shard.json index cfdb06eee..fd8047589 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/decompress/palis_crystal_shard.json +++ b/src/generated/resources/data/actuallyadditions/recipes/decompress/palis_crystal_shard.json @@ -1,12 +1,13 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:palis_crystal" } ], "result": { - "item": "actuallyadditions:palis_crystal_shard", - "count": 9 + "count": 9, + "item": "actuallyadditions:palis_crystal_shard" } } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/decompress/restonia_crystal_shard.json b/src/generated/resources/data/actuallyadditions/recipes/decompress/restonia_crystal_shard.json index 6171eb221..9e54d0f06 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/decompress/restonia_crystal_shard.json +++ b/src/generated/resources/data/actuallyadditions/recipes/decompress/restonia_crystal_shard.json @@ -1,12 +1,13 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:restonia_crystal" } ], "result": { - "item": "actuallyadditions:restonia_crystal_shard", - "count": 9 + "count": 9, + "item": "actuallyadditions:restonia_crystal_shard" } } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/decompress/void_crystal_shard.json b/src/generated/resources/data/actuallyadditions/recipes/decompress/void_crystal_shard.json index a4ed525fc..c42897c65 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/decompress/void_crystal_shard.json +++ b/src/generated/resources/data/actuallyadditions/recipes/decompress/void_crystal_shard.json @@ -1,12 +1,13 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:void_crystal" } ], "result": { - "item": "actuallyadditions:void_crystal_shard", - "count": 9 + "count": 9, + "item": "actuallyadditions:void_crystal_shard" } } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/diamond_aiot.json b/src/generated/resources/data/actuallyadditions/recipes/diamond_aiot.json index 997320949..be4ddb284 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/diamond_aiot.json +++ b/src/generated/resources/data/actuallyadditions/recipes/diamond_aiot.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "minecraft:diamond_axe" diff --git a/src/generated/resources/data/actuallyadditions/recipes/display_stand.json b/src/generated/resources/data/actuallyadditions/recipes/display_stand.json index 2427b9e6f..4b9d0c587 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/display_stand.json +++ b/src/generated/resources/data/actuallyadditions/recipes/display_stand.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - " R ", - "EEE", - "GGG" - ], + "category": "misc", "key": { - "R": { - "item": "actuallyadditions:advanced_coil" - }, "E": { "item": "actuallyadditions:ethetic_green_block" }, "G": { "item": "actuallyadditions:ethetic_white_block" + }, + "R": { + "item": "actuallyadditions:advanced_coil" } }, + "pattern": [ + " R ", + "EEE", + "GGG" + ], "result": { "item": "actuallyadditions:display_stand" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/double_battery.json b/src/generated/resources/data/actuallyadditions/recipes/double_battery.json index b074319b4..fe2f7ed7a 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/double_battery.json +++ b/src/generated/resources/data/actuallyadditions/recipes/double_battery.json @@ -1,23 +1,25 @@ { "type": "actuallyadditions:copy_nbt", + "category": "misc", + "key": { + "C": { + "item": "actuallyadditions:advanced_coil" + }, + "I": { + "item": "actuallyadditions:enori_crystal" + }, + "R": { + "type": "actuallyadditions:nbt_target", + "item": "actuallyadditions:single_battery" + } + }, "pattern": [ " R ", "ICI", "III" ], - "key": { - "R": { - "item": "actuallyadditions:single_battery", - "type": "actuallyadditions:nbt_target" - }, - "I": { - "item": "actuallyadditions:enori_crystal" - }, - "C": { - "item": "actuallyadditions:advanced_coil" - } - }, "result": { "item": "actuallyadditions:double_battery" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/drill_core.json b/src/generated/resources/data/actuallyadditions/recipes/drill_core.json index fb970af33..67b704fdd 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/drill_core.json +++ b/src/generated/resources/data/actuallyadditions/recipes/drill_core.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "C": { + "item": "actuallyadditions:basic_coil" + }, + "I": { + "item": "actuallyadditions:enori_crystal" + }, + "R": { + "item": "actuallyadditions:restonia_crystal" + } + }, "pattern": [ "ICI", "CRC", "ICI" ], - "key": { - "C": { - "item": "actuallyadditions:basic_coil" - }, - "R": { - "item": "actuallyadditions:restonia_crystal" - }, - "I": { - "item": "actuallyadditions:enori_crystal" - } - }, "result": { "item": "actuallyadditions:drill_core" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/drill_light_blue.json b/src/generated/resources/data/actuallyadditions/recipes/drill_light_blue.json index 7f486784f..dc97165c4 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/drill_light_blue.json +++ b/src/generated/resources/data/actuallyadditions/recipes/drill_light_blue.json @@ -1,25 +1,27 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "C": { + "item": "actuallyadditions:advanced_coil" + }, + "D": { + "tag": "forge:gems/diamond" + }, + "I": { + "item": "actuallyadditions:enori_crystal" + }, + "R": { + "item": "actuallyadditions:drill_core" + } + }, "pattern": [ "DDD", "CRC", "III" ], - "key": { - "D": { - "tag": "forge:gems/diamond" - }, - "C": { - "item": "actuallyadditions:advanced_coil" - }, - "R": { - "item": "actuallyadditions:drill_core" - }, - "I": { - "item": "actuallyadditions:enori_crystal" - } - }, "result": { "item": "actuallyadditions:drill_light_blue" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_block_placing.json b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_block_placing.json index 4728fa42f..a428e7b67 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_block_placing.json +++ b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_block_placing.json @@ -1,25 +1,27 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "CEC", - "RAR", - "CEC" - ], + "category": "misc", "key": { + "A": { + "item": "actuallyadditions:basic_coil" + }, "C": { "tag": "forge:cobblestone" }, "E": { "item": "minecraft:paper" }, - "A": { - "item": "actuallyadditions:basic_coil" - }, "R": { "item": "actuallyadditions:enori_crystal" } }, + "pattern": [ + "CEC", + "RAR", + "CEC" + ], "result": { "item": "actuallyadditions:drill_upgrade_block_placing" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_five_by_five.json b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_five_by_five.json index eaddf9d63..8876de2f5 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_five_by_five.json +++ b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_five_by_five.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "C": { + "item": "actuallyadditions:advanced_coil" + }, + "D": { + "item": "actuallyadditions:diamatine_crystal" + }, + "I": { + "item": "actuallyadditions:empowered_enori_crystal" + } + }, "pattern": [ "DID", "ICI", "DID" ], - "key": { - "I": { - "item": "actuallyadditions:empowered_enori_crystal" - }, - "D": { - "item": "actuallyadditions:diamatine_crystal" - }, - "C": { - "item": "actuallyadditions:advanced_coil" - } - }, "result": { "item": "actuallyadditions:drill_upgrade_five_by_five" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_fortune.json b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_fortune.json index c2228fcfa..03c0ea86a 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_fortune.json +++ b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_fortune.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "I": { + "item": "minecraft:glowstone" + }, + "R": { + "item": "actuallyadditions:empowered_diamatine_crystal_block" + }, + "S": { + "tag": "forge:dusts/redstone" + } + }, "pattern": [ "ISI", "SRS", "ISI" ], - "key": { - "I": { - "item": "minecraft:glowstone" - }, - "S": { - "tag": "forge:dusts/redstone" - }, - "R": { - "item": "actuallyadditions:empowered_diamatine_crystal_block" - } - }, "result": { "item": "actuallyadditions:drill_upgrade_fortune" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_fortune_ii.json b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_fortune_ii.json index fc7f7f202..a067c94ef 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_fortune_ii.json +++ b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_fortune_ii.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "I": { + "item": "minecraft:glowstone" + }, + "R": { + "item": "actuallyadditions:ender_casing" + }, + "S": { + "item": "actuallyadditions:empowered_restonia_crystal" + } + }, "pattern": [ "ISI", "SRS", "ISI" ], - "key": { - "I": { - "item": "minecraft:glowstone" - }, - "S": { - "item": "actuallyadditions:empowered_restonia_crystal" - }, - "R": { - "item": "actuallyadditions:ender_casing" - } - }, "result": { "item": "actuallyadditions:drill_upgrade_fortune_ii" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_silk_touch.json b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_silk_touch.json index 4cf9f8271..3d500ce4d 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_silk_touch.json +++ b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_silk_touch.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "DSD", - "SCS", - "DSD" - ], + "category": "misc", "key": { + "C": { + "item": "actuallyadditions:advanced_coil" + }, "D": { "item": "actuallyadditions:emeradic_crystal" }, "S": { "item": "actuallyadditions:diamatine_crystal" - }, - "C": { - "item": "actuallyadditions:advanced_coil" } }, + "pattern": [ + "DSD", + "SCS", + "DSD" + ], "result": { "item": "actuallyadditions:drill_upgrade_silk_touch" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_speed.json b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_speed.json index ded970232..84d9a9cc6 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_speed.json +++ b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_speed.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "I": { + "item": "actuallyadditions:enori_crystal" + }, + "R": { + "item": "actuallyadditions:restonia_crystal" + }, + "S": { + "item": "minecraft:sugar" + } + }, "pattern": [ "ISI", "SRS", "ISI" ], - "key": { - "I": { - "item": "actuallyadditions:enori_crystal" - }, - "S": { - "item": "minecraft:sugar" - }, - "R": { - "item": "actuallyadditions:restonia_crystal" - } - }, "result": { "item": "actuallyadditions:drill_upgrade_speed" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_speed_ii.json b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_speed_ii.json index d5f5f37c0..8b5638d6c 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_speed_ii.json +++ b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_speed_ii.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "I": { + "item": "actuallyadditions:enori_crystal" + }, + "R": { + "item": "minecraft:cake" + }, + "S": { + "item": "minecraft:sugar" + } + }, "pattern": [ "ISI", "SRS", "ISI" ], - "key": { - "I": { - "item": "actuallyadditions:enori_crystal" - }, - "S": { - "item": "minecraft:sugar" - }, - "R": { - "item": "minecraft:cake" - } - }, "result": { "item": "actuallyadditions:drill_upgrade_speed_ii" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_speed_iii.json b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_speed_iii.json index d941ff670..22c074158 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_speed_iii.json +++ b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_speed_iii.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "I": { + "item": "actuallyadditions:empowered_enori_crystal" + }, + "R": { + "item": "actuallyadditions:empowered_diamatine_crystal" + }, + "S": { + "item": "minecraft:sugar" + } + }, "pattern": [ "ISI", "SRS", "ISI" ], - "key": { - "I": { - "item": "actuallyadditions:empowered_enori_crystal" - }, - "S": { - "item": "minecraft:sugar" - }, - "R": { - "item": "actuallyadditions:empowered_diamatine_crystal" - } - }, "result": { "item": "actuallyadditions:drill_upgrade_speed_iii" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_three_by_three.json b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_three_by_three.json index 64a493fb2..a5af98e94 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_three_by_three.json +++ b/src/generated/resources/data/actuallyadditions/recipes/drill_upgrade_three_by_three.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "C": { + "item": "actuallyadditions:basic_coil" + }, + "D": { + "item": "actuallyadditions:diamatine_crystal" + }, + "I": { + "item": "actuallyadditions:enori_crystal" + } + }, "pattern": [ "DID", "ICI", "DID" ], - "key": { - "I": { - "item": "actuallyadditions:enori_crystal" - }, - "D": { - "item": "actuallyadditions:diamatine_crystal" - }, - "C": { - "item": "actuallyadditions:basic_coil" - } - }, "result": { "item": "actuallyadditions:drill_upgrade_three_by_three" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empowerer.json b/src/generated/resources/data/actuallyadditions/recipes/empowerer.json index 27b7df31c..cce076cf5 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empowerer.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empowerer.json @@ -1,14 +1,7 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - " R ", - " B ", - "CDC" - ], + "category": "misc", "key": { - "R": { - "item": "actuallyadditions:restonia_crystal" - }, "B": { "item": "actuallyadditions:double_battery" }, @@ -17,9 +10,18 @@ }, "D": { "item": "actuallyadditions:display_stand" + }, + "R": { + "item": "actuallyadditions:restonia_crystal" } }, + "pattern": [ + " R ", + " B ", + "CDC" + ], "result": { "item": "actuallyadditions:empowerer" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empowering/diamatine.json b/src/generated/resources/data/actuallyadditions/recipes/empowering/diamatine.json index 5c6ff4d34..4efd478d2 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empowering/diamatine.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empowering/diamatine.json @@ -3,6 +3,8 @@ "base": { "item": "actuallyadditions:diamatine_crystal" }, + "color": 6522834, + "energy": 5000, "modifiers": [ { "tag": "forge:dyes/light_blue" @@ -17,10 +19,8 @@ "item": "minecraft:clay" } ], - "energy": 5000, - "time": 50, - "color": 6522834, "result": { "item": "actuallyadditions:empowered_diamatine_crystal" - } + }, + "time": 50 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empowering/diamatine_block.json b/src/generated/resources/data/actuallyadditions/recipes/empowering/diamatine_block.json index 42b1c977e..e64bcbfee 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empowering/diamatine_block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empowering/diamatine_block.json @@ -3,6 +3,8 @@ "base": { "item": "actuallyadditions:diamatine_crystal_block" }, + "color": 6522834, + "energy": 50000, "modifiers": [ { "tag": "forge:dyes/light_blue" @@ -17,10 +19,8 @@ "item": "minecraft:clay" } ], - "energy": 50000, - "time": 500, - "color": 6522834, "result": { "item": "actuallyadditions:empowered_diamatine_crystal_block" - } + }, + "time": 500 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empowering/emeradic.json b/src/generated/resources/data/actuallyadditions/recipes/empowering/emeradic.json index 5d0cf0904..9bcd268c2 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empowering/emeradic.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empowering/emeradic.json @@ -3,6 +3,8 @@ "base": { "item": "actuallyadditions:emeradic_crystal" }, + "color": 3492376, + "energy": 5000, "modifiers": [ { "tag": "forge:dyes/lime" @@ -17,10 +19,8 @@ "tag": "forge:slimeballs" } ], - "energy": 5000, - "time": 50, - "color": 3492376, "result": { "item": "actuallyadditions:empowered_emeradic_crystal" - } + }, + "time": 50 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empowering/emeradic_block.json b/src/generated/resources/data/actuallyadditions/recipes/empowering/emeradic_block.json index cea457c8a..3db62bc61 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empowering/emeradic_block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empowering/emeradic_block.json @@ -3,6 +3,8 @@ "base": { "item": "actuallyadditions:emeradic_crystal_block" }, + "color": 3492376, + "energy": 50000, "modifiers": [ { "tag": "forge:dyes/lime" @@ -17,10 +19,8 @@ "tag": "forge:slimeballs" } ], - "energy": 50000, - "time": 500, - "color": 3492376, "result": { "item": "actuallyadditions:empowered_emeradic_crystal_block" - } + }, + "time": 500 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empowering/empowered_canola.json b/src/generated/resources/data/actuallyadditions/recipes/empowering/empowered_canola.json index 2cee2a39a..e73d8df35 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empowering/empowered_canola.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empowering/empowered_canola.json @@ -3,6 +3,8 @@ "base": { "item": "actuallyadditions:crystallized_canola_seed" }, + "color": 16735052, + "energy": 1000, "modifiers": [ { "item": "actuallyadditions:canola_seeds" @@ -17,10 +19,8 @@ "item": "actuallyadditions:canola_seeds" } ], - "energy": 1000, - "time": 30, - "color": 16735052, "result": { "item": "actuallyadditions:empowered_canola_seed" - } + }, + "time": 30 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empowering/enori.json b/src/generated/resources/data/actuallyadditions/recipes/empowering/enori.json index 305a43686..0823ac019 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empowering/enori.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empowering/enori.json @@ -3,6 +3,8 @@ "base": { "item": "actuallyadditions:enori_crystal" }, + "color": 13421772, + "energy": 5000, "modifiers": [ { "tag": "forge:dyes/gray" @@ -17,10 +19,8 @@ "tag": "forge:cobblestone" } ], - "energy": 5000, - "time": 50, - "color": 13421772, "result": { "item": "actuallyadditions:empowered_enori_crystal" - } + }, + "time": 50 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empowering/enori_block.json b/src/generated/resources/data/actuallyadditions/recipes/empowering/enori_block.json index 536cd61ac..5e6ea6025 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empowering/enori_block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empowering/enori_block.json @@ -3,6 +3,8 @@ "base": { "item": "actuallyadditions:enori_crystal_block" }, + "color": 13421772, + "energy": 50000, "modifiers": [ { "tag": "forge:dyes/gray" @@ -17,10 +19,8 @@ "tag": "forge:cobblestone" } ], - "energy": 50000, - "time": 500, - "color": 13421772, "result": { "item": "actuallyadditions:empowered_enori_crystal_block" - } + }, + "time": 500 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empowering/palis.json b/src/generated/resources/data/actuallyadditions/recipes/empowering/palis.json index 4bbafcb1d..814a771ee 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empowering/palis.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empowering/palis.json @@ -3,6 +3,8 @@ "base": { "item": "actuallyadditions:palis_crystal" }, + "color": 2437779, + "energy": 5000, "modifiers": [ { "tag": "forge:dyes/cyan" @@ -17,10 +19,8 @@ "item": "minecraft:prismarine_shard" } ], - "energy": 5000, - "time": 50, - "color": 2437779, "result": { "item": "actuallyadditions:empowered_palis_crystal" - } + }, + "time": 50 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empowering/palis_block.json b/src/generated/resources/data/actuallyadditions/recipes/empowering/palis_block.json index daf191130..d511bd0fe 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empowering/palis_block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empowering/palis_block.json @@ -3,6 +3,8 @@ "base": { "item": "actuallyadditions:palis_crystal_block" }, + "color": 2437779, + "energy": 50000, "modifiers": [ { "tag": "forge:dyes/cyan" @@ -17,10 +19,8 @@ "item": "minecraft:prismarine_shard" } ], - "energy": 50000, - "time": 500, - "color": 2437779, "result": { "item": "actuallyadditions:empowered_palis_crystal_block" - } + }, + "time": 500 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empowering/restonia.json b/src/generated/resources/data/actuallyadditions/recipes/empowering/restonia.json index b90d7f499..f61f04835 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empowering/restonia.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empowering/restonia.json @@ -3,6 +3,8 @@ "base": { "item": "actuallyadditions:restonia_crystal" }, + "color": 10365735, + "energy": 5000, "modifiers": [ { "tag": "forge:dyes/red" @@ -17,10 +19,8 @@ "item": "minecraft:brick" } ], - "energy": 5000, - "time": 50, - "color": 10365735, "result": { "item": "actuallyadditions:empowered_restonia_crystal" - } + }, + "time": 50 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empowering/restonia_block.json b/src/generated/resources/data/actuallyadditions/recipes/empowering/restonia_block.json index acbafb981..a869a2ce8 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empowering/restonia_block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empowering/restonia_block.json @@ -3,6 +3,8 @@ "base": { "item": "actuallyadditions:restonia_crystal_block" }, + "color": 10365735, + "energy": 50000, "modifiers": [ { "tag": "forge:dyes/red" @@ -17,10 +19,8 @@ "item": "minecraft:brick" } ], - "energy": 50000, - "time": 500, - "color": 10365735, "result": { "item": "actuallyadditions:empowered_restonia_crystal_block" - } + }, + "time": 500 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empowering/void.json b/src/generated/resources/data/actuallyadditions/recipes/empowering/void.json index 77153aa06..0d82ca6fb 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empowering/void.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empowering/void.json @@ -3,6 +3,8 @@ "base": { "item": "actuallyadditions:void_crystal" }, + "color": 3355443, + "energy": 5000, "modifiers": [ { "tag": "forge:dyes/black" @@ -17,10 +19,8 @@ "tag": "forge:stone" } ], - "energy": 5000, - "time": 50, - "color": 3355443, "result": { "item": "actuallyadditions:empowered_void_crystal" - } + }, + "time": 50 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empowering/void_block.json b/src/generated/resources/data/actuallyadditions/recipes/empowering/void_block.json index a82476f74..64b85a724 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empowering/void_block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empowering/void_block.json @@ -3,6 +3,8 @@ "base": { "item": "actuallyadditions:void_crystal_block" }, + "color": 3355443, + "energy": 50000, "modifiers": [ { "tag": "forge:dyes/black" @@ -17,10 +19,8 @@ "tag": "forge:stone" } ], - "energy": 50000, - "time": 500, - "color": 3355443, "result": { "item": "actuallyadditions:empowered_void_crystal_block" - } + }, + "time": 500 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/empty_cup.json b/src/generated/resources/data/actuallyadditions/recipes/empty_cup.json index 0e464d6b7..b70434c00 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/empty_cup.json +++ b/src/generated/resources/data/actuallyadditions/recipes/empty_cup.json @@ -1,19 +1,21 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "C": { + "item": "actuallyadditions:coffee_beans" + }, + "S": { + "tag": "forge:stone" + } + }, "pattern": [ "S S", "SCS", "SSS" ], - "key": { - "S": { - "tag": "forge:stone" - }, - "C": { - "item": "actuallyadditions:coffee_beans" - } - }, "result": { "item": "actuallyadditions:empty_cup" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/ender_casing.json b/src/generated/resources/data/actuallyadditions/recipes/ender_casing.json index 03c2b89ee..71afab143 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/ender_casing.json +++ b/src/generated/resources/data/actuallyadditions/recipes/ender_casing.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "WSW", - "SRS", - "WSW" - ], + "category": "misc", "key": { - "W": { - "tag": "forge:ender_pearls" - }, "R": { "item": "actuallyadditions:black_quartz_block" }, "S": { "item": "actuallyadditions:empowered_diamatine_crystal" + }, + "W": { + "tag": "forge:ender_pearls" } }, + "pattern": [ + "WSW", + "SRS", + "WSW" + ], "result": { "item": "actuallyadditions:ender_casing" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/engineers_goggles.json b/src/generated/resources/data/actuallyadditions/recipes/engineers_goggles.json index c3858836c..654e9ed69 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/engineers_goggles.json +++ b/src/generated/resources/data/actuallyadditions/recipes/engineers_goggles.json @@ -1,21 +1,23 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - " R ", - "IGI" - ], + "category": "misc", "key": { - "R": { - "item": "actuallyadditions:restonia_crystal" + "G": { + "tag": "forge:glass" }, "I": { "item": "minecraft:iron_bars" }, - "G": { - "tag": "forge:glass" + "R": { + "item": "actuallyadditions:restonia_crystal" } }, + "pattern": [ + " R ", + "IGI" + ], "result": { "item": "actuallyadditions:engineers_goggles" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/engineers_goggles_advanced.json b/src/generated/resources/data/actuallyadditions/recipes/engineers_goggles_advanced.json index d1aecc0fd..568b65683 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/engineers_goggles_advanced.json +++ b/src/generated/resources/data/actuallyadditions/recipes/engineers_goggles_advanced.json @@ -1,21 +1,23 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - " R ", - "IGI" - ], + "category": "misc", "key": { - "R": { - "item": "actuallyadditions:empowered_restonia_crystal" + "G": { + "item": "actuallyadditions:engineers_goggles" }, "I": { "item": "minecraft:iron_bars" }, - "G": { - "item": "actuallyadditions:engineers_goggles" + "R": { + "item": "actuallyadditions:empowered_restonia_crystal" } }, + "pattern": [ + " R ", + "IGI" + ], "result": { "item": "actuallyadditions:engineers_goggles_advanced" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/ethetic_green_slab.json b/src/generated/resources/data/actuallyadditions/recipes/ethetic_green_slab.json index 3b0f647d2..d019cdc0c 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/ethetic_green_slab.json +++ b/src/generated/resources/data/actuallyadditions/recipes/ethetic_green_slab.json @@ -1,14 +1,16 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:ethetic_green_block" } }, + "pattern": [ + "QQQ" + ], "result": { "item": "actuallyadditions:ethetic_green_slab" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/ethetic_green_stairs.json b/src/generated/resources/data/actuallyadditions/recipes/ethetic_green_stairs.json index b22c56687..0d6c08b05 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/ethetic_green_stairs.json +++ b/src/generated/resources/data/actuallyadditions/recipes/ethetic_green_stairs.json @@ -1,16 +1,18 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "Q ", - "QQ ", - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:ethetic_green_block" } }, + "pattern": [ + "Q ", + "QQ ", + "QQQ" + ], "result": { "item": "actuallyadditions:ethetic_green_stairs" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/ethetic_green_wall.json b/src/generated/resources/data/actuallyadditions/recipes/ethetic_green_wall.json index 4479aec53..9df9d8264 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/ethetic_green_wall.json +++ b/src/generated/resources/data/actuallyadditions/recipes/ethetic_green_wall.json @@ -1,15 +1,17 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "QQQ", - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:ethetic_green_block" } }, + "pattern": [ + "QQQ", + "QQQ" + ], "result": { "item": "actuallyadditions:ethetic_green_wall" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/ethetic_white_slab.json b/src/generated/resources/data/actuallyadditions/recipes/ethetic_white_slab.json index 4f13fbb0f..1c0b82356 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/ethetic_white_slab.json +++ b/src/generated/resources/data/actuallyadditions/recipes/ethetic_white_slab.json @@ -1,14 +1,16 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:ethetic_white_block" } }, + "pattern": [ + "QQQ" + ], "result": { "item": "actuallyadditions:ethetic_white_slab" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/ethetic_white_stairs.json b/src/generated/resources/data/actuallyadditions/recipes/ethetic_white_stairs.json index 9b47c3c78..5749d6def 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/ethetic_white_stairs.json +++ b/src/generated/resources/data/actuallyadditions/recipes/ethetic_white_stairs.json @@ -1,16 +1,18 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "Q ", - "QQ ", - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:ethetic_white_block" } }, + "pattern": [ + "Q ", + "QQ ", + "QQQ" + ], "result": { "item": "actuallyadditions:ethetic_white_stairs" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/ethetic_white_wall.json b/src/generated/resources/data/actuallyadditions/recipes/ethetic_white_wall.json index dba303d0c..741689ccd 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/ethetic_white_wall.json +++ b/src/generated/resources/data/actuallyadditions/recipes/ethetic_white_wall.json @@ -1,15 +1,17 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "QQQ", - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:ethetic_white_block" } }, + "pattern": [ + "QQQ", + "QQQ" + ], "result": { "item": "actuallyadditions:ethetic_white_wall" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/farmer.json b/src/generated/resources/data/actuallyadditions/recipes/farmer.json index 6df3741ce..90bc8c5b6 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/farmer.json +++ b/src/generated/resources/data/actuallyadditions/recipes/farmer.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "ISI", - "SCS", - "ISI" - ], + "category": "misc", "key": { - "I": { - "item": "actuallyadditions:enori_crystal_block" - }, "C": { "item": "actuallyadditions:iron_casing" }, + "I": { + "item": "actuallyadditions:enori_crystal_block" + }, "S": { "tag": "forge:seeds" } }, + "pattern": [ + "ISI", + "SCS", + "ISI" + ], "result": { "item": "actuallyadditions:farmer" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/fermenting/refined_canola.json b/src/generated/resources/data/actuallyadditions/recipes/fermenting/refined_canola.json index b76b9b78d..9968311e7 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/fermenting/refined_canola.json +++ b/src/generated/resources/data/actuallyadditions/recipes/fermenting/refined_canola.json @@ -1,12 +1,12 @@ { "type": "actuallyadditions:fermenting", "ingredient": { - "fluid": "actuallyadditions:canola_oil", - "amount": 80 + "amount": 80, + "fluid": "actuallyadditions:canola_oil" }, "result": { - "fluid": "actuallyadditions:refined_canola_oil", - "amount": 80 + "amount": 80, + "fluid": "actuallyadditions:refined_canola_oil" }, "time": 100 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/filter.json b/src/generated/resources/data/actuallyadditions/recipes/filter.json index 66bc382a2..02fc64fab 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/filter.json +++ b/src/generated/resources/data/actuallyadditions/recipes/filter.json @@ -1,10 +1,6 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "III", - "IQI", - "III" - ], + "category": "misc", "key": { "I": { "item": "minecraft:iron_bars" @@ -13,7 +9,13 @@ "item": "actuallyadditions:black_quartz" } }, + "pattern": [ + "III", + "IQI", + "III" + ], "result": { "item": "actuallyadditions:filter" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/firework_box.json b/src/generated/resources/data/actuallyadditions/recipes/firework_box.json index 2028e45f2..273db0dc7 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/firework_box.json +++ b/src/generated/resources/data/actuallyadditions/recipes/firework_box.json @@ -1,28 +1,30 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "GFG", - "SAS", - "CCC" - ], + "category": "misc", "key": { + "A": { + "item": "actuallyadditions:iron_casing" + }, + "C": { + "item": "actuallyadditions:enori_crystal" + }, + "F": { + "item": "minecraft:firework_rocket" + }, "G": { "tag": "forge:gunpowder" }, "S": { "tag": "forge:rods/wooden" - }, - "A": { - "item": "actuallyadditions:iron_casing" - }, - "F": { - "item": "minecraft:firework_rocket" - }, - "C": { - "item": "actuallyadditions:enori_crystal" } }, + "pattern": [ + "GFG", + "SAS", + "CCC" + ], "result": { "item": "actuallyadditions:firework_box" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/gold_aiot.json b/src/generated/resources/data/actuallyadditions/recipes/gold_aiot.json index 4c015321f..b9d5d1b01 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/gold_aiot.json +++ b/src/generated/resources/data/actuallyadditions/recipes/gold_aiot.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "minecraft:golden_axe" diff --git a/src/generated/resources/data/actuallyadditions/recipes/handheld_filler.json b/src/generated/resources/data/actuallyadditions/recipes/handheld_filler.json index bed55da8a..296f29c24 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/handheld_filler.json +++ b/src/generated/resources/data/actuallyadditions/recipes/handheld_filler.json @@ -1,16 +1,9 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "IPI", - "DCD", - " B " - ], + "category": "misc", "key": { - "I": { - "item": "actuallyadditions:empowered_enori_crystal" - }, - "P": { - "item": "actuallyadditions:palis_crystal" + "B": { + "item": "actuallyadditions:triple_battery" }, "C": { "item": "actuallyadditions:advanced_coil" @@ -18,11 +11,20 @@ "D": { "item": "actuallyadditions:diamatine_crystal" }, - "B": { - "item": "actuallyadditions:triple_battery" + "I": { + "item": "actuallyadditions:empowered_enori_crystal" + }, + "P": { + "item": "actuallyadditions:palis_crystal" } }, + "pattern": [ + "IPI", + "DCD", + " B " + ], "result": { "item": "actuallyadditions:handheld_filler" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/hopping_item_interface.json b/src/generated/resources/data/actuallyadditions/recipes/hopping_item_interface.json index 7bc7da8aa..6dca89846 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/hopping_item_interface.json +++ b/src/generated/resources/data/actuallyadditions/recipes/hopping_item_interface.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:item_interface" diff --git a/src/generated/resources/data/actuallyadditions/recipes/iron_aiot.json b/src/generated/resources/data/actuallyadditions/recipes/iron_aiot.json index 88d745078..c6192eab9 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/iron_aiot.json +++ b/src/generated/resources/data/actuallyadditions/recipes/iron_aiot.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "minecraft:iron_axe" diff --git a/src/generated/resources/data/actuallyadditions/recipes/iron_casing.json b/src/generated/resources/data/actuallyadditions/recipes/iron_casing.json index 9039f960f..03fca79fe 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/iron_casing.json +++ b/src/generated/resources/data/actuallyadditions/recipes/iron_casing.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "Q": { + "item": "actuallyadditions:black_quartz" + }, + "S": { + "tag": "forge:rods/wooden" + }, + "W": { + "tag": "forge:ingots/iron" + } + }, "pattern": [ "WSW", "SQS", "WSW" ], - "key": { - "Q": { - "item": "actuallyadditions:black_quartz" - }, - "W": { - "tag": "forge:ingots/iron" - }, - "S": { - "tag": "forge:rods/wooden" - } - }, "result": { "item": "actuallyadditions:iron_casing" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/item_interface.json b/src/generated/resources/data/actuallyadditions/recipes/item_interface.json index 56379c203..0c124af66 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/item_interface.json +++ b/src/generated/resources/data/actuallyadditions/recipes/item_interface.json @@ -1,25 +1,27 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "OBO", - "RCR", - "OBO" - ], + "category": "misc", "key": { "B": { "tag": "forge:dusts/redstone" }, + "C": { + "tag": "forge:chests/wooden" + }, "O": { "item": "actuallyadditions:basic_coil" }, "R": { "item": "actuallyadditions:restonia_crystal" - }, - "C": { - "tag": "forge:chests/wooden" } }, + "pattern": [ + "OBO", + "RCR", + "OBO" + ], "result": { "item": "actuallyadditions:item_interface" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_diamatine_crystal.json b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_diamatine_crystal.json index 2f4030b21..d855b4928 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_diamatine_crystal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_diamatine_crystal.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 60, "ingredient": { "tag": "forge:gems/diamond" }, - "energy": 60, "result": { "item": "actuallyadditions:diamatine_crystal" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_diamatine_crystal_block.json b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_diamatine_crystal_block.json index ef26366d8..8e070448e 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_diamatine_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_diamatine_crystal_block.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 600, "ingredient": { "tag": "forge:storage_blocks/diamond" }, - "energy": 600, "result": { "item": "actuallyadditions:diamatine_crystal_block" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_emeradic_crystal.json b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_emeradic_crystal.json index 5750f91f3..622858545 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_emeradic_crystal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_emeradic_crystal.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 100, "ingredient": { "tag": "forge:gems/emerald" }, - "energy": 100, "result": { "item": "actuallyadditions:emeradic_crystal" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_emeradic_crystal_block.json b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_emeradic_crystal_block.json index fa7901e99..2a130cf87 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_emeradic_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_emeradic_crystal_block.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 1000, "ingredient": { "tag": "forge:storage_blocks/emerald" }, - "energy": 1000, "result": { "item": "actuallyadditions:emeradic_crystal_block" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_enori_crystal.json b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_enori_crystal.json index 485bce584..87e786d55 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_enori_crystal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_enori_crystal.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 80, "ingredient": { "tag": "forge:ingots/iron" }, - "energy": 80, "result": { "item": "actuallyadditions:enori_crystal" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_enori_crystal_block.json b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_enori_crystal_block.json index c65fafe99..f53bc8933 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_enori_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_enori_crystal_block.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 800, "ingredient": { "tag": "forge:storage_blocks/iron" }, - "energy": 800, "result": { "item": "actuallyadditions:enori_crystal_block" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_palis_crystal.json b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_palis_crystal.json index 6d734faa3..e0a3007c2 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_palis_crystal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_palis_crystal.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 40, "ingredient": { "tag": "forge:gems/lapis" }, - "energy": 40, "result": { "item": "actuallyadditions:palis_crystal" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_palis_crystal_block.json b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_palis_crystal_block.json index 5dbfed30c..198845441 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_palis_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_palis_crystal_block.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 400, "ingredient": { "tag": "forge:storage_blocks/lapis" }, - "energy": 400, "result": { "item": "actuallyadditions:palis_crystal_block" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_restonia_crystal.json b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_restonia_crystal.json index e5f5c30bf..4ad17772d 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_restonia_crystal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_restonia_crystal.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 40, "ingredient": { "tag": "forge:dusts/redstone" }, - "energy": 40, "result": { "item": "actuallyadditions:restonia_crystal" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_restonia_crystal_block.json b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_restonia_crystal_block.json index 028854dd2..2962d80bd 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_restonia_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_restonia_crystal_block.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 400, "ingredient": { "tag": "forge:storage_blocks/redstone" }, - "energy": 400, "result": { "item": "actuallyadditions:restonia_crystal_block" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_void_crystal.json b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_void_crystal.json index d3c1bc337..17ec2d06b 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_void_crystal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_void_crystal.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 60, "ingredient": { "tag": "minecraft:coals" }, - "energy": 60, "result": { "item": "actuallyadditions:void_crystal" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_void_crystal_block.json b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_void_crystal_block.json index 8452f9708..b1f294cfa 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_void_crystal_block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/crystalize_void_crystal_block.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 600, "ingredient": { "tag": "forge:storage_blocks/coal" }, - "energy": 600, "result": { "item": "actuallyadditions:void_crystal_block" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/crystallized_canola_seed.json b/src/generated/resources/data/actuallyadditions/recipes/laser/crystallized_canola_seed.json index 691428dab..209768614 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/crystallized_canola_seed.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/crystallized_canola_seed.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 2000, "ingredient": { "item": "actuallyadditions:canola_seeds" }, - "energy": 2000, "result": { "item": "actuallyadditions:crystallized_canola_seed" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/ethetic_green_block.json b/src/generated/resources/data/actuallyadditions/recipes/laser/ethetic_green_block.json index fc28c314a..ead2a697f 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/ethetic_green_block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/ethetic_green_block.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 10, "ingredient": { "item": "minecraft:chiseled_quartz_block" }, - "energy": 10, "result": { "item": "actuallyadditions:ethetic_green_block" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/ethetic_white_block.json b/src/generated/resources/data/actuallyadditions/recipes/laser/ethetic_white_block.json index 618b327bd..1ce7d6450 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/ethetic_white_block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/ethetic_white_block.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 10, "ingredient": { "item": "minecraft:quartz_block" }, - "energy": 10, "result": { "item": "actuallyadditions:ethetic_white_block" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/laser_relay.json b/src/generated/resources/data/actuallyadditions/recipes/laser/laser_relay.json index 9d8fa1596..d76413fb3 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/laser_relay.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/laser_relay.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 2000, "ingredient": { "item": "actuallyadditions:laser_relay_item" }, - "energy": 2000, "result": { "item": "actuallyadditions:laser_relay" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/laser_relay_fluids.json b/src/generated/resources/data/actuallyadditions/recipes/laser/laser_relay_fluids.json index f50b73e88..381f96d72 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/laser_relay_fluids.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/laser_relay_fluids.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 2000, "ingredient": { "item": "actuallyadditions:laser_relay" }, - "energy": 2000, "result": { "item": "actuallyadditions:laser_relay_fluids" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/laser_relay_item.json b/src/generated/resources/data/actuallyadditions/recipes/laser/laser_relay_item.json index 109c03f8c..5a8fd939d 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/laser_relay_item.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/laser_relay_item.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 2000, "ingredient": { "item": "actuallyadditions:laser_relay_fluids" }, - "energy": 2000, "result": { "item": "actuallyadditions:laser_relay_item" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/leather.json b/src/generated/resources/data/actuallyadditions/recipes/laser/leather.json index 960d9f633..69ad20d9d 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/leather.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/leather.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 20000, "ingredient": { "item": "minecraft:rotten_flesh" }, - "energy": 20000, "result": { "item": "minecraft:leather" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/lens.json b/src/generated/resources/data/actuallyadditions/recipes/laser/lens.json index 0b20b211c..4cda5633a 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/lens.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/lens.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 5000, "ingredient": { "item": "actuallyadditions:lens_of_certain_death" }, - "energy": 5000, "result": { "item": "actuallyadditions:lens" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/lens_of_certain_death.json b/src/generated/resources/data/actuallyadditions/recipes/laser/lens_of_certain_death.json index dbf4c0948..bdfcd3712 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/lens_of_certain_death.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/lens_of_certain_death.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 5000, "ingredient": { "item": "actuallyadditions:lens_of_detonation" }, - "energy": 5000, "result": { "item": "actuallyadditions:lens_of_certain_death" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/lens_of_color.json b/src/generated/resources/data/actuallyadditions/recipes/laser/lens_of_color.json index 073f96725..50f94d56a 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/lens_of_color.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/lens_of_color.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 5000, "ingredient": { "item": "actuallyadditions:lens" }, - "energy": 5000, "result": { "item": "actuallyadditions:lens_of_color" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/lens_of_detonation.json b/src/generated/resources/data/actuallyadditions/recipes/laser/lens_of_detonation.json index 382761740..95904f590 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/lens_of_detonation.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/lens_of_detonation.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 5000, "ingredient": { "item": "actuallyadditions:lens_of_color" }, - "energy": 5000, "result": { "item": "actuallyadditions:lens_of_detonation" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/nether_wart.json b/src/generated/resources/data/actuallyadditions/recipes/laser/nether_wart.json index 26a0d24a2..3e621f900 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/nether_wart.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/nether_wart.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 150000, "ingredient": { "item": "minecraft:red_mushroom" }, - "energy": 150000, "result": { "item": "minecraft:nether_wart" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/prismarine_shard.json b/src/generated/resources/data/actuallyadditions/recipes/laser/prismarine_shard.json index 7dded5575..b18b91abd 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/prismarine_shard.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/prismarine_shard.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 30000, "ingredient": { "item": "minecraft:quartz" }, - "energy": 30000, "result": { "item": "minecraft:prismarine_shard" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser/soul_sand.json b/src/generated/resources/data/actuallyadditions/recipes/laser/soul_sand.json index b8c36a212..70c5bde26 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser/soul_sand.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser/soul_sand.json @@ -1,9 +1,9 @@ { "type": "actuallyadditions:laser", + "energy": 20000, "ingredient": { "tag": "forge:sand" }, - "energy": 20000, "result": { "item": "minecraft:soul_sand" } diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser_relay.json b/src/generated/resources/data/actuallyadditions/recipes/laser_relay.json index 74543e7db..dd1d07967 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser_relay.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser_relay.json @@ -1,26 +1,28 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "OBO", - "RCR", - "OBO" - ], + "category": "misc", "key": { "B": { "tag": "forge:storage_blocks/redstone" }, + "C": { + "item": "actuallyadditions:advanced_coil" + }, "O": { "tag": "forge:obsidian" }, "R": { "item": "actuallyadditions:restonia_crystal" - }, - "C": { - "item": "actuallyadditions:advanced_coil" } }, + "pattern": [ + "OBO", + "RCR", + "OBO" + ], "result": { - "item": "actuallyadditions:laser_relay", - "count": 4 - } + "count": 4, + "item": "actuallyadditions:laser_relay" + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser_relay_advanced.json b/src/generated/resources/data/actuallyadditions/recipes/laser_relay_advanced.json index 45cf2ed84..fb5c410d9 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser_relay_advanced.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser_relay_advanced.json @@ -1,10 +1,6 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - " I ", - "XRX", - " I " - ], + "category": "misc", "key": { "I": { "item": "actuallyadditions:enori_crystal" @@ -16,7 +12,13 @@ "item": "actuallyadditions:restonia_crystal" } }, + "pattern": [ + " I ", + "XRX", + " I " + ], "result": { "item": "actuallyadditions:laser_relay_advanced" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser_relay_extreme.json b/src/generated/resources/data/actuallyadditions/recipes/laser_relay_extreme.json index 5b435bf2b..09df27819 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser_relay_extreme.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser_relay_extreme.json @@ -1,10 +1,6 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - " I ", - "XRX", - " I " - ], + "category": "misc", "key": { "I": { "item": "actuallyadditions:empowered_diamatine_crystal" @@ -16,7 +12,13 @@ "item": "actuallyadditions:restonia_crystal" } }, + "pattern": [ + " I ", + "XRX", + " I " + ], "result": { "item": "actuallyadditions:laser_relay_extreme" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser_relay_item_advanced.json b/src/generated/resources/data/actuallyadditions/recipes/laser_relay_item_advanced.json index 7d39db7c6..411a08e89 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser_relay_item_advanced.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser_relay_item_advanced.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:laser_relay_item" diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser_upgrade_invisibility.json b/src/generated/resources/data/actuallyadditions/recipes/laser_upgrade_invisibility.json index 8bf61be06..9182116ab 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser_upgrade_invisibility.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser_upgrade_invisibility.json @@ -1,23 +1,25 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "GGG", - "RCR", - "GGG" - ], + "category": "misc", "key": { + "C": { + "item": "actuallyadditions:advanced_coil" + }, "G": { "tag": "forge:glass/black" }, "R": { "item": "actuallyadditions:void_crystal" - }, - "C": { - "item": "actuallyadditions:advanced_coil" } }, + "pattern": [ + "GGG", + "RCR", + "GGG" + ], "result": { - "item": "actuallyadditions:laser_upgrade_invisibility", - "count": 4 - } + "count": 4, + "item": "actuallyadditions:laser_upgrade_invisibility" + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser_upgrade_range.json b/src/generated/resources/data/actuallyadditions/recipes/laser_upgrade_range.json index 391539796..6cda12bae 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser_upgrade_range.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser_upgrade_range.json @@ -1,23 +1,25 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "C": { + "item": "actuallyadditions:advanced_coil" + }, + "G": { + "item": "actuallyadditions:restonia_crystal" + }, + "R": { + "item": "minecraft:compass" + } + }, "pattern": [ "GGC", "RCR", "CGG" ], - "key": { - "R": { - "item": "minecraft:compass" - }, - "G": { - "item": "actuallyadditions:restonia_crystal" - }, - "C": { - "item": "actuallyadditions:advanced_coil" - } - }, "result": { - "item": "actuallyadditions:laser_upgrade_range", - "count": 2 - } + "count": 2, + "item": "actuallyadditions:laser_upgrade_range" + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser_wrench.json b/src/generated/resources/data/actuallyadditions/recipes/laser_wrench.json index ffc945381..61ca6ef3c 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser_wrench.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser_wrench.json @@ -1,10 +1,6 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "C ", - " S ", - " S" - ], + "category": "misc", "key": { "C": { "item": "actuallyadditions:advanced_coil" @@ -13,7 +9,13 @@ "item": "actuallyadditions:enori_crystal" } }, + "pattern": [ + "C ", + " S ", + " S" + ], "result": { "item": "actuallyadditions:laser_wrench" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/laser_wrench_nbt.json b/src/generated/resources/data/actuallyadditions/recipes/laser_wrench_nbt.json index 465adcbc4..4a09b0682 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/laser_wrench_nbt.json +++ b/src/generated/resources/data/actuallyadditions/recipes/laser_wrench_nbt.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:laser_wrench" diff --git a/src/generated/resources/data/actuallyadditions/recipes/leaf_blower.json b/src/generated/resources/data/actuallyadditions/recipes/leaf_blower.json index f73e4e10a..eb550554f 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/leaf_blower.json +++ b/src/generated/resources/data/actuallyadditions/recipes/leaf_blower.json @@ -1,25 +1,27 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - " F", - "IP", - "IC" - ], + "category": "misc", "key": { + "C": { + "item": "actuallyadditions:advanced_coil" + }, + "F": { + "item": "minecraft:flint" + }, "I": { "item": "actuallyadditions:enori_crystal" }, "P": { "item": "minecraft:piston" - }, - "F": { - "item": "minecraft:flint" - }, - "C": { - "item": "actuallyadditions:advanced_coil" } }, + "pattern": [ + " F", + "IP", + "IC" + ], "result": { "item": "actuallyadditions:leaf_blower" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/lens.json b/src/generated/resources/data/actuallyadditions/recipes/lens.json index b07d8482b..fb193621b 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/lens.json +++ b/src/generated/resources/data/actuallyadditions/recipes/lens.json @@ -1,19 +1,21 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "B": { + "item": "actuallyadditions:black_quartz" + }, + "G": { + "tag": "forge:glass" + } + }, "pattern": [ "GGG", "GBG", "GGG" ], - "key": { - "G": { - "tag": "forge:glass" - }, - "B": { - "item": "actuallyadditions:black_quartz" - } - }, "result": { "item": "actuallyadditions:lens" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/lens_of_disenchanting.json b/src/generated/resources/data/actuallyadditions/recipes/lens_of_disenchanting.json index 877fe5f48..1cceaa9c8 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/lens_of_disenchanting.json +++ b/src/generated/resources/data/actuallyadditions/recipes/lens_of_disenchanting.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:lens" diff --git a/src/generated/resources/data/actuallyadditions/recipes/lens_of_the_killer.json b/src/generated/resources/data/actuallyadditions/recipes/lens_of_the_killer.json index 6e8b9284f..40ace5408 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/lens_of_the_killer.json +++ b/src/generated/resources/data/actuallyadditions/recipes/lens_of_the_killer.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "minecraft:diamond_sword" @@ -9,8 +10,8 @@ }, { "type": "forge:nbt", - "item": "minecraft:enchanted_book", "count": 1, + "item": "minecraft:enchanted_book", "nbt": "{Enchantments:[{id:\"minecraft:sharpness\",lvl:5s}]}" } ], diff --git a/src/generated/resources/data/actuallyadditions/recipes/lens_of_the_miner.json b/src/generated/resources/data/actuallyadditions/recipes/lens_of_the_miner.json index 836a1501b..4093e1f07 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/lens_of_the_miner.json +++ b/src/generated/resources/data/actuallyadditions/recipes/lens_of_the_miner.json @@ -1,40 +1,42 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "DGI", - "CLB", - "QPE" - ], + "category": "misc", "key": { + "B": { + "item": "actuallyadditions:black_quartz" + }, + "C": { + "tag": "minecraft:coals" + }, "D": { "tag": "forge:gems/diamond" }, + "E": { + "tag": "forge:gems/emerald" + }, "G": { "tag": "forge:ingots/gold" }, "I": { "tag": "forge:ingots/iron" }, - "C": { - "tag": "minecraft:coals" - }, "L": { "item": "actuallyadditions:lens" }, - "B": { - "item": "actuallyadditions:black_quartz" - }, - "Q": { - "tag": "forge:gems/quartz" - }, "P": { "tag": "forge:gems/lapis" }, - "E": { - "tag": "forge:gems/emerald" + "Q": { + "tag": "forge:gems/quartz" } }, + "pattern": [ + "DGI", + "CLB", + "QPE" + ], "result": { "item": "actuallyadditions:lens_of_the_miner" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/canola_oil.json b/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/canola_oil.json index 2bc1573ba..92b2e1708 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/canola_oil.json +++ b/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/canola_oil.json @@ -1,11 +1,11 @@ { "type": "actuallyadditions:liquid_fuel", "ingredient": { - "fluid": "actuallyadditions:canola_oil", - "amount": 50 + "amount": 50, + "fluid": "actuallyadditions:canola_oil" }, "result": { - "total_energy": 4000, - "burn_time": 100 + "burn_time": 100, + "total_energy": 4000 } } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/crystallized_canola_oil.json b/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/crystallized_canola_oil.json index 134d61c73..e9b3d6543 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/crystallized_canola_oil.json +++ b/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/crystallized_canola_oil.json @@ -1,11 +1,11 @@ { "type": "actuallyadditions:liquid_fuel", "ingredient": { - "fluid": "actuallyadditions:crystallized_oil", - "amount": 50 + "amount": 50, + "fluid": "actuallyadditions:crystallized_oil" }, "result": { - "total_energy": 28000, - "burn_time": 280 + "burn_time": 280, + "total_energy": 28000 } } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/empowered_canola_oil.json b/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/empowered_canola_oil.json index dde7cea8e..2065d5de6 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/empowered_canola_oil.json +++ b/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/empowered_canola_oil.json @@ -1,11 +1,11 @@ { "type": "actuallyadditions:liquid_fuel", "ingredient": { - "fluid": "actuallyadditions:empowered_oil", - "amount": 50 + "amount": 50, + "fluid": "actuallyadditions:empowered_oil" }, "result": { - "total_energy": 48000, - "burn_time": 400 + "burn_time": 400, + "total_energy": 48000 } } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/refined_canola_oil.json b/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/refined_canola_oil.json index 2f344e154..da781b5a1 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/refined_canola_oil.json +++ b/src/generated/resources/data/actuallyadditions/recipes/liquid_fuel/refined_canola_oil.json @@ -1,11 +1,11 @@ { "type": "actuallyadditions:liquid_fuel", "ingredient": { - "fluid": "actuallyadditions:refined_canola_oil", - "amount": 50 + "amount": 50, + "fluid": "actuallyadditions:refined_canola_oil" }, "result": { - "total_energy": 9600, - "burn_time": 120 + "burn_time": 120, + "total_energy": 9600 } } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/mininglens/nether_nether_gold_ore.json b/src/generated/resources/data/actuallyadditions/recipes/mininglens/nether_nether_gold_ore.json index a3d9d095d..c58a7d2a1 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/mininglens/nether_nether_gold_ore.json +++ b/src/generated/resources/data/actuallyadditions/recipes/mininglens/nether_nether_gold_ore.json @@ -3,8 +3,8 @@ "ingredient": { "tag": "forge:netherrack" }, - "weight": 500, "result": { "item": "minecraft:nether_gold_ore" - } + }, + "weight": 500 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/mininglens/nether_nether_quartz_ore.json b/src/generated/resources/data/actuallyadditions/recipes/mininglens/nether_nether_quartz_ore.json index eaac1da93..d8a38462c 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/mininglens/nether_nether_quartz_ore.json +++ b/src/generated/resources/data/actuallyadditions/recipes/mininglens/nether_nether_quartz_ore.json @@ -3,8 +3,8 @@ "ingredient": { "tag": "forge:netherrack" }, - "weight": 3000, "result": { "item": "minecraft:nether_quartz_ore" - } + }, + "weight": 3000 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_coal_ore.json b/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_coal_ore.json index afed4054f..dd190ebb9 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_coal_ore.json +++ b/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_coal_ore.json @@ -3,8 +3,8 @@ "ingredient": { "tag": "forge:stone" }, - "weight": 5000, "result": { "item": "minecraft:coal_ore" - } + }, + "weight": 5000 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_diamond_ore.json b/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_diamond_ore.json index 8e0b417a8..ca7bee0eb 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_diamond_ore.json +++ b/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_diamond_ore.json @@ -3,8 +3,8 @@ "ingredient": { "tag": "forge:stone" }, - "weight": 50, "result": { "item": "minecraft:diamond_ore" - } + }, + "weight": 50 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_emerald_ore.json b/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_emerald_ore.json index 06edb93ad..b2978b7eb 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_emerald_ore.json +++ b/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_emerald_ore.json @@ -3,8 +3,8 @@ "ingredient": { "tag": "forge:stone" }, - "weight": 30, "result": { "item": "minecraft:emerald_ore" - } + }, + "weight": 30 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_gold_ore.json b/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_gold_ore.json index d62795e45..1448a5684 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_gold_ore.json +++ b/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_gold_ore.json @@ -3,8 +3,8 @@ "ingredient": { "tag": "forge:stone" }, - "weight": 500, "result": { "item": "minecraft:gold_ore" - } + }, + "weight": 500 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_iron_ore.json b/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_iron_ore.json index d2342eaab..392604dee 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_iron_ore.json +++ b/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_iron_ore.json @@ -3,8 +3,8 @@ "ingredient": { "tag": "forge:stone" }, - "weight": 3000, "result": { "item": "minecraft:iron_ore" - } + }, + "weight": 3000 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_lapis_ore.json b/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_lapis_ore.json index 30ca421c2..e7ad09d1e 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_lapis_ore.json +++ b/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_lapis_ore.json @@ -3,8 +3,8 @@ "ingredient": { "tag": "forge:stone" }, - "weight": 250, "result": { "item": "minecraft:lapis_ore" - } + }, + "weight": 250 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_redstone_ore.json b/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_redstone_ore.json index 94fa6cbb3..4e0fe01e5 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_redstone_ore.json +++ b/src/generated/resources/data/actuallyadditions/recipes/mininglens/stone_redstone_ore.json @@ -3,8 +3,8 @@ "ingredient": { "tag": "forge:stone" }, - "weight": 200, "result": { "item": "minecraft:redstone_ore" - } + }, + "weight": 200 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/netherite_aiot.json b/src/generated/resources/data/actuallyadditions/recipes/netherite_aiot.json index 9bed90543..a7ae984a2 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/netherite_aiot.json +++ b/src/generated/resources/data/actuallyadditions/recipes/netherite_aiot.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "minecraft:netherite_axe" diff --git a/src/generated/resources/data/actuallyadditions/recipes/phantom_clearing.json b/src/generated/resources/data/actuallyadditions/recipes/phantom_clearing.json index 331dcf89a..838b3077b 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/phantom_clearing.json +++ b/src/generated/resources/data/actuallyadditions/recipes/phantom_clearing.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:phantom_connector" diff --git a/src/generated/resources/data/actuallyadditions/recipes/phantom_connector.json b/src/generated/resources/data/actuallyadditions/recipes/phantom_connector.json index b989a70bf..1015f1a0b 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/phantom_connector.json +++ b/src/generated/resources/data/actuallyadditions/recipes/phantom_connector.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "YE", - "EY", - "S " - ], + "category": "misc", "key": { - "Y": { - "item": "minecraft:ender_eye" - }, "E": { "tag": "forge:ender_pearls" }, "S": { "tag": "forge:rods/wooden" + }, + "Y": { + "item": "minecraft:ender_eye" } }, + "pattern": [ + "YE", + "EY", + "S " + ], "result": { "item": "actuallyadditions:phantom_connector" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/player_probe.json b/src/generated/resources/data/actuallyadditions/recipes/player_probe.json index 129870c34..84ed26e6f 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/player_probe.json +++ b/src/generated/resources/data/actuallyadditions/recipes/player_probe.json @@ -1,25 +1,27 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "A A", - "AIA", - "RHR" - ], + "category": "misc", "key": { "A": { "item": "minecraft:iron_bars" }, - "R": { - "item": "actuallyadditions:empowered_restonia_crystal" - }, "H": { "item": "minecraft:wither_skeleton_skull" }, "I": { "item": "minecraft:iron_helmet" + }, + "R": { + "item": "actuallyadditions:empowered_restonia_crystal" } }, + "pattern": [ + "A A", + "AIA", + "RHR" + ], "result": { "item": "actuallyadditions:player_probe" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/pressing/canola.json b/src/generated/resources/data/actuallyadditions/recipes/pressing/canola.json index 3b87b4bf2..8a2d9598c 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/pressing/canola.json +++ b/src/generated/resources/data/actuallyadditions/recipes/pressing/canola.json @@ -4,7 +4,7 @@ "item": "actuallyadditions:canola" }, "result": { - "fluid": "actuallyadditions:canola_oil", - "amount": 80 + "amount": 80, + "fluid": "actuallyadditions:canola_oil" } } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/quadruple_battery.json b/src/generated/resources/data/actuallyadditions/recipes/quadruple_battery.json index b1f776583..8c57488e1 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/quadruple_battery.json +++ b/src/generated/resources/data/actuallyadditions/recipes/quadruple_battery.json @@ -1,23 +1,25 @@ { "type": "actuallyadditions:copy_nbt", + "category": "misc", + "key": { + "C": { + "item": "actuallyadditions:advanced_coil" + }, + "I": { + "item": "actuallyadditions:empowered_enori_crystal" + }, + "R": { + "type": "actuallyadditions:nbt_target", + "item": "actuallyadditions:triple_battery" + } + }, "pattern": [ " R ", "ICI", "III" ], - "key": { - "R": { - "item": "actuallyadditions:triple_battery", - "type": "actuallyadditions:nbt_target" - }, - "I": { - "item": "actuallyadditions:empowered_enori_crystal" - }, - "C": { - "item": "actuallyadditions:advanced_coil" - } - }, "result": { "item": "actuallyadditions:quadruple_battery" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/quintuple_battery.json b/src/generated/resources/data/actuallyadditions/recipes/quintuple_battery.json index 45221be94..251d87de9 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/quintuple_battery.json +++ b/src/generated/resources/data/actuallyadditions/recipes/quintuple_battery.json @@ -1,23 +1,25 @@ { "type": "actuallyadditions:copy_nbt", + "category": "misc", + "key": { + "C": { + "item": "actuallyadditions:advanced_coil" + }, + "I": { + "item": "actuallyadditions:empowered_diamatine_crystal" + }, + "R": { + "type": "actuallyadditions:nbt_target", + "item": "actuallyadditions:quadruple_battery" + } + }, "pattern": [ " R ", "ICI", "III" ], - "key": { - "R": { - "item": "actuallyadditions:quadruple_battery", - "type": "actuallyadditions:nbt_target" - }, - "I": { - "item": "actuallyadditions:empowered_diamatine_crystal" - }, - "C": { - "item": "actuallyadditions:advanced_coil" - } - }, "result": { "item": "actuallyadditions:quintuple_battery" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/rice_seeds.json b/src/generated/resources/data/actuallyadditions/recipes/rice_seeds.json index b9c5ea5dc..9231addd6 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/rice_seeds.json +++ b/src/generated/resources/data/actuallyadditions/recipes/rice_seeds.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:rice" diff --git a/src/generated/resources/data/actuallyadditions/recipes/rice_slime.json b/src/generated/resources/data/actuallyadditions/recipes/rice_slime.json index 4e9a792cd..106b3d05a 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/rice_slime.json +++ b/src/generated/resources/data/actuallyadditions/recipes/rice_slime.json @@ -1,19 +1,21 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "B": { + "item": "minecraft:water_bucket" + }, + "R": { + "item": "actuallyadditions:rice_dough" + } + }, "pattern": [ " R ", "RBR", " R " ], - "key": { - "R": { - "item": "actuallyadditions:rice_dough" - }, - "B": { - "item": "minecraft:water_bucket" - } - }, "result": { "item": "actuallyadditions:rice_slimeball" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/rice_slime_potion.json b/src/generated/resources/data/actuallyadditions/recipes/rice_slime_potion.json index 448d889dc..6ca52bc3a 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/rice_slime_potion.json +++ b/src/generated/resources/data/actuallyadditions/recipes/rice_slime_potion.json @@ -1,19 +1,21 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "B": { + "item": "minecraft:potion" + }, + "R": { + "item": "actuallyadditions:rice_dough" + } + }, "pattern": [ " R ", "RBR", " R " ], - "key": { - "R": { - "item": "actuallyadditions:rice_dough" - }, - "B": { - "item": "minecraft:potion" - } - }, "result": { "item": "actuallyadditions:rice_slimeball" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/ring_of_growth.json b/src/generated/resources/data/actuallyadditions/recipes/ring_of_growth.json index 6ef62e6a1..5620b2ec9 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/ring_of_growth.json +++ b/src/generated/resources/data/actuallyadditions/recipes/ring_of_growth.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "SIS", - "IOI", - "SIS" - ], + "category": "misc", "key": { - "S": { - "tag": "forge:seeds" - }, "I": { "item": "actuallyadditions:empowered_enori_crystal" }, "O": { "item": "actuallyadditions:ring" + }, + "S": { + "tag": "forge:seeds" } }, + "pattern": [ + "SIS", + "IOI", + "SIS" + ], "result": { "item": "actuallyadditions:ring_of_growth" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/ring_of_magnetizing.json b/src/generated/resources/data/actuallyadditions/recipes/ring_of_magnetizing.json index 563f5ac38..7b58a0ea8 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/ring_of_magnetizing.json +++ b/src/generated/resources/data/actuallyadditions/recipes/ring_of_magnetizing.json @@ -1,25 +1,27 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "B": { + "item": "minecraft:lapis_lazuli" + }, + "I": { + "item": "actuallyadditions:enori_crystal" + }, + "O": { + "item": "actuallyadditions:ring" + }, + "R": { + "item": "actuallyadditions:restonia_crystal" + } + }, "pattern": [ "RIB", "IOI", "BIR" ], - "key": { - "R": { - "item": "actuallyadditions:restonia_crystal" - }, - "I": { - "item": "actuallyadditions:enori_crystal" - }, - "B": { - "item": "minecraft:lapis_lazuli" - }, - "O": { - "item": "actuallyadditions:ring" - } - }, "result": { "item": "actuallyadditions:ring_of_magnetizing" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/shock_suppressor.json b/src/generated/resources/data/actuallyadditions/recipes/shock_suppressor.json index 5e2dcd022..6ea81db91 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/shock_suppressor.json +++ b/src/generated/resources/data/actuallyadditions/recipes/shock_suppressor.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "A": { + "item": "actuallyadditions:empowered_void_crystal" + }, + "C": { + "item": "actuallyadditions:advanced_coil" + }, + "O": { + "tag": "forge:obsidian" + } + }, "pattern": [ "OAO", "ACA", "OAO" ], - "key": { - "A": { - "item": "actuallyadditions:empowered_void_crystal" - }, - "O": { - "tag": "forge:obsidian" - }, - "C": { - "item": "actuallyadditions:advanced_coil" - } - }, "result": { "item": "actuallyadditions:shock_suppressor" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/single_battery.json b/src/generated/resources/data/actuallyadditions/recipes/single_battery.json index 60e5a7bd8..6dcb6993e 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/single_battery.json +++ b/src/generated/resources/data/actuallyadditions/recipes/single_battery.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "C": { + "item": "actuallyadditions:advanced_coil" + }, + "I": { + "item": "actuallyadditions:enori_crystal" + }, + "R": { + "item": "actuallyadditions:restonia_crystal" + } + }, "pattern": [ " R ", "ICI", "III" ], - "key": { - "R": { - "item": "actuallyadditions:restonia_crystal" - }, - "I": { - "item": "actuallyadditions:enori_crystal" - }, - "C": { - "item": "actuallyadditions:advanced_coil" - } - }, "result": { "item": "actuallyadditions:single_battery" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/smooth_black_quartz_slab.json b/src/generated/resources/data/actuallyadditions/recipes/smooth_black_quartz_slab.json index 58e0ebd8c..e32c1fd01 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/smooth_black_quartz_slab.json +++ b/src/generated/resources/data/actuallyadditions/recipes/smooth_black_quartz_slab.json @@ -1,14 +1,16 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:smooth_black_quartz_block" } }, + "pattern": [ + "QQQ" + ], "result": { "item": "actuallyadditions:smooth_black_quartz_slab" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/smooth_black_quartz_stair.json b/src/generated/resources/data/actuallyadditions/recipes/smooth_black_quartz_stair.json index 49288a0f4..a720bea74 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/smooth_black_quartz_stair.json +++ b/src/generated/resources/data/actuallyadditions/recipes/smooth_black_quartz_stair.json @@ -1,16 +1,18 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "Q ", - "QQ ", - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:smooth_black_quartz_block" } }, + "pattern": [ + "Q ", + "QQ ", + "QQQ" + ], "result": { "item": "actuallyadditions:smooth_black_quartz_stair" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/smooth_black_quartz_wall.json b/src/generated/resources/data/actuallyadditions/recipes/smooth_black_quartz_wall.json index 23d1284ed..b5eeef6b2 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/smooth_black_quartz_wall.json +++ b/src/generated/resources/data/actuallyadditions/recipes/smooth_black_quartz_wall.json @@ -1,15 +1,17 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "QQQ", - "QQQ" - ], + "category": "misc", "key": { "Q": { "item": "actuallyadditions:smooth_black_quartz_block" } }, + "pattern": [ + "QQQ", + "QQQ" + ], "result": { "item": "actuallyadditions:smooth_black_quartz_wall" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/charcoal.json b/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/charcoal.json index 913bb42ce..81f66b6e7 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/charcoal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/charcoal.json @@ -1,8 +1,8 @@ { "type": "actuallyadditions:solid_fuel", + "burn_time": 1600, "item": { "item": "minecraft:charcoal" }, - "total_energy": 32000, - "burn_time": 1600 + "total_energy": 32000 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/coal-block.json b/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/coal-block.json index 85e175b74..393f3c01d 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/coal-block.json +++ b/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/coal-block.json @@ -1,8 +1,8 @@ { "type": "actuallyadditions:solid_fuel", + "burn_time": 16000, "item": { "item": "minecraft:coal_block" }, - "total_energy": 320000, - "burn_time": 16000 + "total_energy": 320000 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/coal.json b/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/coal.json index 676388ab8..2d346daa2 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/coal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/coal.json @@ -1,8 +1,8 @@ { "type": "actuallyadditions:solid_fuel", + "burn_time": 1600, "item": { "item": "minecraft:coal" }, - "total_energy": 32000, - "burn_time": 1600 + "total_energy": 32000 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/lava.json b/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/lava.json index fa19d9336..37ed35865 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/lava.json +++ b/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/lava.json @@ -1,8 +1,8 @@ { "type": "actuallyadditions:solid_fuel", + "burn_time": 20000, "item": { "item": "minecraft:lava_bucket" }, - "total_energy": 400000, - "burn_time": 20000 + "total_energy": 400000 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/stick.json b/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/stick.json index 4efd9904e..4155a6bce 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/stick.json +++ b/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/stick.json @@ -1,8 +1,8 @@ { "type": "actuallyadditions:solid_fuel", + "burn_time": 100, "item": { "item": "minecraft:stick" }, - "total_energy": 2000, - "burn_time": 100 + "total_energy": 2000 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/tiny-coal.json b/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/tiny-coal.json index d07e114bc..d6de6bb3f 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/tiny-coal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/solid_fuel/tiny-coal.json @@ -1,8 +1,8 @@ { "type": "actuallyadditions:solid_fuel", + "burn_time": 200, "item": { "tag": "actuallyadditions:tiny_coals" }, - "total_energy": 4000, - "burn_time": 200 + "total_energy": 4000 } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/stone_aiot.json b/src/generated/resources/data/actuallyadditions/recipes/stone_aiot.json index 6f7cc993f..5d205fa4d 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/stone_aiot.json +++ b/src/generated/resources/data/actuallyadditions/recipes/stone_aiot.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "minecraft:stone_axe" diff --git a/src/generated/resources/data/actuallyadditions/recipes/teleport_staff.json b/src/generated/resources/data/actuallyadditions/recipes/teleport_staff.json index 6963aac4b..e5f4b4034 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/teleport_staff.json +++ b/src/generated/resources/data/actuallyadditions/recipes/teleport_staff.json @@ -1,25 +1,27 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "B": { + "item": "actuallyadditions:single_battery" + }, + "E": { + "tag": "forge:ender_pearls" + }, + "F": { + "item": "actuallyadditions:empowered_diamatine_crystal" + }, + "S": { + "item": "actuallyadditions:ender_casing" + } + }, "pattern": [ " FE", " S ", "SB " ], - "key": { - "F": { - "item": "actuallyadditions:empowered_diamatine_crystal" - }, - "E": { - "tag": "forge:ender_pearls" - }, - "S": { - "item": "actuallyadditions:ender_casing" - }, - "B": { - "item": "actuallyadditions:single_battery" - } - }, "result": { "item": "actuallyadditions:teleport_staff" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/tiny_to_charcoal.json b/src/generated/resources/data/actuallyadditions/recipes/tiny_to_charcoal.json index ae03cf5cb..b229bf533 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/tiny_to_charcoal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/tiny_to_charcoal.json @@ -4,25 +4,27 @@ { "conditions": [ { - "config_name": "tinyCoalStuff", - "type": "actuallyadditions:bool_config_condition" + "type": "actuallyadditions:bool_config_condition", + "config_name": "tinyCoalStuff" } ], "recipe": { "type": "minecraft:crafting_shaped", - "pattern": [ - "CCC", - "C C", - "CCC" - ], + "category": "misc", "key": { "C": { "item": "actuallyadditions:tiny_charcoal" } }, + "pattern": [ + "CCC", + "C C", + "CCC" + ], "result": { "item": "minecraft:charcoal" - } + }, + "show_notification": true } } ] diff --git a/src/generated/resources/data/actuallyadditions/recipes/tiny_to_coal.json b/src/generated/resources/data/actuallyadditions/recipes/tiny_to_coal.json index 46c6d9482..88f47eb76 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/tiny_to_coal.json +++ b/src/generated/resources/data/actuallyadditions/recipes/tiny_to_coal.json @@ -4,25 +4,27 @@ { "conditions": [ { - "config_name": "tinyCoalStuff", - "type": "actuallyadditions:bool_config_condition" + "type": "actuallyadditions:bool_config_condition", + "config_name": "tinyCoalStuff" } ], "recipe": { "type": "minecraft:crafting_shaped", - "pattern": [ - "CCC", - "C C", - "CCC" - ], + "category": "misc", "key": { "C": { "item": "actuallyadditions:tiny_coal" } }, + "pattern": [ + "CCC", + "C C", + "CCC" + ], "result": { "item": "minecraft:coal" - } + }, + "show_notification": true } } ] diff --git a/src/generated/resources/data/actuallyadditions/recipes/tiny_torch.json b/src/generated/resources/data/actuallyadditions/recipes/tiny_torch.json index 935f412c2..8c7e5d12e 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/tiny_torch.json +++ b/src/generated/resources/data/actuallyadditions/recipes/tiny_torch.json @@ -1,9 +1,6 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "C", - "S" - ], + "category": "misc", "key": { "C": { "tag": "actuallyadditions:tiny_coals" @@ -12,8 +9,13 @@ "tag": "forge:rods/wooden" } }, + "pattern": [ + "C", + "S" + ], "result": { - "item": "actuallyadditions:tiny_torch", - "count": 2 - } + "count": 2, + "item": "actuallyadditions:tiny_torch" + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/travelers_sack.json b/src/generated/resources/data/actuallyadditions/recipes/travelers_sack.json index 48120c1b5..b3d24d871 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/travelers_sack.json +++ b/src/generated/resources/data/actuallyadditions/recipes/travelers_sack.json @@ -1,25 +1,27 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "SLS", - "SCS", - "LVL" - ], + "category": "misc", "key": { - "S": { - "tag": "forge:string" + "C": { + "tag": "forge:chests/wooden" }, "L": { "tag": "forge:leather" }, - "C": { - "tag": "forge:chests/wooden" + "S": { + "tag": "forge:string" }, "V": { "item": "actuallyadditions:void_crystal_block" } }, + "pattern": [ + "SLS", + "SCS", + "LVL" + ], "result": { "item": "actuallyadditions:travelers_sack" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/triple_battery.json b/src/generated/resources/data/actuallyadditions/recipes/triple_battery.json index c0b8c636d..90ab2360c 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/triple_battery.json +++ b/src/generated/resources/data/actuallyadditions/recipes/triple_battery.json @@ -1,23 +1,25 @@ { "type": "actuallyadditions:copy_nbt", + "category": "misc", + "key": { + "C": { + "item": "actuallyadditions:advanced_coil" + }, + "I": { + "item": "actuallyadditions:empowered_enori_crystal" + }, + "R": { + "type": "actuallyadditions:nbt_target", + "item": "actuallyadditions:double_battery" + } + }, "pattern": [ " R ", "ICI", "III" ], - "key": { - "R": { - "item": "actuallyadditions:double_battery", - "type": "actuallyadditions:nbt_target" - }, - "I": { - "item": "actuallyadditions:empowered_enori_crystal" - }, - "C": { - "item": "actuallyadditions:advanced_coil" - } - }, "result": { "item": "actuallyadditions:triple_battery" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/vertical_digger.json b/src/generated/resources/data/actuallyadditions/recipes/vertical_digger.json index 47327fda9..dfbb672f8 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/vertical_digger.json +++ b/src/generated/resources/data/actuallyadditions/recipes/vertical_digger.json @@ -1,25 +1,27 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "IRI", - "RCR", - "IDI" - ], + "category": "misc", "key": { - "R": { - "tag": "forge:storage_blocks/redstone" - }, - "I": { - "item": "actuallyadditions:iron_casing" - }, "C": { "item": "actuallyadditions:empowered_void_crystal" }, "D": { "tag": "actuallyadditions:drills" + }, + "I": { + "item": "actuallyadditions:iron_casing" + }, + "R": { + "tag": "forge:storage_blocks/redstone" } }, + "pattern": [ + "IRI", + "RCR", + "IDI" + ], "result": { "item": "actuallyadditions:vertical_digger" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/void_sack.json b/src/generated/resources/data/actuallyadditions/recipes/void_sack.json index ab104555c..c36c396d8 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/void_sack.json +++ b/src/generated/resources/data/actuallyadditions/recipes/void_sack.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "actuallyadditions:travelers_sack" diff --git a/src/generated/resources/data/actuallyadditions/recipes/wings_of_the_bats.json b/src/generated/resources/data/actuallyadditions/recipes/wings_of_the_bats.json index 8cc445871..2b9131bdc 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/wings_of_the_bats.json +++ b/src/generated/resources/data/actuallyadditions/recipes/wings_of_the_bats.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", + "category": "misc", + "key": { + "D": { + "item": "actuallyadditions:ender_star" + }, + "N": { + "item": "actuallyadditions:diamatine_crystal_block" + }, + "W": { + "item": "actuallyadditions:bats_wing" + } + }, "pattern": [ "WNW", "WDW", "WNW" ], - "key": { - "W": { - "item": "actuallyadditions:bats_wing" - }, - "N": { - "item": "actuallyadditions:diamatine_crystal_block" - }, - "D": { - "item": "actuallyadditions:ender_star" - } - }, "result": { "item": "actuallyadditions:wings_of_the_bats" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/wood_casing.json b/src/generated/resources/data/actuallyadditions/recipes/wood_casing.json index 3517c3f69..cb15c6b97 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/wood_casing.json +++ b/src/generated/resources/data/actuallyadditions/recipes/wood_casing.json @@ -1,22 +1,24 @@ { "type": "minecraft:crafting_shaped", - "pattern": [ - "WSW", - "SRS", - "WSW" - ], + "category": "misc", "key": { + "R": { + "tag": "minecraft:logs" + }, "S": { "tag": "forge:rods/wooden" }, "W": { "tag": "minecraft:planks" - }, - "R": { - "tag": "minecraft:logs" } }, + "pattern": [ + "WSW", + "SRS", + "WSW" + ], "result": { "item": "actuallyadditions:wood_casing" - } + }, + "show_notification": true } \ No newline at end of file diff --git a/src/generated/resources/data/actuallyadditions/recipes/wooden_aiot.json b/src/generated/resources/data/actuallyadditions/recipes/wooden_aiot.json index 854dc6f81..9116c5338 100644 --- a/src/generated/resources/data/actuallyadditions/recipes/wooden_aiot.json +++ b/src/generated/resources/data/actuallyadditions/recipes/wooden_aiot.json @@ -1,5 +1,6 @@ { "type": "minecraft:crafting_shapeless", + "category": "misc", "ingredients": [ { "item": "minecraft:wooden_axe" diff --git a/src/generated/resources/data/actuallyadditions/tags/blocks/mineable/aio.json b/src/generated/resources/data/actuallyadditions/tags/blocks/mineable/aio.json index 311da04cc..b817f097f 100644 --- a/src/generated/resources/data/actuallyadditions/tags/blocks/mineable/aio.json +++ b/src/generated/resources/data/actuallyadditions/tags/blocks/mineable/aio.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "#minecraft:mineable/axe", "#minecraft:mineable/hoe", diff --git a/src/generated/resources/data/actuallyadditions/tags/blocks/mineable/drill.json b/src/generated/resources/data/actuallyadditions/tags/blocks/mineable/drill.json index 190180da3..81da9cffd 100644 --- a/src/generated/resources/data/actuallyadditions/tags/blocks/mineable/drill.json +++ b/src/generated/resources/data/actuallyadditions/tags/blocks/mineable/drill.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "#minecraft:mineable/shovel", "#minecraft:mineable/pickaxe" diff --git a/src/generated/resources/data/actuallyadditions/tags/items/coffee_beans.json b/src/generated/resources/data/actuallyadditions/tags/items/coffee_beans.json index 1905fc392..81062bf32 100644 --- a/src/generated/resources/data/actuallyadditions/tags/items/coffee_beans.json +++ b/src/generated/resources/data/actuallyadditions/tags/items/coffee_beans.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "actuallyadditions:coffee_beans" ] diff --git a/src/generated/resources/data/actuallyadditions/tags/items/crystals.json b/src/generated/resources/data/actuallyadditions/tags/items/crystals.json index e95dc7531..b7d4e4c75 100644 --- a/src/generated/resources/data/actuallyadditions/tags/items/crystals.json +++ b/src/generated/resources/data/actuallyadditions/tags/items/crystals.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "actuallyadditions:restonia_crystal", "actuallyadditions:palis_crystal", diff --git a/src/generated/resources/data/actuallyadditions/tags/items/drills.json b/src/generated/resources/data/actuallyadditions/tags/items/drills.json index 92ded93ec..1c5aea39d 100644 --- a/src/generated/resources/data/actuallyadditions/tags/items/drills.json +++ b/src/generated/resources/data/actuallyadditions/tags/items/drills.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "actuallyadditions:drill_light_blue", "actuallyadditions:drill_black", diff --git a/src/generated/resources/data/actuallyadditions/tags/items/tiny_coals.json b/src/generated/resources/data/actuallyadditions/tags/items/tiny_coals.json index b17766959..fb0ae688a 100644 --- a/src/generated/resources/data/actuallyadditions/tags/items/tiny_coals.json +++ b/src/generated/resources/data/actuallyadditions/tags/items/tiny_coals.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "actuallyadditions:tiny_coal", "actuallyadditions:tiny_charcoal" diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json index 36b45d4a7..84d0e7c5b 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/axe.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "actuallyadditions:fermenting_barrel" ] diff --git a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json index 4da0c02df..51562c1b7 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json +++ b/src/generated/resources/data/minecraft/tags/blocks/mineable/pickaxe.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "actuallyadditions:lamp_white", "actuallyadditions:lamp_orange", diff --git a/src/generated/resources/data/minecraft/tags/blocks/needs_stone_tool.json b/src/generated/resources/data/minecraft/tags/blocks/needs_stone_tool.json index 08bee803a..93dd08fe6 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/needs_stone_tool.json +++ b/src/generated/resources/data/minecraft/tags/blocks/needs_stone_tool.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "actuallyadditions:wood_casing", "actuallyadditions:iron_casing", diff --git a/src/generated/resources/data/minecraft/tags/blocks/walls.json b/src/generated/resources/data/minecraft/tags/blocks/walls.json index 0a338cef4..4146f9dc7 100644 --- a/src/generated/resources/data/minecraft/tags/blocks/walls.json +++ b/src/generated/resources/data/minecraft/tags/blocks/walls.json @@ -1,5 +1,4 @@ { - "replace": false, "values": [ "actuallyadditions:ethetic_white_wall", "actuallyadditions:ethetic_green_wall", diff --git a/src/generated/resources/data/minecraft/tags/damage_type/bypasses_armor.json b/src/generated/resources/data/minecraft/tags/damage_type/bypasses_armor.json new file mode 100644 index 000000000..69a12b2d4 --- /dev/null +++ b/src/generated/resources/data/minecraft/tags/damage_type/bypasses_armor.json @@ -0,0 +1,5 @@ +{ + "values": [ + "actuallyadditions:atomicreconstructor" + ] +} \ No newline at end of file diff --git a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyTags.java b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyTags.java index d55b04435..a657faba6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyTags.java +++ b/src/main/java/de/ellpeck/actuallyadditions/api/ActuallyTags.java @@ -1,9 +1,8 @@ package de.ellpeck.actuallyadditions.api; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.core.Registry; +import net.minecraft.core.registries.Registries; import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.BlockTags; import net.minecraft.tags.ItemTags; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; @@ -13,6 +12,7 @@ public final class ActuallyTags { public static final void init() { // lol Items.touch(); + Blocks.touch(); } public static class Items { public static void touch() { @@ -25,7 +25,7 @@ public final class ActuallyTags { public static final TagKey CRYSTALS = tag("crystals"); private static TagKey tag(String name) { - return TagKey.create(Registry.ITEM_REGISTRY, new ResourceLocation(ActuallyAdditions.MODID, name)); + return TagKey.create(Registries.ITEM, new ResourceLocation(ActuallyAdditions.MODID, name)); } } @@ -45,7 +45,7 @@ public final class ActuallyTags { public static final TagKey NEEDS_ENORI_TOOL = tag("needs_enori_tool"); private static TagKey tag(String name) { - return TagKey.create(Registry.BLOCK_REGISTRY, new ResourceLocation(ActuallyAdditions.MODID, name)); + return TagKey.create(Registries.BLOCK, new ResourceLocation(ActuallyAdditions.MODID, name)); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/ActuallyAdditionsData.java b/src/main/java/de/ellpeck/actuallyadditions/data/ActuallyAdditionsData.java index 3a3605df9..6826d2606 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/ActuallyAdditionsData.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/ActuallyAdditionsData.java @@ -2,12 +2,23 @@ package de.ellpeck.actuallyadditions.data; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.config.conditions.BoolConfigCondition; +import de.ellpeck.actuallyadditions.mod.misc.ActuallyDamageTypes; +import net.minecraft.core.HolderLookup; +import net.minecraft.core.RegistryAccess; +import net.minecraft.core.RegistrySetBuilder; +import net.minecraft.core.registries.BuiltInRegistries; +import net.minecraft.core.registries.Registries; import net.minecraft.data.DataGenerator; +import net.minecraft.data.PackOutput; +import net.minecraft.data.registries.VanillaRegistries; +import net.minecraft.world.damagesource.DamageType; import net.minecraftforge.common.crafting.CraftingHelper; import net.minecraftforge.common.data.ExistingFileHelper; +import net.minecraftforge.data.event.GatherDataEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.forge.event.lifecycle.GatherDataEvent; + +import java.util.concurrent.CompletableFuture; @Mod.EventBusSubscriber(modid = ActuallyAdditions.MODID, bus = Mod.EventBusSubscriber.Bus.MOD) public class ActuallyAdditionsData { @@ -16,31 +27,46 @@ public class ActuallyAdditionsData { public static void runGenerator(GatherDataEvent event) { CraftingHelper.register(BoolConfigCondition.Serializer.INSTANCE); DataGenerator generator = event.getGenerator(); + PackOutput packOutput = generator.getPackOutput(); + CompletableFuture lookupProvider = CompletableFuture.supplyAsync(ActuallyAdditionsData::getProvider); ExistingFileHelper helper = event.getExistingFileHelper(); // generator.addProvider(new GeneratorBlockStates(generator, helper)); // generator.addProvider(new GeneratorItemModels(generator, helper)); // generator.addProvider(new GeneratorLanguage(generator)); - BlockTagsGenerator generatorBlockTags = new BlockTagsGenerator(generator, helper); + BlockTagsGenerator generatorBlockTags = new BlockTagsGenerator(packOutput, lookupProvider, helper); - generator.addProvider(new LootTableGenerator(generator)); - generator.addProvider(new BlockRecipeGenerator(generator)); - generator.addProvider(new ItemRecipeGenerator(generator)); - generator.addProvider(generatorBlockTags); - generator.addProvider(new ItemTagsGenerator(generator, generatorBlockTags, helper)); + generator.addProvider(true, new LootTableGenerator(packOutput)); + generator.addProvider(true, new BlockRecipeGenerator(packOutput)); + generator.addProvider(true, new ItemRecipeGenerator(packOutput)); + generator.addProvider(true, generatorBlockTags); + generator.addProvider(true, new ItemTagsGenerator(packOutput, lookupProvider, generatorBlockTags, helper)); + generator.addProvider(true, new DamageTypeTagsGenerator(packOutput, lookupProvider, helper)); - generator.addProvider(new BlockStateGenerator(generator, helper)); - generator.addProvider(new ItemModelGenerator(generator, helper)); + generator.addProvider(true, new BlockStateGenerator(packOutput, helper)); + generator.addProvider(true, new ItemModelGenerator(packOutput, helper)); - generator.addProvider(new AdvancementGenerator(generator, helper)); - generator.addProvider(new LaserRecipeGenerator(generator)); - generator.addProvider(new ColorChangeGenerator(generator)); - generator.addProvider(new EmpoweringRecipeGenerator(generator)); - generator.addProvider(new CrushingRecipeGenerator(generator)); - generator.addProvider(new FuelRecipeGenerator(generator)); - generator.addProvider(new MiscMachineRecipeGenerator(generator)); - generator.addProvider(new MiningLensGenerator(generator)); + generator.addProvider(true, new AdvancementGenerator(packOutput, lookupProvider, helper)); + generator.addProvider(true, new LaserRecipeGenerator(packOutput)); + generator.addProvider(true, new ColorChangeGenerator(packOutput)); + generator.addProvider(true, new EmpoweringRecipeGenerator(packOutput)); + generator.addProvider(true, new CrushingRecipeGenerator(packOutput)); + generator.addProvider(true, new FuelRecipeGenerator(packOutput)); + generator.addProvider(true, new MiscMachineRecipeGenerator(packOutput)); + generator.addProvider(true, new MiningLensGenerator(packOutput)); - generator.addProvider(new SoundsGenerator(generator, helper)); + generator.addProvider(true, new SoundsGenerator(packOutput, helper)); + } + + private static HolderLookup.Provider getProvider() { + final RegistrySetBuilder registryBuilder = new RegistrySetBuilder(); + registryBuilder.add(Registries.DAMAGE_TYPE, (context) -> { + context.register(ActuallyDamageTypes.ATOMIC_RECONSTRUCTOR, new DamageType("actuallyadditions.atomic_reconstructor", 0.0F)); + }); + // We need the BIOME registry to be present, so we can use a biome tag, doesn't matter that it's empty + registryBuilder.add(Registries.BIOME, context -> { + }); + RegistryAccess.Frozen regAccess = RegistryAccess.fromRegistryOfRegistries(BuiltInRegistries.REGISTRY); + return registryBuilder.buildPatch(regAccess, VanillaRegistries.createLookup()); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/AdvancementGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/AdvancementGenerator.java index 52744ad97..221f18e29 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/AdvancementGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/AdvancementGenerator.java @@ -9,200 +9,205 @@ import net.minecraft.advancements.FrameType; import net.minecraft.advancements.critereon.ImpossibleTrigger; import net.minecraft.advancements.critereon.InventoryChangeTrigger; import net.minecraft.advancements.critereon.ItemPredicate; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.advancements.AdvancementProvider; -import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.core.HolderLookup; +import net.minecraft.data.PackOutput; +import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.common.data.ExistingFileHelper; +import net.minecraftforge.common.data.ForgeAdvancementProvider; +import java.util.List; +import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; -public class AdvancementGenerator extends AdvancementProvider { - public AdvancementGenerator(DataGenerator gen, ExistingFileHelper exFileHelper) { - super(gen, exFileHelper); +public class AdvancementGenerator extends ForgeAdvancementProvider { + public AdvancementGenerator(PackOutput packOutput, CompletableFuture registries, ExistingFileHelper existingFileHelper) { + super(packOutput, registries, existingFileHelper, List.of(new ActuallyAdvancementGenerator())); } - @Override - protected void registerAdvancements(Consumer consumer, ExistingFileHelper exFileHelper) { - Advancement root = Advancement.Builder.advancement() - .display(new DisplayInfo(ActuallyItems.ITEM_BOOKLET.get().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.openBooklet"), - new TranslatableComponent("achievement.actuallyadditions.openBooklet.desc"), - new ResourceLocation("textures/gui/advancements/backgrounds/stone.png"), FrameType.TASK, true, true, false)) - .addCriterion("right_click", new ImpossibleTrigger.TriggerInstance()) - .save(consumer, "actuallyadditions:root"); + public static class ActuallyAdvancementGenerator implements AdvancementGenerator { + @Override + public void generate(HolderLookup.Provider registries, Consumer consumer, ExistingFileHelper existingFileHelper) { + Advancement root = Advancement.Builder.advancement() + .display(new DisplayInfo(ActuallyItems.ITEM_BOOKLET.get().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.openBooklet"), + Component.translatable("achievement.actuallyadditions.openBooklet.desc"), + new ResourceLocation("textures/gui/advancements/backgrounds/stone.png"), FrameType.TASK, true, true, false)) + .addCriterion("right_click", new ImpossibleTrigger.TriggerInstance()) + .save(consumer, "actuallyadditions:root"); - //TODO: Underwater Treasure Chest Advancement? + //TODO: Underwater Treasure Chest Advancement? - Advancement phantomFace = Advancement.Builder.advancement() - .parent(root) - .display(new DisplayInfo(ActuallyBlocks.PHANTOM_ITEMFACE.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftPhantomface"), - new TranslatableComponent("achievement.actuallyadditions.craftPhantomface.desc"), - new ResourceLocation("textures/blocks/stone.png"), FrameType.TASK, true, true, false)) - .addCriterion("phantom_face", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.PHANTOM_ITEMFACE.get())) - .save(consumer, "actuallyadditions:craft_phantom_face"); + Advancement phantomFace = Advancement.Builder.advancement() + .parent(root) + .display(new DisplayInfo(ActuallyBlocks.PHANTOM_ITEMFACE.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftPhantomface"), + Component.translatable("achievement.actuallyadditions.craftPhantomface.desc"), + new ResourceLocation("textures/blocks/stone.png"), FrameType.TASK, true, true, false)) + .addCriterion("phantom_face", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.PHANTOM_ITEMFACE.get())) + .save(consumer, "actuallyadditions:craft_phantom_face"); - Advancement.Builder.advancement() - .parent(phantomFace) - .display(new DisplayInfo(ActuallyBlocks.PHANTOM_LIQUIFACE.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftLiquiface"), - new TranslatableComponent("achievement.actuallyadditions.craftLiquiface.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("liquiface", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.PHANTOM_LIQUIFACE.get())) - .save(consumer, "actuallyadditions:craft_liquiface"); + Advancement.Builder.advancement() + .parent(phantomFace) + .display(new DisplayInfo(ActuallyBlocks.PHANTOM_LIQUIFACE.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftLiquiface"), + Component.translatable("achievement.actuallyadditions.craftLiquiface.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("liquiface", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.PHANTOM_LIQUIFACE.get())) + .save(consumer, "actuallyadditions:craft_liquiface"); - Advancement.Builder.advancement() - .parent(phantomFace) - .display(new DisplayInfo(ActuallyBlocks.PHANTOM_ENERGYFACE.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftEnergyface"), - new TranslatableComponent("achievement.actuallyadditions.craftEnergyface.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("energyface", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.PHANTOM_ENERGYFACE.get())) - .save(consumer, "actuallyadditions:craft_energyface"); + Advancement.Builder.advancement() + .parent(phantomFace) + .display(new DisplayInfo(ActuallyBlocks.PHANTOM_ENERGYFACE.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftEnergyface"), + Component.translatable("achievement.actuallyadditions.craftEnergyface.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("energyface", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.PHANTOM_ENERGYFACE.get())) + .save(consumer, "actuallyadditions:craft_energyface"); - Advancement coalGenerator = Advancement.Builder.advancement() - .parent(root) - .display(new DisplayInfo(ActuallyBlocks.COAL_GENERATOR.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftCoalGen"), - new TranslatableComponent("achievement.actuallyadditions.craftCoalGen.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("coal_generator", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.COAL_GENERATOR.get())) - .save(consumer, "actuallyadditions:craft_coal_generator"); + Advancement coalGenerator = Advancement.Builder.advancement() + .parent(root) + .display(new DisplayInfo(ActuallyBlocks.COAL_GENERATOR.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftCoalGen"), + Component.translatable("achievement.actuallyadditions.craftCoalGen.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("coal_generator", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.COAL_GENERATOR.get())) + .save(consumer, "actuallyadditions:craft_coal_generator"); - Advancement.Builder.advancement() - .parent(coalGenerator) - .display(new DisplayInfo(ActuallyBlocks.LEAF_GENERATOR.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftLeafGen"), - new TranslatableComponent("achievement.actuallyadditions.craftLeafGen.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("leaf_generator", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.LEAF_GENERATOR.get())) - .save(consumer, "actuallyadditions:craft_leaf_generator"); + Advancement.Builder.advancement() + .parent(coalGenerator) + .display(new DisplayInfo(ActuallyBlocks.LEAF_GENERATOR.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftLeafGen"), + Component.translatable("achievement.actuallyadditions.craftLeafGen.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("leaf_generator", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.LEAF_GENERATOR.get())) + .save(consumer, "actuallyadditions:craft_leaf_generator"); - Advancement coffeeBeans = Advancement.Builder.advancement() - .parent(coalGenerator) - .display(new DisplayInfo(ActuallyItems.COFFEE_BEANS.get().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.pickUpCoffee"), - new TranslatableComponent("achievement.actuallyadditions.pickUpCoffee.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("coffee_beans", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyItems.COFFEE_BEANS.get())) - .save(consumer, "actuallyadditions:pickup_coffee"); + Advancement coffeeBeans = Advancement.Builder.advancement() + .parent(coalGenerator) + .display(new DisplayInfo(ActuallyItems.COFFEE_BEANS.get().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.pickUpCoffee"), + Component.translatable("achievement.actuallyadditions.pickUpCoffee.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("coffee_beans", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyItems.COFFEE_BEANS.get())) + .save(consumer, "actuallyadditions:pickup_coffee"); - Advancement.Builder.advancement() - .parent(coffeeBeans) - .display(new DisplayInfo(ActuallyBlocks.COFFEE_MACHINE.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftCoffeeMachine"), - new TranslatableComponent("achievement.actuallyadditions.craftCoffeeMachine.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("coffee_machine", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.COFFEE_MACHINE.get())) - .save(consumer, "actuallyadditions:craft_coffee_machine"); + Advancement.Builder.advancement() + .parent(coffeeBeans) + .display(new DisplayInfo(ActuallyBlocks.COFFEE_MACHINE.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftCoffeeMachine"), + Component.translatable("achievement.actuallyadditions.craftCoffeeMachine.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("coffee_machine", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.COFFEE_MACHINE.get())) + .save(consumer, "actuallyadditions:craft_coffee_machine"); - Advancement reconstructor = Advancement.Builder.advancement() - .parent(coalGenerator) - .display(new DisplayInfo(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftReconstructor"), - new TranslatableComponent("achievement.actuallyadditions.craftReconstructor.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("atomic_reconstructor", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get())) - .save(consumer, "actuallyadditions:craft_reconstructor"); + Advancement reconstructor = Advancement.Builder.advancement() + .parent(coalGenerator) + .display(new DisplayInfo(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftReconstructor"), + Component.translatable("achievement.actuallyadditions.craftReconstructor.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("atomic_reconstructor", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.ATOMIC_RECONSTRUCTOR.get())) + .save(consumer, "actuallyadditions:craft_reconstructor"); - Advancement makeFirstCrystal = Advancement.Builder.advancement() - .parent(reconstructor) - .display(new DisplayInfo(ActuallyItems.EMERADIC_CRYSTAL.get().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.makeCrystal"), - new TranslatableComponent("achievement.actuallyadditions.makeCrystal.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("crystal", InventoryChangeTrigger.TriggerInstance.hasItems( - ItemPredicate.Builder.item().of(ActuallyTags.Items.CRYSTALS).build()) - ) - .save(consumer, "actuallyadditions:make_first_crystal"); + Advancement makeFirstCrystal = Advancement.Builder.advancement() + .parent(reconstructor) + .display(new DisplayInfo(ActuallyItems.EMERADIC_CRYSTAL.get().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.makeCrystal"), + Component.translatable("achievement.actuallyadditions.makeCrystal.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("crystal", InventoryChangeTrigger.TriggerInstance.hasItems( + ItemPredicate.Builder.item().of(ActuallyTags.Items.CRYSTALS).build()) + ) + .save(consumer, "actuallyadditions:make_first_crystal"); - Advancement.Builder.advancement() - .parent(makeFirstCrystal) - .display(new DisplayInfo(ActuallyBlocks.EMPOWERER.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftEmpowerer"), - new TranslatableComponent("achievement.actuallyadditions.craftEmpowerer.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("empowerer", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.EMPOWERER.get())) - .save(consumer, "actuallyadditions:craft_empowerer"); + Advancement.Builder.advancement() + .parent(makeFirstCrystal) + .display(new DisplayInfo(ActuallyBlocks.EMPOWERER.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftEmpowerer"), + Component.translatable("achievement.actuallyadditions.craftEmpowerer.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("empowerer", InventoryChangeTrigger.TriggerInstance.hasItems(ActuallyBlocks.EMPOWERER.get())) + .save(consumer, "actuallyadditions:craft_empowerer"); - Advancement craftCrusher = Advancement.Builder.advancement() - .parent(reconstructor) - .display(new DisplayInfo(ActuallyBlocks.CRUSHER.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftCrusher"), - new TranslatableComponent("achievement.actuallyadditions.craftCrusher.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("crystal", InventoryChangeTrigger.TriggerInstance.hasItems( - ItemPredicate.Builder.item().of(ActuallyBlocks.CRUSHER.get()).build()) - ) - .save(consumer, "actuallyadditions:craft_crusher"); + Advancement craftCrusher = Advancement.Builder.advancement() + .parent(reconstructor) + .display(new DisplayInfo(ActuallyBlocks.CRUSHER.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftCrusher"), + Component.translatable("achievement.actuallyadditions.craftCrusher.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("crystal", InventoryChangeTrigger.TriggerInstance.hasItems( + ItemPredicate.Builder.item().of(ActuallyBlocks.CRUSHER.get()).build()) + ) + .save(consumer, "actuallyadditions:craft_crusher"); - Advancement craftDoubleCrusher = Advancement.Builder.advancement() - .parent(craftCrusher) - .display(new DisplayInfo(ActuallyBlocks.CRUSHER_DOUBLE.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftDoubleCrusher"), - new TranslatableComponent("achievement.actuallyadditions.craftDoubleCrusher.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("crystal", InventoryChangeTrigger.TriggerInstance.hasItems( - ItemPredicate.Builder.item().of(ActuallyBlocks.CRUSHER_DOUBLE.get()).build()) - ) - .save(consumer, "actuallyadditions:craft_double_crusher"); + Advancement craftDoubleCrusher = Advancement.Builder.advancement() + .parent(craftCrusher) + .display(new DisplayInfo(ActuallyBlocks.CRUSHER_DOUBLE.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftDoubleCrusher"), + Component.translatable("achievement.actuallyadditions.craftDoubleCrusher.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("crystal", InventoryChangeTrigger.TriggerInstance.hasItems( + ItemPredicate.Builder.item().of(ActuallyBlocks.CRUSHER_DOUBLE.get()).build()) + ) + .save(consumer, "actuallyadditions:craft_double_crusher"); - Advancement craftLaserRelay = Advancement.Builder.advancement() - .parent(reconstructor) - .display(new DisplayInfo(ActuallyBlocks.LASER_RELAY.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftLaserRelay"), - new TranslatableComponent("achievement.actuallyadditions.craftLaserRelay.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("laser_relay", InventoryChangeTrigger.TriggerInstance.hasItems( - ItemPredicate.Builder.item().of(ActuallyBlocks.LASER_RELAY.get()).build()) - ) - .save(consumer, "actuallyadditions:craft_laser_relay"); + Advancement craftLaserRelay = Advancement.Builder.advancement() + .parent(reconstructor) + .display(new DisplayInfo(ActuallyBlocks.LASER_RELAY.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftLaserRelay"), + Component.translatable("achievement.actuallyadditions.craftLaserRelay.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("laser_relay", InventoryChangeTrigger.TriggerInstance.hasItems( + ItemPredicate.Builder.item().of(ActuallyBlocks.LASER_RELAY.get()).build()) + ) + .save(consumer, "actuallyadditions:craft_laser_relay"); - Advancement craftLaserRelayAdvanced = Advancement.Builder.advancement() - .parent(craftLaserRelay) - .display(new DisplayInfo(ActuallyBlocks.LASER_RELAY_ADVANCED.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftLaserRelayAdvanced"), - new TranslatableComponent("achievement.actuallyadditions.craftLaserRelayAdvanced.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("laser_relay_advanced", InventoryChangeTrigger.TriggerInstance.hasItems( - ItemPredicate.Builder.item().of(ActuallyBlocks.LASER_RELAY_ADVANCED.get()).build()) - ) - .save(consumer, "actuallyadditions:craft_laser_relay_advanced"); + Advancement craftLaserRelayAdvanced = Advancement.Builder.advancement() + .parent(craftLaserRelay) + .display(new DisplayInfo(ActuallyBlocks.LASER_RELAY_ADVANCED.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftLaserRelayAdvanced"), + Component.translatable("achievement.actuallyadditions.craftLaserRelayAdvanced.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("laser_relay_advanced", InventoryChangeTrigger.TriggerInstance.hasItems( + ItemPredicate.Builder.item().of(ActuallyBlocks.LASER_RELAY_ADVANCED.get()).build()) + ) + .save(consumer, "actuallyadditions:craft_laser_relay_advanced"); - Advancement craftLaserRelayExtreme = Advancement.Builder.advancement() - .parent(craftLaserRelayAdvanced) - .display(new DisplayInfo(ActuallyBlocks.LASER_RELAY_EXTREME.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftLaserRelayExtreme"), - new TranslatableComponent("achievement.actuallyadditions.craftLaserRelayExtreme.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("laser_relay_extreme", InventoryChangeTrigger.TriggerInstance.hasItems( - ItemPredicate.Builder.item().of(ActuallyBlocks.LASER_RELAY_EXTREME.get()).build()) - ) - .save(consumer, "actuallyadditions:craft_laser_relay_extreme"); + Advancement craftLaserRelayExtreme = Advancement.Builder.advancement() + .parent(craftLaserRelayAdvanced) + .display(new DisplayInfo(ActuallyBlocks.LASER_RELAY_EXTREME.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftLaserRelayExtreme"), + Component.translatable("achievement.actuallyadditions.craftLaserRelayExtreme.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("laser_relay_extreme", InventoryChangeTrigger.TriggerInstance.hasItems( + ItemPredicate.Builder.item().of(ActuallyBlocks.LASER_RELAY_EXTREME.get()).build()) + ) + .save(consumer, "actuallyadditions:craft_laser_relay_extreme"); - Advancement craftLaserRelayItem = Advancement.Builder.advancement() - .parent(craftLaserRelay) - .display(new DisplayInfo(ActuallyBlocks.LASER_RELAY_ITEM.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftLaserRelayItem"), - new TranslatableComponent("achievement.actuallyadditions.craftLaserRelayItem.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("laser_relay_item", InventoryChangeTrigger.TriggerInstance.hasItems( - ItemPredicate.Builder.item().of(ActuallyBlocks.LASER_RELAY_ITEM.get()).build()) - ) - .save(consumer, "actuallyadditions:craft_laser_relay_item"); + Advancement craftLaserRelayItem = Advancement.Builder.advancement() + .parent(craftLaserRelay) + .display(new DisplayInfo(ActuallyBlocks.LASER_RELAY_ITEM.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftLaserRelayItem"), + Component.translatable("achievement.actuallyadditions.craftLaserRelayItem.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("laser_relay_item", InventoryChangeTrigger.TriggerInstance.hasItems( + ItemPredicate.Builder.item().of(ActuallyBlocks.LASER_RELAY_ITEM.get()).build()) + ) + .save(consumer, "actuallyadditions:craft_laser_relay_item"); - Advancement craftItemInterface = Advancement.Builder.advancement() - .parent(craftLaserRelay) - .display(new DisplayInfo(ActuallyBlocks.ITEM_INTERFACE.get().asItem().getDefaultInstance(), - new TranslatableComponent("achievement.actuallyadditions.craftItemInterface"), - new TranslatableComponent("achievement.actuallyadditions.craftItemInterface.desc"), - null, FrameType.TASK, true, true, false)) - .addCriterion("item_interface", InventoryChangeTrigger.TriggerInstance.hasItems( - ItemPredicate.Builder.item().of(ActuallyBlocks.ITEM_INTERFACE.get()).build()) - ) - .save(consumer, "actuallyadditions:craft_item_interface"); + Advancement craftItemInterface = Advancement.Builder.advancement() + .parent(craftLaserRelay) + .display(new DisplayInfo(ActuallyBlocks.ITEM_INTERFACE.get().asItem().getDefaultInstance(), + Component.translatable("achievement.actuallyadditions.craftItemInterface"), + Component.translatable("achievement.actuallyadditions.craftItemInterface.desc"), + null, FrameType.TASK, true, true, false)) + .addCriterion("item_interface", InventoryChangeTrigger.TriggerInstance.hasItems( + ItemPredicate.Builder.item().of(ActuallyBlocks.ITEM_INTERFACE.get()).build()) + ) + .save(consumer, "actuallyadditions:craft_item_interface"); + } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/BlockRecipeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/BlockRecipeGenerator.java index b745f7f76..e6eeb5898 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/BlockRecipeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/BlockRecipeGenerator.java @@ -4,9 +4,10 @@ import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.api.ActuallyTags; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.HashCache; +import net.minecraft.data.CachedOutput; +import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeCategory; import net.minecraft.data.recipes.RecipeProvider; import net.minecraft.data.recipes.ShapedRecipeBuilder; import net.minecraft.data.recipes.ShapelessRecipeBuilder; @@ -14,19 +15,20 @@ import net.minecraft.tags.ItemTags; import net.minecraft.world.item.Items; import net.minecraft.world.level.ItemLike; import net.minecraftforge.common.Tags; +import org.jetbrains.annotations.Nullable; import javax.annotation.Nonnull; -import java.nio.file.Path; import java.util.Arrays; +import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; public class BlockRecipeGenerator extends RecipeProvider { - public BlockRecipeGenerator(DataGenerator generatorIn) { - super(generatorIn); + public BlockRecipeGenerator(PackOutput packOutput) { + super(packOutput); } @Override - protected void buildCraftingRecipes(@Nonnull Consumer consumer) { + protected void buildRecipes(@Nonnull Consumer consumer) { //Battery Box Recipe.shapeless(ActuallyBlocks.BATTERY_BOX.getItem()).ingredients(ActuallyBlocks.ENERGIZER.get(), ActuallyBlocks.ENERVATOR.get(), ActuallyItems.BASIC_COIL.get()).save(consumer); @@ -231,7 +233,8 @@ public class BlockRecipeGenerator extends RecipeProvider { } @Override - protected void saveAdvancement(HashCache p_208310_1_, JsonObject p_208310_2_, Path p_208310_3_) { + protected @Nullable CompletableFuture saveAdvancement(CachedOutput output, FinishedRecipe finishedRecipe, JsonObject advancementJson) { + return null; //Nope... maybe later... } @@ -270,7 +273,7 @@ public class BlockRecipeGenerator extends RecipeProvider { } public Shapeless(ItemLike result, int countIn) { - super(result, countIn); + super(RecipeCategory.MISC, result, countIn); } public Shapeless ingredients(ItemLike... ingredients) { @@ -291,7 +294,7 @@ public class BlockRecipeGenerator extends RecipeProvider { } public Shaped(ItemLike resultIn, int countIn) { - super(resultIn, countIn); + super(RecipeCategory.MISC, resultIn, countIn); } public Shaped pattern(String line1, String line2, String line3) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/BlockStateGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/BlockStateGenerator.java index 41f2af837..4077ea0fc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/BlockStateGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/BlockStateGenerator.java @@ -2,7 +2,7 @@ package de.ellpeck.actuallyadditions.data; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; -import net.minecraft.data.DataGenerator; +import net.minecraft.data.PackOutput; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.CropBlock; @@ -14,12 +14,13 @@ import net.minecraftforge.client.model.generators.BlockStateProvider; import net.minecraftforge.client.model.generators.ConfiguredModel; import net.minecraftforge.client.model.generators.ModelFile; import net.minecraftforge.common.data.ExistingFileHelper; +import net.minecraftforge.registries.ForgeRegistries; import java.util.function.Supplier; public class BlockStateGenerator extends BlockStateProvider { - public BlockStateGenerator(DataGenerator gen, ExistingFileHelper exFileHelper) { - super(gen, ActuallyAdditions.MODID, exFileHelper); + public BlockStateGenerator(PackOutput packOutput, ExistingFileHelper exFileHelper) { + super(packOutput, ActuallyAdditions.MODID, exFileHelper); } @Override @@ -207,7 +208,7 @@ public class BlockStateGenerator extends BlockStateProvider { } private void standardBlock(Supplier block) { - ResourceLocation name = block.get().getRegistryName(); + ResourceLocation name = ForgeRegistries.BLOCKS.getKey(block.get()); ModelFile model = new ModelFile.UncheckedModelFile(modLoc("block/" + name.getPath())); assert name != null; @@ -215,7 +216,7 @@ public class BlockStateGenerator extends BlockStateProvider { } private void standardBlockWithCube(Supplier block) { - ResourceLocation name = block.get().getRegistryName(); + ResourceLocation name = ForgeRegistries.BLOCKS.getKey(block.get()); assert name != null; ModelFile model = models().cubeAll(name.toString(), modLoc("block/" + name.getPath())); @@ -223,7 +224,7 @@ public class BlockStateGenerator extends BlockStateProvider { } private void buildLitState(Supplier block) { - ResourceLocation name = block.get().getRegistryName(); + ResourceLocation name = ForgeRegistries.BLOCKS.getKey(block.get()); assert name != null; getVariantBuilder(block.get()) @@ -234,7 +235,7 @@ public class BlockStateGenerator extends BlockStateProvider { } private void fullyDirectionalBlock(Supplier block) { - ResourceLocation name = block.get().getRegistryName(); + ResourceLocation name = ForgeRegistries.BLOCKS.getKey(block.get()); ModelFile model = new ModelFile.UncheckedModelFile(modLoc("block/" + name.toString().split(":")[1])); ModelFile verModel = new ModelFile.UncheckedModelFile(modLoc("block/" + name.toString().split(":")[1] + "_ver")); @@ -243,7 +244,7 @@ public class BlockStateGenerator extends BlockStateProvider { } private void horizontallyDirectionalBlock(Supplier block) { - ResourceLocation name = block.get().getRegistryName(); + ResourceLocation name = ForgeRegistries.BLOCKS.getKey(block.get()); ModelFile model = new ModelFile.UncheckedModelFile(modLoc("block/" + name.toString().split(":")[1])); assert name != null; diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/BlockTagsGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/BlockTagsGenerator.java index 4cbbd38ac..e4fc488ac 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/BlockTagsGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/BlockTagsGenerator.java @@ -3,22 +3,22 @@ package de.ellpeck.actuallyadditions.data; import de.ellpeck.actuallyadditions.api.ActuallyTags; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.tags.BlockTagsProvider; -import net.minecraft.resources.ResourceLocation; +import net.minecraft.core.HolderLookup; +import net.minecraft.data.PackOutput; import net.minecraft.tags.BlockTags; +import net.minecraftforge.common.data.BlockTagsProvider; import net.minecraftforge.common.data.ExistingFileHelper; import javax.annotation.Nullable; -import java.nio.file.Path; +import java.util.concurrent.CompletableFuture; public class BlockTagsGenerator extends BlockTagsProvider { - public BlockTagsGenerator(DataGenerator generatorIn, @Nullable ExistingFileHelper existingFileHelper) { - super(generatorIn, ActuallyAdditions.MODID, existingFileHelper); + public BlockTagsGenerator(PackOutput packOutput, CompletableFuture lookupProvider, @Nullable ExistingFileHelper existingFileHelper) { + super(packOutput, lookupProvider, ActuallyAdditions.MODID, existingFileHelper); } @Override - public void addTags() { + protected void addTags(HolderLookup.Provider provider) { tag(BlockTags.WALLS).add( ActuallyBlocks.ETHETIC_WHITE_WALL.get(), ActuallyBlocks.ETHETIC_GREEN_WALL.get(), @@ -162,13 +162,13 @@ public class BlockTagsGenerator extends BlockTagsProvider { ); } - /** - * Resolves a Path for the location to save the given tag. - */ - @Override - protected Path getPath(ResourceLocation id) { - return this.generator.getOutputFolder().resolve("data/" + id.getNamespace() + "/tags/blocks/" + id.getPath() + ".json"); - } +// /** +// * Resolves a Path for the location to save the given tag. +// */ +// @Override +// protected Path getPath(ResourceLocation id) { +// return this.generator.getOutputFolder().resolve("data/" + id.getNamespace() + "/tags/blocks/" + id.getPath() + ".json"); +// } /** * Gets a name for this provider, to use in logging. diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/ColorChangeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/ColorChangeGenerator.java index 5a1ce8aa3..a728efde8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/ColorChangeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/ColorChangeGenerator.java @@ -4,8 +4,8 @@ import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.crafting.ColorChangeRecipe; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.HashCache; +import net.minecraft.data.CachedOutput; +import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.data.recipes.RecipeProvider; import net.minecraft.resources.ResourceLocation; @@ -13,21 +13,30 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.level.ItemLike; +import net.minecraftforge.registries.ForgeRegistries; +import org.jetbrains.annotations.Nullable; import javax.annotation.Nonnull; -import java.nio.file.Path; +import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; public class ColorChangeGenerator extends RecipeProvider { - public ColorChangeGenerator(DataGenerator p_i48262_1_) { - super(p_i48262_1_); - } - @Override - protected void saveAdvancement(@Nonnull HashCache pCache, @Nonnull JsonObject pAdvancementJson, @Nonnull Path pPath) { + public ColorChangeGenerator(PackOutput packOutput) { + super(packOutput); } @Override - protected void buildCraftingRecipes(@Nonnull Consumer consumer) { + public String getName() { + return "Color Change " + super.getName(); + } + + @Override + protected @Nullable CompletableFuture saveAdvancement(CachedOutput output, FinishedRecipe finishedRecipe, JsonObject advancementJson) { + return null; //Nope... + } + + @Override + protected void buildRecipes(@Nonnull Consumer consumer) { buildWool(consumer); buildStainedGlass(consumer); buildStainedGlassPane(consumer); @@ -193,15 +202,15 @@ public class ColorChangeGenerator extends RecipeProvider { private void changeColor(Consumer consumer, ItemLike output, Ingredient input) { - consumer.accept(new ColorChangeRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "colorchange/" + output.asItem().getRegistryName().getPath()), + consumer.accept(new ColorChangeRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "colorchange/" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), input, output)); } private void changeColor(Consumer consumer, ItemLike output, ItemLike input) { - consumer.accept(new ColorChangeRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "colorchange/" + output.asItem().getRegistryName().getPath()), + consumer.accept(new ColorChangeRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "colorchange/" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), Ingredient.of(input), output)); } private void changeColor(Consumer consumer, ItemLike output, ItemStack input) { - consumer.accept(new ColorChangeRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "colorchange/" + output.asItem().getRegistryName().getPath()), + consumer.accept(new ColorChangeRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "colorchange/" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), Ingredient.of(input), output)); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/CrushingRecipeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/CrushingRecipeGenerator.java index 9c1a88427..ae9c23b91 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/CrushingRecipeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/CrushingRecipeGenerator.java @@ -3,29 +3,35 @@ package de.ellpeck.actuallyadditions.data; import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.crafting.CrushingRecipe; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.HashCache; +import net.minecraft.data.CachedOutput; +import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.data.recipes.RecipeProvider; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; +import org.jetbrains.annotations.Nullable; -import javax.annotation.Nonnull; -import java.nio.file.Path; +import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; public class CrushingRecipeGenerator extends RecipeProvider { - public CrushingRecipeGenerator(DataGenerator p_i48262_1_) { - super(p_i48262_1_); + public CrushingRecipeGenerator(PackOutput packOutput) { + super(packOutput); } @Override - protected void saveAdvancement(@Nonnull HashCache p_208310_1_, @Nonnull JsonObject p_208310_2_, @Nonnull Path p_208310_3_) { + public String getName() { + return "Crushing " + super.getName(); } @Override - protected void buildCraftingRecipes(Consumer consumer) { + protected @Nullable CompletableFuture saveAdvancement(CachedOutput output, FinishedRecipe finishedRecipe, JsonObject advancementJson) { + return null; //Nope... + } + + @Override + protected void buildRecipes(Consumer consumer) { consumer.accept(new CrushingRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "crushing/bone_crusher"), Ingredient.of(Items.BONE), Items.BONE_MEAL, 6, 1.0f , Items.AIR, 0, 0.0f)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/DamageTypeTagsGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/DamageTypeTagsGenerator.java new file mode 100644 index 000000000..017acd3d1 --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/data/DamageTypeTagsGenerator.java @@ -0,0 +1,25 @@ +package de.ellpeck.actuallyadditions.data; + +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +import de.ellpeck.actuallyadditions.mod.misc.ActuallyDamageTypes; +import net.minecraft.core.HolderLookup; +import net.minecraft.data.PackOutput; +import net.minecraft.data.tags.DamageTypeTagsProvider; +import net.minecraft.tags.DamageTypeTags; +import net.minecraftforge.common.data.ExistingFileHelper; +import org.jetbrains.annotations.Nullable; + +import java.util.concurrent.CompletableFuture; + +public class DamageTypeTagsGenerator extends DamageTypeTagsProvider { + public DamageTypeTagsGenerator(PackOutput pOutput, CompletableFuture pLookupProvider, @Nullable ExistingFileHelper existingFileHelper) { + super(pOutput, pLookupProvider, ActuallyAdditions.MODID, existingFileHelper); + } + + @Override + protected void addTags(HolderLookup.Provider pProvider) { + tag(DamageTypeTags.BYPASSES_ARMOR).add( + ActuallyDamageTypes.ATOMIC_RECONSTRUCTOR + ); + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/EmpoweringRecipeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/EmpoweringRecipeGenerator.java index 86ab36c19..262e19f08 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/EmpoweringRecipeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/EmpoweringRecipeGenerator.java @@ -6,13 +6,12 @@ import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.crafting.EmpowererRecipe; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import de.ellpeck.actuallyadditions.mod.items.metalists.Crystals; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.HashCache; +import net.minecraft.data.CachedOutput; +import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.data.recipes.RecipeProvider; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; -import net.minecraft.tags.Tag; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; @@ -20,23 +19,31 @@ import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.level.ItemLike; import net.minecraftforge.common.Tags; +import net.minecraftforge.registries.ForgeRegistries; +import org.jetbrains.annotations.Nullable; -import java.nio.file.Path; import java.util.ArrayList; import java.util.List; +import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; public class EmpoweringRecipeGenerator extends RecipeProvider { - public EmpoweringRecipeGenerator(DataGenerator p_i48262_1_) { - super(p_i48262_1_); + public EmpoweringRecipeGenerator(PackOutput packOutput) { + super(packOutput); } @Override - protected void saveAdvancement(HashCache pCache, JsonObject pAdvancementJson, Path pPath) { + public String getName() { + return "Empowering " + super.getName(); } @Override - protected void buildCraftingRecipes(Consumer consumer) { + protected @Nullable CompletableFuture saveAdvancement(CachedOutput output, FinishedRecipe finishedRecipe, JsonObject advancementJson) { + return null; //Nope... + } + + @Override + protected void buildRecipes(Consumer consumer) { EmpoweringBuilder.builder(ActuallyItems.EMPOWERED_RESTONIA_CRYSTAL.get(), ActuallyItems.RESTONIA_CRYSTAL.get(), 5000, 50, Crystals.REDSTONE.conversionColorParticles) .addModifier(Tags.Items.DYES_RED) .addModifier(Items.NETHER_BRICK) @@ -133,14 +140,14 @@ public class EmpoweringRecipeGenerator extends RecipeProvider { public EmpoweringBuilder addModifier(ItemLike input) { if (modifiers.size() >= 4) - throw new IllegalStateException("too many modifiers for empowering recipe, input: " + input.asItem().getRegistryName()); + throw new IllegalStateException("too many modifiers for empowering recipe, input: " + ForgeRegistries.ITEMS.getKey(input.asItem())); modifiers.add(Ingredient.of(input)); return this; } public EmpoweringBuilder addModifier(ItemStack input) { if (modifiers.size() >= 4) - throw new IllegalStateException("too many modifiers for empowering recipe, input: " + input.getItem().getRegistryName()); + throw new IllegalStateException("too many modifiers for empowering recipe, input: " + ForgeRegistries.ITEMS.getKey(input.getItem())); modifiers.add(Ingredient.of(input)); return this; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/FuelRecipeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/FuelRecipeGenerator.java index 528ec0b66..cfc0b60cd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/FuelRecipeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/FuelRecipeGenerator.java @@ -6,8 +6,8 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.crafting.LiquidFuelRecipe; import de.ellpeck.actuallyadditions.mod.crafting.SolidFuelRecipe; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.HashCache; +import net.minecraft.data.CachedOutput; +import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.data.recipes.RecipeProvider; import net.minecraft.resources.ResourceLocation; @@ -16,23 +16,29 @@ import net.minecraft.world.item.Item; import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; import net.minecraftforge.fluids.FluidStack; +import org.jetbrains.annotations.Nullable; import javax.annotation.Nonnull; -import java.nio.file.Path; +import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; public class FuelRecipeGenerator extends RecipeProvider { - public FuelRecipeGenerator(DataGenerator pGenerator) { - super(pGenerator); + public FuelRecipeGenerator(PackOutput packOutput) { + super(packOutput); } @Override - protected void saveAdvancement(@Nonnull HashCache pCache, @Nonnull JsonObject pAdvancementJson, @Nonnull Path pPath) { - //Nah + public String getName() { + return "Fuel " + super.getName(); } @Override - protected void buildCraftingRecipes(@Nonnull Consumer consumer) { + protected @Nullable CompletableFuture saveAdvancement(CachedOutput output, FinishedRecipe finishedRecipe, JsonObject advancementJson) { + return null; //Nope... + } + + @Override + protected void buildRecipes(@Nonnull Consumer consumer) { addSolid(consumer, "coal", Items.COAL, 32000, 1600); addSolid(consumer, "stick", Items.STICK, 2000, 100); addSolid(consumer, "tiny-coal", ActuallyTags.Items.TINY_COALS, 4000, 200); diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/ItemModelGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/ItemModelGenerator.java index 3c5500894..b4dc68736 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/ItemModelGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/ItemModelGenerator.java @@ -6,23 +6,24 @@ import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.fluids.FluidAA; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.data.DataGenerator; +import net.minecraft.data.PackOutput; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.WallBlock; import net.minecraftforge.client.model.generators.ItemModelProvider; import net.minecraftforge.client.model.generators.ModelFile; -import net.minecraftforge.client.model.generators.loaders.DynamicBucketModelBuilder; +import net.minecraftforge.client.model.generators.loaders.DynamicFluidContainerModelBuilder; import net.minecraftforge.common.data.ExistingFileHelper; +import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; import java.util.Set; import java.util.function.Supplier; public class ItemModelGenerator extends ItemModelProvider { - public ItemModelGenerator(DataGenerator generator, ExistingFileHelper existingFileHelper) { - super(generator, ActuallyAdditions.MODID, existingFileHelper); + public ItemModelGenerator(PackOutput packOutput, ExistingFileHelper existingFileHelper) { + super(packOutput, ActuallyAdditions.MODID, existingFileHelper); } @Override @@ -60,7 +61,7 @@ public class ItemModelGenerator extends ItemModelProvider { generateBucket(InitFluids.EMPOWERED_OIL); - String wormpath = ActuallyItems.WORM.get().getRegistryName().getPath(); + String wormpath = ActuallyItems.WORM.getId().getPath(); singleTexture(wormpath, mcLoc("item/handheld"), "layer0", modLoc("item/" + wormpath)) .override().predicate(new ResourceLocation(ActuallyAdditions.MODID, "snail"), 1F) .model(singleTexture("snail", mcLoc("item/handheld"), "layer0", modLoc("item/snail"))).end(); @@ -71,12 +72,12 @@ public class ItemModelGenerator extends ItemModelProvider { } private void generateBucket(FluidAA fluidSupplier) { - withExistingParent(fluidSupplier.getBucket().getRegistryName().getPath(), "forge:item/bucket") - .customLoader((builder, template) -> DynamicBucketModelBuilder.begin(builder, template).fluid(fluidSupplier.get())); + withExistingParent(ForgeRegistries.ITEMS.getKey(fluidSupplier.getBucket()).getPath(), "forge:item/bucket") + .customLoader((builder, template) -> DynamicFluidContainerModelBuilder.begin(builder, template).fluid(fluidSupplier.get())); } private void registerBlockModel(RegistryObject block) { - String path = block.get().getRegistryName().getPath(); + String path = block.getId().getPath(); if (block.get() instanceof WallBlock) { String name = path; path = "block/" + path.replace("_wall", "_block"); @@ -88,7 +89,7 @@ public class ItemModelGenerator extends ItemModelProvider { } private void simpleItem(Supplier item) { - String path = item.get().getRegistryName().getPath(); + String path = ForgeRegistries.ITEMS.getKey(item.get()).getPath(); singleTexture(path, mcLoc("item/handheld"), "layer0", modLoc("item/" + path)); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/ItemRecipeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/ItemRecipeGenerator.java index 8ac3bf6c4..bbd7b87ab 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/ItemRecipeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/ItemRecipeGenerator.java @@ -8,9 +8,10 @@ import de.ellpeck.actuallyadditions.mod.crafting.ActuallyRecipes; import de.ellpeck.actuallyadditions.mod.crafting.TargetNBTIngredient; import de.ellpeck.actuallyadditions.mod.crafting.WrappedRecipe; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.HashCache; +import net.minecraft.data.CachedOutput; +import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; +import net.minecraft.data.recipes.RecipeCategory; import net.minecraft.data.recipes.RecipeProvider; import net.minecraft.data.recipes.ShapedRecipeBuilder; import net.minecraft.data.recipes.ShapelessRecipeBuilder; @@ -23,22 +24,28 @@ import net.minecraft.world.item.enchantment.Enchantments; import net.minecraft.world.level.ItemLike; import net.minecraftforge.common.Tags; import net.minecraftforge.common.crafting.ConditionalRecipe; -import net.minecraftforge.common.crafting.NBTIngredient; +import net.minecraftforge.common.crafting.StrictNBTIngredient; import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; +import org.jetbrains.annotations.Nullable; import javax.annotation.Nonnull; -import java.nio.file.Path; import java.util.Arrays; +import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; public class ItemRecipeGenerator extends RecipeProvider { - public ItemRecipeGenerator(DataGenerator generatorIn) { - super(generatorIn); + public ItemRecipeGenerator(PackOutput packOutput) { + super(packOutput); } @Override - protected void buildCraftingRecipes(Consumer consumer) { + public String getName() { + return "Item " + super.getName(); + } + + @Override + protected void buildRecipes(Consumer consumer) { generatePaxels(consumer); //Goggles @@ -149,7 +156,7 @@ public class ItemRecipeGenerator extends RecipeProvider { Recipe.shapeless(ActuallyItems.LENS_OF_THE_KILLER.get()) .requires(Items.DIAMOND_SWORD) .requires(ActuallyItems.LENS_OF_CERTAIN_DEATH.get()) - .requires(NBTIngredient.of(enchantedBook)).save(consumer); + .requires(StrictNBTIngredient.of(enchantedBook)).save(consumer); //Filter @@ -551,10 +558,9 @@ public class ItemRecipeGenerator extends RecipeProvider { decompress(consumer, shard, crystal); } - @Override - protected void saveAdvancement(HashCache cache, JsonObject cache2, Path advancementJson) { - //Nope... + protected @Nullable CompletableFuture saveAdvancement(CachedOutput output, FinishedRecipe finishedRecipe, JsonObject advancementJson) { + return null; //Nope... } public static void addToolAndArmorRecipes(Consumer consumer, RegistryObject base, RegistryObject pickaxe, RegistryObject sword, RegistryObject axe, RegistryObject shovel, RegistryObject hoe, RegistryObject helm, RegistryObject chest, RegistryObject pants, RegistryObject boots) { @@ -642,7 +648,7 @@ public class ItemRecipeGenerator extends RecipeProvider { } public Shapeless(ItemLike result, int countIn) { - super(result, countIn); + super(RecipeCategory.MISC, result, countIn); } public ItemRecipeGenerator.Recipe.Shapeless ingredients(ItemLike... ingredients) { @@ -677,7 +683,7 @@ public class ItemRecipeGenerator extends RecipeProvider { } public Shaped(ItemLike resultIn, int countIn) { - super(resultIn, countIn); + super(RecipeCategory.MISC, resultIn, countIn); } public ItemRecipeGenerator.Recipe.Shaped pattern(String line1, String line2, String line3) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/ItemTagsGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/ItemTagsGenerator.java index 20bb76439..d4ea4a216 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/ItemTagsGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/ItemTagsGenerator.java @@ -3,20 +3,23 @@ package de.ellpeck.actuallyadditions.data; import de.ellpeck.actuallyadditions.api.ActuallyTags; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.tags.BlockTagsProvider; +import net.minecraft.core.HolderLookup; +import net.minecraft.data.PackOutput; import net.minecraft.data.tags.ItemTagsProvider; +import net.minecraft.data.tags.TagsProvider; +import net.minecraft.world.level.block.Block; import net.minecraftforge.common.data.ExistingFileHelper; -import javax.annotation.Nullable; +import java.util.concurrent.CompletableFuture; public class ItemTagsGenerator extends ItemTagsProvider { - public ItemTagsGenerator(DataGenerator dataGenerator, BlockTagsProvider blockTagProvider, @Nullable ExistingFileHelper existingFileHelper) { - super(dataGenerator, blockTagProvider, ActuallyAdditions.MODID, existingFileHelper); + public ItemTagsGenerator(PackOutput packOutput, CompletableFuture lookupProvider, + TagsProvider blockTagProvider, ExistingFileHelper existingFileHelper) { + super(packOutput, lookupProvider, blockTagProvider.contentsGetter(), ActuallyAdditions.MODID, existingFileHelper); } @Override - protected void addTags() { + protected void addTags(HolderLookup.Provider provider) { tag(ActuallyTags.Items.COFFEE_BEANS) .add(ActuallyItems.COFFEE_BEANS.get()); tag(ActuallyTags.Items.TINY_COALS) diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/LaserRecipeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/LaserRecipeGenerator.java index 88e8676b7..6265fbe17 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/LaserRecipeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/LaserRecipeGenerator.java @@ -5,34 +5,41 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.crafting.LaserRecipe; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.HashCache; +import net.minecraft.data.CachedOutput; +import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.data.recipes.RecipeProvider; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.ItemTags; -import net.minecraft.tags.Tag; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.level.ItemLike; import net.minecraftforge.common.Tags; +import net.minecraftforge.registries.ForgeRegistries; +import org.jetbrains.annotations.Nullable; -import java.nio.file.Path; +import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; public class LaserRecipeGenerator extends RecipeProvider { - public LaserRecipeGenerator(DataGenerator p_i48262_1_) { - super(p_i48262_1_); + public LaserRecipeGenerator(PackOutput packOutput) { + super(packOutput); } @Override - protected void saveAdvancement(HashCache pCache, JsonObject pAdvancementJson, Path pPath) { + public String getName() { + return "Laser " + super.getName(); } @Override - protected void buildCraftingRecipes(Consumer consumer) { + protected @Nullable CompletableFuture saveAdvancement(CachedOutput output, FinishedRecipe finishedRecipe, JsonObject advancementJson) { + return null; //Nope... + } + + @Override + protected void buildRecipes(Consumer consumer) { //Crystal Blocks laserCrystalizeRecipe(consumer, ActuallyBlocks.RESTONIA_CRYSTAL.getItem(), Tags.Items.STORAGE_BLOCKS_REDSTONE, 400); laserCrystalizeRecipe(consumer, ActuallyBlocks.PALIS_CRYSTAL.getItem(), Tags.Items.STORAGE_BLOCKS_LAPIS, 400); @@ -72,27 +79,27 @@ public class LaserRecipeGenerator extends RecipeProvider { } private void laserRecipe(Consumer consumer, ItemLike output, Ingredient input, int energy) { - consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/" + output.asItem().getRegistryName().getPath()), + consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), input, energy, output)); } private void laserRecipe(Consumer consumer, ItemLike output, TagKey input, int energy) { - consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/" + output.asItem().getRegistryName().getPath()), + consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), Ingredient.of(input), energy, output)); } private void laserRecipe(Consumer consumer, ItemLike output, ItemLike input, int energy) { - consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/" + output.asItem().getRegistryName().getPath()), + consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), Ingredient.of(input), energy, output)); } private void laserCrystalizeRecipe(Consumer consumer, ItemLike output, Ingredient input, int energy) { - consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/crystalize_" + output.asItem().getRegistryName().getPath()), + consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/crystalize_" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), input, energy, output)); } private void laserCrystalizeRecipe(Consumer consumer, ItemLike output, TagKey input, int energy) { - consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/crystalize_" + output.asItem().getRegistryName().getPath()), + consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/crystalize_" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), Ingredient.of(input), energy, output)); } private void laserCrystalizeRecipe(Consumer consumer, ItemLike output, ItemLike input, int energy) { - consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/crystalize_" + output.asItem().getRegistryName().getPath()), + consumer.accept(new LaserRecipe.Result(new ResourceLocation(ActuallyAdditions.MODID, "laser/crystalize_" + ForgeRegistries.ITEMS.getKey(output.asItem()).getPath()), Ingredient.of(input), energy, output)); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/LootTableGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/LootTableGenerator.java index f09b3ccc6..e445a6b71 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/LootTableGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/LootTableGenerator.java @@ -1,28 +1,25 @@ package de.ellpeck.actuallyadditions.data; -import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; -import com.mojang.datafixers.util.Pair; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import net.minecraft.advancements.critereon.StatePropertiesPredicate; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.loot.BlockLoot; +import net.minecraft.data.PackOutput; +import net.minecraft.data.loot.BlockLootSubProvider; import net.minecraft.data.loot.LootTableProvider; import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.flag.FeatureFlags; import net.minecraft.world.item.Item; import net.minecraft.world.item.Items; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.CropBlock; import net.minecraft.world.level.storage.loot.LootPool; import net.minecraft.world.level.storage.loot.LootTable; -import net.minecraft.world.level.storage.loot.LootTables; import net.minecraft.world.level.storage.loot.ValidationContext; import net.minecraft.world.level.storage.loot.entries.LootItem; import net.minecraft.world.level.storage.loot.functions.CopyNbtFunction; -import net.minecraft.world.level.storage.loot.parameters.LootContextParamSet; import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets; import net.minecraft.world.level.storage.loot.predicates.LootItemBlockStatePropertyCondition; import net.minecraft.world.level.storage.loot.providers.nbt.ContextNbtProvider; @@ -33,29 +30,30 @@ import javax.annotation.Nonnull; import java.util.List; import java.util.Map; import java.util.Set; -import java.util.function.BiConsumer; import java.util.function.Consumer; import java.util.function.Supplier; import java.util.stream.Collectors; public class LootTableGenerator extends LootTableProvider { - public LootTableGenerator(DataGenerator p_i50789_1_) { - super(p_i50789_1_); - } - @Nonnull - @Override - protected List>>, LootContextParamSet>> getTables() { - return ImmutableList.of(Pair.of(Blocks::new, LootContextParamSets.BLOCK)); + public LootTableGenerator(PackOutput packOutput) { + super(packOutput, Set.of(), List.of( + new SubProviderEntry(Blocks::new, LootContextParamSets.BLOCK) + )); } @Override protected void validate(Map map, @Nonnull ValidationContext validationtracker) { - map.forEach((name, table) -> LootTables.validate(validationtracker, name, table)); + map.forEach((name, table) -> table.validate(validationtracker)); } - public static class Blocks extends BlockLoot { + public static class Blocks extends BlockLootSubProvider { + + protected Blocks() { + super(Set.of(), FeatureFlags.REGISTRY.allFlags()); + } + @Override - protected void addTables() { + protected void generate() { CopyNbtFunction.Builder copyEnergy = CopyNbtFunction.copyData(ContextNbtProvider.BLOCK_ENTITY).copy("Energy", "BlockEntityTag.Energy"); CopyNbtFunction.Builder copyPulseMode = CopyNbtFunction.copyData(ContextNbtProvider.BLOCK_ENTITY).copy("IsPulseMode", "BlockEntityTag.IsPulseMode"); diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/MiningLensGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/MiningLensGenerator.java index 9b2e70442..7aed2a5c8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/MiningLensGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/MiningLensGenerator.java @@ -3,34 +3,39 @@ package de.ellpeck.actuallyadditions.data; import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.crafting.MiningLensRecipe; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.HashCache; +import net.minecraft.data.CachedOutput; +import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.data.recipes.RecipeProvider; import net.minecraft.resources.ResourceLocation; -import net.minecraft.tags.Tag; import net.minecraft.tags.TagKey; import net.minecraft.world.item.Item; import net.minecraft.world.item.Items; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.level.ItemLike; import net.minecraftforge.common.Tags; -import net.minecraftforge.registries.ForgeRegistries; +import org.jetbrains.annotations.Nullable; -import java.nio.file.Path; +import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; public class MiningLensGenerator extends RecipeProvider { - public MiningLensGenerator(DataGenerator pGenerator) { - super(pGenerator); + public MiningLensGenerator(PackOutput packOutput) { + super(packOutput); } @Override - protected void saveAdvancement(HashCache pCache, JsonObject pAdvancementJson, Path pPath) { + public String getName() { + return "Mining Lens " + super.getName(); } @Override - protected void buildCraftingRecipes(Consumer consumer) { + protected @Nullable CompletableFuture saveAdvancement(CachedOutput output, FinishedRecipe finishedRecipe, JsonObject advancementJson) { + return null; //Nope... + } + + @Override + protected void buildRecipes(Consumer consumer) { buildMiningLens(consumer); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/MiscMachineRecipeGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/MiscMachineRecipeGenerator.java index d3255f594..932fbcb33 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/MiscMachineRecipeGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/MiscMachineRecipeGenerator.java @@ -6,30 +6,35 @@ import de.ellpeck.actuallyadditions.mod.crafting.FermentingRecipe; import de.ellpeck.actuallyadditions.mod.crafting.PressingRecipe; import de.ellpeck.actuallyadditions.mod.fluids.InitFluids; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.data.DataGenerator; -import net.minecraft.data.HashCache; +import net.minecraft.data.CachedOutput; +import net.minecraft.data.PackOutput; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.data.recipes.RecipeProvider; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.crafting.Ingredient; -import net.minecraft.world.level.ItemLike; import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.registries.ForgeRegistries; +import org.jetbrains.annotations.Nullable; -import java.nio.file.Path; +import java.util.concurrent.CompletableFuture; import java.util.function.Consumer; public class MiscMachineRecipeGenerator extends RecipeProvider { - public MiscMachineRecipeGenerator(DataGenerator pGenerator) { - super(pGenerator); + public MiscMachineRecipeGenerator(PackOutput packOutput) { + super(packOutput); } @Override - protected void saveAdvancement(HashCache pCache, JsonObject pAdvancementJson, Path pPath) { + public String getName() { + return "Misc " + super.getName(); } @Override - protected void buildCraftingRecipes(Consumer consumer) { + protected @Nullable CompletableFuture saveAdvancement(CachedOutput output, FinishedRecipe finishedRecipe, JsonObject advancementJson) { + return null; //Nope... + } + + @Override + protected void buildRecipes(Consumer consumer) { consumer.accept(new PressingRecipe.Result(folderRecipe("pressing", "canola"), Ingredient.of(ActuallyItems.CANOLA.get()), new FluidStack(InitFluids.CANOLA_OIL.get(), 80))); diff --git a/src/main/java/de/ellpeck/actuallyadditions/data/SoundsGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/data/SoundsGenerator.java index 260cd0af0..99cdb69fe 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/data/SoundsGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/data/SoundsGenerator.java @@ -2,15 +2,15 @@ package de.ellpeck.actuallyadditions.data; import de.ellpeck.actuallyadditions.mod.AASounds; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.data.DataGenerator; +import net.minecraft.data.PackOutput; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.common.data.ExistingFileHelper; import net.minecraftforge.common.data.SoundDefinitionsProvider; public class SoundsGenerator extends SoundDefinitionsProvider { - protected SoundsGenerator(DataGenerator generator, ExistingFileHelper helper) { - super(generator, ActuallyAdditions.MODID, helper); + protected SoundsGenerator(PackOutput packOutput, ExistingFileHelper helper) { + super(packOutput, ActuallyAdditions.MODID, helper); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/AASounds.java b/src/main/java/de/ellpeck/actuallyadditions/mod/AASounds.java index 811ab818b..730fb984b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/AASounds.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/AASounds.java @@ -10,10 +10,10 @@ import net.minecraftforge.registries.RegistryObject; public class AASounds { public static final DeferredRegister SOUNDS = DeferredRegister.create(ForgeRegistries.SOUND_EVENTS, ActuallyAdditions.MODID); - public static RegistryObject RECONSTRUCTOR = SOUNDS.register("reconstructor", () -> new SoundEvent(new ResourceLocation(ActuallyAdditions.MODID, "reconstructor"))); - public static RegistryObject CRUSHER = SOUNDS.register("crusher", () -> new SoundEvent(new ResourceLocation(ActuallyAdditions.MODID, "crusher"))); - public static RegistryObject COFFEE_MACHINE = SOUNDS.register("coffee_machine", () -> new SoundEvent(new ResourceLocation(ActuallyAdditions.MODID, "coffee_machine"))); - public static RegistryObject DUH_DUH_DUH_DUUUH = SOUNDS.register("duh_duh_duh_duuuh", () -> new SoundEvent(new ResourceLocation(ActuallyAdditions.MODID, "duh_duh_duh_duuuh"))); + public static RegistryObject RECONSTRUCTOR = SOUNDS.register("reconstructor", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ActuallyAdditions.MODID, "reconstructor"))); + public static RegistryObject CRUSHER = SOUNDS.register("crusher", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ActuallyAdditions.MODID, "crusher"))); + public static RegistryObject COFFEE_MACHINE = SOUNDS.register("coffee_machine", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ActuallyAdditions.MODID, "coffee_machine"))); + public static RegistryObject DUH_DUH_DUH_DUUUH = SOUNDS.register("duh_duh_duh_duuuh", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ActuallyAdditions.MODID, "duh_duh_duh_duuuh"))); public static void init(IEventBus bus) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java index 2f86bea70..1e9014a3f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyAdditions.java @@ -39,13 +39,10 @@ import de.ellpeck.actuallyadditions.mod.util.ResourceReloader; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.MobCategory; -import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.Item; -import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.client.event.ParticleFactoryRegisterEvent; +import net.minecraftforge.client.event.RegisterParticleProvidersEvent; import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.crafting.CraftingHelper; import net.minecraftforge.event.AddReloadListenerEvent; @@ -79,16 +76,9 @@ public class ActuallyAdditions { public static final String GUIFACTORY = "de.ellpeck.actuallyadditions.mod.config.GuiFactory"; public static final String DEPS = "required:forge@[14.23.5.2836,);before:craftingtweaks;after:fastbench@[1.3.2,)"; - public static final CreativeModeTab GROUP = new CreativeModeTab(MODID) { - @OnlyIn(Dist.CLIENT) - @Override - public ItemStack makeIcon() { - return new ItemStack(ActuallyItems.ITEM_BOOKLET.get()); - } - }; public static final Logger LOGGER = LogManager.getLogger(NAME); - public static final DeferredRegister> ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITIES, MODID); + public static final DeferredRegister> ENTITIES = DeferredRegister.create(ForgeRegistries.ENTITY_TYPES, MODID); public static final RegistryObject> ENTITY_WORM = ENTITIES.register("worm", () -> EntityType.Builder.of(EntityWorm::new, MobCategory.MISC).build(MODID + ":worm")); public static boolean commonCapsLoaded; @@ -100,6 +90,7 @@ public class ActuallyAdditions { ActuallyBlocks.init(eventBus); ActuallyItems.init(eventBus); + ActuallyTabs.init(eventBus); ActuallyRecipes.init(eventBus); AASounds.init(eventBus); ActuallyContainers.CONTAINERS.register(eventBus); @@ -165,7 +156,7 @@ public class ActuallyAdditions { ActuallyAdditionsClient.setup(event); } - private void particleFactoryRegister(ParticleFactoryRegisterEvent event) { + private void particleFactoryRegister(RegisterParticleProvidersEvent event) { ActuallyAdditionsClient.registerParticleFactories(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyTabs.java b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyTabs.java new file mode 100644 index 000000000..a55fe9b43 --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/ActuallyTabs.java @@ -0,0 +1,36 @@ +package de.ellpeck.actuallyadditions.mod; + +import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; +import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; +import net.minecraft.core.registries.Registries; +import net.minecraft.network.chat.Component; +import net.minecraft.world.item.CreativeModeTab; +import net.minecraft.world.item.CreativeModeTabs; +import net.minecraft.world.item.ItemStack; +import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.registries.DeferredRegister; + +import java.util.List; +import java.util.function.Supplier; + +public class ActuallyTabs { + public static final DeferredRegister CREATIVE_MODE_TABS = DeferredRegister.create(Registries.CREATIVE_MODE_TAB, ActuallyAdditions.MODID); + + public static final Supplier GROUP = CREATIVE_MODE_TABS.register("tab", () -> CreativeModeTab.builder() + .icon(() -> ActuallyItems.ITEM_BOOKLET.get().getDefaultInstance()) + .withTabsBefore(CreativeModeTabs.SPAWN_EGGS) + .title(Component.translatable("itemGroup.actuallyadditions")) + .displayItems((parameters, output) -> { + List stacks = ActuallyItems.ITEMS.getEntries().stream().map(reg -> new ItemStack(reg.get())).toList(); + stacks.forEach(stack -> { + if(stack.getItem() instanceof ItemEnergy itemEnergy) { + stack.getOrCreateTag().putDouble("Energy", itemEnergy.getMaxEnergyStored(stack)); + } + }); + output.acceptAll(stacks); + }).build()); + + public static void init(IEventBus evt) { + CREATIVE_MODE_TABS.register(evt); + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/ClientRegistryHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/ClientRegistryHandler.java index 1190516b9..ecb790eb8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/ClientRegistryHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/ClientRegistryHandler.java @@ -3,8 +3,8 @@ package de.ellpeck.actuallyadditions.mod; import net.minecraft.client.resources.model.ModelResourceLocation; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.material.Fluid; -import net.minecraftforge.client.event.ModelBakeEvent; -import net.minecraftforge.client.event.ModelRegistryEvent; +import net.minecraftforge.client.event.ModelEvent.BakingCompleted; +import net.minecraftforge.client.event.ModelEvent.RegisterGeometryLoaders; import net.minecraftforge.eventbus.api.SubscribeEvent; import java.util.HashMap; @@ -30,7 +30,7 @@ public class ClientRegistryHandler { } @SubscribeEvent - public void onModelRegistry(ModelRegistryEvent event) { + public void onModelRegistry(RegisterGeometryLoaders event) { // for (Block block : RegistryHandler.BLOCKS_TO_REGISTER) { // if (block instanceof IHasModel) { // ((IHasModel) block).registerRendering(); @@ -48,7 +48,7 @@ public class ClientRegistryHandler { } @SubscribeEvent - public void onModelBake(ModelBakeEvent e) { + public void onModelBake(BakingCompleted e) { // ModelResourceLocation mrl = new ModelResourceLocation(new ResourceLocation(ActuallyAdditions.MODID, "block_compost"), "normal"); // CompostModel.compostBase = e.getModelRegistry().getObject(mrl); // e.getModelRegistry().putObject(mrl, new ActualCompostModel()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/AABlockItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/AABlockItem.java index 5ed14c274..654ba979a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/AABlockItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/AABlockItem.java @@ -2,7 +2,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemNameBlockItem; import net.minecraft.world.item.ItemStack; @@ -46,7 +45,7 @@ public class AABlockItem extends BlockItem { energy = BET.getInt("Energy"); } NumberFormat format = NumberFormat.getInstance(); - pTooltip.add(new TranslatableComponent("misc.actuallyadditions.power_single", format.format(energy))); + pTooltip.add(Component.translatable("misc.actuallyadditions.power_single", format.format(energy))); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlock.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlock.java index 3e83bcc53..a16653c84 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlock.java @@ -1,6 +1,5 @@ package de.ellpeck.actuallyadditions.mod.blocks; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.SlabBlock; @@ -27,7 +26,7 @@ public class ActuallyBlock extends Block implements IActuallyBlock { @Override public Item.Properties getItemProperties() { - return new Item.Properties().tab(ActuallyAdditions.GROUP); + return new Item.Properties(); } public static class Stairs extends StairBlock implements IActuallyBlock { @@ -42,7 +41,7 @@ public class ActuallyBlock extends Block implements IActuallyBlock { @Override public Item.Properties getItemProperties() { - return new Item.Properties().tab(ActuallyAdditions.GROUP); + return new Item.Properties(); } } @@ -58,7 +57,7 @@ public class ActuallyBlock extends Block implements IActuallyBlock { @Override public Item.Properties getItemProperties() { - return new Item.Properties().tab(ActuallyAdditions.GROUP); + return new Item.Properties(); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlocks.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlocks.java index 48f96bb33..10b84d788 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlocks.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/ActuallyBlocks.java @@ -64,13 +64,15 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier; import de.ellpeck.actuallyadditions.registration.AABlockReg; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.SlabBlock; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.StairBlock; import net.minecraft.world.level.block.WallBlock; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockBehaviour; -import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; import net.minecraftforge.eventbus.api.IEventBus; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; @@ -79,11 +81,11 @@ import java.util.function.Supplier; public final class ActuallyBlocks { public static final DeferredRegister BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ActuallyAdditions.MODID); - public static final DeferredRegister> TILES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITIES, ActuallyAdditions.MODID); + public static final DeferredRegister> TILES = DeferredRegister.create(ForgeRegistries.BLOCK_ENTITY_TYPES, ActuallyAdditions.MODID); - public static final Item.Properties defaultBlockItemProperties = new Item.Properties().tab(ActuallyAdditions.GROUP).stacksTo(64); + public static final Item.Properties defaultBlockItemProperties = new Item.Properties().stacksTo(64); - public static final BlockBehaviour.Properties miscBlockProperties = BlockBehaviour.Properties.of(Material.STONE).requiresCorrectToolForDrops().strength(1.5f, 10f); + public static final BlockBehaviour.Properties miscBlockProperties = BlockBehaviour.Properties.copy(Blocks.STONE).requiresCorrectToolForDrops().strength(1.5f, 10f); // Casings public static final AABlockReg WOOD_CASING = new AABlockReg<>("wood_casing", () -> new ActuallyBlock(miscBlockProperties), ActuallyBlock::createBlockItem); @@ -316,15 +318,15 @@ public final class ActuallyBlocks { (b) -> new AABlockItem(b, defaultBlockItemProperties)); public static BlockBehaviour.Properties defaultPickProps(float hardness, float resistance) { - return BlockBehaviour.Properties.of(Material.STONE).requiresCorrectToolForDrops().strength(hardness, resistance).sound(SoundType.STONE); + return BlockBehaviour.Properties.copy(Blocks.STONE).requiresCorrectToolForDrops().strength(hardness, resistance).sound(SoundType.STONE); } public static BlockBehaviour.Properties defaultPickProps() { - return BlockBehaviour.Properties.of(Material.STONE).requiresCorrectToolForDrops().strength(1.5F, 10.0F).sound(SoundType.STONE); + return BlockBehaviour.Properties.copy(Blocks.STONE).requiresCorrectToolForDrops().strength(1.5F, 10.0F).sound(SoundType.STONE); } public static BlockBehaviour.Properties defaultCropProps() { - return BlockBehaviour.Properties.of(Material.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.CROP); + return BlockBehaviour.Properties.of().mapColor(MapColor.PLANT).pushReaction(PushReaction.DESTROY).noCollission().randomTicks().instabreak().sound(SoundType.CROP); } public static void init(IEventBus evt) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java index e51595fd6..df2c55733 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockAtomicReconstructor.java @@ -11,18 +11,18 @@ package de.ellpeck.actuallyadditions.mod.blocks; import com.mojang.blaze3d.platform.Window; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.mod.blocks.base.FullyDirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.util.Mth; +import net.minecraft.util.RandomSource; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; @@ -46,7 +46,6 @@ import javax.annotation.Nonnull; import javax.annotation.Nullable; import java.text.NumberFormat; import java.util.List; -import java.util.Random; public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container implements IHudDisplay { public static final DirectionProperty FACING = BlockStateProperties.FACING; @@ -106,7 +105,7 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im @Override @OnlyIn(Dist.CLIENT) - public void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { + public void displayHud(GuiGraphics guiGraphics, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { if (!(rayCast instanceof BlockHitResult) || minecraft.level == null) { return; } @@ -116,13 +115,13 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im ItemStack slot = ((TileEntityAtomicReconstructor) tile).inv.getStackInSlot(0); Component lens_name; if (slot.isEmpty()) { - lens_name = new TranslatableComponent("info.actuallyadditions.nolens"); + lens_name = Component.translatable("info.actuallyadditions.nolens"); } else { lens_name = slot.getItem().getName(slot); AssetUtil.renderStackToGui(slot, resolution.getGuiScaledWidth() / 2 + 15, resolution.getGuiScaledHeight() / 2 - 19, 1F); } - minecraft.font.drawShadow(matrices, lens_name.plainCopy().withStyle(ChatFormatting.YELLOW).withStyle(ChatFormatting.ITALIC).getString(), resolution.getGuiScaledWidth() / 2.0f + 35, resolution.getGuiScaledHeight() / 2.0f - 15, 0xFFFFFF); + guiGraphics.drawString(minecraft.font, lens_name.plainCopy().withStyle(ChatFormatting.YELLOW).withStyle(ChatFormatting.ITALIC).getString(), (int) (resolution.getGuiScaledWidth() / 2.0f + 35), (int) (resolution.getGuiScaledHeight() / 2.0f - 15), 0xFFFFFF); } } @@ -148,14 +147,14 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im if (this.lastSysTime + 3000 < sysTime) { this.lastSysTime = sysTime; if (Minecraft.getInstance().level != null) { - Random random = Minecraft.getInstance().level.random; + RandomSource random = Minecraft.getInstance().level.random; this.toPick1 = random.nextInt(NAME_FLAVOR_AMOUNTS_1) + 1; this.toPick2 = random.nextInt(NAME_FLAVOR_AMOUNTS_2) + 1; } } String base = block.getDescriptionId() + ".info."; - pTooltip.add(new TranslatableComponent(base + "1." + this.toPick1).append(" ").append(new TranslatableComponent(base + "2." + this.toPick2)).withStyle(s -> s.withColor(ChatFormatting.GRAY))); + pTooltip.add(Component.translatable(base + "1." + this.toPick1).append(" ").append(Component.translatable(base + "2." + this.toPick2)).withStyle(s -> s.withColor(ChatFormatting.GRAY))); if (pStack.hasTag() && pStack.getTag().contains("BlockEntityTag")) { CompoundTag BET = pStack.getTag().getCompound("BlockEntityTag"); @@ -164,11 +163,11 @@ public class BlockAtomicReconstructor extends FullyDirectionalBlock.Container im energy = BET.getInt("Energy"); } NumberFormat format = NumberFormat.getInstance(); - pTooltip.add(new TranslatableComponent("misc.actuallyadditions.power_single", format.format(energy))); + pTooltip.add(Component.translatable("misc.actuallyadditions.power_single", format.format(energy))); if (BET.contains("IsPulseMode")) { - pTooltip.add(new TranslatableComponent("info.actuallyadditions.redstoneMode").append(": ") - .append(new TranslatableComponent(BET.getBoolean("IsPulseMode")?"info.actuallyadditions.redstoneMode.pulse":"info.actuallyadditions.redstoneMode.deactivation").withStyle($ -> $.withColor(ChatFormatting.RED)))); + pTooltip.add(Component.translatable("info.actuallyadditions.redstoneMode").append(": ") + .append(Component.translatable(BET.getBoolean("IsPulseMode")?"info.actuallyadditions.redstoneMode.pulse":"info.actuallyadditions.redstoneMode.deactivation").withStyle($ -> $.withColor(ChatFormatting.RED)))); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBatteryBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBatteryBox.java index 49526030b..60e0527e3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBatteryBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockBatteryBox.java @@ -60,9 +60,8 @@ public class BlockBatteryBox extends BlockContainerBase { @Override public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { BlockEntity tile = world.getBlockEntity(pos); - if (tile instanceof TileEntityBatteryBox) { - TileEntityBatteryBox box = (TileEntityBatteryBox) tile; - ItemStack stack = player.getItemInHand(hand); + if (tile instanceof TileEntityBatteryBox box) { + ItemStack stack = player.getItemInHand(hand); if (!stack.isEmpty()) { if (stack.getItem() instanceof ItemBattery && box.inv.getStackInSlot(0).isEmpty()) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java index 7a42fd0f8..a3f93a854 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCanolaPress.java @@ -63,7 +63,7 @@ public class BlockCanolaPress extends BlockContainerBase { return InteractionResult.SUCCESS; if (!player.isShiftKeyDown()) { if (!FluidUtil.interactWithFluidHandler(player, hand, tile.tank)) - NetworkHooks.openGui((ServerPlayer) player, tile, pos); + NetworkHooks.openScreen((ServerPlayer) player, tile, pos); return InteractionResult.SUCCESS; } return InteractionResult.PASS; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java index 6f3fdd0f1..512115fd0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoalGenerator.java @@ -15,6 +15,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; @@ -29,7 +30,6 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; import javax.annotation.Nullable; -import java.util.Random; public class BlockCoalGenerator extends DirectionalBlock.Container { public BlockCoalGenerator() { @@ -49,7 +49,7 @@ public class BlockCoalGenerator extends DirectionalBlock.Container { } @Override - public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) { + public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityCoalGenerator) { if (((TileEntityCoalGenerator) tile).currentBurnTime > 0) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java index 9670004c0..9e4eee42f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCoffeeMachine.java @@ -41,7 +41,7 @@ public class BlockCoffeeMachine extends DirectionalBlock.Container { TileEntityCoffeeMachine tile = (TileEntityCoffeeMachine) world.getBlockEntity(pos); if (tile != null) { if (!this.tryUseItemOnTank(player, hand, tile.tank)) { - NetworkHooks.openGui((ServerPlayer) player, tile, pos); + NetworkHooks.openScreen((ServerPlayer) player, tile, pos); } } return InteractionResult.PASS; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java index 60e4071a2..7eae11c99 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockColoredLamp.java @@ -26,7 +26,8 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; -import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; +import net.minecraft.world.level.material.MapColor; import net.minecraft.world.phys.BlockHitResult; import java.util.HashMap; @@ -55,7 +56,7 @@ public class BlockColoredLamp extends BlockBase { private static final BooleanProperty LIT = BlockStateProperties.LIT; public BlockColoredLamp() { - super(Properties.of(Material.BUILDABLE_GLASS).strength(0.5F, 3.0F).requiresCorrectToolForDrops()); + super(Properties.of().mapColor(MapColor.NONE).instrument(NoteBlockInstrument.HAT).strength(0.5F, 3.0F).requiresCorrectToolForDrops()); this.registerDefaultState(this.stateDefinition.any().setValue(LIT, false)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrusher.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrusher.java index 5b252bada..77ac44258 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrusher.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockCrusher.java @@ -17,6 +17,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; @@ -35,7 +36,6 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; import javax.annotation.Nullable; -import java.util.Random; import static net.minecraft.world.level.block.state.properties.BlockStateProperties.HORIZONTAL_FACING; import static net.minecraft.world.level.block.state.properties.BlockStateProperties.LIT; @@ -66,7 +66,7 @@ public class BlockCrusher extends BlockContainerBase { } @Override - public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random rand) { + public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource rand) { if (state.getValue(BlockStateProperties.LIT)) { for (int i = 0; i < 5; i++) { double xRand = rand.nextDouble() / 0.75D - 0.5D; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java index 62ca5e63f..09f372b70 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockFermentingBarrel.java @@ -28,7 +28,8 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; +import net.minecraft.world.level.material.MapColor; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -40,7 +41,7 @@ import javax.annotation.Nullable; public class BlockFermentingBarrel extends BlockContainerBase { public BlockFermentingBarrel() { - super(Properties.of(Material.WOOD).requiresCorrectToolForDrops().strength(0.5F, 5.0F).sound(SoundType.WOOD)); + super(Properties.of().mapColor(MapColor.WOOD).ignitedByLava().instrument(NoteBlockInstrument.BASS).requiresCorrectToolForDrops().strength(0.5F, 5.0F).sound(SoundType.WOOD)); } @Nullable @@ -67,7 +68,7 @@ public class BlockFermentingBarrel extends BlockContainerBase { ItemStack stack = player.getItemInHand(hand); world.playSound(null, pos, stack.getItem() == Items.BUCKET ? SoundEvents.BUCKET_EMPTY:SoundEvents.BUCKET_FILL, SoundSource.BLOCKS, 1.0F, 1.0F); } else - NetworkHooks.openGui((ServerPlayer) player, tile, pos); + NetworkHooks.openScreen((ServerPlayer) player, tile, pos); return InteractionResult.SUCCESS; } return InteractionResult.PASS; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java index a820a169c..4cdab6849 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockGreenhouseGlass.java @@ -13,6 +13,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BonemealableBlock; @@ -23,8 +24,6 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; import org.apache.commons.lang3.tuple.Triple; -import java.util.Random; - public class BlockGreenhouseGlass extends BlockBase { public BlockGreenhouseGlass() { super(ActuallyBlocks.defaultPickProps(0.5F, 10.0F).sound(SoundType.GLASS).randomTicks()); @@ -49,7 +48,7 @@ public class BlockGreenhouseGlass extends BlockBase { } @Override - public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random rand) { + public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource rand) { if (world.isClientSide) { return; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java index 682362681..6dafbd937 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLaserRelay.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; import com.mojang.blaze3d.platform.Window; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; import de.ellpeck.actuallyadditions.api.laser.IConnectionPair; import de.ellpeck.actuallyadditions.api.laser.Network; @@ -32,6 +31,7 @@ import de.ellpeck.actuallyadditions.mod.util.StackUtil; import io.netty.util.internal.ConcurrentSet; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.resources.language.I18n; import net.minecraft.core.BlockPos; import net.minecraft.world.InteractionHand; @@ -102,10 +102,9 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) { ItemStack stack = player.getItemInHand(hand); BlockEntity tile = world.getBlockEntity(pos); - if (tile instanceof TileEntityLaserRelay) { - TileEntityLaserRelay relay = (TileEntityLaserRelay) tile; + if (tile instanceof TileEntityLaserRelay relay) { - if (StackUtil.isValid(stack)) { + if (StackUtil.isValid(stack)) { if (stack.getItem() instanceof ItemLaserWrench) { return InteractionResult.FAIL; } else if (stack.getItem() == CommonConfig.Other.relayConfigureItem) { @@ -201,7 +200,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements @Override @OnlyIn(Dist.CLIENT) - public void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { + public void displayHud(GuiGraphics guiGraphics, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { if (!(rayCast instanceof BlockHitResult)) { return; } @@ -213,11 +212,10 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements boolean compass = stack.getItem() == CommonConfig.Other.relayConfigureItem; if (wearing || compass || stack.getItem() instanceof ItemLaserWrench) { BlockEntity tile = minecraft.level.getBlockEntity(pos); - if (tile instanceof TileEntityLaserRelay) { - TileEntityLaserRelay relay = (TileEntityLaserRelay) tile; + if (tile instanceof TileEntityLaserRelay relay) { - String strg = relay.getExtraDisplayString(); - minecraft.font.drawShadow(matrices, strg, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f + 5, 0xFFFFFF); + String strg = relay.getExtraDisplayString(); + guiGraphics.drawString(minecraft.font, strg, (int) (resolution.getGuiScaledWidth() / 2f + 5), (int) (resolution.getGuiScaledHeight() / 2f + 5), 0xFFFFFF); String expl; if (compass) { @@ -226,7 +224,7 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements expl = ChatFormatting.GRAY.toString() + ChatFormatting.ITALIC + I18n.get("info." + ActuallyAdditions.MODID + ".laserRelay.mode.noCompasss", I18n.get(CommonConfig.Other.relayConfigureItem.getDescriptionId())); } - minecraft.font.draw(matrices, expl, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f + 15, 0xFFFFFF); + guiGraphics.drawString(minecraft.font, expl, (int) (resolution.getGuiScaledWidth() / 2f + 5), (int) (resolution.getGuiScaledHeight() / 2f + 15), 0xFFFFFF); } } } @@ -249,9 +247,8 @@ public class BlockLaserRelay extends FullyDirectionalBlock.Container implements //Update the connected relays to sync the changes to the client relayPositions.forEach(relayPos -> { BlockEntity tile = world.getBlockEntity(relayPos); - if(tile instanceof TileEntityLaserRelay) { - TileEntityLaserRelay relay = (TileEntityLaserRelay) tile; - relay.sendUpdate(); + if(tile instanceof TileEntityLaserRelay relay) { + relay.sendUpdate(); } }); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java index ca492a490..db2c964f8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLavaFactoryController.java @@ -11,12 +11,12 @@ package de.ellpeck.actuallyadditions.mod.blocks; import com.mojang.blaze3d.platform.Window; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLavaFactoryController; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.resources.language.I18n; import net.minecraft.core.BlockPos; import net.minecraft.world.entity.player.Player; @@ -57,7 +57,7 @@ public class BlockLavaFactoryController extends DirectionalBlock.Container imple @Override @OnlyIn(Dist.CLIENT) - public void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { + public void displayHud(GuiGraphics guiGraphics, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { if (!(rayCast instanceof BlockHitResult)) { return; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java index af6463e62..ca125f76f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockLeafGenerator.java @@ -20,7 +20,7 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.material.MapColor; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; @@ -29,7 +29,7 @@ import javax.annotation.Nullable; public class BlockLeafGenerator extends DirectionalBlock.Container { public BlockLeafGenerator() { - super(Properties.of(Material.METAL).strength(5.0F, 10.0F).requiresCorrectToolForDrops().strength(5.0F, 10.0F).sound(SoundType.METAL)); + super(Properties.of().mapColor(MapColor.METAL).strength(5.0F, 10.0F).requiresCorrectToolForDrops().strength(5.0F, 10.0F).sound(SoundType.METAL)); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java index f137f9a1f..60585bd7f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockOilGenerator.java @@ -16,6 +16,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; +import net.minecraft.util.RandomSource; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; @@ -31,7 +32,6 @@ import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.network.NetworkHooks; import javax.annotation.Nullable; -import java.util.Random; public class BlockOilGenerator extends DirectionalBlock.Container { @@ -53,7 +53,7 @@ public class BlockOilGenerator extends DirectionalBlock.Container { // TODO: Move all of these over to the client version @Override - public void randomTick(BlockState state, ServerLevel world, BlockPos pos, Random random) { + public void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) { BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityOilGenerator) { if (((TileEntityOilGenerator) tile).currentBurnTime > 0) { @@ -70,7 +70,7 @@ public class BlockOilGenerator extends DirectionalBlock.Container { TileEntityOilGenerator generator = (TileEntityOilGenerator) world.getBlockEntity(pos); if (generator != null) { if (!this.tryUseItemOnTank(player, hand, generator.tank)) { - NetworkHooks.openGui((ServerPlayer) player, generator, pos); + NetworkHooks.openScreen((ServerPlayer) player, generator, pos); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java index 135a3c651..077674bcb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPhantom.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.blocks; import com.mojang.blaze3d.platform.Window; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.api.tile.IPhantomTile; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; @@ -24,6 +23,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomRedstoneface; import de.ellpeck.actuallyadditions.mod.util.StringUtil; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.resources.language.I18n; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; @@ -148,16 +148,15 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay { // TODO: [port] fix all of this, it's a mess @Override @OnlyIn(Dist.CLIENT) - public void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { + public void displayHud(GuiGraphics guiGraphics, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { if (!(rayCast instanceof BlockHitResult)) { return; } BlockPos pos = ((BlockHitResult) rayCast).getBlockPos(); BlockEntity tile = minecraft.level.getBlockEntity(pos); if (tile != null) { - if (tile instanceof IPhantomTile) { - IPhantomTile phantom = (IPhantomTile) tile; - minecraft.font.drawShadow(matrices, ChatFormatting.GOLD + I18n.get("tooltip." + ActuallyAdditions.MODID + ".blockPhantomRange.desc") + ": " + phantom.getRange(), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 - 40, ChatFormatting.WHITE.getColor()); + if (tile instanceof IPhantomTile phantom) { + guiGraphics.drawString(minecraft.font, ChatFormatting.GOLD + I18n.get("tooltip." + ActuallyAdditions.MODID + ".blockPhantomRange.desc") + ": " + phantom.getRange(), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 - 40, ChatFormatting.WHITE.getColor()); if (phantom.hasBoundPosition()) { int distance = Mth.ceil(new Vec3(pos.getX(), pos.getY(), pos.getZ()).distanceTo(new Vec3(phantom.getBoundPosition().getX(), phantom.getBoundPosition().getY(), phantom.getBoundPosition().getZ()))); BlockState state = minecraft.level.getBlockState(phantom.getBoundPosition()); @@ -172,7 +171,7 @@ public class BlockPhantom extends BlockContainerBase implements IHudDisplay { StringUtil.drawSplitString(minecraft.font, ChatFormatting.DARK_RED + I18n.get("tooltip." + ActuallyAdditions.MODID + ".phantom.connectedNoRange.desc"), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 25, 200, 0xFFFFFF, true); } } else { - minecraft.font.drawShadow(matrices, ChatFormatting.RED + I18n.get("tooltip." + ActuallyAdditions.MODID + ".phantom.notConnected.desc"), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 25, ChatFormatting.WHITE.getColor()); + guiGraphics.drawString(minecraft.font, ChatFormatting.RED + I18n.get("tooltip." + ActuallyAdditions.MODID + ".phantom.notConnected.desc"), resolution.getGuiScaledWidth() / 2 + 5, resolution.getGuiScaledHeight() / 2 + 25, ChatFormatting.WHITE.getColor()); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java index c7188a5cb..85515225b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPlayerInterface.java @@ -11,11 +11,11 @@ package de.ellpeck.actuallyadditions.mod.blocks; import com.mojang.blaze3d.platform.Window; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockContainerBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.core.BlockPos; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.player.Player; @@ -56,9 +56,8 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp @Override public void setPlacedBy(Level world, BlockPos pos, BlockState state, LivingEntity player, ItemStack stack) { BlockEntity tile = world.getBlockEntity(pos); - if (tile instanceof TileEntityPlayerInterface) { - TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile; - if (face.connectedPlayer == null) { + if (tile instanceof TileEntityPlayerInterface face) { + if (face.connectedPlayer == null) { face.connectedPlayer = player.getUUID(); face.playerName = player.getName().getString(); face.setChanged(); @@ -71,20 +70,19 @@ public class BlockPlayerInterface extends BlockContainerBase implements IHudDisp @Override @OnlyIn(Dist.CLIENT) - public void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { + public void displayHud(GuiGraphics guiGraphics, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { if (!(rayCast instanceof BlockHitResult)) { return; } BlockEntity tile = minecraft.level.getBlockEntity(((BlockHitResult) rayCast).getBlockPos()); if (tile != null) { - if (tile instanceof TileEntityPlayerInterface) { - TileEntityPlayerInterface face = (TileEntityPlayerInterface) tile; - String name = face.playerName == null + if (tile instanceof TileEntityPlayerInterface face) { + String name = face.playerName == null ? "Unknown" : face.playerName; - minecraft.font.drawShadow(matrices, "Bound to: " + ChatFormatting.RED + name, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f + 5, 0xFFFFFF); - minecraft.font.drawShadow(matrices, "UUID: " + ChatFormatting.DARK_GREEN + face.connectedPlayer, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f + 15, 0xFFFFFF); + guiGraphics.drawString(minecraft.font, "Bound to: " + ChatFormatting.RED + name, (int) (resolution.getGuiScaledWidth() / 2f + 5), (int) (resolution.getGuiScaledHeight() / 2f + 5), 0xFFFFFF); + guiGraphics.drawString(minecraft.font, "UUID: " + ChatFormatting.DARK_GREEN + face.connectedPlayer, (int) (resolution.getGuiScaledWidth() / 2f + 5), (int) (resolution.getGuiScaledHeight() / 2f + 15), 0xFFFFFF); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPoweredFurnace.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPoweredFurnace.java index ca9f5bfeb..edcfbdf4c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPoweredFurnace.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockPoweredFurnace.java @@ -16,6 +16,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.server.level.ServerLevel; +import net.minecraft.util.RandomSource; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; @@ -33,7 +34,6 @@ import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; import javax.annotation.Nullable; -import java.util.Random; import static net.minecraft.world.level.block.state.properties.BlockStateProperties.HORIZONTAL_FACING; import static net.minecraft.world.level.block.state.properties.BlockStateProperties.LIT; @@ -61,7 +61,7 @@ public class BlockPoweredFurnace extends DirectionalBlock.Container { } @Override - public void randomTick(BlockState state, ServerLevel worldIn, BlockPos pos, Random random) { + public void randomTick(BlockState state, ServerLevel worldIn, BlockPos pos, RandomSource random) { if (state.getValue(LIT)) { for (int i = 0; i < 5; i++) { worldIn.addParticle(ParticleTypes.SMOKE, (double) pos.getX() + 0.5F, (double) pos.getY() + 1.0F, (double) pos.getZ() + 0.5F, 0.0D, 0.0D, 0.0D); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java index 1979be1c0..fcfbc82c4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockShockSuppressor.java @@ -24,7 +24,7 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; import net.minecraftforge.common.MinecraftForge; -import net.minecraftforge.event.world.ExplosionEvent; +import net.minecraftforge.event.level.ExplosionEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import javax.annotation.Nullable; @@ -41,7 +41,7 @@ public class BlockShockSuppressor extends Block implements EntityBlock { @SubscribeEvent public void onExplosion(ExplosionEvent.Detonate event) { - Level world = event.getWorld(); + Level world = event.getLevel(); if (!world.isClientSide) { List affectedBlocks = event.getAffectedBlocks(); List affectedEntities = event.getAffectedEntities(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java index 46ddf758c..c0d550236 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockTinyTorch.java @@ -12,7 +12,7 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBase; import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.AABB; public class BlockTinyTorch extends BlockBase { @@ -26,7 +26,7 @@ public class BlockTinyTorch extends BlockBase { private static final AABB TORCH_EAST_AABB = new AABB(0.0D, 0.25D, 0.4375D, 0.1875D, 0.5625D, 0.5625D); public BlockTinyTorch() { - super(Properties.of(Material.DECORATION).sound(SoundType.WOOD).strength(0.0F, 0.8F)); + super(Properties.of().pushReaction(PushReaction.DESTROY).sound(SoundType.WOOD).strength(0.0F, 0.8F)); // TorchBlock // this.setDefaultState(this.blockState.getBaseState().withProperty(BlockTorch.FACING, Direction.UP)); // this.setTickRandomly(true); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockVerticalDigger.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockVerticalDigger.java index 58ae3ef0f..0bd109fae 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockVerticalDigger.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockVerticalDigger.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.blocks; import com.mojang.blaze3d.platform.Window; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.blocks.base.DirectionalBlock; import de.ellpeck.actuallyadditions.mod.tile.TileEntityVerticalDigger; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.core.BlockPos; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -61,19 +61,18 @@ public class BlockVerticalDigger extends DirectionalBlock.Container implements I @Override @OnlyIn(Dist.CLIENT) - public void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { + public void displayHud(GuiGraphics guiGraphics, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { if (!(rayCast instanceof BlockHitResult)) { return; } BlockEntity tile = minecraft.level.getBlockEntity(((BlockHitResult) rayCast).getBlockPos()); - if (tile instanceof TileEntityVerticalDigger) { - TileEntityVerticalDigger miner = (TileEntityVerticalDigger) tile; - String info = miner.checkY == 0 + if (tile instanceof TileEntityVerticalDigger miner) { + String info = miner.checkY == 0 ? "Done Mining!" : miner.checkY == -1 ? "Calculating positions..." : "Mining at " + (miner.getBlockPos().getX() + miner.checkX) + ", " + miner.checkY + ", " + (miner.getBlockPos().getZ() + miner.checkZ) + "."; - minecraft.font.drawShadow(matrices, info, resolution.getGuiScaledWidth() / 2f + 5, resolution.getGuiScaledHeight() / 2f - 20, 0xFFFFFF); + guiGraphics.drawString(minecraft.font, info, (int) (resolution.getGuiScaledWidth() / 2f + 5), (int) (resolution.getGuiScaledHeight() / 2f - 20), 0xFFFFFF); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java index c0db3582a..42eb9d0e9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/BlockWildPlant.java @@ -12,7 +12,8 @@ package de.ellpeck.actuallyadditions.mod.blocks; import de.ellpeck.actuallyadditions.mod.blocks.base.BlockBushBase; import net.minecraft.world.level.block.SoundType; -import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; public class BlockWildPlant extends BlockBushBase { @@ -20,7 +21,7 @@ public class BlockWildPlant extends BlockBushBase { // public static final PropertyEnum TYPE = PropertyEnum.create("type", TheWildPlants.class); public BlockWildPlant() { - super(Properties.of(Material.PLANT).sound(SoundType.GRASS).strength(0, 0)); + super(Properties.of().mapColor(MapColor.PLANT).pushReaction(PushReaction.DESTROY).sound(SoundType.GRASS).strength(0, 0)); // this.setSoundType(SoundType.PLANT); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/CrystalClusterBlock.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/CrystalClusterBlock.java index f59725c67..6345c6564 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/CrystalClusterBlock.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/CrystalClusterBlock.java @@ -20,7 +20,7 @@ import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.DirectionProperty; -import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.block.state.properties.NoteBlockInstrument; import net.minecraft.world.phys.shapes.BooleanOp; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.Shapes; @@ -45,7 +45,8 @@ public class CrystalClusterBlock extends FullyDirectionalBlock { ).reduce((v1, v2) -> Shapes.join(v1, v2, BooleanOp.OR) ).get(); public CrystalClusterBlock(Crystals crystal) { - super(Block.Properties.of(Material.GLASS) + super(Block.Properties.of() + .instrument(NoteBlockInstrument.HAT) .lightLevel((e) -> 7) .sound(SoundType.GLASS) .noOcclusion() diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IHudDisplay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IHudDisplay.java index 64e075cfa..bc4debac4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IHudDisplay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/IHudDisplay.java @@ -11,8 +11,8 @@ package de.ellpeck.actuallyadditions.mod.blocks; import com.mojang.blaze3d.platform.Window; -import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.phys.HitResult; @@ -22,6 +22,6 @@ import net.minecraftforge.api.distmarker.OnlyIn; public interface IHudDisplay { @OnlyIn(Dist.CLIENT) - void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution); + void displayHud(GuiGraphics guiGraphics, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java index a90287dfb..c90a4db59 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockBase.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.blocks.base; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.world.item.Item; import net.minecraft.world.level.block.Block; @@ -20,7 +19,7 @@ public class BlockBase extends Block { } protected ItemBlockBase getItemBlock() { - return new ItemBlockBase(this, new Item.Properties().tab(ActuallyAdditions.GROUP)); + return new ItemBlockBase(this, new Item.Properties()); } public boolean shouldAddCreative() { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java index 9b1ae9f20..82afdaa49 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockContainerBase.java @@ -18,9 +18,10 @@ import de.ellpeck.actuallyadditions.mod.util.StackUtil; import net.minecraft.ChatFormatting; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; -import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.network.chat.Component; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; +import net.minecraft.util.RandomSource; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.MenuProvider; @@ -41,7 +42,6 @@ import net.minecraftforge.network.NetworkHooks; import javax.annotation.Nonnull; import javax.annotation.Nullable; -import java.util.Random; public abstract class BlockContainerBase extends Block implements EntityBlock { public BlockContainerBase(Properties properties) { @@ -52,7 +52,7 @@ public abstract class BlockContainerBase extends Block implements EntityBlock { if (!world.isClientSide) { BlockEntity tile = world.getBlockEntity(pos); if (expectedInstance.isInstance(tile)) { - NetworkHooks.openGui((ServerPlayer) player, (MenuProvider) tile, pos); + NetworkHooks.openScreen((ServerPlayer) player, (MenuProvider) tile, pos); } return InteractionResult.SUCCESS; } @@ -63,9 +63,8 @@ public abstract class BlockContainerBase extends Block implements EntityBlock { private void dropInventory(Level world, BlockPos position) { if (!world.isClientSide) { BlockEntity aTile = world.getBlockEntity(position); - if (aTile instanceof TileEntityInventoryBase) { - TileEntityInventoryBase tile = (TileEntityInventoryBase) aTile; - if (tile.inv.getSlots() > 0) { + if (aTile instanceof TileEntityInventoryBase tile) { + if (tile.inv.getSlots() > 0) { for (int i = 0; i < tile.inv.getSlots(); i++) { this.dropSlotFromInventory(i, tile, world, position); } @@ -93,9 +92,8 @@ public abstract class BlockContainerBase extends Block implements EntityBlock { ItemStack stack = player.getMainHandItem(); if (stack.getItem() == CommonConfig.Other.redstoneConfigureItem) { BlockEntity tile = world.getBlockEntity(pos); - if (tile instanceof TileEntityBase) { - TileEntityBase base = (TileEntityBase) tile; - if (!world.isClientSide && base.isRedstoneToggle()) { + if (tile instanceof TileEntityBase base) { + if (!world.isClientSide && base.isRedstoneToggle()) { base.isPulseMode = !base.isPulseMode; base.setChanged(); base.sendUpdate(); @@ -107,12 +105,11 @@ public abstract class BlockContainerBase extends Block implements EntityBlock { } @Override - public void tick(@Nonnull BlockState state, ServerLevel world, @Nonnull BlockPos pos, @Nonnull Random rand) { + public void tick(@Nonnull BlockState state, ServerLevel world, @Nonnull BlockPos pos, @Nonnull RandomSource rand) { if (!world.isClientSide) { BlockEntity tile = world.getBlockEntity(pos); - if (tile instanceof TileEntityBase) { - TileEntityBase base = (TileEntityBase) tile; - if (base.respondsToPulses()) { + if (tile instanceof TileEntityBase base) { + if (base.respondsToPulses()) { base.activateOnPulse(); } } @@ -123,9 +120,8 @@ public abstract class BlockContainerBase extends Block implements EntityBlock { this.updateRedstoneState(world, pos); BlockEntity tile = world.getBlockEntity(pos); - if (tile instanceof TileEntityBase) { - TileEntityBase base = (TileEntityBase) tile; - if (base.shouldSaveDataOnChangeOrWorldStart()) { + if (tile instanceof TileEntityBase base) { + if (base.shouldSaveDataOnChangeOrWorldStart()) { base.saveDataOnChangeOrWorldStart(); } } @@ -147,9 +143,8 @@ public abstract class BlockContainerBase extends Block implements EntityBlock { public void updateRedstoneState(Level world, BlockPos pos) { if (!world.isClientSide) { BlockEntity tile = world.getBlockEntity(pos); - if (tile instanceof TileEntityBase) { - TileEntityBase base = (TileEntityBase) tile; - boolean powered = world.getBestNeighborSignal(pos) > 0; + if (tile instanceof TileEntityBase base) { + boolean powered = world.getBestNeighborSignal(pos) > 0; boolean wasPowered = base.isRedstonePowered; if (powered && !wasPowered) { if (base.respondsToPulses()) { @@ -181,9 +176,8 @@ public abstract class BlockContainerBase extends Block implements EntityBlock { public void setPlacedBy(Level world, BlockPos pos, BlockState state, @Nullable LivingEntity placer, ItemStack stack) { if (stack.hasTag()) { BlockEntity tile = world.getBlockEntity(pos); - if (tile instanceof TileEntityBase) { - TileEntityBase base = (TileEntityBase) tile; - CompoundTag compound = stack.getOrCreateTag().getCompound("Data"); + if (tile instanceof TileEntityBase base) { + CompoundTag compound = stack.getOrCreateTag().getCompound("Data"); base.readSyncableNBT(compound, TileEntityBase.NBTType.SAVE_BLOCK); } } @@ -195,7 +189,7 @@ public abstract class BlockContainerBase extends Block implements EntityBlock { if (!player.isCreative()) { BlockEntity tile = world.getBlockEntity(pos); if (tile instanceof TileEntityBase && ((TileEntityBase) tile).stopFromDropping) { - player.displayClientMessage(new TranslatableComponent("info." + ActuallyAdditions.MODID + ".machineBroke").withStyle(ChatFormatting.RED), false); + player.displayClientMessage(Component.translatable("info." + ActuallyAdditions.MODID + ".machineBroke").withStyle(ChatFormatting.RED), false); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java index 1558750ab..7c48ecaa0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/base/BlockPlant.java @@ -25,7 +25,8 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.CropBlock; import net.minecraft.world.level.block.SoundType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.Material; +import net.minecraft.world.level.material.MapColor; +import net.minecraft.world.level.material.PushReaction; import net.minecraft.world.phys.BlockHitResult; import net.minecraftforge.common.PlantType; import net.minecraftforge.items.ItemHandlerHelper; @@ -39,7 +40,7 @@ public class BlockPlant extends CropBlock { // Stolen from potato for now // PotatoBlock(AbstractBlock.Properties.create(Material.PLANTS).doesNotBlockMovement().tickRandomly().zeroHardnessAndResistance().sound(SoundType.CROP))); public BlockPlant(Supplier seedItem) { - super(Properties.of(Material.PLANT).noCollission().randomTicks().instabreak().sound(SoundType.CROP)); + super(Properties.of().mapColor(MapColor.PLANT).pushReaction(PushReaction.DESTROY).noCollission().randomTicks().instabreak().sound(SoundType.CROP)); this.seedItem = seedItem; } @@ -75,7 +76,7 @@ public class BlockPlant extends CropBlock { boolean deductedSeedSize = false; for (ItemStack drop : drops) { if (StackUtil.isValid(drop)) { - if (drop.getItem() == this.seedItem && !deductedSeedSize) { + if (drop.getItem() == this.seedItem.get() && !deductedSeedSize) { drop.shrink(1); deductedSeedSize = true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/CompostModel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/CompostModel.java index 7074dc18a..75e4ae222 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/CompostModel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/CompostModel.java @@ -6,7 +6,7 @@ //import java.util.List; // //import javax.annotation.Nullable; -//import javax.vecmath.Vector3f; +//import javax.vecmath.Axis; // //import com.google.common.collect.ImmutableList; //import com.google.common.collect.ImmutableMap; @@ -30,7 +30,7 @@ // public CompostModel(BlockState flowerState, float height) { // this.display = Minecraft.getInstance().getBlockRendererDispatcher().getModelForState(flowerState); // -// TRSRTransformation transform = TRSRTransformation.blockCenterToCorner(new TRSRTransformation(new Vector3f(0, -.218F, 0), null, new Vector3f(0.75F, height / 1.81F, 0.75F), null)); +// TRSRTransformation transform = TRSRTransformation.blockCenterToCorner(new TRSRTransformation(new Axis(0, -.218F, 0), null, new Axis(0.75F, height / 1.81F, 0.75F), null)); // // ImmutableList.Builder builder; // EnumMap> faces = new EnumMap<>(Direction.class); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/ReconstructorRenderer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/ReconstructorRenderer.java index e7addb4de..25e7a02c4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/ReconstructorRenderer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/ReconstructorRenderer.java @@ -11,7 +11,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.math.Vector3f; +import com.mojang.math.Axis; import de.ellpeck.actuallyadditions.api.lens.ILensItem; import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; @@ -59,8 +59,8 @@ public class ReconstructorRenderer implements BlockEntityRenderer { @@ -44,24 +46,32 @@ public class RenderBatteryBox implements BlockEntityRenderer { + stack.getCapability(ForgeCapabilities.ENERGY).ifPresent(cap -> { Font font = Minecraft.getInstance().font; String energyTotal = Lang.cleanEnergyValues(cap, false); String energyName = I18n.get("misc.actuallyadditions.power_name_long"); + float backgroundOpacity = Minecraft.getInstance().options.getBackgroundOpacity(0.25F); + int j = (int) (backgroundOpacity * 255.0F) << 24; for (int i = 0; i < 4; i++) { - font.draw(matrices, energyTotal, -font.width(energyTotal) / 2F, 10F, 0xFFFFFF); - font.draw(matrices, energyName, -font.width(energyName) / 2F, 20F, 0xFFFFFF); + matrices.pushPose(); matrices.translate(-60F, 0F, 60F); - matrices.mulPose(Vector3f.YP.rotationDegrees(90)); + matrices.mulPose(Axis.YP.rotationDegrees(90)); + Matrix4f pose = matrices.last().pose(); + font.drawInBatch(energyTotal, -font.width(energyTotal) / 2F, 10F, 0, false, pose, buffer, Font.DisplayMode.SEE_THROUGH, j, combinedLight, true); + font.drawInBatch(energyName, -font.width(energyTotal) / 2F, 20F, 0, false, pose, buffer, Font.DisplayMode.SEE_THROUGH, j, combinedLight, true); +// font.draw(matrices, energyTotal, -font.width(energyTotal) / 2F, 10F, 0xFFFFFF); +// font.draw(matrices, energyName, -font.width(energyName) / 2F, 20F, 0xFFFFFF); + + matrices.popPose(); } }); @@ -75,13 +85,13 @@ public class RenderBatteryBox implements BlockEntityRenderer { public RenderEmpowerer(BlockEntityRendererProvider.Context context) { @@ -41,7 +42,7 @@ public class RenderEmpowerer implements BlockEntityRenderer float boop = Util.getMillis() / 800F; matrices.translate(0D, Math.sin(boop % (2 * Math.PI)) * 0.065, 0D); - matrices.mulPose(Vector3f.YP.rotationDegrees(boop * 40F % 360.0F)); + matrices.mulPose(Axis.YP.rotationDegrees(boop * 40F % 360.0F)); float scale = stack.getItem() instanceof BlockItem ? 0.85F @@ -50,7 +51,7 @@ public class RenderEmpowerer implements BlockEntityRenderer try { AssetUtil.renderItemInWorld(stack, combinedLight, combinedOverlay, matrices, buffer); } catch (Exception e) { - ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in an empowerer! The item is " + stack.getItem().getRegistryName() + "!", e); + ActuallyAdditions.LOGGER.error("Something went wrong trying to render an item in an empowerer! The item is " + ForgeRegistries.ITEMS.getKey(stack.getItem()) + "!", e); } matrices.popPose(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java index 821de6619..6b740dfcf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/blocks/render/RenderLaserRelay.java @@ -11,7 +11,7 @@ package de.ellpeck.actuallyadditions.mod.blocks.render; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.math.Vector3f; +import com.mojang.math.Axis; import de.ellpeck.actuallyadditions.api.laser.IConnectionPair; import de.ellpeck.actuallyadditions.api.laser.LaserType; import de.ellpeck.actuallyadditions.mod.config.CommonConfig; @@ -73,7 +73,7 @@ public class RenderLaserRelay implements BlockEntityRenderer { +// super(x, y, 16, 16, StringComponent.empty(), btn -> { // BookmarkButton button = (BookmarkButton) btn; // if (button.assignedPage != null) { // if (Screen.hasShiftDown()) { @@ -74,7 +74,7 @@ // GlStateManager._blendFuncSeparate(770, 771, 1, 0); // GlStateManager._blendFunc(770, 771); // int renderHeight = 25; -// this.blit(matrices, this.x, this.y, 224 + (this.assignedPage == null +// guiGraphics.blit(matrices, this.x, this.y, 224 + (this.assignedPage == null // ? 0 // : 16), 14 - renderHeight + offset * renderHeight, this.width, renderHeight); // diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiBooklet.java index 2abe7420d..107f42543 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/booklet/gui/GuiBooklet.java @@ -63,7 +63,7 @@ // private float largeFontSize; // // public GuiBooklet(Screen previousScreen, GuiBookletBase parentPage) { -// super(StringTextComponent.EMPTY); +// super(StringComponent.empty()); // // this.previousScreen = previousScreen; // this.parentPage = parentPage; @@ -115,7 +115,7 @@ // } // // if (this.hasSearchBar()) { -// this.searchField = new TextFieldWidget(this.font, this.guiLeft + this.xSize + 2, this.guiTop + this.ySize - 40 + 2, 64, 12, StringTextComponent.EMPTY); +// this.searchField = new TextFieldWidget(this.font, this.guiLeft + this.xSize + 2, this.guiTop + this.ySize - 40 + 2, 64, 12, StringComponent.empty()); // this.searchField.setMaxLength(50); // this.searchField.setBordered(false); // this.children.add(this.searchField); @@ -179,7 +179,7 @@ // // if (this.hasSearchBar()) { // this.getMinecraft().getTextureManager().bind(RES_LOC_GADGETS); -// this.blit(matrices, this.guiLeft + this.xSize, this.guiTop + this.ySize - 40, 188, 0, 68, 14); +// guiGraphics.blit(matrices, this.guiLeft + this.xSize, this.guiTop + this.ySize - 40, 188, 0, 68, 14); // // // boolean unicodeBefore = this.font.getUnicodeFlag(); // // this.font.setUnicodeFlag(true); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/CommonConfig.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/CommonConfig.java index 2eb80f2d0..0ea6e80f5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/CommonConfig.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/CommonConfig.java @@ -128,8 +128,8 @@ public class CommonConfig { MOST_BLAND_PERSON_EVER = BUILDER.comment("If you want to be really boring and lame, you can turn on this setting to disable colored names on Actually Additions items. Because why would you want things to look pretty anyways, right?") .define("noColoredItemNames", false); //TODO is this still needed? - REDSTONECONFIGURATOR = BUILDER.comment("define the item used to configure Redstone Mode").define("redstoneConfigurator", Items.REDSTONE_TORCH.getRegistryName().toString(), obj -> obj instanceof String); - RELAYCONFIGURATOR = BUILDER.comment("define the item used to configure Direction in laser relays").define("relayConfigurator", Items.COMPASS.getRegistryName().toString(), obj -> obj instanceof String); + REDSTONECONFIGURATOR = BUILDER.comment("define the item used to configure Redstone Mode").define("redstoneConfigurator", "minecraft:redstone_torch", obj -> obj instanceof String); + RELAYCONFIGURATOR = BUILDER.comment("define the item used to configure Direction in laser relays").define("relayConfigurator", "minecraft:compass", obj -> obj instanceof String); BUILDER.pop(); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/config/conditions/BoolConfigCondition.java b/src/main/java/de/ellpeck/actuallyadditions/mod/config/conditions/BoolConfigCondition.java index a44b84a74..71862a652 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/config/conditions/BoolConfigCondition.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/config/conditions/BoolConfigCondition.java @@ -21,7 +21,7 @@ public class BoolConfigCondition implements ICondition { } @Override - public boolean test() { + public boolean test(IContext condition) { switch (boolConfig) { default: return true; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ColorChangeRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ColorChangeRecipe.java index c16fe8d18..8a1e9177c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ColorChangeRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/ColorChangeRecipe.java @@ -2,6 +2,7 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; +import net.minecraft.core.RegistryAccess; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; @@ -14,7 +15,7 @@ import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.Level; -import net.minecraftforge.registries.ForgeRegistryEntry; +import net.minecraftforge.registries.ForgeRegistries; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -49,7 +50,7 @@ public class ColorChangeRecipe implements Recipe { @Nonnull @Override - public ItemStack assemble(@Nonnull Container pInv) { + public ItemStack assemble(Container pInv, RegistryAccess pRegistryAccess) { return output.copy(); } @@ -64,7 +65,7 @@ public class ColorChangeRecipe implements Recipe { @Nonnull @Override - public ItemStack getResultItem() { + public ItemStack getResultItem(RegistryAccess pRegistryAccess) { return output.copy(); } @@ -85,7 +86,7 @@ public class ColorChangeRecipe implements Recipe { return ActuallyRecipes.Types.COLOR_CHANGE; } - public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { + public static class Serializer implements RecipeSerializer { @Override public ColorChangeRecipe fromJson(@Nonnull ResourceLocation pRecipeId, @Nonnull JsonObject pJson) { Ingredient ingredient = Ingredient.fromJson(GsonHelper.getAsJsonObject(pJson, "ingredient")); @@ -126,7 +127,7 @@ public class ColorChangeRecipe implements Recipe { pJson.add("ingredient", itemIngredient.toJson()); JsonObject resultObject = new JsonObject(); - resultObject.addProperty("item", output.asItem().getRegistryName().toString()); + resultObject.addProperty("item", ForgeRegistries.ITEMS.getKey(output.asItem()).toString()); pJson.add("result", resultObject); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/CrushingRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/CrushingRecipe.java index 3b49c1fe2..98adf64aa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/CrushingRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/CrushingRecipe.java @@ -3,6 +3,7 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonArray; import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +import net.minecraft.core.RegistryAccess; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; @@ -15,7 +16,7 @@ import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.Level; -import net.minecraftforge.registries.ForgeRegistryEntry; +import net.minecraftforge.registries.ForgeRegistries; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -39,7 +40,7 @@ public class CrushingRecipe implements Recipe { } public CrushingRecipe(Ingredient input, ItemStack outputOne, float chance1, ItemStack outputTwo, float chance2) { - this.id = new ResourceLocation(ActuallyAdditions.MODID, input.getItems()[0].getItem().getRegistryName().getPath() + "_crushing"); + this.id = new ResourceLocation(ActuallyAdditions.MODID, ForgeRegistries.ITEMS.getKey(input.getItems()[0].getItem()).getPath() + "_crushing"); this.input = input; this.outputOne = outputOne; this.outputTwo = outputTwo; @@ -63,7 +64,7 @@ public class CrushingRecipe implements Recipe { @Override @Nonnull - public ItemStack assemble(@Nonnull Container pInv) { + public ItemStack assemble(Container pInv, RegistryAccess pRegistryAccess) { return ItemStack.EMPTY; } @@ -74,7 +75,7 @@ public class CrushingRecipe implements Recipe { @Override @Nonnull - public ItemStack getResultItem() { + public ItemStack getResultItem(RegistryAccess pRegistryAccess) { return outputOne; } @@ -115,7 +116,7 @@ public class CrushingRecipe implements Recipe { return this.input; } - public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { + public static class Serializer implements RecipeSerializer { @Override @Nonnull @@ -190,12 +191,12 @@ public class CrushingRecipe implements Recipe { pJson.add("ingredient", input.toJson()); JsonObject result1 = new JsonObject(); - result1.addProperty("item", outputOne.asItem().getRegistryName().toString()); + result1.addProperty("item", ForgeRegistries.ITEMS.getKey(outputOne.asItem()).toString()); result1.addProperty("count", countOne); result1.addProperty("chance", outputChance1); JsonObject result2 = new JsonObject(); - result2.addProperty("item", outputTwo.asItem().getRegistryName().toString()); + result2.addProperty("item", ForgeRegistries.ITEMS.getKey(outputTwo.asItem()).toString()); result2.addProperty("count", countTwo); result2.addProperty("chance", outputChance2); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/EmpowererRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/EmpowererRecipe.java index 34c05f983..ed1a89ae5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/EmpowererRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/EmpowererRecipe.java @@ -2,6 +2,7 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonArray; import com.google.gson.JsonObject; +import net.minecraft.core.RegistryAccess; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; @@ -14,7 +15,7 @@ import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.Level; -import net.minecraftforge.registries.ForgeRegistryEntry; +import net.minecraftforge.registries.ForgeRegistries; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -86,7 +87,7 @@ public class EmpowererRecipe implements Recipe { @Override @Nonnull - public ItemStack assemble(@Nonnull Container pInv) { + public ItemStack assemble(Container pInv, RegistryAccess pRegistryAccess) { return output.copy(); } @@ -97,7 +98,7 @@ public class EmpowererRecipe implements Recipe { @Override @Nonnull - public ItemStack getResultItem() { + public ItemStack getResultItem(RegistryAccess pRegistryAccess) { return output; } @@ -155,7 +156,7 @@ public class EmpowererRecipe implements Recipe { return this.particleColor; } - public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { + public static class Serializer implements RecipeSerializer { @Override @Nonnull public EmpowererRecipe fromJson(@Nonnull ResourceLocation pRecipeId, @Nonnull JsonObject pJson) { @@ -250,7 +251,7 @@ public class EmpowererRecipe implements Recipe { pJson.addProperty("color", color); JsonObject resultObject = new JsonObject(); - resultObject.addProperty("item", output.asItem().getRegistryName().toString()); + resultObject.addProperty("item", ForgeRegistries.ITEMS.getKey(output.asItem()).toString()); pJson.add("result", resultObject); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FermentingRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FermentingRecipe.java index 2c5d6632e..6d19a35e1 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FermentingRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/FermentingRecipe.java @@ -3,6 +3,7 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; import de.ellpeck.actuallyadditions.mod.inventory.gui.FluidDisplay; +import net.minecraft.core.RegistryAccess; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; @@ -16,7 +17,6 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.registries.ForgeRegistryEntry; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -87,7 +87,7 @@ public class FermentingRecipe implements Recipe { @Nonnull @Override - public ItemStack assemble(Container pInv) { + public ItemStack assemble(Container pInv, RegistryAccess pRegistryAccess) { return ItemStack.EMPTY; } @@ -98,7 +98,7 @@ public class FermentingRecipe implements Recipe { @Nonnull @Override - public ItemStack getResultItem() { + public ItemStack getResultItem(RegistryAccess pRegistryAccess) { return ItemStack.EMPTY; } @@ -120,7 +120,7 @@ public class FermentingRecipe implements Recipe { return ActuallyRecipes.Types.FERMENTING; } - public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { + public static class Serializer implements RecipeSerializer { @Nonnull @Override public FermentingRecipe fromJson(@Nonnull ResourceLocation pRecipeId, @Nonnull JsonObject pJson) { @@ -170,9 +170,9 @@ public class FermentingRecipe implements Recipe { @Override public void toNetwork(@Nonnull FriendlyByteBuf pBuffer, @Nonnull FermentingRecipe pRecipe) { - pBuffer.writeUtf(pRecipe.input.getFluid().getRegistryName().toString()); + pBuffer.writeUtf(ForgeRegistries.FLUIDS.getKey(pRecipe.input.getFluid()).toString()); pBuffer.writeInt(pRecipe.input.getAmount()); - pBuffer.writeUtf(pRecipe.output.getFluid().getRegistryName().toString()); + pBuffer.writeUtf(ForgeRegistries.FLUIDS.getKey(pRecipe.output.getFluid()).toString()); pBuffer.writeInt(pRecipe.output.getAmount()); pBuffer.writeInt(pRecipe.time); } @@ -193,11 +193,11 @@ public class FermentingRecipe implements Recipe { @Override public void serializeRecipeData(JsonObject pJson) { JsonObject ingredient = new JsonObject(); - ingredient.addProperty("fluid", input.getFluid().getRegistryName().toString()); + ingredient.addProperty("fluid", ForgeRegistries.FLUIDS.getKey(input.getFluid()).toString()); ingredient.addProperty("amount", input.getAmount()); JsonObject result = new JsonObject(); - result.addProperty("fluid", output.getFluid().getRegistryName().toString()); + result.addProperty("fluid", ForgeRegistries.FLUIDS.getKey(output.getFluid()).toString()); result.addProperty("amount", output.getAmount()); pJson.add("ingredient", ingredient); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LaserRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LaserRecipe.java index c665d2f20..b6c96914d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LaserRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LaserRecipe.java @@ -2,6 +2,7 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI; +import net.minecraft.core.RegistryAccess; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; @@ -14,7 +15,7 @@ import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.Level; -import net.minecraftforge.registries.ForgeRegistryEntry; +import net.minecraftforge.registries.ForgeRegistries; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -63,7 +64,7 @@ public class LaserRecipe implements Recipe { } @Override - public ItemStack assemble(Container pInv) { + public ItemStack assemble(Container pInv, RegistryAccess pRegistryAccess) { return result.copy(); } @@ -73,7 +74,7 @@ public class LaserRecipe implements Recipe { } @Override - public ItemStack getResultItem() { + public ItemStack getResultItem(RegistryAccess pRegistryAccess) { return result; } @@ -100,7 +101,7 @@ public class LaserRecipe implements Recipe { return getRecipeForStack(stack).isPresent(); } - public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { + public static class Serializer implements RecipeSerializer { @Override public LaserRecipe fromJson(@Nonnull ResourceLocation pRecipeId, @Nonnull JsonObject pJson) { Ingredient ingredient = Ingredient.fromJson(GsonHelper.getAsJsonObject(pJson, "ingredient")); @@ -147,7 +148,7 @@ public class LaserRecipe implements Recipe { pJson.addProperty("energy", energy); JsonObject resultObject = new JsonObject(); - resultObject.addProperty("item", output.asItem().getRegistryName().toString()); + resultObject.addProperty("item", ForgeRegistries.ITEMS.getKey(output.asItem()).toString()); pJson.add("result", resultObject); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LiquidFuelRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LiquidFuelRecipe.java index bbaeb5bfa..fb1d81b1b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LiquidFuelRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/LiquidFuelRecipe.java @@ -2,6 +2,7 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; +import net.minecraft.core.RegistryAccess; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; @@ -15,7 +16,6 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.registries.ForgeRegistryEntry; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -73,7 +73,7 @@ public class LiquidFuelRecipe implements Recipe { @Nonnull @Override - public ItemStack assemble(@Nonnull Container pInv) { + public ItemStack assemble(Container pInv, RegistryAccess pRegistryAccess) { return ItemStack.EMPTY; } @@ -84,7 +84,7 @@ public class LiquidFuelRecipe implements Recipe { @Nonnull @Override - public ItemStack getResultItem() { + public ItemStack getResultItem(RegistryAccess pRegistryAccess) { return ItemStack.EMPTY; } @@ -106,7 +106,7 @@ public class LiquidFuelRecipe implements Recipe { return ActuallyRecipes.Types.LIQUID_FUEL; } - public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { + public static class Serializer implements RecipeSerializer { @Nonnull @Override public LiquidFuelRecipe fromJson(@Nonnull ResourceLocation pId, JsonObject pJson) { @@ -141,7 +141,7 @@ public class LiquidFuelRecipe implements Recipe { @Override public void toNetwork(@Nonnull FriendlyByteBuf pBuffer, LiquidFuelRecipe pRecipe) { - pBuffer.writeUtf(pRecipe.fuel.getFluid().getRegistryName().toString()); + pBuffer.writeUtf(ForgeRegistries.FLUIDS.getKey(pRecipe.fuel.getFluid()).toString()); pBuffer.writeInt(pRecipe.fuel.getAmount()); pBuffer.writeInt(pRecipe.totalEnergy); pBuffer.writeInt(pRecipe.burnTime); @@ -164,7 +164,7 @@ public class LiquidFuelRecipe implements Recipe { @Override public void serializeRecipeData(JsonObject pJson) { JsonObject ingredient = new JsonObject(); - ingredient.addProperty("fluid", fuel.getFluid().getRegistryName().toString()); + ingredient.addProperty("fluid", ForgeRegistries.FLUIDS.getKey(fuel.getFluid()).toString()); ingredient.addProperty("amount", fuel.getAmount()); JsonObject result = new JsonObject(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/MiningLensRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/MiningLensRecipe.java index b8f846f78..cd8eda4b4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/MiningLensRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/MiningLensRecipe.java @@ -1,6 +1,7 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; +import net.minecraft.core.RegistryAccess; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; @@ -15,7 +16,7 @@ import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.ItemLike; import net.minecraft.world.level.Level; -import net.minecraftforge.registries.ForgeRegistryEntry; +import net.minecraftforge.registries.ForgeRegistries; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -62,7 +63,7 @@ public class MiningLensRecipe implements Recipe, WeightedEntry { @Nonnull @Override - public ItemStack assemble(Container pInv) { + public ItemStack assemble(Container pInv, RegistryAccess pRegistryAccess) { return ItemStack.EMPTY; } @@ -72,7 +73,7 @@ public class MiningLensRecipe implements Recipe, WeightedEntry { } @Override - public ItemStack getResultItem() { + public ItemStack getResultItem(RegistryAccess pRegistryAccess) { return output; } @@ -91,7 +92,7 @@ public class MiningLensRecipe implements Recipe, WeightedEntry { return ActuallyRecipes.Types.MINING_LENS; } - public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { + public static class Serializer implements RecipeSerializer { @Override public MiningLensRecipe fromJson(@Nonnull ResourceLocation pRecipeId, @Nonnull JsonObject pJson) { Ingredient ingredient = Ingredient.fromJson(GsonHelper.getAsJsonObject(pJson, "ingredient")); @@ -138,7 +139,7 @@ public class MiningLensRecipe implements Recipe, WeightedEntry { pJson.addProperty("weight", weight); JsonObject resultObject = new JsonObject(); - resultObject.addProperty("item", output.asItem().getRegistryName().toString()); + resultObject.addProperty("item", ForgeRegistries.ITEMS.getKey(output.asItem()).toString()); pJson.add("result", resultObject); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/PressingRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/PressingRecipe.java index b162f7056..71860f323 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/PressingRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/PressingRecipe.java @@ -2,6 +2,7 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; import com.google.gson.JsonParseException; +import net.minecraft.core.RegistryAccess; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; @@ -16,7 +17,6 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.material.Fluid; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.registries.ForgeRegistries; -import net.minecraftforge.registries.ForgeRegistryEntry; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -44,7 +44,7 @@ public class PressingRecipe implements Recipe { } @Override - public ItemStack assemble(Container pInv) { + public ItemStack assemble(Container pInv, RegistryAccess pRegistryAccess) { return ItemStack.EMPTY; } @@ -58,7 +58,7 @@ public class PressingRecipe implements Recipe { } @Override - public ItemStack getResultItem() { + public ItemStack getResultItem(RegistryAccess pRegistryAccess) { return ItemStack.EMPTY; } @@ -77,7 +77,7 @@ public class PressingRecipe implements Recipe { return ActuallyRecipes.Types.PRESSING; } - public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { + public static class Serializer implements RecipeSerializer { @Nonnull @Override public PressingRecipe fromJson(@Nonnull ResourceLocation pRecipeId, @Nonnull JsonObject pJson) { @@ -110,7 +110,7 @@ public class PressingRecipe implements Recipe { @Override public void toNetwork(@Nonnull FriendlyByteBuf pBuffer, @Nonnull PressingRecipe pRecipe) { pRecipe.input.toNetwork(pBuffer); - pBuffer.writeUtf(pRecipe.output.getFluid().getRegistryName().toString()); + pBuffer.writeUtf(ForgeRegistries.FLUIDS.getKey(pRecipe.output.getFluid()).toString()); pBuffer.writeInt(pRecipe.output.getAmount()); } } @@ -129,7 +129,7 @@ public class PressingRecipe implements Recipe { public void serializeRecipeData(JsonObject pJson) { pJson.add("ingredient", input.toJson()); JsonObject result = new JsonObject(); - result.addProperty("fluid", output.getFluid().getRegistryName().toString()); + result.addProperty("fluid", ForgeRegistries.FLUIDS.getKey(output.getFluid()).toString()); result.addProperty("amount", output.getAmount()); pJson.add("result", result); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/RecipeKeepDataShaped.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/RecipeKeepDataShaped.java index e9c86bcbe..da5df6baa 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/RecipeKeepDataShaped.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/RecipeKeepDataShaped.java @@ -2,14 +2,15 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; import net.minecraft.core.NonNullList; +import net.minecraft.core.RegistryAccess; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.inventory.CraftingContainer; import net.minecraft.world.item.ItemStack; +import net.minecraft.world.item.crafting.CraftingBookCategory; import net.minecraft.world.item.crafting.Ingredient; import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.ShapedRecipe; -import net.minecraftforge.registries.ForgeRegistryEntry; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -19,16 +20,16 @@ public class RecipeKeepDataShaped extends ShapedRecipe { public static String NAME = "copy_nbt"; public static final Logger LOGGER = LogManager.getLogger(); public RecipeKeepDataShaped(ResourceLocation idIn, String groupIn, int recipeWidthIn, int recipeHeightIn, NonNullList recipeItemsIn, ItemStack recipeOutputIn) { - super(idIn, groupIn, recipeWidthIn, recipeHeightIn, recipeItemsIn, recipeOutputIn); + super(idIn, groupIn, CraftingBookCategory.MISC, recipeWidthIn, recipeHeightIn, recipeItemsIn, recipeOutputIn); } public RecipeKeepDataShaped(ShapedRecipe shapedRecipe) { - super(shapedRecipe.getId(), shapedRecipe.getGroup(), shapedRecipe.getRecipeWidth(), shapedRecipe.getRecipeHeight(), shapedRecipe.getIngredients(), shapedRecipe.getResultItem()); + super(shapedRecipe.getId(), shapedRecipe.getGroup(), CraftingBookCategory.MISC, shapedRecipe.getRecipeWidth(), shapedRecipe.getRecipeHeight(), shapedRecipe.getIngredients(), shapedRecipe.getResultItem(null)); } @Override - public ItemStack assemble(CraftingContainer inv) { - final ItemStack craftingResult = super.assemble(inv); + public ItemStack assemble(CraftingContainer inv, RegistryAccess registryAccess) { + final ItemStack craftingResult = super.assemble(inv, registryAccess); TargetNBTIngredient donorIngredient = null; ItemStack datasource = ItemStack.EMPTY; NonNullList ingredients = getIngredients(); @@ -60,7 +61,7 @@ public class RecipeKeepDataShaped extends ShapedRecipe { return ActuallyRecipes.KEEP_DATA_SHAPED_RECIPE.get(); } - public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { + public static class Serializer implements RecipeSerializer { @Nullable @Override public RecipeKeepDataShaped fromNetwork(ResourceLocation recipeId, FriendlyByteBuf buffer) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/SolidFuelRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/SolidFuelRecipe.java index 849ddacb2..f352765c2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/SolidFuelRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/SolidFuelRecipe.java @@ -1,6 +1,7 @@ package de.ellpeck.actuallyadditions.mod.crafting; import com.google.gson.JsonObject; +import net.minecraft.core.RegistryAccess; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.network.FriendlyByteBuf; import net.minecraft.resources.ResourceLocation; @@ -10,7 +11,6 @@ import net.minecraft.world.item.crafting.Recipe; import net.minecraft.world.item.crafting.RecipeSerializer; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.level.Level; -import net.minecraftforge.registries.ForgeRegistryEntry; import javax.annotation.Nullable; @@ -51,7 +51,7 @@ public class SolidFuelRecipe implements Recipe { } @Override - public ItemStack assemble(SingleItem pInv) { + public ItemStack assemble(SingleItem pInv, RegistryAccess registryAccess) { return ItemStack.EMPTY; } @@ -61,7 +61,7 @@ public class SolidFuelRecipe implements Recipe { } @Override - public ItemStack getResultItem() { + public ItemStack getResultItem(RegistryAccess pRegistryAccess) { return ItemStack.EMPTY; } @@ -80,7 +80,7 @@ public class SolidFuelRecipe implements Recipe { return ActuallyRecipes.Types.SOLID_FUEL; } - public static class Serializer extends ForgeRegistryEntry> implements RecipeSerializer { + public static class Serializer implements RecipeSerializer { @Override public SolidFuelRecipe fromJson(ResourceLocation pId, JsonObject pJson) { Ingredient itemIngredient = Ingredient.fromJson(pJson.get("item")); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/WrappedRecipe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/WrappedRecipe.java index b1d126cda..9b202d371 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/WrappedRecipe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/crafting/WrappedRecipe.java @@ -4,6 +4,7 @@ import com.google.gson.JsonObject; import net.minecraft.data.recipes.FinishedRecipe; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.item.crafting.RecipeSerializer; +import net.minecraftforge.registries.ForgeRegistries; import javax.annotation.Nullable; import java.util.function.Consumer; @@ -35,9 +36,9 @@ public class WrappedRecipe implements FinishedRecipe { JsonObject jsonObject = new JsonObject(); if (serializerOverride != null) - jsonObject.addProperty("type", serializerOverride.getRegistryName().toString()); + jsonObject.addProperty("type", ForgeRegistries.RECIPE_SERIALIZERS.getKey(serializerOverride).toString()); else - jsonObject.addProperty("type", inner.getType().getRegistryName().toString()); + jsonObject.addProperty("type", ForgeRegistries.RECIPE_SERIALIZERS.getKey(inner.getType()).toString()); serializeRecipeData(jsonObject); return jsonObject; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java b/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java index 563178eb3..d4abb5856 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/entity/EntityWorm.java @@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.mod.config.CommonConfig; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.protocol.Packet; +import net.minecraft.network.protocol.game.ClientGamePacketListener; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; @@ -48,7 +49,7 @@ public class EntityWorm extends Entity { BlockPos posUp = pos.above(); BlockState stateUp = world.getBlockState(posUp); Block blockUp = stateUp.getBlock(); - return blockUp instanceof IPlantable || blockUp instanceof BushBlock || stateUp.getMaterial().isReplaceable(); + return blockUp instanceof IPlantable || blockUp instanceof BushBlock || stateUp.canBeReplaced(); } else { return false; } @@ -74,13 +75,13 @@ public class EntityWorm extends Entity { public void setPos(double pX, double pY, double pZ) { super.setPos(pX, pY, pZ); - if (level.isClientSide) + if (this.level().isClientSide) return; if (waterTicket != null) waterTicket.invalidate(); - waterTicket = FarmlandWaterManager.addAABBTicket(level, new AABB(getX() - 2, getY() - 1.5, getZ() - 2, getX() + 2, getY(), getZ() + 2)); + waterTicket = FarmlandWaterManager.addAABBTicket(this.level(), new AABB(getX() - 2, getY() - 1.5, getZ() - 2, getX() + 2, getY(), getZ() + 2)); } @Override @@ -90,47 +91,47 @@ public class EntityWorm extends Entity { @Override public void tick() { - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { this.timer++; if (this.timer % 50 == 0) { for (int x = -1; x <= 1; x++) { for (int z = -1; z <= 1; z++) { - BlockPos pos = new BlockPos(this.getX() + x, this.getY(), this.getZ() + z); - BlockState state = this.level.getBlockState(pos); + BlockPos pos = BlockPos.containing(this.getX() + x, this.getY(), this.getZ() + z); + BlockState state = this.level().getBlockState(pos); Block block = state.getBlock(); boolean isMiddlePose = x == 0 && z == 0; - if (canWormify(this.level, pos, state)) { + if (canWormify(this.level(), pos, state)) { boolean isFarmland = block instanceof FarmBlock; /* if (!isFarmland || state.getValue(FarmlandBlock.MOISTURE) < 7) { - if (isMiddlePose || this.level.random.nextFloat() >= 0.45F) { + if (isMiddlePose || this.level().random.nextFloat() >= 0.45F) { if (!isFarmland) { DefaultFarmerBehavior.useHoeAt(this.level, pos); } - state = this.level.getBlockState(pos); + state = this.level().getBlockState(pos); isFarmland = state.getBlock() instanceof FarmlandBlock; if (isFarmland) { - this.level.setBlock(pos, state.setValue(FarmlandBlock.MOISTURE, 7), 2); + this.level().setBlock(pos, state.setValue(FarmlandBlock.MOISTURE, 7), 2); } } }*/ - if (isFarmland && this.level.random.nextFloat() >= 0.95F) { + if (isFarmland && this.level().random.nextFloat() >= 0.95F) { BlockPos plant = pos.above(); - if (!this.level.isEmptyBlock(plant)) { - BlockState plantState = this.level.getBlockState(plant); + if (!this.level().isEmptyBlock(plant)) { + BlockState plantState = this.level().getBlockState(plant); Block plantBlock = plantState.getBlock(); if ((plantBlock instanceof BonemealableBlock || plantBlock instanceof IPlantable) && !(plantBlock instanceof GrassBlock)) { - plantBlock.randomTick(plantState, (ServerLevel) this.level, plant, this.level.random); + plantBlock.randomTick(plantState, (ServerLevel) this.level(), plant, this.level().random); - BlockState newState = this.level.getBlockState(plant); + BlockState newState = this.level().getBlockState(plant); if (newState != plantState) { - this.level.levelEvent(2005, plant, 0); + this.level().levelEvent(2005, plant, 0); } } } @@ -165,7 +166,7 @@ public class EntityWorm extends Entity { } @Override - public Packet getAddEntityPacket() { + public Packet getAddEntityPacket() { return NetworkHooks.getEntitySpawningPacket(this); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/entity/RenderWorm.java b/src/main/java/de/ellpeck/actuallyadditions/mod/entity/RenderWorm.java index 1f82c8094..f589e1619 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/entity/RenderWorm.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/entity/RenderWorm.java @@ -11,18 +11,18 @@ package de.ellpeck.actuallyadditions.mod.entity; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.math.Vector3f; +import com.mojang.math.Axis; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.block.model.ItemTransforms; import net.minecraft.client.renderer.entity.EntityRenderer; import net.minecraft.client.renderer.entity.EntityRendererProvider; import net.minecraft.client.renderer.texture.OverlayTexture; -import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.inventory.InventoryMenu; +import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -39,7 +39,7 @@ public class RenderWorm extends EntityRenderer { stack = new ItemStack(ActuallyItems.WORM.get()); snailStack = new ItemStack(ActuallyItems.WORM.get()); - snailStack.setHoverName(new TextComponent("Snail Mail")); + snailStack.setHoverName(Component.literal("Snail Mail")); } @Override @@ -48,10 +48,10 @@ public class RenderWorm extends EntityRenderer { matrix.pushPose(); matrix.translate(0, 0.7F, 0); double boop = Util.getMillis() / 70D; - matrix.mulPose(Vector3f.YP.rotationDegrees(-(float) (boop % 360))); + matrix.mulPose(Axis.YP.rotationDegrees(-(float) (boop % 360))); matrix.translate(0,0,0.4); Minecraft.getInstance().getItemRenderer().renderStatic( - isSnail? snailStack:stack, ItemTransforms.TransformType.FIXED, light, OverlayTexture.NO_OVERLAY, matrix, buffer, 0 + isSnail? snailStack:stack, ItemDisplayContext.FIXED, light, OverlayTexture.NO_OVERLAY, matrix, buffer, null, 0 ); matrix.popPose(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java index ee95d9c38..2037ff64d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/ClientEvents.java @@ -23,9 +23,10 @@ import de.ellpeck.actuallyadditions.mod.util.StackUtil; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; +import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.block.Block; @@ -34,7 +35,8 @@ import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.client.event.RenderGameOverlayEvent; +import net.minecraftforge.client.event.RenderGuiOverlayEvent; +import net.minecraftforge.client.gui.overlay.GuiOverlayManager; import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.entity.player.ItemTooltipEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; @@ -42,8 +44,8 @@ import net.minecraftforge.eventbus.api.SubscribeEvent; @OnlyIn(Dist.CLIENT) public class ClientEvents { - private static final Component ADVANCED_INFO_TEXT_PRE = new TextComponent(" -").withStyle(ChatFormatting.DARK_GRAY); - private static final Component ADVANCED_INFO_HEADER_PRE = new TextComponent(" -").withStyle(ChatFormatting.GRAY); + private static final Component ADVANCED_INFO_TEXT_PRE = Component.literal(" -").withStyle(ChatFormatting.DARK_GRAY); + private static final Component ADVANCED_INFO_HEADER_PRE = Component.literal(" -").withStyle(ChatFormatting.GRAY); private static EnergyDisplay energyDisplay; @@ -161,10 +163,10 @@ public class ClientEvents { } @SubscribeEvent - public void onGameOverlay(RenderGameOverlayEvent.Post event) { + public void onGameOverlay(RenderGuiOverlayEvent.Post event) { Minecraft minecraft = Minecraft.getInstance(); - if (event.getType() == RenderGameOverlayEvent.ElementType.ALL && minecraft.screen == null) { - PoseStack matrices = event.getMatrixStack(); + if (event.getOverlay() == GuiOverlayManager.findOverlay(new ResourceLocation("crosshair")) && minecraft.screen == null) { //ALL + GuiGraphics guiGraphics = event.getGuiGraphics(); Player player = minecraft.player; if (player == null) { return; @@ -176,7 +178,7 @@ public class ClientEvents { if (StackUtil.isValid(stack)) { if (stack.getItem() instanceof IHudDisplay) { - ((IHudDisplay) stack.getItem()).displayHud(matrices, minecraft, player, stack, posHit, event.getWindow()); + ((IHudDisplay) stack.getItem()).displayHud(guiGraphics, minecraft, player, stack, posHit, event.getWindow()); } } @@ -186,16 +188,15 @@ public class ClientEvents { BlockEntity tileHit = minecraft.level.getBlockEntity(rayCast.getBlockPos()); if (blockHit instanceof IHudDisplay) { - ((IHudDisplay) blockHit).displayHud(matrices, minecraft, player, stack, posHit, event.getWindow()); + ((IHudDisplay) blockHit).displayHud(guiGraphics, minecraft, player, stack, posHit, event.getWindow()); } - if (tileHit instanceof TileEntityBase) { - TileEntityBase base = (TileEntityBase) tileHit; - if (base.isRedstoneToggle()) { + if (tileHit instanceof TileEntityBase base) { + if (base.isRedstoneToggle()) { String strg = String.format("%s: %s", I18n.get("info." + ActuallyAdditions.MODID + ".redstoneMode"), ChatFormatting.DARK_RED + I18n.get("info." + ActuallyAdditions.MODID + ".redstoneMode." + (base.isPulseMode ? "pulse" : "deactivation")) + ChatFormatting.RESET); - font.drawShadow(matrices, strg, event.getWindow().getGuiScaledWidth() / 2f + 5, event.getWindow().getGuiScaledHeight() / 2f + 5, 0xFFFFFF); + guiGraphics.drawString(font, strg, (int) (event.getWindow().getGuiScaledWidth() / 2f + 5), (int) (event.getWindow().getGuiScaledHeight() / 2f + 5), 0xFFFFFF); String expl; if (!stack.isEmpty() && stack.getItem() == CommonConfig.Other.redstoneConfigureItem) { @@ -203,22 +204,22 @@ public class ClientEvents { } else { expl = ChatFormatting.GRAY.toString() + ChatFormatting.ITALIC + I18n.get("info." + ActuallyAdditions.MODID + ".redstoneMode.invalidItem", I18n.get(CommonConfig.Other.redstoneConfigureItem.asItem().getDescriptionId())); } - font.drawShadow(matrices, expl, event.getWindow().getGuiScaledWidth() / 2f + 5, event.getWindow().getGuiScaledHeight() / 2f + 15, 0xFFFFFF); + guiGraphics.drawString(font, expl, (int) (event.getWindow().getGuiScaledWidth() / 2f + 5), (int) (event.getWindow().getGuiScaledHeight() / 2f + 15), 0xFFFFFF); } } - if (tileHit instanceof IEnergyDisplay) { - IEnergyDisplay display = (IEnergyDisplay) tileHit; - if (!display.needsHoldShift() || player.isShiftKeyDown()) { + if (tileHit instanceof IEnergyDisplay display) { + if (!display.needsHoldShift() || player.isShiftKeyDown()) { if (energyDisplay == null) { energyDisplay = new EnergyDisplay(0, 0, null); } energyDisplay.setData(2, event.getWindow().getGuiScaledHeight() - 96, display.getEnergyStorage(), true, true); + PoseStack matrices = guiGraphics.pose(); matrices.pushPose(); // GlStateManager._color4f(1F, 1F, 1F, 1F); RenderSystem.setShaderColor(1F, 1F, 1F, 1F); - energyDisplay.draw(matrices); + energyDisplay.draw(guiGraphics); matrices.popPose(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java b/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java index c629c5fdc..a3662246b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/event/CommonEvents.java @@ -33,9 +33,10 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.event.entity.living.LivingDropsEvent; import net.minecraftforge.event.entity.player.EntityItemPickupEvent; import net.minecraftforge.event.entity.player.PlayerEvent; -import net.minecraftforge.event.world.BlockEvent; +import net.minecraftforge.event.level.BlockEvent; import net.minecraftforge.eventbus.api.Event; import net.minecraftforge.eventbus.api.SubscribeEvent; +import net.minecraftforge.registries.ForgeRegistries; import java.util.Locale; @@ -57,7 +58,7 @@ public class CommonEvents { return; } - Player player = event.getPlayer(); + Player player = event.getEntity(); ItemEntity item = event.getItem(); if (item != null && item.isAlive()) { ItemStack stack = item.getItem(); @@ -141,11 +142,11 @@ public class CommonEvents { //TODO this isnt how this should be done im pretty sure... @SubscribeEvent public void onEntityDropEvent(LivingDropsEvent event) { - if (event.getEntityLiving().level != null && !event.getEntityLiving().level.isClientSide && event.getSource().getEntity() instanceof Player) { + if (event.getEntity().level() != null && !event.getEntity().level().isClientSide && event.getSource().getEntity() instanceof Player) { //Drop Cobwebs from Spiders - if (ConfigBoolValues.DO_SPIDER_DROPS.isEnabled() && event.getEntityLiving() instanceof Spider) { - if (event.getEntityLiving().level.random.nextInt(20) <= event.getLootingLevel() * 2) { - event.getDrops().add(new ItemEntity(event.getEntityLiving().level, event.getEntityLiving().getX(), event.getEntityLiving().getY(), event.getEntityLiving().getZ(), new ItemStack(Blocks.COBWEB, event.getEntityLiving().level.random.nextInt(2 + event.getLootingLevel()) + 1))); + if (ConfigBoolValues.DO_SPIDER_DROPS.isEnabled() && event.getEntity() instanceof Spider) { + if (event.getEntity().level().random.nextInt(20) <= event.getLootingLevel() * 2) { + event.getDrops().add(new ItemEntity(event.getEntity().level(), event.getEntity().getX(), event.getEntity().getY(), event.getEntity().getZ(), new ItemStack(Blocks.COBWEB, event.getEntity().level().random.nextInt(2 + event.getLootingLevel()) + 1))); } } } @@ -153,9 +154,8 @@ public class CommonEvents { @SubscribeEvent public void onLogInEvent(PlayerEvent.PlayerLoggedInEvent event) { - if (!event.getPlayer().level.isClientSide && event.getPlayer() instanceof ServerPlayer) { - ServerPlayer player = (ServerPlayer) event.getPlayer(); - PacketHandlerHelper.syncPlayerData(player, true); + if (!event.getEntity().level().isClientSide && event.getEntity() instanceof ServerPlayer player) { + PacketHandlerHelper.syncPlayerData(player, true); ActuallyAdditions.LOGGER.info("Sending Player Data to player " + player.getName() + " with UUID " + player.getUUID() + "."); } } @@ -166,18 +166,18 @@ public class CommonEvents { //checkAchievements(event.crafting, event.player, InitAchievements.Type.CRAFTING); if (CommonConfig.Other.GIVE_BOOKLET_ON_FIRST_CRAFT.get()) { - if (!event.getPlayer().level.isClientSide && StackUtil.isValid(event.getCrafting()) && event.getCrafting().getItem() != ActuallyItems.ITEM_BOOKLET.get()) { + if (!event.getEntity().level().isClientSide && StackUtil.isValid(event.getCrafting()) && event.getCrafting().getItem() != ActuallyItems.ITEM_BOOKLET.get()) { - String name = event.getCrafting().getItem().getRegistryName().toString(); + String name = ForgeRegistries.ITEMS.getKey(event.getCrafting().getItem()).toString(); if (name != null && name.toLowerCase(Locale.ROOT).contains(ActuallyAdditions.MODID)) { - PlayerData.PlayerSave save = PlayerData.getDataFromPlayer(event.getPlayer()); + PlayerData.PlayerSave save = PlayerData.getDataFromPlayer(event.getEntity()); if (save != null && !save.bookGottenAlready) { save.bookGottenAlready = true; - WorldData.get(event.getPlayer().getCommandSenderWorld()).setDirty(); + WorldData.get(event.getEntity().getCommandSenderWorld()).setDirty(); - ItemEntity entityItem = new ItemEntity(event.getPlayer().level, event.getPlayer().getX(), event.getPlayer().getY(), event.getPlayer().getZ(), new ItemStack(ActuallyItems.ITEM_BOOKLET.get())); + ItemEntity entityItem = new ItemEntity(event.getEntity().level(), event.getEntity().getX(), event.getEntity().getY(), event.getEntity().getZ(), new ItemStack(ActuallyItems.ITEM_BOOKLET.get())); entityItem.setPickUpDelay(0); - event.getPlayer().level.addFreshEntity(entityItem); + event.getEntity().level().addFreshEntity(entityItem); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/FluidAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/FluidAA.java index ccfb87174..d555eb03e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/FluidAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/FluidAA.java @@ -14,23 +14,31 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import net.minecraft.resources.ResourceLocation; +import net.minecraft.sounds.SoundEvents; import net.minecraft.world.item.BucketItem; import net.minecraft.world.item.Item; import net.minecraft.world.item.Items; import net.minecraft.world.level.block.Block; +import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.LiquidBlock; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.material.FlowingFluid; import net.minecraft.world.level.material.Fluid; -import net.minecraft.world.level.material.Material; -import net.minecraftforge.fluids.FluidAttributes; +import net.minecraft.world.level.pathfinder.BlockPathTypes; +import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions; +import net.minecraftforge.common.SoundActions; +import net.minecraftforge.fluids.FluidType; import net.minecraftforge.fluids.ForgeFlowingFluid; import net.minecraftforge.registries.RegistryObject; +import java.util.function.Consumer; import java.util.function.Supplier; public class FluidAA implements Supplier { private String name; + private final ResourceLocation stillTexture; + private final ResourceLocation flowingTexture; + private RegistryObject fluidType; private RegistryObject source; private RegistryObject flowing; private RegistryObject fluidBlock; @@ -40,17 +48,42 @@ public class FluidAA implements Supplier { return name; } - public FluidAA(String fluidName, String textureName) { - name = fluidName; - ForgeFlowingFluid.Properties props = makeProperties(textureName, () -> fluidBlock.get(), () -> source.get(), () -> flowing.get(), () -> bucket.get()); - source = InitFluids.FLUIDS.register(name, () -> new ForgeFlowingFluid.Source(props)); - flowing = InitFluids.FLUIDS.register(name + "_flowing", () -> new ForgeFlowingFluid.Flowing(props)); - fluidBlock = ActuallyBlocks.BLOCKS.register(name, () -> new LiquidBlock(source, BlockBehaviour.Properties.of(Material.WATER))); - bucket = ActuallyItems.ITEMS.register(name + "_bucket", () -> new BucketItem(source, new Item.Properties().craftRemainder(Items.BUCKET).tab(ActuallyAdditions.GROUP).stacksTo(1))); + public static ForgeFlowingFluid.Properties createProperties(Supplier type, Supplier still, Supplier flowing, + RegistryObject bucket, Supplier block) { + return new ForgeFlowingFluid.Properties(type, still, flowing) + .bucket(bucket).block(block); } - public static ForgeFlowingFluid.Properties makeProperties(String texture, Supplier blockSupplier, Supplier stillSupplier, Supplier flowingSupplier, Supplier bucketSupplier) { - return new ForgeFlowingFluid.Properties(stillSupplier, flowingSupplier, FluidAttributes.builder(new ResourceLocation(ActuallyAdditions.MODID,texture + "_still"), new ResourceLocation(ActuallyAdditions.MODID, texture + "_flowing"))).bucket(bucketSupplier).block(blockSupplier); + public FluidAA(String fluidName, String textureName) { + this.name = fluidName; + this.stillTexture = new ResourceLocation(ActuallyAdditions.MODID,textureName + "_still"); + this.flowingTexture = new ResourceLocation(ActuallyAdditions.MODID,textureName + "_flowing"); + this.fluidType = InitFluids.FLUID_TYPES.register(name, () -> new FluidType(createTypeProperties()) { + @Override + public void initializeClient(Consumer consumer) { + consumer.accept(new IClientFluidTypeExtensions() { + + @Override + public ResourceLocation getStillTexture() { + return FluidAA.this.stillTexture; + } + + @Override + public ResourceLocation getFlowingTexture() { + return FluidAA.this.flowingTexture; + } + }); + } + }); + + source = InitFluids.FLUIDS.register(name, () -> new ForgeFlowingFluid.Source(createProperties(fluidType, source, flowing, bucket, fluidBlock))); + flowing = InitFluids.FLUIDS.register(name + "_flowing", () -> new ForgeFlowingFluid.Flowing(createProperties(fluidType, source, flowing, bucket, fluidBlock))); + fluidBlock = ActuallyBlocks.BLOCKS.register(name, () -> new LiquidBlock(source, BlockBehaviour.Properties.copy(Blocks.WATER))); + bucket = ActuallyItems.ITEMS.register(name + "_bucket", () -> new BucketItem(source, new Item.Properties().craftRemainder(Items.BUCKET).stacksTo(1))); + } + + public FluidType getFluidType() { + return fluidType.get(); } @Override @@ -69,4 +102,13 @@ public class FluidAA implements Supplier { public FlowingFluid getFlowing() { return flowing.get(); } + + public static FluidType.Properties createTypeProperties() { + return FluidType.Properties.create() + .canSwim(true) + .canDrown(true) + .pathType(BlockPathTypes.LAVA) + .sound(SoundActions.BUCKET_FILL, SoundEvents.BUCKET_FILL) + .sound(SoundActions.BUCKET_EMPTY, SoundEvents.BUCKET_EMPTY); + } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/InitFluids.java b/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/InitFluids.java index ae52302ae..a828b639c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/InitFluids.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/fluids/InitFluids.java @@ -14,11 +14,13 @@ import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.material.Fluid; import net.minecraftforge.eventbus.api.IEventBus; +import net.minecraftforge.fluids.FluidType; import net.minecraftforge.registries.DeferredRegister; import net.minecraftforge.registries.ForgeRegistries; public final class InitFluids { public static final DeferredRegister FLUIDS = DeferredRegister.create(ForgeRegistries.FLUIDS, ActuallyAdditions.MODID); + public static final DeferredRegister FLUID_TYPES = DeferredRegister.create(ForgeRegistries.Keys.FLUID_TYPES, ActuallyAdditions.MODID); public static final DeferredRegister FLUID_BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, ActuallyAdditions.MODID); public static final FluidAA CANOLA_OIL = new FluidAA("canola_oil", "fluid/canola_oil"); @@ -29,6 +31,7 @@ public final class InitFluids { public static void init(IEventBus bus) { FLUIDS.register(bus); + FLUID_TYPES.register(bus); FLUID_BLOCKS.register(bus); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ActuallyContainers.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ActuallyContainers.java index 2783aeee2..896f8ec26 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ActuallyContainers.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ActuallyContainers.java @@ -8,7 +8,7 @@ import net.minecraftforge.registries.ForgeRegistries; import net.minecraftforge.registries.RegistryObject; public class ActuallyContainers { - public static final DeferredRegister> CONTAINERS = DeferredRegister.create(ForgeRegistries.CONTAINERS, ActuallyAdditions.MODID); + public static final DeferredRegister> CONTAINERS = DeferredRegister.create(ForgeRegistries.MENU_TYPES, ActuallyAdditions.MODID); public static final RegistryObject> BAG_CONTAINER = CONTAINERS.register("bag_container", () -> IForgeMenuType.create(SackContainer::fromNetwork)); public static final RegistryObject> BIO_REACTOR_CONTAINER = CONTAINERS.register("bioreactor_container", () -> IForgeMenuType.create(ContainerBioReactor::fromNetwork)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBioReactor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBioReactor.java index 95e00c9ee..722f58e02 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBioReactor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBioReactor.java @@ -26,7 +26,7 @@ public class ContainerBioReactor extends AbstractContainerMenu { public final TileEntityBioReactor tile; public static ContainerBioReactor fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerBioReactor(windowId, inv, (TileEntityBioReactor) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerBioReactor(windowId, inv, (TileEntityBioReactor) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerBioReactor(int windowId, Inventory inventory, TileEntityBioReactor tile) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBreaker.java index 9a4a5a4bf..0d039f702 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerBreaker.java @@ -27,7 +27,7 @@ public class ContainerBreaker extends AbstractContainerMenu { public final TileEntityBreaker breaker; public static ContainerBreaker fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerBreaker(windowId, inv, (TileEntityBreaker) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerBreaker(windowId, inv, (TileEntityBreaker) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerBreaker(int windowId, Inventory inventory, TileEntityBreaker tile) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCanolaPress.java index 7918eddf0..d63ddb9bd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCanolaPress.java @@ -45,7 +45,7 @@ public class ContainerCanolaPress extends AbstractContainerMenu { } public static ContainerCanolaPress fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerCanolaPress(windowId, inv, (TileEntityCanolaPress) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerCanolaPress(windowId, inv, (TileEntityCanolaPress) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoalGenerator.java index d4e16d2e8..8783f8246 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoalGenerator.java @@ -28,7 +28,7 @@ public class ContainerCoalGenerator extends AbstractContainerMenu { public final TileEntityCoalGenerator generator; public static ContainerCoalGenerator fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerCoalGenerator(windowId, inv, (TileEntityCoalGenerator) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerCoalGenerator(windowId, inv, (TileEntityCoalGenerator) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerCoalGenerator(int windowId, Inventory inventory, TileEntityCoalGenerator tile) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoffeeMachine.java index ff500a5ef..646fd63e5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerCoffeeMachine.java @@ -31,7 +31,7 @@ public class ContainerCoffeeMachine extends AbstractContainerMenu { public final TileEntityCoffeeMachine machine; public static ContainerCoffeeMachine fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerCoffeeMachine(windowId, inv, (TileEntityCoffeeMachine) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerCoffeeMachine(windowId, inv, (TileEntityCoffeeMachine) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerCoffeeMachine(int windowId, Inventory inventory, TileEntityCoffeeMachine tile) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDirectionalBreaker.java index d44ce34f3..7331362b5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDirectionalBreaker.java @@ -47,7 +47,7 @@ public class ContainerDirectionalBreaker extends AbstractContainerMenu { } public static ContainerDirectionalBreaker fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerDirectionalBreaker(windowId, inv, (TileEntityLongRangeBreaker) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerDirectionalBreaker(windowId, inv, (TileEntityLongRangeBreaker) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDropper.java index 93c56a98c..babd9fdc6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerDropper.java @@ -29,7 +29,7 @@ public class ContainerDropper extends AbstractContainerMenu { Player player; public static ContainerDropper fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerDropper(windowId, inv, (TileEntityDropper) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerDropper(windowId, inv, (TileEntityDropper) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerDropper(int windowId, Inventory inventory, TileEntityDropper tile) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java index f69778042..a2e1d2b3a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnergizer.java @@ -23,7 +23,7 @@ import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ArmorItem; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.enchantment.EnchantmentHelper; -import net.minecraftforge.energy.CapabilityEnergy; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import java.util.Objects; @@ -33,7 +33,7 @@ public class ContainerEnergizer extends AbstractContainerMenu { public final TileEntityEnergizer energizer; public static ContainerEnergizer fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerEnergizer(windowId, inv, (TileEntityEnergizer) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerEnergizer(windowId, inv, (TileEntityEnergizer) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerEnergizer(int windowId, Inventory inventory, TileEntityEnergizer tile) { @@ -43,7 +43,7 @@ public class ContainerEnergizer extends AbstractContainerMenu { this.addSlot(new SlotItemHandlerUnconditioned(this.energizer.inv, 0, 76, 73) { @Override public boolean mayPlace(ItemStack stack) { - return super.mayPlace(stack) && stack.getCapability(CapabilityEnergy.ENERGY, null).isPresent(); + return super.mayPlace(stack) && stack.getCapability(ForgeCapabilities.ENERGY, null).isPresent(); } }); this.addSlot(new SlotOutput(this.energizer.inv, 1, 76, 42)); @@ -110,7 +110,7 @@ public class ContainerEnergizer extends AbstractContainerMenu { //Other Slots in Inventory excluded else if (slot >= inventoryStart) { //Shift from Inventory - if (newStack.getCapability(CapabilityEnergy.ENERGY, null).isPresent()) { + if (newStack.getCapability(ForgeCapabilities.ENERGY, null).isPresent()) { if (!this.moveItemStackTo(newStack, 0, 1, false)) { return ItemStack.EMPTY; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java index c5ae10a29..c8b535ab7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerEnervator.java @@ -22,7 +22,7 @@ import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.inventory.Slot; import net.minecraft.world.item.ArmorItem; import net.minecraft.world.item.ItemStack; -import net.minecraftforge.energy.CapabilityEnergy; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import java.util.Objects; @@ -31,7 +31,7 @@ public class ContainerEnervator extends AbstractContainerMenu { public final TileEntityEnervator enervator; public static ContainerEnervator fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerEnervator(windowId, inv, (TileEntityEnervator) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerEnervator(windowId, inv, (TileEntityEnervator) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerEnervator(int windowId, Inventory inventory, TileEntityEnervator tile) { @@ -98,7 +98,7 @@ public class ContainerEnervator extends AbstractContainerMenu { //Other Slots in Inventory excluded else if (slot >= inventoryStart) { //Shift from Inventory - if (newStack.getCapability(CapabilityEnergy.ENERGY).isPresent()) { + if (newStack.getCapability(ForgeCapabilities.ENERGY).isPresent()) { if (!this.moveItemStackTo(newStack, 0, 1, false)) { return ItemStack.EMPTY; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFarmer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFarmer.java index 3b9369bed..7d9a0d91c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFarmer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFarmer.java @@ -27,7 +27,7 @@ public class ContainerFarmer extends AbstractContainerMenu { public final TileEntityFarmer farmer; public static ContainerFarmer fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerFarmer(windowId, inv, (TileEntityFarmer) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerFarmer(windowId, inv, (TileEntityFarmer) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerFarmer(int windowId, Inventory inventory, TileEntityFarmer tile) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFeeder.java index 71c5802d7..1381a08dc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFeeder.java @@ -27,7 +27,7 @@ public class ContainerFeeder extends AbstractContainerMenu { public final TileEntityFeeder feeder; public static ContainerFeeder fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerFeeder(windowId, inv, (TileEntityFeeder) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerFeeder(windowId, inv, (TileEntityFeeder) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerFeeder(int windowId, Inventory inventory, TileEntityFeeder tile) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFermentingBarrel.java index 054f99a8f..1ff91cac8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFermentingBarrel.java @@ -26,7 +26,7 @@ public class ContainerFermentingBarrel extends AbstractContainerMenu { public final TileEntityFermentingBarrel barrel; public static ContainerFermentingBarrel fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerFermentingBarrel(windowId, inv, (TileEntityFermentingBarrel) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerFermentingBarrel(windowId, inv, (TileEntityFermentingBarrel) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerFermentingBarrel(int windowId, Inventory inventory, TileEntityFermentingBarrel tile) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFluidCollector.java index c87f463a7..c35659065 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFluidCollector.java @@ -26,7 +26,7 @@ public class ContainerFluidCollector extends AbstractContainerMenu { public final TileEntityFluidCollector collector; public static ContainerFluidCollector fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerFluidCollector(windowId, inv, (TileEntityFluidCollector) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerFluidCollector(windowId, inv, (TileEntityFluidCollector) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerFluidCollector(int windowId, Inventory inventory, TileEntityFluidCollector tile) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFurnaceDouble.java index 51233a427..a23f79047 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerFurnaceDouble.java @@ -51,7 +51,7 @@ public class ContainerFurnaceDouble extends AbstractContainerMenu { } public static ContainerFurnaceDouble fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerFurnaceDouble(windowId, inv, (TileEntityPoweredFurnace) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerFurnaceDouble(windowId, inv, (TileEntityPoweredFurnace) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } @Nonnull @@ -83,7 +83,7 @@ public class ContainerFurnaceDouble extends AbstractContainerMenu { return ItemStack.EMPTY; } - ItemStack recipeOutput = irecipe.getResultItem(); + ItemStack recipeOutput = irecipe.getResultItem(player.level().registryAccess()); //Shift from Inventory if (StackUtil.isValid(recipeOutput)) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerLaserRelayItemWhitelist.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerLaserRelayItemWhitelist.java index 31d262db2..566756c93 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerLaserRelayItemWhitelist.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerLaserRelayItemWhitelist.java @@ -52,7 +52,7 @@ public class ContainerLaserRelayItemWhitelist extends AbstractContainerMenu { } public static ContainerLaserRelayItemWhitelist fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerLaserRelayItemWhitelist(windowId, inv, (TileEntityLaserRelayItemAdvanced) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerLaserRelayItemWhitelist(windowId, inv, (TileEntityLaserRelayItemAdvanced) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerMiner.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerMiner.java index f8525b13a..5ba6a453f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerMiner.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerMiner.java @@ -47,7 +47,7 @@ public class ContainerMiner extends AbstractContainerMenu { } public static ContainerMiner fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerMiner(windowId, inv, (TileEntityVerticalDigger) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerMiner(windowId, inv, (TileEntityVerticalDigger) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerOilGenerator.java index c37916906..a0b0de370 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerOilGenerator.java @@ -26,7 +26,7 @@ public class ContainerOilGenerator extends AbstractContainerMenu { public final TileEntityOilGenerator generator; public static ContainerOilGenerator fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerOilGenerator(windowId, inv, (TileEntityOilGenerator) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerOilGenerator(windowId, inv, (TileEntityOilGenerator) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerOilGenerator(int windowId, Inventory inventory, TileEntityOilGenerator tile) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerPhantomPlacer.java index bb453d78b..7b4fe973b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerPhantomPlacer.java @@ -27,7 +27,7 @@ public class ContainerPhantomPlacer extends AbstractContainerMenu { public final TileEntityPhantomPlacer placer; public static ContainerPhantomPlacer fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerPhantomPlacer(windowId, inv, (TileEntityPhantomPlacer) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerPhantomPlacer(windowId, inv, (TileEntityPhantomPlacer) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerPhantomPlacer(int windowId, Inventory inventory, TileEntityPhantomPlacer tile) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerRangedCollector.java index b6efdfb10..638b3248a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerRangedCollector.java @@ -29,7 +29,7 @@ public class ContainerRangedCollector extends AbstractContainerMenu { public final TileEntityRangedCollector collector; public static ContainerRangedCollector fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerRangedCollector(windowId, inv, (TileEntityRangedCollector) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerRangedCollector(windowId, inv, (TileEntityRangedCollector) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerRangedCollector(int windowId, Inventory inventory, TileEntityRangedCollector tile) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerXPSolidifier.java index 911108e3f..00484880e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/ContainerXPSolidifier.java @@ -29,7 +29,7 @@ public class ContainerXPSolidifier extends AbstractContainerMenu { public final TileEntityXPSolidifier solidifier; public static ContainerXPSolidifier fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new ContainerXPSolidifier(windowId, inv, (TileEntityXPSolidifier) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new ContainerXPSolidifier(windowId, inv, (TileEntityXPSolidifier) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } public ContainerXPSolidifier(int windowId, Inventory inventory, TileEntityXPSolidifier tile) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/CrusherContainer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/CrusherContainer.java index b70296245..097ea074c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/CrusherContainer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/CrusherContainer.java @@ -57,7 +57,7 @@ public class CrusherContainer extends AbstractContainerMenu { } public static CrusherContainer fromNetwork(int windowId, Inventory inv, FriendlyByteBuf data) { - return new CrusherContainer(windowId, inv, (TileEntityCrusher) Objects.requireNonNull(inv.player.level.getBlockEntity(data.readBlockPos()))); + return new CrusherContainer(windowId, inv, (TileEntityCrusher) Objects.requireNonNull(inv.player.level().getBlockEntity(data.readBlockPos()))); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/AAScreen.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/AAScreen.java index aa74bff26..79c8e62dc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/AAScreen.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/AAScreen.java @@ -10,7 +10,7 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.vertex.PoseStack; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; import net.minecraft.network.chat.Component; import net.minecraft.world.entity.player.Inventory; @@ -25,15 +25,15 @@ public abstract class AAScreen extends Abstract } @Override - public void render(@Nonnull PoseStack matrixStack, int mouseX, int mouseY, float partialTicks) { - this.renderBackground(matrixStack); - super.render(matrixStack, mouseX, mouseY, partialTicks); - this.renderTooltip(matrixStack, mouseX, mouseY); + public void render(@Nonnull GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) { + this.renderBackground(guiGraphics); + super.render(guiGraphics, mouseX, mouseY, partialTicks); + this.renderTooltip(guiGraphics, mouseX, mouseY); } @Override - public void renderLabels(@Nonnull PoseStack matrices, int x, int y) { - font.draw(matrices, this.title, titleLabelX, titleLabelY, 0xFFFFFF); + public void renderLabels(@Nonnull GuiGraphics guiGraphics, int x, int y) { + guiGraphics.drawString(this.font, this.title, titleLabelX, titleLabelY, 0xFFFFFF, false); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/Buttons.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/Buttons.java index 581c3ff3b..f0b094011 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/Buttons.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/Buttons.java @@ -2,12 +2,11 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -26,21 +25,21 @@ public class Buttons { public SmallerButton(int x, int y, Component display, boolean smaller, OnPress pressable) { super(x, y, 16, smaller ? 12 - : 16, display, pressable); + : 16, display, pressable, DEFAULT_NARRATION); this.smaller = smaller; } @Override - public void render(PoseStack matrixStack, int x, int y, float f) { + public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float f) { if (this.visible) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.setShaderTexture(0, this.resLoc); - this.isHovered = x >= this.x && y >= this.y && x < this.x + this.width && y < this.y + this.height; - int k = this.getYImage(this.isHovered); + this.isHovered = mouseX >= this.getX() && mouseY >= this.getY() && mouseX < this.getX() + this.width && mouseY < this.getY() + this.height; + int k = !this.active ? 0 : (this.isHoveredOrFocused() ? 2 : 1); GlStateManager._enableBlend(); GlStateManager.glBlendFuncSeparate(770, 771, 1, 0); GlStateManager._blendFunc(770, 771); - this.blit(matrixStack, this.x, this.y, this.smaller + guiGraphics.blit(this.resLoc, mouseX, mouseY, this.smaller ? 200 : 176, k * this.height, this.width, this.height); //this.mouseDragged(mc, x, y); // The heck was this doing here? @@ -54,7 +53,7 @@ public class Buttons { color = 16777120; } - drawCenteredString(matrixStack, Minecraft.getInstance().font, this.getMessage().getString(), this.x + this.width / 2, this.y + (this.height - 8) / 2, color); + guiGraphics.drawCenteredString(Minecraft.getInstance().font, this.getMessage().getString(), this.getX() + this.width / 2, this.getY() + (this.height - 8) / 2, color); } } @@ -66,20 +65,20 @@ public class Buttons { public final ResourceLocation resLoc = AssetUtil.getGuiLocation("gui_inputter"); public TinyButton(int id, int x, int y) { - super(x, y, 8, 8, new TextComponent(""), Button::onPress); + super(x, y, 8, 8, Component.literal(""), Button::onPress, DEFAULT_NARRATION); } @Override - public void render(PoseStack matrixStack, int x, int y, float f) { + public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float f) { if (this.visible) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); RenderSystem.setShaderTexture(0, this.resLoc); - this.isHovered = x >= this.x && y >= this.y && x < this.x + this.width && y < this.y + this.height; - int k = this.getYImage(this.isHovered); + this.isHovered = mouseX >= this.getX() && mouseY >= this.getY() && mouseX < this.getX() + this.width && mouseY < this.getY() + this.height; + int k = !this.active ? 0 : (this.isHoveredOrFocused() ? 2 : 1); GlStateManager._enableBlend(); GlStateManager.glBlendFuncSeparate(770, 771, 1, 0); GlStateManager._blendFunc(770, 771); - this.blit(matrixStack, this.x, this.y, 192, k * 8, 8, 8); + guiGraphics.blit(this.resLoc, this.getX(), this.getY(), 192, k * 8, 8, 8); //this.mouseDragged(mc, x, y); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/CrusherScreen.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/CrusherScreen.java index 805b04375..29df27cdc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/CrusherScreen.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/CrusherScreen.java @@ -10,17 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.CrusherContainer; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCrusher; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.ChatFormatting; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; @@ -55,7 +52,7 @@ public class CrusherScreen extends AAScreen { : 42), this.topPos + 5, this.tileGrinder.storage); if (this.isDouble) { - this.buttonAutoSplit = new Buttons.SmallerButton( this.leftPos - 10, this.topPos, new TextComponent("S"), (button) -> actionPerformed(0)); + this.buttonAutoSplit = new Buttons.SmallerButton( this.leftPos - 10, this.topPos, Component.literal("S"), (button) -> actionPerformed(0)); this.addRenderableWidget(this.buttonAutoSplit); } @@ -74,49 +71,43 @@ public class CrusherScreen extends AAScreen { super.containerTick(); if (this.isDouble) { - this.buttonAutoSplit.setMessage(new TextComponent("S").withStyle(this.tileGrinder.isAutoSplit + this.buttonAutoSplit.setMessage(Component.literal("S").withStyle(this.tileGrinder.isAutoSplit ? ChatFormatting.DARK_GREEN : ChatFormatting.RED)); } } @Override - public void render(@Nonnull PoseStack matrixStack, int x, int y, float f) { - super.render(matrixStack, x, y, f); - this.energy.render(matrixStack, x, y); + public void render(@Nonnull GuiGraphics guiGraphics, int x, int y, float f) { + super.render(guiGraphics, x, y, f); + this.energy.render(guiGraphics, x, y); if (this.isDouble && this.buttonAutoSplit.isMouseOver(x,y)) { - - drawString(matrixStack, font, new TranslatableComponent("info.actuallyadditions.gui.autosplititems." + (tileGrinder.isAutoSplit?"on":"off")).withStyle(ChatFormatting.BOLD), x , y, 0xffffff); + guiGraphics.drawString(font, Component.translatable("info.actuallyadditions.gui.autosplititems." + (tileGrinder.isAutoSplit?"on":"off")).withStyle(ChatFormatting.BOLD), x , y, 0xffffff, false); } } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { - RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - - RenderSystem.setShaderTexture(0, this.isDouble - ? RES_LOC_DOUBLE - : RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + ResourceLocation usedLoc = this.isDouble ? RES_LOC_DOUBLE : RES_LOC; + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.tileGrinder.firstCrushTime > 0) { int i = this.tileGrinder.getFirstTimeToScale(23); - this.blit(matrices, this.leftPos + (this.isDouble + guiGraphics.blit(usedLoc, this.leftPos + (this.isDouble ? 51 : 80), this.topPos + 40, 176, 0, 24, i); } if (this.isDouble) { if (this.tileGrinder.secondCrushTime > 0) { int i = this.tileGrinder.getSecondTimeToScale(23); - this.blit(matrices, this.leftPos + 101, this.topPos + 40, 176, 22, 24, i); + guiGraphics.blit(usedLoc, this.leftPos + 101, this.topPos + 40, 176, 22, 24, i); } } - this.energy.draw(matrices); + this.energy.draw(guiGraphics); } public static class CrusherDoubleScreen extends CrusherScreen { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java index a70bb6289..59bf92835 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/EnergyDisplay.java @@ -11,14 +11,11 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.tile.CustomEnergyStorage; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiComponent; -import net.minecraft.client.renderer.GameRenderer; -import net.minecraft.network.chat.TextComponent; -import net.minecraft.network.chat.TranslatableComponent; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.network.chat.Component; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -27,7 +24,7 @@ import java.util.ArrayList; import java.util.List; @OnlyIn(Dist.CLIENT) -public class EnergyDisplay extends GuiComponent { +public class EnergyDisplay { private CustomEnergyStorage rfReference; private int x; @@ -51,28 +48,25 @@ public class EnergyDisplay extends GuiComponent { this.drawTextNextTo = drawTextNextTo; } - public void draw(PoseStack matrices) { + public void draw(GuiGraphics guiGraphics) { Minecraft mc = Minecraft.getInstance(); - RenderSystem.setShader(GameRenderer::getPositionTexShader); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); //bind? - int barX = this.x; int barY = this.y; if (this.outline) { - this.blit(matrices, this.x, this.y, 52, 163, 26, 93); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.x, this.y, 52, 163, 26, 93); barX += 4; barY += 4; } - this.blit(matrices, barX, barY, 18, 171, 18, 85); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, barX, barY, 18, 171, 18, 85); if (this.rfReference.getEnergyStored() > 0) { int i = this.rfReference.getEnergyStored() * 83 / this.rfReference.getMaxEnergyStored(); float[] color = AssetUtil.getWheelColor(mc.level.getGameTime() % 256); RenderSystem.setShaderColor(color[0] / 255F, color[1] / 255F, color[2] / 255F, 1F); //color3f - this.blit(matrices, barX + 1, barY + 84 - i, 36, 172, 16, i); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, barX + 1, barY + 84 - i, 36, 172, 16, i); RenderSystem.setShaderColor(1F, 1F, 1F, 1F); //color3f } @@ -81,14 +75,13 @@ public class EnergyDisplay extends GuiComponent { } } - public void render(PoseStack matrices, int mouseX, int mouseY) { + public void render(GuiGraphics guiGraphics, int mouseX, int mouseY) { if (this.isMouseOver(mouseX, mouseY)) { Minecraft mc = Minecraft.getInstance(); - List text = new ArrayList<>(); - text.add(new TextComponent(this.getOverlayText())); - if(mc.screen != null) - mc.screen.renderComponentTooltip(matrices, text, mouseX, mouseY, mc.font); //TODO: Check if this is correct, used to call GuiUtils.drawHoveringText + List text = new ArrayList<>(); + text.add(Component.literal(this.getOverlayText())); + guiGraphics.renderComponentTooltip(mc.font, text, mouseX, mouseY); //TODO: Check if this is correct, used to call GuiUtils.drawHoveringText } } @@ -102,7 +95,7 @@ public class EnergyDisplay extends GuiComponent { private String getOverlayText() { NumberFormat format = NumberFormat.getInstance(); - return new TranslatableComponent("misc.actuallyadditions.power_long", + return Component.translatable("misc.actuallyadditions.power_long", format.format(this.rfReference.getEnergyStored()), format.format(this.rfReference.getMaxEnergyStored())) .getString(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java index 761dce0e8..d73a110c8 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FilterSettingsGui.java @@ -10,18 +10,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.tile.FilterSettings; import net.minecraft.ChatFormatting; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiComponent; -import net.minecraft.client.gui.components.AbstractWidget; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; -import net.minecraft.client.gui.components.Widget; +import net.minecraft.client.gui.components.Renderable; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -29,7 +25,7 @@ import java.util.ArrayList; import java.util.List; @OnlyIn(Dist.CLIENT) -public class FilterSettingsGui extends GuiComponent { +public class FilterSettingsGui { private final FilterSettings theSettings; @@ -37,56 +33,56 @@ public class FilterSettingsGui extends GuiComponent { public Buttons.SmallerButton nbtButton; public Buttons.SmallerButton modButton; - public FilterSettingsGui(FilterSettings settings, int x, int y, List buttonList) { + public FilterSettingsGui(FilterSettings settings, int x, int y, List buttonList) { this.theSettings = settings; - this.whitelistButton = new Buttons.SmallerButton( x, y, new TextComponent("WH"), true, Button::onPress); //TODO these need translation keys + this.whitelistButton = new Buttons.SmallerButton( x, y, Component.literal("WH"), true, Button::onPress); //TODO these need translation keys buttonList.add(this.whitelistButton); y += 14; - this.nbtButton = new Buttons.SmallerButton( x, y, new TextComponent("NB"), true, Button::onPress);//TODO also button actions + this.nbtButton = new Buttons.SmallerButton( x, y, Component.literal("NB"), true, Button::onPress);//TODO also button actions buttonList.add(this.nbtButton); y += 14; - this.modButton = new Buttons.SmallerButton( x, y, new TextComponent("MO"), true, Button::onPress); + this.modButton = new Buttons.SmallerButton( x, y, Component.literal("MO"), true, Button::onPress); buttonList.add(this.modButton); this.tick(); } public void tick() { - this.whitelistButton.setMessage(new TextComponent("WH").withStyle(this.theSettings.isWhitelist + this.whitelistButton.setMessage(Component.literal("WH").withStyle(this.theSettings.isWhitelist ? ChatFormatting.DARK_GREEN : ChatFormatting.RED)); - this.whitelistButton.setMessage(new TextComponent("NB").withStyle(this.theSettings.respectNBT + this.whitelistButton.setMessage(Component.literal("NB").withStyle(this.theSettings.respectNBT ? ChatFormatting.DARK_GREEN : ChatFormatting.RED)); - this.whitelistButton.setMessage(new TextComponent("MO").withStyle(this.theSettings.respectMod + this.whitelistButton.setMessage(Component.literal("MO").withStyle(this.theSettings.respectMod ? ChatFormatting.DARK_GREEN : ChatFormatting.RED)); } - public void drawHover(PoseStack stack, int mouseX, int mouseY) { + public void drawHover(GuiGraphics guiGraphics, int mouseX, int mouseY) { Minecraft mc = Minecraft.getInstance(); List list = new ArrayList<>(); if (this.whitelistButton.isMouseOver(mouseX, mouseY)) { list.add((this.theSettings.isWhitelist - ? new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.whitelist") - : new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.blacklist")).withStyle(ChatFormatting.BOLD)); - list.add(new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.whitelistInfo")); + ? Component.translatable("info." + ActuallyAdditions.MODID + ".gui.whitelist") + : Component.translatable("info." + ActuallyAdditions.MODID + ".gui.blacklist")).withStyle(ChatFormatting.BOLD)); + list.add(Component.translatable("info." + ActuallyAdditions.MODID + ".gui.whitelistInfo")); } else if (this.nbtButton.isMouseOver(mouseX, mouseY)) { list.add((this.theSettings.respectNBT - ? new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.respectNBT") - : new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.ignoreNBT")).withStyle(ChatFormatting.BOLD)); + ? Component.translatable("info." + ActuallyAdditions.MODID + ".gui.respectNBT") + : Component.translatable("info." + ActuallyAdditions.MODID + ".gui.ignoreNBT")).withStyle(ChatFormatting.BOLD)); } else if (this.modButton.isMouseOver(mouseX, mouseY)) { list.add((this.theSettings.respectMod - ? new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.respectMod") - : new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.ignoreMod")).withStyle(ChatFormatting.BOLD)); - list.add(new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.respectModInfo")); + ? Component.translatable("info." + ActuallyAdditions.MODID + ".gui.respectMod") + : Component.translatable("info." + ActuallyAdditions.MODID + ".gui.ignoreMod")).withStyle(ChatFormatting.BOLD)); + list.add(Component.translatable("info." + ActuallyAdditions.MODID + ".gui.respectModInfo")); } //TODO tooltips still jank - if (!list.isEmpty() && mc.screen != null) { - mc.screen.renderComponentTooltip(stack, list, mouseX, mouseY, mc.font); //TODO: Check if this is correct, used to call GuiUtils.drawHoveringText + if (!list.isEmpty()) { + guiGraphics.renderComponentTooltip(mc.font, list, mouseX, mouseY); //TODO: Check if this is correct, used to call GuiUtils.drawHoveringText } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FluidDisplay.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FluidDisplay.java index 1d97a35be..96bc686d2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FluidDisplay.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/FluidDisplay.java @@ -11,17 +11,15 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.platform.GlStateManager; -import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiComponent; -import net.minecraft.client.renderer.GameRenderer; -import net.minecraft.network.chat.TextComponent; +import net.minecraft.client.gui.GuiGraphics; +import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.level.material.Fluid; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.client.extensions.common.IClientFluidTypeExtensions; import net.minecraftforge.fluids.FluidStack; import net.minecraftforge.fluids.IFluidTank; import net.minecraftforge.fluids.capability.IFluidHandler; @@ -31,7 +29,7 @@ import java.text.NumberFormat; import java.util.Collections; @OnlyIn(Dist.CLIENT) -public class FluidDisplay extends GuiComponent { +public class FluidDisplay { private IFluidTank fluidReference; private Fluid oldFluid; @@ -73,21 +71,19 @@ public class FluidDisplay extends GuiComponent { this.drawTextNextTo = drawTextNextTo; } - public void draw(PoseStack matrices) { + public void draw(GuiGraphics guiGraphics) { Minecraft mc = Minecraft.getInstance(); - RenderSystem.setShader(GameRenderer::getPositionTexShader); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); //bind? int barX = this.x; int barY = this.y; if (this.outline) { - this.blit(matrices, this.x, this.y, 52, 163, 26, 93); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.x, this.y, 52, 163, 26, 93); barX += 4; barY += 4; } - this.blit(matrices, barX, barY, 0, 171, 18, 85); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, barX, barY, 0, 171, 18, 85); FluidStack stack = this.fluidReference.getFluid(); Fluid fluid = stack.getFluid(); @@ -95,20 +91,18 @@ public class FluidDisplay extends GuiComponent { if (this.resLoc == null || this.oldFluid != stack.getFluid()) { this.oldFluid = stack.getFluid(); - if (fluid != null && fluid.getAttributes().getStillTexture() != null) { - this.resLoc = new ResourceLocation(fluid.getAttributes().getStillTexture().getNamespace(), "textures/" + fluid.getAttributes().getStillTexture().getPath() + ".png"); + if (fluid != null && IClientFluidTypeExtensions.of(fluid).getStillTexture() != null) { + this.resLoc = new ResourceLocation(IClientFluidTypeExtensions.of(fluid).getStillTexture().getNamespace(), "textures/" + IClientFluidTypeExtensions.of(fluid).getStillTexture().getPath() + ".png"); } } if (stack != null && fluid != null && this.resLoc != null) { - RenderSystem.setShaderTexture(0, this.resLoc); - // GlStateManager._pushMatrix(); GlStateManager._enableBlend(); // GlStateManager._disableAlphaTest(); GlStateManager._blendFuncSeparate(770, 771, 1, 0); int i = this.fluidReference.getFluid().getAmount() * 83 / this.fluidReference.getCapacity(); - blit(matrices, barX + 1, barY + 84 - i, 0, 0, 16, i, 16, 512); + guiGraphics.blit(this.resLoc, barX + 1, barY + 84 - i, 0, 0, 16, i, 16, 512); //drawModalRectWithCustomSizedTexture(barX + 1, barY + 84 - i, 36, 172, 16, i, 16, 512); GlStateManager._disableBlend(); // GlStateManager._enableAlphaTest(); @@ -116,19 +110,18 @@ public class FluidDisplay extends GuiComponent { } if (this.drawTextNextTo) { - mc.font.draw(matrices, new TextComponent(this.getOverlayText()), barX + 25, barY + 78, 0xFFFFFF); + guiGraphics.drawString(mc.font, Component.literal(this.getOverlayText()), barX + 25, barY + 78, 0xFFFFFF, false); } } - public void render(PoseStack matrices, int mouseX, int mouseY) { + public void render(GuiGraphics guiGraphics, int mouseX, int mouseY) { if (mouseX >= this.x && mouseY >= this.y && mouseX < this.x + (this.outline ? 26 : 18) && mouseY < this.y + (this.outline ? 93 : 85)) { Minecraft mc = Minecraft.getInstance(); - if(mc.screen != null) - mc.screen.renderComponentTooltip(matrices, Collections.singletonList(new TextComponent(this.getOverlayText())), mouseX, mouseY, mc.font); //TODO: Check if this is correct, used to call GuiUtils.drawHoveringText + guiGraphics.renderComponentTooltip(mc.font, Collections.singletonList(Component.literal(this.getOverlayText())), mouseX, mouseY); //TODO: Check if this is correct, used to call GuiUtils.drawHoveringText } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBioReactor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBioReactor.java index e2ed33e8f..7ac2ce511 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBioReactor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBioReactor.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerBioReactor; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBioReactor; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; @@ -42,28 +42,26 @@ public class GuiBioReactor extends AAScreen { } @Override - public void render(@Nonnull PoseStack matrices, int mouseX, int mouseY, float partialTicks) { - super.render(matrices, mouseX, mouseY, partialTicks); + public void render(@Nonnull GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) { + super.render(guiGraphics, mouseX, mouseY, partialTicks); //this.energy.render(mouseX, mouseY); } @Override - public void renderBg(PoseStack matrices, float partialTicks, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float partialTicks, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.tile.burnTime > 0) { int i = this.tile.burnTime * 13 / this.tile.maxBurnTime; - this.blit(matrices, this.leftPos + 87, this.topPos + 51 + 12 - i, 176, 96 - i, 14, i); + guiGraphics.blit(RES_LOC, this.leftPos + 87, this.topPos + 51 + 12 - i, 176, 96 - i, 14, i); } if (this.tile.producePerTick > 0) { - drawCenteredString(matrices, this.font, this.tile.producePerTick + " " + I18n.get("actuallyadditions.cft"), this.leftPos + 87, this.topPos + 86, 0xFFFFFF); + guiGraphics.drawCenteredString(this.font, this.tile.producePerTick + " " + I18n.get("actuallyadditions.cft"), this.leftPos + 87, this.topPos + 86, 0xFFFFFF); } //this.energy.draw(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java index 284e186f9..f59c3e654 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiBreaker.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerBreaker; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBreaker; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -37,13 +37,11 @@ public class GuiBreaker extends AAScreen { } @Override - protected void renderBg(@Nonnull PoseStack matrices, float partialTicks, int x, int y) { + protected void renderBg(@Nonnull GuiGraphics guiGraphics, float partialTicks, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java index 6fe4b6bbc..995e6cb5c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCanolaPress.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCanolaPress; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCanolaPress; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -46,29 +46,27 @@ public class GuiCanolaPress extends AAScreen { } @Override - public void render(@Nonnull PoseStack matrices, int x, int y, float f) { - super.render(matrices, x, y, f); + public void render(@Nonnull GuiGraphics guiGraphics, int x, int y, float f) { + super.render(guiGraphics, x, y, f); - this.energy.render(matrices, x, y); - this.fluid.render(matrices, x, y); + this.energy.render(guiGraphics, x, y); + this.fluid.render(guiGraphics, x, y); } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.press.currentProcessTime > 0) { int i = this.press.getProcessScaled(29); - this.blit(matrices, this.leftPos + 83, this.topPos + 32, 176, 0, 12, i); + guiGraphics.blit(RES_LOC, this.leftPos + 83, this.topPos + 32, 176, 0, 12, i); } - this.energy.draw(matrices); - this.fluid.draw(matrices); + this.energy.draw(guiGraphics); + this.fluid.draw(guiGraphics); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java index da2ab42fe..f212e25f2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoalGenerator.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCoalGenerator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoalGenerator; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -44,28 +44,26 @@ public class GuiCoalGenerator extends AAScreen { } @Override - public void render(@Nonnull PoseStack matrices, int x, int y, float f) { - renderBackground(matrices); - super.render(matrices, x, y, f); - this.energy.render(matrices, x, y); - renderTooltip(matrices, x, y); + public void render(@Nonnull GuiGraphics guiGraphics, int x, int y, float f) { + renderBackground(guiGraphics); + super.render(guiGraphics, x, y, f); + this.energy.render(guiGraphics, x, y); + renderTooltip(guiGraphics, x, y); } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { - RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.generator.currentBurnTime > 0) { int i = this.generator.getBurningScaled(13); - this.blit(matrices, this.leftPos + 87, this.topPos + 27 + 12 - i, 176, 96 - i, 14, i); + guiGraphics.blit(RES_LOC, this.leftPos + 87, this.topPos + 27 + 12 - i, 176, 96 - i, 14, i); } - this.energy.draw(matrices); + this.energy.draw(guiGraphics); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java index a95be4821..845716070 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiCoffeeMachine.java @@ -11,16 +11,14 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerCoffeeMachine; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityCoffeeMachine; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; -import net.minecraft.network.chat.BaseComponent; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; @@ -49,51 +47,50 @@ public class GuiCoffeeMachine extends AAScreen { public void init() { super.init(); - this.addRenderableWidget(new Button(this.leftPos + 60, this.topPos + 11, 58, 20, new TranslatableComponent("info.actuallyadditions.gui.ok"), - (b) -> PacketHandlerHelper.sendButtonPacket(this.machine, 0))); + this.addRenderableWidget(new Button.Builder(Component.translatable("info.actuallyadditions.gui.ok"), + (b) -> PacketHandlerHelper.sendButtonPacket(this.machine, 0)) + .bounds(this.leftPos + 60, this.topPos + 11, 58, 20).build()); this.energy = new EnergyDisplay(this.leftPos + 16, this.topPos + 5, this.machine.storage); this.fluid = new FluidDisplay(this.leftPos - 30, this.topPos + 1, this.machine.tank, true, false); } @Override - public void render(@Nonnull PoseStack matrices, int x, int y, float f) { - super.render(matrices, x, y, f); + public void render(@Nonnull GuiGraphics guiGraphics, int x, int y, float f) { + super.render(guiGraphics, x, y, f); Minecraft mc = Minecraft.getInstance(); - BaseComponent text = new TranslatableComponent("info.actuallyadditions.gui.coffee_amount", this.machine.coffeeCacheAmount, TileEntityCoffeeMachine.COFFEE_CACHE_MAX_AMOUNT); + Component text = Component.translatable("info.actuallyadditions.gui.coffee_amount", this.machine.coffeeCacheAmount, TileEntityCoffeeMachine.COFFEE_CACHE_MAX_AMOUNT); if (x >= this.leftPos + 40 && y >= this.topPos + 25 && x <= this.leftPos + 49 && y <= this.topPos + 56) { - renderComponentTooltip(matrices, Collections.singletonList(text), x, y, font); + guiGraphics.renderComponentTooltip(font, Collections.singletonList(text), x, y); } - this.energy.render(matrices, x, y); - this.fluid.render(matrices, x, y); + this.energy.render(guiGraphics, x, y); + this.fluid.render(guiGraphics, x, y); } @Override - public void renderBg(@Nonnull PoseStack matrices, float f, int x, int y) { + public void renderBg(@Nonnull GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.machine.coffeeCacheAmount > 0) { int i = this.machine.getCoffeeScaled(30); - this.blit(matrices, this.leftPos + 41, this.topPos + 56 - i, 192, 0, 8, i); + guiGraphics.blit(RES_LOC, this.leftPos + 41, this.topPos + 56 - i, 192, 0, 8, i); } if (this.machine.brewTime > 0) { int i = this.machine.getBrewScaled(23); - this.blit(matrices, this.leftPos + 53, this.topPos + 42, 192, 30, i, 16); + guiGraphics.blit(RES_LOC, this.leftPos + 53, this.topPos + 42, 192, 30, i, 16); int j = this.machine.getBrewScaled(26); - this.blit(matrices, this.leftPos + 99 + 25 - j, this.topPos + 44, 192 + 25 - j, 46, j, 12); + guiGraphics.blit(RES_LOC, this.leftPos + 99 + 25 - j, this.topPos + 44, 192 + 25 - j, 46, j, 12); } - this.energy.draw(matrices); - this.fluid.draw(matrices); + this.energy.draw(guiGraphics); + this.fluid.draw(guiGraphics); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java index a51732337..c5d431a7c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDirectionalBreaker.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerDirectionalBreaker; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLongRangeBreaker; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -44,21 +44,19 @@ public class GuiDirectionalBreaker extends AAScreen } @Override - public void render(@Nonnull PoseStack matrices, int x, int y, float f) { - super.render(matrices, x, y, f); - this.energy.render(matrices, x, y); + public void render(@Nonnull GuiGraphics guiGraphics, int x, int y, float f) { + super.render(guiGraphics, x, y, f); + this.energy.render(guiGraphics, x, y); } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); - this.energy.draw(matrices); + this.energy.draw(guiGraphics); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java index 0e5eab215..7f0d1103e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDrill.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.inventory.ContainerDrill; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; @@ -37,18 +37,16 @@ public class GuiDrill extends AAScreen { } @Override - public void renderLabels(@Nonnull PoseStack matrices, int x, int y) { - AssetUtil.displayNameString(matrices, this.font, this.imageWidth, -10, I18n.get("container." + ActuallyAdditions.MODID + ".drill.name")); + public void renderLabels(@Nonnull GuiGraphics guiGraphics, int x, int y) { + AssetUtil.displayNameString(guiGraphics, this.font, this.imageWidth, -10, I18n.get("container." + ActuallyAdditions.MODID + ".drill.name")); } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 54, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 54, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 54); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 54); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java index d714df7ed..d8d009973 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiDropper.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerDropper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityDropper; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -43,13 +43,11 @@ public class GuiDropper extends AAScreen { } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java index 8ec8b3eaf..31238a2a3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnergizer.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerEnergizer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnergizer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -44,21 +44,19 @@ public class GuiEnergizer extends AAScreen { } @Override - public void render(@Nonnull PoseStack matrices, int x, int y, float f) { - super.render(matrices, x, y, f); - this.energy.render(matrices, x, y); + public void render(@Nonnull GuiGraphics guiGraphics, int x, int y, float f) { + super.render(guiGraphics, x, y, f); + this.energy.render(guiGraphics, x, y); } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); - this.energy.draw(matrices); + this.energy.draw(guiGraphics); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java index 63f8060b8..42d026498 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiEnervator.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerEnervator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityEnervator; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -45,21 +45,19 @@ public class GuiEnervator extends AAScreen { } @Override - public void render(@Nonnull PoseStack matrices, int x, int y, float f) { - super.render(matrices, x, y, f); - this.energy.render(matrices, x, y); + public void render(@Nonnull GuiGraphics guiGraphics, int x, int y, float f) { + super.render(guiGraphics, x, y, f); + this.energy.render(guiGraphics, x, y); } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); - this.energy.draw(matrices); + this.energy.draw(guiGraphics); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFarmer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFarmer.java index 729f2382c..485bbc420 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFarmer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFarmer.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFarmer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFarmer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -47,21 +47,19 @@ public class GuiFarmer extends AAScreen { } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); - this.energy.draw(matrices); + this.energy.draw(guiGraphics); } @Override - public void render(@Nonnull PoseStack matrices, int x, int y, float f) { - super.render(matrices, x, y, f); - this.energy.render(matrices, x, y); + public void render(@Nonnull GuiGraphics guiGraphics, int x, int y, float f) { + super.render(guiGraphics, x, y, f); + this.energy.render(guiGraphics, x, y); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java index 04672fcb7..8158e0515 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFeeder.java @@ -11,11 +11,11 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFeeder; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFeeder; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; @@ -39,8 +39,8 @@ public class GuiFeeder extends AAScreen { } @Override - public void render(@Nonnull PoseStack matrices, int x, int y, float f) { - super.render(matrices, x, y, f); + public void render(@Nonnull GuiGraphics guiGraphics, int x, int y, float f) { + super.render(guiGraphics, x, y, f); if (x >= this.leftPos + 69 && y >= this.topPos + 30 && x <= this.leftPos + 69 + 10 && y <= this.topPos + 30 + 10) { String[] array = new String[]{this.tileFeeder.currentAnimalAmount + " " + I18n.get("info." + ActuallyAdditions.MODID + ".gui.animals"), this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < TileEntityFeeder.THRESHOLD ? I18n.get("info." + ActuallyAdditions.MODID + ".gui.enoughToBreed") @@ -52,25 +52,24 @@ public class GuiFeeder extends AAScreen { } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 70, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 70, 0, 0, 176, 86); RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 70); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 70); if (this.tileFeeder.currentTimer > 0) { int i = this.tileFeeder.getCurrentTimerToScale(20); - this.blit(matrices, this.leftPos + 85, this.topPos + 42 - i, 181, 19 + 19 - i, 6, 20); + guiGraphics.blit(RES_LOC, this.leftPos + 85, this.topPos + 42 - i, 181, 19 + 19 - i, 6, 20); } if (this.tileFeeder.currentAnimalAmount >= 2 && this.tileFeeder.currentAnimalAmount < TileEntityFeeder.THRESHOLD) { - this.blit(matrices, this.leftPos + 70, this.topPos + 31, 192, 16, 8, 8); + guiGraphics.blit(RES_LOC, this.leftPos + 70, this.topPos + 31, 192, 16, 8, 8); } if (this.tileFeeder.currentAnimalAmount >= TileEntityFeeder.THRESHOLD) { - this.blit(matrices, this.leftPos + 70, this.topPos + 31, 192, 24, 8, 8); + guiGraphics.blit(RES_LOC, this.leftPos + 70, this.topPos + 31, 192, 24, 8, 8); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java index 95337c7c7..6215b8002 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFermentingBarrel.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFermentingBarrel; import de.ellpeck.actuallyadditions.mod.tile.TileEntityFermentingBarrel; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -40,10 +40,10 @@ public class GuiFermentingBarrel extends AAScreen { } @Override - public void render(@Nonnull PoseStack matrices, int x, int y, float f) { - super.render(matrices, x, y, f); - this.input.render(matrices, x, y); - this.output.render(matrices, x, y); + public void render(@Nonnull GuiGraphics guiGraphics, int x, int y, float f) { + super.render(guiGraphics, x, y, f); + this.input.render(guiGraphics, x, y); + this.output.render(guiGraphics, x, y); } @Override @@ -54,21 +54,20 @@ public class GuiFermentingBarrel extends AAScreen { } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.press.currentProcessTime > 0) { int i = this.press.getProcessScaled(29); - this.blit(matrices, this.leftPos + 82, this.topPos + 34, 176, 0, 12, i); + guiGraphics.blit(RES_LOC, this.leftPos + 82, this.topPos + 34, 176, 0, 12, i); } - this.input.draw(matrices); - this.output.draw(matrices); + this.input.draw(guiGraphics); + this.output.draw(guiGraphics); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFilter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFilter.java index f057a9b5b..f59b90250 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFilter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFilter.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFilter; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; @@ -36,18 +36,16 @@ public class GuiFilter extends AAScreen { } @Override - public void renderLabels(@Nonnull PoseStack matrices, int x, int y) { - AssetUtil.displayNameString(matrices, this.font, this.imageWidth, -10, I18n.get("container." + ActuallyAdditions.MODID + ".filter.name")); + public void renderLabels(@Nonnull GuiGraphics guiGraphics, int x, int y) { + AssetUtil.displayNameString(guiGraphics, this.font, this.imageWidth, -10, I18n.get("container." + ActuallyAdditions.MODID + ".filter.name")); } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 90, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 90, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 90); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 90); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFireworkBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFireworkBox.java index d4b81ba57..0adabe05e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFireworkBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFireworkBox.java @@ -10,8 +10,8 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFireworkBox; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.AbstractSliderButton; import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen; import net.minecraft.network.chat.Component; @@ -53,7 +53,7 @@ public class GuiFireworkBox extends AbstractContainerScreen { } @Override - public void render(@Nonnull PoseStack matrices, int x, int y, float f) { - super.render(matrices, x, y, f); + public void render(@Nonnull GuiGraphics guiGraphics, int x, int y, float f) { + super.render(guiGraphics, x, y, f); - this.fluid.render(matrices, x, y); + this.fluid.render(guiGraphics, x, y); } @Override @@ -52,15 +52,13 @@ public class GuiFluidCollector extends AAScreen { } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); - this.fluid.draw(matrices); + this.fluid.draw(guiGraphics); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java index 3d0487075..1ab98202f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiFurnaceDouble.java @@ -11,17 +11,15 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.inventory.ContainerFurnaceDouble; import de.ellpeck.actuallyadditions.mod.network.PacketHandlerHelper; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPoweredFurnace; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.ChatFormatting; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; import net.minecraftforge.api.distmarker.Dist; @@ -47,14 +45,14 @@ public class GuiFurnaceDouble extends AAScreen { } @Override - public void render(@Nonnull PoseStack matrices, int x, int y, float f) { - super.render(matrices, x, y, f); - this.energy.render(matrices, x, y); + public void render(@Nonnull GuiGraphics guiGraphics, int x, int y, float f) { + super.render(guiGraphics, x, y, f); + this.energy.render(guiGraphics, x, y); if (this.buttonAutoSplit.isMouseOver(x, y)) { - renderComponentTooltip(matrices, Collections.singletonList(this.tileFurnace.isAutoSplit - ? new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.on").withStyle(ChatFormatting.BOLD) - : new TranslatableComponent("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.off").withStyle(ChatFormatting.BOLD)), x, y); + guiGraphics.renderComponentTooltip(font, Collections.singletonList(this.tileFurnace.isAutoSplit + ? Component.translatable("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.on").withStyle(ChatFormatting.BOLD) + : Component.translatable("info." + ActuallyAdditions.MODID + ".gui.autoSplitItems.off").withStyle(ChatFormatting.BOLD)), x, y); } } @@ -62,7 +60,7 @@ public class GuiFurnaceDouble extends AAScreen { public void init() { super.init(); this.energy = new EnergyDisplay(this.leftPos + 27, this.topPos + 5, this.tileFurnace.storage); - this.buttonAutoSplit = new Buttons.SmallerButton(this.leftPos, this.topPos, new TextComponent("S"), (button) -> PacketHandlerHelper.sendButtonPacket(this.tileFurnace, 0)); + this.buttonAutoSplit = new Buttons.SmallerButton(this.leftPos, this.topPos, Component.literal("S"), (button) -> PacketHandlerHelper.sendButtonPacket(this.tileFurnace, 0)); buttonAutoSplit.setFGColor(this.tileFurnace.isAutoSplit ? ChatFormatting.DARK_GREEN.getColor() : ChatFormatting.RED.getColor()); this.addRenderableWidget(this.buttonAutoSplit); } @@ -75,24 +73,22 @@ public class GuiFurnaceDouble extends AAScreen { } @Override - public void renderBg(@Nonnull PoseStack matrices, float f, int x, int y) { + public void renderBg(@Nonnull GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.tileFurnace.firstSmeltTime > 0) { int i = this.tileFurnace.getFirstTimeToScale(23); - this.blit(matrices, this.leftPos + 51, this.topPos + 40, 176, 0, 24, i); + guiGraphics.blit(RES_LOC, this.leftPos + 51, this.topPos + 40, 176, 0, 24, i); } if (this.tileFurnace.secondSmeltTime > 0) { int i = this.tileFurnace.getSecondTimeToScale(23); - this.blit(matrices, this.leftPos + 101, this.topPos + 40, 176, 22, 24, i); + guiGraphics.blit(RES_LOC, this.leftPos + 101, this.topPos + 40, 176, 22, 24, i); } - this.energy.draw(matrices); + this.energy.draw(guiGraphics); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java index f376196cf..d7587d4fd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiGiantChest.java @@ -72,8 +72,8 @@ // public void drawGuiContainerBackgroundLayer(float f, int x, int y) { // RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); // this.getMinecraft().getTextureManager().bindTexture(RES_LOC); -// this.blit(matrices, this.guiLeft, this.guiTop, 0, 0, 242, 190); +// guiGraphics.blit(matrices, this.guiLeft, this.guiTop, 0, 0, 242, 190); // this.getMinecraft().getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); -// this.blit(matrices, this.guiLeft + 33, this.guiTop + 172, 0, 0, 176, 86); +// guiGraphics.blit(matrices, this.guiLeft + 33, this.guiTop + 172, 0, 0, 176, 86); // } //} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiLaserRelayItemWhitelist.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiLaserRelayItemWhitelist.java index ac0b42c07..fa827ae6d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiLaserRelayItemWhitelist.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiLaserRelayItemWhitelist.java @@ -11,11 +11,11 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.inventory.ContainerLaserRelayItemWhitelist; import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelayItemAdvanced; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; @@ -72,8 +72,8 @@ public class GuiLaserRelayItemWhitelist extends AAScreen list = new ArrayList<>(); @@ -82,29 +82,27 @@ public class GuiLaserRelayItemWhitelist extends AAScreen { // this.addButton(buttonReset); } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); String mining = this.miner.onlyMineOres ? "Only Mining Ores" : "Mining Everything"; - this.font.draw(matrices, mining, this.leftPos + this.imageWidth / 2 - this.font.width(mining) / 2, this.topPos + 8, 0x404040); + guiGraphics.drawString(font, mining, this.leftPos + this.imageWidth / 2 - this.font.width(mining) / 2, this.topPos + 8, 0x404040, false); } // @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java index 9dd1bc680..6c5026668 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiOilGenerator.java @@ -15,6 +15,7 @@ import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerOilGenerator; import de.ellpeck.actuallyadditions.mod.tile.TileEntityOilGenerator; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.resources.language.I18n; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; @@ -49,39 +50,38 @@ public class GuiOilGenerator extends AAScreen { } @Override - public void render(@Nonnull PoseStack matrices, int x, int y, float f) { - super.render(matrices, x, y, f); - this.energy.render(matrices, x, y); - this.fluid.render(matrices, x, y); + public void render(@Nonnull GuiGraphics guiGraphics, int x, int y, float f) { + super.render(guiGraphics, x, y, f); + this.energy.render(guiGraphics, x, y); + this.fluid.render(guiGraphics, x, y); } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); if (this.generator.currentBurnTime > 0 && this.generator.maxBurnTime > 0) { int i = this.generator.getBurningScaled(13); - this.blit(matrices, this.leftPos + 72, this.topPos + 44 + 12 - i, 176, 96 - i, 14, i); + guiGraphics.blit(RES_LOC, this.leftPos + 72, this.topPos + 44 + 12 - i, 176, 96 - i, 14, i); } if (this.generator.maxBurnTime > 0 && this.generator.currentEnergyProduce > 0) { - drawCenteredString(matrices, this.font, this.generator.currentEnergyProduce + " " + I18n.get("misc.actuallyadditions.energy_tick"), this.leftPos + 87, this.topPos + 65, 0xFFFFFF); - drawCenteredString(matrices, this.font, "for " + this.generator.maxBurnTime + " t", this.leftPos + 87, this.topPos + 75, 0xFFFFFF); - matrices.pushPose(); - matrices.translate(this.leftPos + 87, this.topPos + 85, 0); - matrices.scale(0.5625F, 0.5625F, 1F); + guiGraphics.drawCenteredString(this.font, this.generator.currentEnergyProduce + " " + I18n.get("misc.actuallyadditions.energy_tick"), this.leftPos + 87, this.topPos + 65, 0xFFFFFF); + guiGraphics.drawCenteredString(this.font, "for " + this.generator.maxBurnTime + " t", this.leftPos + 87, this.topPos + 75, 0xFFFFFF); + PoseStack poseStack = guiGraphics.pose(); + poseStack.pushPose(); + poseStack.translate(this.leftPos + 87, this.topPos + 85, 0); + poseStack.scale(0.5625F, 0.5625F, 1F); int usage = this.generator.fuelUsage; - drawCenteredString(matrices, this.font, "(per " + usage + " mB)",0, 0, 0xFFFFFF); - matrices.popPose(); + guiGraphics.drawCenteredString(this.font, "(per " + usage + " mB)",0, 0, 0xFFFFFF); + poseStack.popPose(); } - this.energy.draw(matrices); - this.fluid.draw(matrices); + this.energy.draw(guiGraphics); + this.fluid.draw(guiGraphics); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java index 05fa8b2cd..55b1410f6 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiPhantomPlacer.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerPhantomPlacer; import de.ellpeck.actuallyadditions.mod.tile.TileEntityPhantomPlacer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -55,8 +55,8 @@ public class GuiPhantomPlacer extends AAScreen { } @Override - public void render(@Nonnull PoseStack matrices, int mouseX, int mouseY, float partialTicks) { - super.render(matrices, mouseX, mouseY, partialTicks); + public void render(@Nonnull GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) { + super.render(guiGraphics, mouseX, mouseY, partialTicks); // if (!this.placer.isBreaker && this.buttonList.get(0).isMouseOver()) { // String loc = "info." + ActuallyAdditions.MODID + ".placer.sides"; @@ -79,13 +79,11 @@ public class GuiPhantomPlacer extends AAScreen { // return GuiInputter.SIDES[this.placer.side + 1]; // } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java index 4880998f1..97db97c7f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRangedCollector.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerRangedCollector; import de.ellpeck.actuallyadditions.mod.tile.TileEntityRangedCollector; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -47,8 +47,8 @@ public class GuiRangedCollector extends AAScreen { } @Override - public void render(@Nonnull PoseStack matrices, int x, int y, float f) { - super.render(matrices, x, y, f); + public void render(@Nonnull GuiGraphics guiGraphics, int x, int y, float f) { + super.render(guiGraphics, x, y, f); //this.filter.drawHover(matrices, x, y); } @@ -61,14 +61,12 @@ public class GuiRangedCollector extends AAScreen { } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1F, 1F, 1F, 1F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 86, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 86, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 86); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 86); } // @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java index 94c4ad2fb..9232b1cb2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiRepairer.java @@ -57,14 +57,14 @@ // RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); // // this.getMinecraft().getTextureManager().bindTexture(AssetUtil.GUI_INVENTORY_LOCATION); -// this.blit(matrices, this.guiLeft, this.guiTop + 93, 0, 0, 176, 86); +// guiGraphics.blit(matrices, this.guiLeft, this.guiTop + 93, 0, 0, 176, 86); // // this.getMinecraft().getTextureManager().bindTexture(RES_LOC); -// this.blit(matrices, this.guiLeft, this.guiTop, 0, 0, 176, 93); +// guiGraphics.blit(matrices, this.guiLeft, this.guiTop, 0, 0, 176, 93); // // if (TileEntityItemRepairer.canBeRepaired(this.tileRepairer.inv.getStackInSlot(TileEntityItemRepairer.SLOT_INPUT))) { // int i = this.tileRepairer.getItemDamageToScale(22); -// this.blit(matrices, this.guiLeft + 73, this.guiTop + 52, 176, 28, i, 16); +// guiGraphics.blit(matrices, this.guiLeft + 73, this.guiTop + 52, 176, 28, i, 16); // } // // this.energy.draw(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java index 0ce275a00..485b30b94 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiSmileyCloud.java @@ -78,7 +78,7 @@ // RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); // // this.getMinecraft().getTextureManager().bindTexture(RES_LOC); -// this.blit(matrices, this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize); +// guiGraphics.blit(matrices, this.guiLeft, this.guiTop, 0, 0, this.xSize, this.ySize); // // this.nameField.drawTextBox(); // } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java index 58d5c3a72..929d3bd05 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/GuiXPSolidifier.java @@ -11,10 +11,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.ContainerXPSolidifier; import de.ellpeck.actuallyadditions.mod.tile.TileEntityXPSolidifier; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.entity.player.Inventory; @@ -70,16 +70,14 @@ public class GuiXPSolidifier extends AAScreen { } @Override - public void renderBg(PoseStack matrices, float f, int x, int y) { + public void renderBg(GuiGraphics guiGraphics, float f, int x, int y) { RenderSystem.setShaderColor(1F, 1F, 1F, 1F); - RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrices, this.leftPos, this.topPos + 93, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 93, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, RES_LOC); - this.blit(matrices, this.leftPos, this.topPos, 0, 0, 176, 93); + guiGraphics.blit(RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 93); - drawCenteredString(matrices, this.font, Integer.toString(this.solidifier.amount), this.leftPos + 88, this.topPos + 30, 0xFFFFFF); + guiGraphics.drawCenteredString(this.font, Integer.toString(this.solidifier.amount), this.leftPos + 88, this.topPos + 30, 0xFFFFFF); } // @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/SackGui.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/SackGui.java index 800440ea7..3af40510f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/SackGui.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/SackGui.java @@ -11,9 +11,9 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.mod.inventory.SackContainer; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; @@ -77,9 +77,9 @@ public class SackGui extends AAScreen { }*/ @Override - public void render(@Nonnull PoseStack stack, int mouseX, int mouseY, float partialTicks) { - super.render(stack, mouseX, mouseY, partialTicks); - this.filter.drawHover(stack, mouseX, mouseY); + public void render(@Nonnull GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) { + super.render(guiGraphics, mouseX, mouseY, partialTicks); + this.filter.drawHover(guiGraphics, mouseX, mouseY); /* if (this.buttonAutoInsert.isMouseOver()) { List text = new ArrayList<>(); @@ -93,15 +93,12 @@ public class SackGui extends AAScreen { } @Override - protected void renderBg(PoseStack matrixStack, float partialTicks, int x, int y) { + protected void renderBg(GuiGraphics guiGraphics, float partialTicks, int x, int y) { RenderSystem.setShaderColor(1F, 1F, 1F, 1F); RenderSystem.setShaderTexture(0, AssetUtil.GUI_INVENTORY_LOCATION); - this.blit(matrixStack, this.leftPos, this.topPos + 90, 0, 0, 176, 86); + guiGraphics.blit(AssetUtil.GUI_INVENTORY_LOCATION, this.leftPos, this.topPos + 90, 0, 0, 176, 86); - RenderSystem.setShaderTexture(0, this.isVoid - ? RES_LOC_VOID - : RES_LOC); - this.blit(matrixStack, this.leftPos, this.topPos, 0, 0, 176, 90); + guiGraphics.blit(this.isVoid ? RES_LOC_VOID : RES_LOC, this.leftPos, this.topPos, 0, 0, 176, 90); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/TexturedButton.java b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/TexturedButton.java index 7d9159dee..b5f4b7efc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/TexturedButton.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/inventory/gui/TexturedButton.java @@ -12,10 +12,10 @@ package de.ellpeck.actuallyadditions.mod.inventory.gui; import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; -import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.gui.components.Button; -import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -37,7 +37,7 @@ public class TexturedButton extends Button { } public TexturedButton(ResourceLocation resLoc, int x, int y, int texturePosX, int texturePosY, int width, int height, List hoverTextList, OnPress pressable) { - super(x, y, width, height, TextComponent.EMPTY, pressable); + super(x, y, width, height, Component.empty(), pressable, DEFAULT_NARRATION); this.texturePosX = texturePosX; this.texturePosY = texturePosY; this.resLoc = resLoc; @@ -45,11 +45,10 @@ public class TexturedButton extends Button { } @Override - public void render(PoseStack matrices, int mouseX, int mouseY, float partialTicks) { + public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partialTicks) { if (this.visible) { RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.setShaderTexture(0, this.resLoc); - this.isHovered = mouseX >= this.x && mouseY >= this.y && this.x < this.x + this.width && this.y < this.y + this.height; + this.isHovered = mouseX >= this.getX() && mouseY >= this.getY() && mouseX < this.getX() + this.width && mouseY < this.getY() + this.height; int k = this.isHovered ? 1 : 0; @@ -57,16 +56,15 @@ public class TexturedButton extends Button { GlStateManager._enableBlend(); GlStateManager._blendFuncSeparate(770, 771, 1, 0); GlStateManager._blendFunc(770, 771); - this.blit(matrices, this.x, this.y, this.texturePosX, this.texturePosY - this.height + k * this.height, this.width, this.height); + guiGraphics.blit(this.resLoc, this.getX(), this.getY(), this.texturePosX, this.texturePosY - this.height + k * this.height, this.width, this.height); // this.mouseDragged(minecraft, x, y); } } - public void drawHover(PoseStack matrices, int x, int y) { + public void drawHover(GuiGraphics guiGraphics, int x, int y) { if (this.isMouseOver(x, y)) { Minecraft mc = Minecraft.getInstance(); - if(mc.screen != null) - mc.screen.renderComponentTooltip(matrices, this.textList.stream().map(TextComponent::new).collect(Collectors.toList()), x, y, mc.font); //TODO: Check if this is correct, used to call GuiUtils.drawHoveringText + guiGraphics.renderComponentTooltip(mc.font, this.textList.stream().map(Component::literal).collect(Collectors.toList()), x, y); //TODO: Check if this is correct, used to call GuiUtils.drawHoveringText } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ActuallyItems.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ActuallyItems.java index 9ca4d8071..46cbc0c57 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ActuallyItems.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ActuallyItems.java @@ -211,7 +211,7 @@ public final class ActuallyItems { return () -> new Item(defaultProps()); } public static Item.Properties defaultProps() { - return new Item.Properties().tab(ActuallyAdditions.GROUP); + return new Item.Properties(); } public static Item.Properties defaultNonStacking() { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java index b9ee7439a..1528cc87b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/AllInOneTool.java @@ -1,7 +1,6 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.api.ActuallyTags; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.base.IActuallyItem; import net.minecraft.world.InteractionResult; import net.minecraft.world.item.DiggerItem; @@ -24,7 +23,7 @@ public class AllInOneTool extends DiggerItem implements IActuallyItem { ActuallyTags.Blocks.MINEABLE_WITH_AIO, new Properties() .durability(tier.getUses() * 4) - .tab(ActuallyAdditions.GROUP) + ); this.tier = tier; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/CanolaSeed.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/CanolaSeed.java index 0cbe19040..6a6856123 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/CanolaSeed.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/CanolaSeed.java @@ -23,10 +23,10 @@ public class CanolaSeed extends ItemBase { @Override public boolean onEntityItemUpdate(ItemStack stack, ItemEntity entity) { - if (!entity.level.isClientSide) { + if (!entity.level().isClientSide) { if (stack != null) { BlockPos pos = entity.blockPosition(); - BlockState state = entity.level.getBlockState(pos); + BlockState state = entity.level().getBlockState(pos); Block block = state.getBlock(); if (block instanceof LiquidBlock && state.getFluidState().isSource()) { @@ -35,7 +35,7 @@ public class CanolaSeed extends ItemBase { ? InitFluids.CRYSTALLIZED_OIL.get() : InitFluids.REFINED_CANOLA_OIL.get())) { entity.kill(); - entity.level.setBlockAndUpdate(pos, (empowered + entity.level().setBlockAndUpdate(pos, (empowered ? InitFluids.EMPOWERED_OIL.getBlock() : InitFluids.CRYSTALLIZED_OIL.getBlock()).defaultBlockState()); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java index e6770fd4a..3df6394d7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/DrillItem.java @@ -25,7 +25,7 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; -import net.minecraft.network.chat.TextComponent; +import net.minecraft.network.chat.Component; import net.minecraft.resources.ResourceLocation; import net.minecraft.tags.BlockTags; import net.minecraft.world.InteractionHand; @@ -47,14 +47,15 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.Material; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; import net.minecraftforge.common.ForgeHooks; +import net.minecraftforge.common.Tags; import net.minecraftforge.common.ToolAction; import net.minecraftforge.common.ToolActions; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandlerModifiable; +import net.minecraftforge.registries.ForgeRegistries; public class DrillItem extends ItemEnergy { @@ -177,7 +178,7 @@ public class DrillItem extends ItemEnergy { @Override public InteractionResultHolder use(Level world, Player player, InteractionHand hand) { if (!world.isClientSide && player.isShiftKeyDown() && hand == InteractionHand.MAIN_HAND) { - player.openMenu(new SimpleMenuProvider((id, inv, p) -> new ContainerDrill(id, inv), new TextComponent(""))); + player.openMenu(new SimpleMenuProvider((id, inv, p) -> new ContainerDrill(id, inv), Component.literal(""))); // player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.DRILL.ordinal(), world, (int) player.posX, (int) player.posY, (int) player.posZ); } return new InteractionResultHolder<>(InteractionResult.PASS, player.getItemInHand(hand)); @@ -238,18 +239,18 @@ public class DrillItem extends ItemEnergy { } //Block hit - HitResult ray = WorldUtil.getNearestBlockWithDefaultReachDistance(player.level, player); + HitResult ray = WorldUtil.getNearestBlockWithDefaultReachDistance(player.level(), player); if (ray != null && ray.getType() == HitResult.Type.BLOCK) { BlockHitResult trace = (BlockHitResult) ray; //Breaks the Blocks if (!player.isShiftKeyDown() && this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.THREE_BY_THREE)) { if (this.getHasUpgrade(stack, ItemDrillUpgrade.UpgradeType.FIVE_BY_FIVE)) { - toReturn = this.breakBlocks(stack, 2, player.level, pos, trace.getDirection(), player); + toReturn = this.breakBlocks(stack, 2, player.level(), pos, trace.getDirection(), player); } else { - toReturn = this.breakBlocks(stack, 1, player.level, pos, trace.getDirection(), player); + toReturn = this.breakBlocks(stack, 1, player.level(), pos, trace.getDirection(), player); } } else { - toReturn = this.breakBlocks(stack, 0, player.level, pos, trace.getDirection(), player); + toReturn = this.breakBlocks(stack, 0, player.level(), pos, trace.getDirection(), player); } //Removes Enchantments added above @@ -263,7 +264,7 @@ public class DrillItem extends ItemEnergy { @Override public boolean isCorrectToolForDrops(ItemStack stack, BlockState state) { Block block = state.getBlock(); - return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) && (this.hasExtraWhitelist(block) || state.getMaterial().isReplaceable() || block == Blocks.SNOW_BLOCK || block == Blocks.SNOW || (block == Blocks.OBSIDIAN + return this.getEnergyStored(stack) >= this.getEnergyUsePerBlock(stack) && (this.hasExtraWhitelist(block) || state.canBeReplaced() || block == Blocks.SNOW_BLOCK || block == Blocks.SNOW || (block == Blocks.OBSIDIAN ? HARVEST_LEVEL >= 3 : block != Blocks.DIAMOND_BLOCK && block != Blocks.DIAMOND_ORE ? block != Blocks.EMERALD_ORE && block != Blocks.EMERALD_BLOCK @@ -271,7 +272,7 @@ public class DrillItem extends ItemEnergy { ? block != Blocks.IRON_BLOCK && block != Blocks.IRON_ORE ? block != Blocks.LAPIS_BLOCK && block != Blocks.LAPIS_ORE ? block != Blocks.REDSTONE_ORE - ? state.getMaterial() == Material.STONE || state.getMaterial() == Material.METAL || state.getMaterial() == Material.HEAVY_METAL + ? state.is(Tags.Blocks.STONE) || state.is(Tags.Blocks.STORAGE_BLOCKS) : HARVEST_LEVEL >= 2 : HARVEST_LEVEL >= 1 : HARVEST_LEVEL >= 1 @@ -487,7 +488,7 @@ public class DrillItem extends ItemEnergy { private boolean hasExtraWhitelist(Block block) { if (block != null) { - ResourceLocation location = block.getRegistryName(); + ResourceLocation location = ForgeRegistries.BLOCKS.getKey(block); if (location != null) { String name = location.toString(); if (name != null) { @@ -504,6 +505,6 @@ public class DrillItem extends ItemEnergy { @Override public boolean shouldCauseBlockBreakReset(ItemStack oldStack, ItemStack newStack) { - return !newStack.sameItem(oldStack); + return !ItemStack.isSameItem(newStack, oldStack); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java index 3c8abd813..038e75eec 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemAxeAA.java @@ -10,8 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import com.google.common.collect.ImmutableSet; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.world.item.DiggerItem; import net.minecraft.world.item.Tier; @@ -29,7 +27,7 @@ public class ItemAxeAA extends DiggerItem { // .addToolType(ToolType.SHOVEL, tier.getLevel()) // .addToolType(ToolType.PICKAXE, tier.getLevel()) .durability(tier.getUses() * 4) - .tab(ActuallyAdditions.GROUP) + ); this.tier = tier; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java index 6ff3c9541..7d0871831 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBattery.java @@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.entity.Entity; @@ -23,8 +22,8 @@ import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; import javax.annotation.Nonnull; @@ -44,12 +43,11 @@ public class ItemBattery extends ItemEnergy { @Override public void inventoryTick(@Nonnull ItemStack stack, Level world, @Nonnull Entity entity, int itemSlot, boolean isSelected) { - if (!world.isClientSide && entity instanceof Player && ItemUtil.isEnabled(stack) && !isSelected) { - Player player = (Player) entity; - for (int i = 0; i < player.getInventory().getContainerSize(); i++) { + if (!world.isClientSide && entity instanceof Player player && ItemUtil.isEnabled(stack) && !isSelected) { + for (int i = 0; i < player.getInventory().getContainerSize(); i++) { ItemStack slot = player.getInventory().getItem(i); if (!slot.isEmpty() && slot.getCount() == 1) { - LazyOptional energy = slot.getCapability(CapabilityEnergy.ENERGY); + LazyOptional energy = slot.getCapability(ForgeCapabilities.ENERGY); energy.ifPresent(cap -> { int extractable = this.extractEnergy(stack, Integer.MAX_VALUE, true); int received = cap.receiveEnergy(extractable, false); @@ -77,9 +75,9 @@ public class ItemBattery extends ItemEnergy { @Override public void appendHoverText(ItemStack stack, @Nullable Level playerIn, List list, TooltipFlag advanced) { super.appendHoverText(stack, playerIn, list, advanced); - list.add(new TranslatableComponent("tooltip.actuallyadditions.battery." + (ItemUtil.isEnabled(stack) + list.add(Component.translatable("tooltip.actuallyadditions.battery." + (ItemUtil.isEnabled(stack) ? "discharge" : "noDischarge"))); - list.add(new TranslatableComponent("tooltip.actuallyadditions.battery.changeMode")); + list.add(Component.translatable("tooltip.actuallyadditions.battery.changeMode")); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java index f999e1063..2cc70eb80 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemBooklet.java @@ -11,7 +11,6 @@ package de.ellpeck.actuallyadditions.mod.items; import com.mojang.blaze3d.platform.Window; -import com.mojang.blaze3d.vertex.PoseStack; import de.ellpeck.actuallyadditions.api.booklet.IBookletPage; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.IHudDisplay; @@ -19,8 +18,8 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import net.minecraft.ChatFormatting; import net.minecraft.advancements.Advancement; import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.server.PlayerAdvancements; import net.minecraft.server.ServerAdvancementManager; @@ -90,11 +89,11 @@ public class ItemBooklet extends ItemBase implements IHudDisplay { @OnlyIn(Dist.CLIENT) @Override public void appendHoverText(ItemStack stack, @Nullable Level playerIn, List tooltip, TooltipFlag advanced) { - tooltip.add(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + "." + this.getDescription().getString() + ".desc")); + tooltip.add(Component.translatable("tooltip." + ActuallyAdditions.MODID + "." + this.getDescription().getString() + ".desc")); // TODO: this is bad for (int i = 1; i <= 4; i++) { - tooltip.add(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + "." + this.getDescription().getString() + ".sub." + i).withStyle(i == 4 + tooltip.add(Component.translatable("tooltip." + ActuallyAdditions.MODID + "." + this.getDescription().getString() + ".sub." + i).withStyle(i == 4 ? ChatFormatting.GOLD : ChatFormatting.RESET).withStyle(i == 4 ? ChatFormatting.ITALIC @@ -104,7 +103,7 @@ public class ItemBooklet extends ItemBase implements IHudDisplay { @Override @OnlyIn(Dist.CLIENT) - public void displayHud(PoseStack matrices, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { + public void displayHud(GuiGraphics guiGraphics, Minecraft minecraft, Player player, ItemStack stack, HitResult rayCast, Window resolution) { // if (rayCast != null && rayCast.getBlockPos() != null) { // BlockState state = minecraft.level.getBlockState(rayCast.getBlockPos()); // Block block = state.getBlock(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java index 698e271b1..d6c66f096 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemCrafterOnAStick.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; @@ -27,7 +26,7 @@ import net.minecraftforge.network.NetworkHooks; import javax.annotation.Nonnull; public class ItemCrafterOnAStick extends ItemBase { - private static final Component CONTAINER_TITLE = new TranslatableComponent("container.crafting"); + private static final Component CONTAINER_TITLE = Component.translatable("container.crafting"); public ItemCrafterOnAStick() { super(ActuallyItems.defaultNonStacking()); @@ -37,7 +36,7 @@ public class ItemCrafterOnAStick extends ItemBase { @Override public InteractionResultHolder use(Level world, @Nonnull Player player, @Nonnull InteractionHand hand) { if (!world.isClientSide) { - NetworkHooks.openGui((ServerPlayer) player, new SimpleMenuProvider((windowId, playerInventory, playerEntity) -> new CraftingMenu(windowId, playerInventory), CONTAINER_TITLE)); + NetworkHooks.openScreen((ServerPlayer) player, new SimpleMenuProvider((windowId, playerInventory, playerEntity) -> new CraftingMenu(windowId, playerInventory), CONTAINER_TITLE)); } return new InteractionResultHolder<>(InteractionResult.SUCCESS, player.getItemInHand(hand)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemEngineerGoggles.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemEngineerGoggles.java index d80338dc7..b4c020413 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemEngineerGoggles.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemEngineerGoggles.java @@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.util.StackUtil; import io.netty.util.internal.ConcurrentSet; import net.minecraft.client.Minecraft; import net.minecraft.world.entity.Entity; -import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; import net.minecraft.world.phys.AABB; @@ -38,7 +37,7 @@ public class ItemEngineerGoggles extends ItemArmorAA implements IGoggles { private final boolean displayMobs; public ItemEngineerGoggles(boolean displayMobs) { - super(ArmorMaterials.GOGGLES, EquipmentSlot.HEAD, ActuallyItems.defaultProps().setNoRepair().durability(0)); + super(ArmorMaterials.GOGGLES, Type.HELMET, ActuallyItems.defaultProps().setNoRepair().durability(0)); this.displayMobs = displayMobs; DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> () -> MinecraftForge.EVENT_BUS.register(this)); @@ -59,7 +58,7 @@ public class ItemEngineerGoggles extends ItemArmorAA implements IGoggles { if (((IGoggles) face.getItem()).displaySpectralMobs()) { double range = 8; AABB aabb = new AABB(player.getX() - range, player.getY() - range, player.getZ() - range, player.getX() + range, player.getY() + range, player.getZ() + range); - List entities = player.level.getEntitiesOfClass(Entity.class, aabb); + List entities = player.level().getEntitiesOfClass(Entity.class, aabb); if (entities != null && !entities.isEmpty()) { this.cachedGlowingEntities.addAll(entities); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFillingWand.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFillingWand.java index f6f6eb2ed..a760b6d31 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFillingWand.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFillingWand.java @@ -14,11 +14,11 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.core.BlockPos; +import net.minecraft.core.registries.BuiltInRegistries; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.NbtUtils; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.MutableComponent; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.sounds.SoundSource; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.Entity; @@ -53,7 +53,7 @@ public class ItemFillingWand extends ItemEnergy { if (StackUtil.isValid(stack)) { for (int i = 0; i < player.getInventory().getContainerSize(); i++) { ItemStack slot = player.getInventory().getItem(i); - if (StackUtil.isValid(slot) && slot.sameItem(stack)) { + if (StackUtil.isValid(slot) && ItemStack.isSameItem(slot, stack)) { slot.shrink(1); if (!StackUtil.isValid(slot)) { player.getInventory().setItem(i, ItemStack.EMPTY); @@ -73,7 +73,7 @@ public class ItemFillingWand extends ItemEnergy { private static Optional loadData(ItemStack stack) { if (stack.getOrCreateTag().contains("state")) { - return Optional.of(NbtUtils.readBlockState(stack.getOrCreateTag().getCompound("state"))); + return Optional.of(NbtUtils.readBlockState(BuiltInRegistries.BLOCK.asLookup(), stack.getOrCreateTag().getCompound("state"))); } return Optional.empty(); @@ -142,9 +142,8 @@ public class ItemFillingWand extends ItemEnergy { boolean shouldClear = false; if (isSelected) { - if (entity instanceof Player && stack.hasTag()) { - Player player = (Player) entity; - boolean creative = player.isCreative(); + if (entity instanceof Player player && stack.hasTag()) { + boolean creative = player.isCreative(); CompoundTag compound = stack.getOrCreateTag(); @@ -168,7 +167,7 @@ public class ItemFillingWand extends ItemEnergy { BlockPos pos = new BlockPos(lowestX + currX, lowestY + currY, lowestZ + currZ); BlockState state = world.getBlockState(pos); - if (state.getMaterial().isReplaceable() && replaceState.canSurvive(world, pos)) { + if (state.canBeReplaced() && replaceState.canSurvive(world, pos)) { if (creative || removeFittingItem(replaceState, player)) { world.setBlock(pos, replaceState, 2); @@ -227,9 +226,9 @@ public class ItemFillingWand extends ItemEnergy { MutableComponent display = loadData(stack) .map(state -> state.getBlock().getName()) - .orElse(new TranslatableComponent("tooltip.actuallyadditions.item_filling_wand.selected_block.none")); + .orElse(Component.translatable("tooltip.actuallyadditions.item_filling_wand.selected_block.none")); - tooltip.add(new TranslatableComponent("tooltip.actuallyadditions.item_filling_wand.selected_block", display.getString())); + tooltip.add(Component.translatable("tooltip.actuallyadditions.item_filling_wand.selected_block", display.getString())); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFilter.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFilter.java index 80f40ce8f..17abdbbf7 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFilter.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemFilter.java @@ -15,7 +15,6 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.server.level.ServerPlayer; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResultHolder; @@ -40,7 +39,7 @@ public class ItemFilter extends ItemBase { @Override public InteractionResultHolder use(Level world, Player player, InteractionHand hand) { if (!world.isClientSide && hand == InteractionHand.MAIN_HAND) { - NetworkHooks.openGui((ServerPlayer) player, new SimpleMenuProvider((windowId, inv, playerEnt) -> new ContainerFilter(windowId, inv), TextComponent.EMPTY)); + NetworkHooks.openScreen((ServerPlayer) player, new SimpleMenuProvider((windowId, inv, playerEnt) -> new ContainerFilter(windowId, inv), Component.empty())); // player.openGui(ActuallyAdditions.INSTANCE, GuiHandler.GuiTypes.FILTER.ordinal(), world, (int) player.posX, (int) player.posY, (int) player.posZ); } return InteractionResultHolder.pass(player.getItemInHand(hand)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java index e898f5524..0f880f69c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemGrowthRing.java @@ -36,19 +36,18 @@ public class ItemGrowthRing extends ItemEnergy { @Override public void inventoryTick(ItemStack stack, Level world, Entity entity, int itemSlot, boolean isSelected) { - if (!(entity instanceof Player) || world.isClientSide || entity.isShiftKeyDown()) { + if (!(entity instanceof Player player) || world.isClientSide || entity.isShiftKeyDown()) { return; } - Player player = (Player) entity; - ItemStack equipped = player.getMainHandItem(); + ItemStack equipped = player.getMainHandItem(); int energyUse = 300; if (StackUtil.isValid(equipped) && equipped == stack && this.getEnergyStored(stack) >= energyUse) { List blocks = new ArrayList<>(); //Adding all possible Blocks - if (player.level.getGameTime() % 30 == 0) { + if (player.level().getGameTime() % 30 == 0) { int range = 3; for (int x = -range; x < range + 1; x++) { for (int z = -range; z < range + 1; z++) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java index e1048a25e..2ddc2ff90 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLaserWrench.java @@ -17,8 +17,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityLaserRelay; import net.minecraft.ChatFormatting; import net.minecraft.core.BlockPos; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; @@ -45,21 +43,19 @@ public class ItemLaserWrench extends ItemBase { ItemStack stack = player.getItemInHand(context.getHand()); BlockEntity tile = world.getBlockEntity(pos); - if (tile instanceof TileEntityLaserRelay) { - TileEntityLaserRelay relay = (TileEntityLaserRelay) tile; - if (!world.isClientSide) { + if (tile instanceof TileEntityLaserRelay relay) { + if (!world.isClientSide) { if (ItemPhantomConnector.getStoredPosition(stack) == null) { ItemPhantomConnector.storeConnection(stack, pos.getX(), pos.getY(), pos.getZ(), world); - player.displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".laser.stored.desc"), true); + player.displayClientMessage(Component.translatable("tooltip." + ActuallyAdditions.MODID + ".laser.stored.desc"), true); } else { BlockPos savedPos = ItemPhantomConnector.getStoredPosition(stack); if (savedPos != null) { BlockEntity savedTile = world.getBlockEntity(savedPos); - if (savedTile instanceof TileEntityLaserRelay) { + if (savedTile instanceof TileEntityLaserRelay savedRelay) { int distanceSq = (int) savedPos.distSqr(pos); - TileEntityLaserRelay savedRelay = (TileEntityLaserRelay) savedTile; - int lowestRange = Math.min(relay.getMaxRange(), savedRelay.getMaxRange()); + int lowestRange = Math.min(relay.getMaxRange(), savedRelay.getMaxRange()); int range = lowestRange * lowestRange; if (ItemPhantomConnector.getStoredWorld(stack) == world.dimension() && savedRelay.type == relay.type && distanceSq <= range && ActuallyAdditionsAPI.connectionHandler.addConnection(savedPos, pos, relay.type, world, false, true)) { ItemPhantomConnector.clearStorage(stack, "XCoordOfTileStored", "YCoordOfTileStored", "ZCoordOfTileStored", "WorldOfTileStored"); @@ -67,13 +63,13 @@ public class ItemLaserWrench extends ItemBase { ((TileEntityLaserRelay) savedTile).sendUpdate(); relay.sendUpdate(); - player.displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".laser.connected.desc"), true); + player.displayClientMessage(Component.translatable("tooltip." + ActuallyAdditions.MODID + ".laser.connected.desc"), true); return InteractionResult.SUCCESS; } } - player.displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".laser.cantConnect.desc"), false); + player.displayClientMessage(Component.translatable("tooltip." + ActuallyAdditions.MODID + ".laser.cantConnect.desc"), false); ItemPhantomConnector.clearStorage(stack, "XCoordOfTileStored", "YCoordOfTileStored", "ZCoordOfTileStored", "WorldOfTileStored"); } } @@ -95,11 +91,11 @@ public class ItemLaserWrench extends ItemBase { public void appendHoverText(ItemStack stack, Level playerIn, List list, TooltipFlag advanced) { BlockPos coords = ItemPhantomConnector.getStoredPosition(stack); if (coords != null) { - list.add(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".boundTo.desc").append(":")); - list.add(new TextComponent("X: " + coords.getX())); - list.add(new TextComponent("Y: " + coords.getY())); - list.add(new TextComponent("Z: " + coords.getZ())); - list.add(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".clearStorage.desc").withStyle(ChatFormatting.ITALIC)); + list.add(Component.translatable("tooltip." + ActuallyAdditions.MODID + ".boundTo.desc").append(":")); + list.add(Component.literal("X: " + coords.getX())); + list.add(Component.literal("Y: " + coords.getY())); + list.add(Component.literal("Z: " + coords.getZ())); + list.add(Component.translatable("tooltip." + ActuallyAdditions.MODID + ".clearStorage.desc").withStyle(ChatFormatting.ITALIC)); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java index 519ee179c..da7ed3160 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemLeafBlower.java @@ -63,8 +63,8 @@ public class ItemLeafBlower extends ItemBase implements IDisplayStandItem { } @Override - public void onUsingTick(ItemStack stack, LivingEntity player, int count) { - this.doUpdate(player.level, Mth.floor(player.getX()), Mth.floor(player.getY()), Mth.floor(player.getZ()), count, stack); + public void onUseTick(Level level, LivingEntity livingEntity, ItemStack stack, int remainingUseDuration) { + this.doUpdate(level, Mth.floor(livingEntity.getX()), Mth.floor(livingEntity.getY()), Mth.floor(livingEntity.getZ()), remainingUseDuration, stack); } private boolean doUpdate(Level world, int x, int y, int z, int time, ItemStack stack) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java index ff87229e2..510d251f2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemMagnetRing.java @@ -37,9 +37,8 @@ public class ItemMagnetRing extends ItemEnergy { @Override public void inventoryTick(@Nonnull ItemStack stack, @Nonnull Level world, @Nonnull Entity entity, int itemSlot, boolean isSelected) { - if (entity instanceof Player && !world.isClientSide && !ItemUtil.isEnabled(stack)) { - Player player = (Player) entity; - if (player.isCreative() || player.isSpectator()) { + if (entity instanceof Player player && !world.isClientSide && !ItemUtil.isEnabled(stack)) { + if (player.isCreative() || player.isSpectator()) { return; } if (!entity.isShiftKeyDown()) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java index 4d4d09649..2f0ce9478 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPhantomConnector.java @@ -16,11 +16,9 @@ import de.ellpeck.actuallyadditions.mod.items.base.ItemBase; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import net.minecraft.ChatFormatting; import net.minecraft.core.BlockPos; -import net.minecraft.core.Registry; +import net.minecraft.core.registries.Registries; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.InteractionResult; @@ -47,7 +45,7 @@ public class ItemPhantomConnector extends ItemBase { return null; } - return ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(tag.getString("WorldOfTileStored"))); + return ResourceKey.create(Registries.DIMENSION, new ResourceLocation(tag.getString("WorldOfTileStored"))); } public static BlockPos getStoredPosition(ItemStack stack) { @@ -95,7 +93,7 @@ public class ItemPhantomConnector extends ItemBase { ((TileEntityBase) tile).sendUpdate(); } clearStorage(stack, "XCoordOfTileStored", "YCoordOfTileStored", "ZCoordOfTileStored", "WorldOfTileStored"); - context.getPlayer().displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".phantom.connected.desc"), true); + context.getPlayer().displayClientMessage(Component.translatable("tooltip." + ActuallyAdditions.MODID + ".phantom.connected.desc"), true); return InteractionResult.SUCCESS; } return InteractionResult.FAIL; @@ -103,7 +101,7 @@ public class ItemPhantomConnector extends ItemBase { } //Storing Connections storeConnection(stack, pos.getX(), pos.getY(), pos.getZ(), context.getLevel()); - context.getPlayer().displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".phantom.stored.desc"), true); + context.getPlayer().displayClientMessage(Component.translatable("tooltip." + ActuallyAdditions.MODID + ".phantom.stored.desc"), true); } return InteractionResult.SUCCESS; } @@ -119,11 +117,11 @@ public class ItemPhantomConnector extends ItemBase { public void appendHoverText(ItemStack stack, @Nullable Level playerIn, List list, TooltipFlag advanced) { BlockPos coords = getStoredPosition(stack); if (coords != null) { - list.add(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".boundTo.desc").append(":")); - list.add(new TextComponent("X: " + coords.getX())); - list.add(new TextComponent("Y: " + coords.getY())); - list.add(new TextComponent("Z: " + coords.getZ())); - list.add(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".clearStorage.desc").withStyle(ChatFormatting.ITALIC)); + list.add(Component.translatable("tooltip." + ActuallyAdditions.MODID + ".boundTo.desc").append(":")); + list.add(Component.literal("X: " + coords.getX())); + list.add(Component.literal("Y: " + coords.getY())); + list.add(Component.literal("Z: " + coords.getZ())); + list.add(Component.translatable("tooltip." + ActuallyAdditions.MODID + ".clearStorage.desc").withStyle(ChatFormatting.ITALIC)); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java index bebe68b32..dfcfc3785 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPickaxeAA.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.world.item.DiggerItem; import net.minecraft.world.item.Tier; @@ -28,7 +27,7 @@ public class ItemPickaxeAA extends DiggerItem { // .addToolType(ToolType.SHOVEL, tier.getLevel()) // .addToolType(ToolType.PICKAXE, tier.getLevel()) .durability(tier.getUses() * 4) - .tab(ActuallyAdditions.GROUP) + ); this.tier = tier; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPlayerProbe.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPlayerProbe.java index ba12b77d7..93e0a8a92 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPlayerProbe.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemPlayerProbe.java @@ -16,7 +16,6 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityPlayerInterface; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.Entity; @@ -51,13 +50,13 @@ public class ItemPlayerProbe extends ItemBase { if (player != null) { if (player.isShiftKeyDown()) { ItemPhantomConnector.clearStorage(stack, "UUIDLeast", "UUIDMost", "Name"); - ((Player) entity).displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".playerProbe.disconnect.1"), false); - player.displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".playerProbe.notice"), false); + ((Player) entity).displayClientMessage(Component.translatable("tooltip." + ActuallyAdditions.MODID + ".playerProbe.disconnect.1"), false); + player.displayClientMessage(Component.translatable("tooltip." + ActuallyAdditions.MODID + ".playerProbe.notice"), false); //TheAchievements.GET_UNPROBED.get(player); } } else { ItemPhantomConnector.clearStorage(stack, "UUIDLeast", "UUIDMost", "Name"); - ((Player) entity).displayClientMessage(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".playerProbe.disconnect.2"), false); + ((Player) entity).displayClientMessage(Component.translatable("tooltip." + ActuallyAdditions.MODID + ".playerProbe.disconnect.2"), false); } } } @@ -92,13 +91,12 @@ public class ItemPlayerProbe extends ItemBase { @Override public InteractionResult interactLivingEntity(ItemStack aStack, Player player, LivingEntity entity, InteractionHand hand) { - if (!player.level.isClientSide) { + if (!player.level().isClientSide) { ItemStack stack = player.getMainHandItem(); if (StackUtil.isValid(stack) && stack.getItem() == this) { - if (entity instanceof Player) { - Player playerHit = (Player) entity; + if (entity instanceof Player playerHit) { - if (!playerHit.isShiftKeyDown()) { + if (!playerHit.isShiftKeyDown()) { CompoundTag compound = stack.getOrCreateTag(); compound.putString("Name", playerHit.getName().getString()); compound.putUUID("UUID", playerHit.getUUID()); @@ -115,7 +113,7 @@ public class ItemPlayerProbe extends ItemBase { public void appendHoverText(ItemStack stack, @Nullable Level playerIn, List tooltip, TooltipFlag advanced) { if (stack.getOrCreateTag().contains("Name")) { String name = stack.getOrCreateTag().getString("Name"); - tooltip.add(new TranslatableComponent("tooltip." + ActuallyAdditions.MODID + ".playerProbe.probing").append(": " + name)); + tooltip.add(Component.translatable("tooltip." + ActuallyAdditions.MODID + ".playerProbe.probing").append(": " + name)); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java index 8db14011d..8dd146dae 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemResonantRice.java @@ -15,7 +15,6 @@ import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResultHolder; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.level.Explosion; import net.minecraft.world.level.Level; public class ItemResonantRice extends ItemBase { @@ -29,7 +28,7 @@ public class ItemResonantRice extends ItemBase { ItemStack stack = player.getItemInHand(hand); if (!world.isClientSide) { stack.shrink(1); - world.explode(null, player.getX(), player.getY(), player.getZ(), 0.5F, Explosion.BlockInteraction.DESTROY); + world.explode(null, player.getX(), player.getY(), player.getZ(), 0.5F, Level.ExplosionInteraction.MOB); } return InteractionResultHolder.success(stack); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemShovelAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemShovelAA.java index 284741836..210e1da5d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemShovelAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemShovelAA.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.items; import com.google.common.collect.Sets; import de.ellpeck.actuallyadditions.mod.items.base.ItemToolAA; -import net.minecraft.tags.Tag; import net.minecraft.tags.TagKey; import net.minecraft.world.InteractionResult; import net.minecraft.world.item.Item; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleportStaff.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleportStaff.java index 91e06d0c2..b3350d7c5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleportStaff.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemTeleportStaff.java @@ -11,7 +11,7 @@ package de.ellpeck.actuallyadditions.mod.items; import de.ellpeck.actuallyadditions.mod.items.base.ItemEnergy; -import net.minecraft.core.Vec3i; +import net.minecraft.core.BlockPos; import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; @@ -36,9 +36,9 @@ public class ItemTeleportStaff extends ItemEnergy { HitResult rayTraceResult = player.pick(100,1F,false); if (rayTraceResult.getType() == HitResult.Type.BLOCK || player.getXRot() >= -5) { Vec3 location = rayTraceResult.getLocation(); - Vec3 pos = Vec3.atBottomCenterOf(new Vec3i(location.x, location.y, location.z)); + Vec3 pos = Vec3.atBottomCenterOf(BlockPos.containing(location.x, location.y, location.z)); int baseUse = 200; - int use = baseUse + (int) (baseUse * player.blockPosition().distSqr(new Vec3i(pos.x, pos.y, pos.z))); + int use = baseUse + (int) (baseUse * player.blockPosition().distSqr(BlockPos.containing(pos.x, pos.y, pos.z))); if (this.getEnergyStored(stack) >= use) { ((ServerPlayer) player).connection.teleport(pos.x, pos.y + 1F, pos.z, player.getYRot(), player.getXRot()); player.removeVehicle(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterBowl.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterBowl.java index 93f82f98f..bbd60814c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterBowl.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterBowl.java @@ -32,7 +32,6 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraft.world.level.material.Material; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; import net.minecraftforge.event.ForgeEventFactory; @@ -48,36 +47,36 @@ public class ItemWaterBowl extends ItemBase { @SubscribeEvent public void onPlayerInteractEvent(PlayerInteractEvent.RightClickItem event) { - if (event.getWorld() != null) { + if (event.getLevel() != null) { if (CommonConfig.Other.WATER_BOWL.get()) { if (StackUtil.isValid(event.getItemStack()) && event.getItemStack().getItem() == Items.BOWL) { - HitResult rayTrace = WorldUtil.getNearestBlockWithDefaultReachDistance(event.getWorld(), event.getPlayer(), true, false, false); + HitResult rayTrace = WorldUtil.getNearestBlockWithDefaultReachDistance(event.getLevel(), event.getEntity(), true, false, false); if (rayTrace.getType() != HitResult.Type.BLOCK) { return; } BlockHitResult trace = (BlockHitResult) rayTrace; - InteractionResultHolder result = ForgeEventFactory.onBucketUse(event.getPlayer(), event.getWorld(), event.getItemStack(), trace); + InteractionResultHolder result = ForgeEventFactory.onBucketUse(event.getEntity(), event.getLevel(), event.getItemStack(), trace); if (result == null) { - if (event.getPlayer().mayUseItemAt(trace.getBlockPos().relative(trace.getDirection()), trace.getDirection(), event.getItemStack())) { - BlockState state = event.getWorld().getBlockState(trace.getBlockPos()); + if (event.getEntity().mayUseItemAt(trace.getBlockPos().relative(trace.getDirection()), trace.getDirection(), event.getItemStack())) { + BlockState state = event.getLevel().getBlockState(trace.getBlockPos()); Block block = state.getBlock(); // TODO: Validate fluid check if ((block == Blocks.WATER) && state.getValue(BlockStateProperties.LEVEL) == 0) { - event.getPlayer().playSound(SoundEvents.BUCKET_FILL, 1.0F, 1.0F); + event.getEntity().playSound(SoundEvents.BUCKET_FILL, 1.0F, 1.0F); - if (!event.getWorld().isClientSide) { - event.getWorld().setBlock(trace.getBlockPos(), Blocks.AIR.defaultBlockState(), 11); + if (!event.getLevel().isClientSide) { + event.getLevel().setBlock(trace.getBlockPos(), Blocks.AIR.defaultBlockState(), 11); ItemStack reduced = StackUtil.shrink(event.getItemStack(), 1); ItemStack bowl = new ItemStack(ActuallyItems.WATER_BOWL.get()); if (!StackUtil.isValid(reduced)) { - event.getPlayer().setItemInHand(event.getHand(), bowl); - } else if (!event.getPlayer().getInventory().add(bowl.copy())) { - ItemEntity entityItem = new ItemEntity(event.getWorld(), event.getPlayer().getX(), event.getPlayer().getY(), event.getPlayer().getZ(), bowl.copy()); + event.getEntity().setItemInHand(event.getHand(), bowl); + } else if (!event.getEntity().getInventory().add(bowl.copy())) { + ItemEntity entityItem = new ItemEntity(event.getLevel(), event.getEntity().getX(), event.getEntity().getY(), event.getEntity().getZ(), bowl.copy()); entityItem.setPickUpDelay(0); - event.getWorld().addFreshEntity(entityItem); + event.getLevel().addFreshEntity(entityItem); } } } @@ -109,7 +108,7 @@ public class ItemWaterBowl extends ItemBase { if (!world.mayInteract(player, pos)) { return InteractionResultHolder.fail(stack); } else { - BlockPos pos1 = world.getBlockState(pos).getMaterial().isReplaceable() && blockTrace.getDirection() == Direction.UP + BlockPos pos1 = world.getBlockState(pos).canBeReplaced() && blockTrace.getDirection() == Direction.UP ? pos : pos.relative(blockTrace.getDirection()); @@ -143,9 +142,8 @@ public class ItemWaterBowl extends ItemBase { boolean change = false; if (lastX != 0 && lastX != (int) entity.getX() || lastY != 0 && lastY != (int) entity.getY()) { if (!entity.isShiftKeyDown()) { - if (entity instanceof Player) { - Player player = (Player) entity; - if (this.tryPlaceContainedLiquid(player, world, player.blockPosition(), true)) { + if (entity instanceof Player player) { + if (this.tryPlaceContainedLiquid(player, world, player.blockPosition(), true)) { this.checkReplace(player, stack, new ItemStack(Items.BOWL), itemSlot); } } @@ -173,14 +171,13 @@ public class ItemWaterBowl extends ItemBase { @Override public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) { - return !ItemStack.isSame(oldStack, newStack); + return !ItemStack.isSameItem(oldStack, newStack); } public boolean tryPlaceContainedLiquid(Player player, Level world, BlockPos pos, boolean finite) { BlockState state = world.getBlockState(pos); - Material material = state.getMaterial(); - boolean nonSolid = !material.isSolid(); - boolean replaceable = state.getMaterial().isReplaceable(); + boolean nonSolid = !state.isSolid(); + boolean replaceable = state.canBeReplaced(); if (!world.isEmptyBlock(pos) && !nonSolid && !replaceable) { return false; @@ -192,7 +189,7 @@ public class ItemWaterBowl extends ItemBase { world.addParticle(ParticleTypes.LARGE_SMOKE, pos.getX() + Math.random(), pos.getY() + Math.random(), pos.getZ() + Math.random(), 0.0D, 0.0D, 0.0D); } } else { - if (!world.isClientSide && (nonSolid || replaceable) && !material.isLiquid()) { + if (!world.isClientSide && (nonSolid || replaceable) && world.getFluidState(pos).isEmpty()) { world.destroyBlock(pos, true); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java index d6fb60359..6ebd5309f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWaterRemovalRing.java @@ -29,7 +29,7 @@ public class ItemWaterRemovalRing extends ItemEnergy { @Override public void inventoryTick(ItemStack stack, Level world, Entity player, int itemSlot, boolean isSelected) { - if (!(player instanceof Player) || player.level.isClientSide || player.isShiftKeyDown()) { + if (!(player instanceof Player) || player.level().isClientSide || player.isShiftKeyDown()) { return; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java index 10d7d56ef..9d0fee2e9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/ItemWingsOfTheBats.java @@ -88,9 +88,9 @@ public class ItemWingsOfTheBats extends ItemBase { public void onEntityDropEvent(LivingDropsEvent event) { Entity source = event.getSource().getEntity(); - if (event.getEntityLiving().level != null && !event.getEntityLiving().level.isClientSide && source instanceof Player) { + if (event.getEntity().level() != null && !event.getEntity().level().isClientSide && source instanceof Player) { //Drop Wings from Bats - if (ConfigBoolValues.DO_BAT_DROPS.isEnabled() && event.getEntityLiving() instanceof Bat) { + if (ConfigBoolValues.DO_BAT_DROPS.isEnabled() && event.getEntity() instanceof Bat) { int looting = event.getLootingLevel(); Iterable equip = source.getHandSlots(); @@ -102,23 +102,22 @@ public class ItemWingsOfTheBats extends ItemBase { } } - if (event.getEntityLiving().level.random.nextInt(15) <= looting * 2) { - LivingEntity entityLiving = event.getEntityLiving(); - event.getDrops().add(new ItemEntity(event.getEntityLiving().level, entityLiving.getX(), entityLiving.getY(), entityLiving.getZ(), new ItemStack(ActuallyItems.BATS_WING.get(), event.getEntityLiving().level.random.nextInt(2 + looting) + 1))); + if (event.getEntity().level().random.nextInt(15) <= looting * 2) { + LivingEntity entityLiving = event.getEntity(); + event.getDrops().add(new ItemEntity(event.getEntity().level(), entityLiving.getX(), entityLiving.getY(), entityLiving.getZ(), new ItemStack(ActuallyItems.BATS_WING.get(), event.getEntity().level().random.nextInt(2 + looting) + 1))); } } } } @SubscribeEvent - public void livingUpdateEvent(LivingEvent.LivingUpdateEvent event) { - if (event.getEntityLiving() instanceof Player) { - Player player = (Player) event.getEntityLiving(); + public void livingUpdateEvent(LivingEvent.LivingTickEvent event) { + if (event.getEntity() instanceof Player player) { - if (false &&!player.isCreative() && !player.isSpectator()) { //TODO disabled for now. + if (false &&!player.isCreative() && !player.isSpectator()) { //TODO disabled for now. PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player); - if (!player.level.isClientSide) { + if (!player.level().isClientSide) { boolean tryDeduct = false; boolean shouldSend = false; @@ -139,7 +138,7 @@ public class ItemWingsOfTheBats extends ItemBase { if (player.getAbilities().flying) { data.batWingsFlyTime++; - if (player.level.getLevelData().getGameTime() % 10 == 0) { + if (player.level().getLevelData().getGameTime() % 10 == 0) { shouldSend = true; } } @@ -162,9 +161,9 @@ public class ItemWingsOfTheBats extends ItemBase { if (!player.getAbilities().flying) { deductTime = 2; } else { - BlockPos pos = new BlockPos(player.getX(), player.getY() + player.getBbHeight(), player.getZ()); - BlockState state = player.level.getBlockState(pos); - if (state.isFaceSturdy(player.level, pos, Direction.DOWN)) { + BlockPos pos = BlockPos.containing(player.getX(), player.getY() + player.getBbHeight(), player.getZ()); + BlockState state = player.level().getBlockState(pos); + if (state.isFaceSturdy(player.level(), pos, Direction.DOWN)) { deductTime = 10; } } @@ -172,7 +171,7 @@ public class ItemWingsOfTheBats extends ItemBase { if (deductTime > 0) { data.batWingsFlyTime = Math.max(0, data.batWingsFlyTime - deductTime); - if (player.level.getLevelData().getGameTime() % 10 == 0) { + if (player.level().getLevelData().getGameTime() % 10 == 0) { shouldSend = true; } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/Sack.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/Sack.java index ba268c8ee..fae3f4e7f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/Sack.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/Sack.java @@ -27,7 +27,7 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; -import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.network.NetworkHooks; import java.util.UUID; @@ -49,7 +49,7 @@ public class Sack extends ItemBase { if (!context.getLevel().isClientSide) { ItemStackHandlerAA inv = new ItemStackHandlerAA(28); - boolean changed = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, context.getClickedFace()) + boolean changed = tile.getCapability(ForgeCapabilities.ITEM_HANDLER, context.getClickedFace()) .map(cap -> { boolean localChanged = false; DrillItem.loadSlotsFromNBT(inv, stack); @@ -99,14 +99,14 @@ public class Sack extends ItemBase { data.updateAccessRecords(player.getName().getString(), System.currentTimeMillis()); - NetworkHooks.openGui((ServerPlayer) player, new SimpleMenuProvider((id, inv, entity) -> + NetworkHooks.openScreen((ServerPlayer) player, new SimpleMenuProvider((id, inv, entity) -> new SackContainer(id, inv, uuid, data.getSpecialHandler()), sackStack.getHoverName()), (buffer -> buffer.writeUUID(uuid))); } /* NetworkHooks.openGui((ServerPlayerEntity) player, new SimpleNamedContainerProvider((windowId, playerInventory, playerEntity) -> - new ContainerBag(windowId, playerInventory, playerEntity.getItemInHand(hand), this.isVoid), StringTextComponent.EMPTY));*/ + new ContainerBag(windowId, playerInventory, playerEntity.getItemInHand(hand), this.isVoid), StringComponent.empty()));*/ } return InteractionResultHolder.pass(player.getItemInHand(hand)); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/Worm.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/Worm.java index 5047ecdc9..b6fbcff70 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/Worm.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/Worm.java @@ -23,7 +23,8 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.AABB; -import net.minecraftforge.event.entity.player.UseHoeEvent; +import net.minecraftforge.common.ToolActions; +import net.minecraftforge.event.level.BlockEvent; import net.minecraftforge.eventbus.api.Event; import java.util.List; @@ -58,20 +59,22 @@ public class Worm extends ItemBase { return InteractionResult.SUCCESS; } - public static void onHoe(UseHoeEvent event) { - Level level = event.getEntity().level; + public static void onHoe(BlockEvent.BlockToolModificationEvent event) { + if (event.getToolAction() == ToolActions.HOE_TILL) { + Level level = event.getPlayer().level(); - if (level.isClientSide || !CommonConfig.Other.WORMS.get() || event.getResult() == Event.Result.DENY) - return; + if (level.isClientSide || !CommonConfig.Other.WORMS.get() || event.getResult() == Event.Result.DENY) + return; - BlockPos pos = event.getContext().getClickedPos(); - if (level.isEmptyBlock(pos.above())) { - BlockState state = level.getBlockState(pos); - if (state.getBlock() == Blocks.GRASS_BLOCK && level.random.nextFloat() >= 0.95F) { - ItemStack stack = new ItemStack(ActuallyItems.WORM.get(), level.random.nextInt(2) + 1); - ItemEntity item = new ItemEntity(level, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, stack); + BlockPos pos = event.getContext().getClickedPos(); + if (level.isEmptyBlock(pos.above())) { + BlockState state = level.getBlockState(pos); + if (state.getBlock() == Blocks.GRASS_BLOCK && level.random.nextFloat() >= 0.95F) { + ItemStack stack = new ItemStack(ActuallyItems.WORM.get(), level.random.nextInt(2) + 1); + ItemEntity item = new ItemEntity(level, pos.getX() + 0.5, pos.getY() + 1, pos.getZ() + 0.5, stack); - level.addFreshEntity(item); + level.addFreshEntity(item); + } } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ActuallyItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ActuallyItem.java index ff1ab2cd4..6ec0b844a 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ActuallyItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ActuallyItem.java @@ -1,6 +1,5 @@ package de.ellpeck.actuallyadditions.mod.items.base; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.world.item.Item; /** @@ -13,6 +12,6 @@ public abstract class ActuallyItem extends Item implements IActuallyItem { } protected static Properties baseProps() { - return new Properties().tab(ActuallyAdditions.GROUP); + return new Properties(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java index 9714abed2..bcd8dba7e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemArmorAA.java @@ -12,18 +12,17 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.api.misc.IDisableableItem; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; -import net.minecraft.world.entity.EquipmentSlot; import net.minecraft.world.item.ArmorItem; import net.minecraft.world.item.ArmorMaterial; public class ItemArmorAA extends ArmorItem implements IDisableableItem { private final boolean disabled; - public ItemArmorAA(ArmorMaterial material, EquipmentSlot type) { + public ItemArmorAA(ArmorMaterial material, Type type) { this(material, type, ActuallyItems.defaultProps()); } - public ItemArmorAA(ArmorMaterial material, EquipmentSlot type, Properties properties) { + public ItemArmorAA(ArmorMaterial material, Type type, Properties properties) { super(material, type, properties); this.disabled = false; // this.disabled = ConfigurationHandler.config.getBoolean("Disable: " + StringUtil.badTranslate(this.name), "Tool Control", false, "This will disable the " + StringUtil.badTranslate(this.name) + ". It will not be registered."); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java index b179150ee..06ac10d04 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemEnergy.java @@ -13,21 +13,18 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; import de.ellpeck.actuallyadditions.mod.tile.CustomEnergyStorage; import net.minecraft.core.Direction; -import net.minecraft.core.NonNullList; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; -import net.minecraft.world.item.CreativeModeTab; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.TooltipFlag; import net.minecraft.world.level.Level; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.capabilities.ICapabilityProvider; import net.minecraftforge.common.capabilities.ICapabilitySerializable; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; import javax.annotation.Nonnull; @@ -60,7 +57,7 @@ public abstract class ItemEnergy extends ItemBase { energy = stack.getTag().getInt("Energy"); } NumberFormat format = NumberFormat.getInstance(); - tooltip.add(new TranslatableComponent("misc.actuallyadditions.power_long", format.format(energy), format.format(this.maxPower))); + tooltip.add(Component.translatable("misc.actuallyadditions.power_long", format.format(energy), format.format(this.maxPower))); } @Override @@ -68,17 +65,17 @@ public abstract class ItemEnergy extends ItemBase { return false; } - @Override - public void fillItemCategory(CreativeModeTab group, NonNullList items) { - super.fillItemCategory(group, items); - if (!this.allowdedIn(group)) { - return; - } - - ItemStack charged = new ItemStack(this); - charged.getOrCreateTag().putDouble("Energy", this.getMaxEnergyStored(charged)); - items.add(charged); - } +// @Override +// public void fillItemCategory(CreativeModeTab group, NonNullList items) { +// super.fillItemCategory(group, items); +// if (!this.allowdedIn(group)) { +// return; +// } +// +// ItemStack charged = new ItemStack(this); +// charged.getOrCreateTag().putDouble("Energy", this.getMaxEnergyStored(charged)); +// items.add(charged); +// } @Override public boolean isBarVisible(ItemStack itemStack) { @@ -95,13 +92,13 @@ public abstract class ItemEnergy extends ItemBase { @Override public int getBarColor(ItemStack stack) { - //float[] color = AssetUtil.getWheelColor(player.level.getGameTime() % 256); + //float[] color = AssetUtil.getWheelColor(player.level().getGameTime() % 256); //return MathHelper.color(color[0] / 255F, color[1] / 255F, color[2] / 255F); return super.getBarColor(stack); } public void setEnergy(ItemStack stack, int energy) { - stack.getCapability(CapabilityEnergy.ENERGY, null).ifPresent(cap -> { + stack.getCapability(ForgeCapabilities.ENERGY, null).ifPresent(cap -> { if (cap instanceof CustomEnergyStorage) { ((CustomEnergyStorage) cap).setEnergyStored(energy); } @@ -110,13 +107,13 @@ public abstract class ItemEnergy extends ItemBase { @Deprecated public int receiveEnergyInternal(ItemStack stack, int maxReceive, boolean simulate) { - return stack.getCapability(CapabilityEnergy.ENERGY) + return stack.getCapability(ForgeCapabilities.ENERGY) .map(cap -> ((CustomEnergyStorage) cap).receiveEnergyInternal(maxReceive, simulate)) .orElse(0); } public int extractEnergyInternal(ItemStack stack, int maxExtract, boolean simulate) { - return stack.getCapability(CapabilityEnergy.ENERGY) + return stack.getCapability(ForgeCapabilities.ENERGY) .map(cap -> cap instanceof CustomEnergyStorage ? ((CustomEnergyStorage) cap).extractEnergyInternal(maxExtract, simulate) : 0) @@ -125,25 +122,25 @@ public abstract class ItemEnergy extends ItemBase { @Deprecated public int receiveEnergy(ItemStack stack, int maxReceive, boolean simulate) { - return stack.getCapability(CapabilityEnergy.ENERGY) + return stack.getCapability(ForgeCapabilities.ENERGY) .map(cap -> cap.receiveEnergy(maxReceive, simulate)) .orElse(0); } public int extractEnergy(ItemStack stack, int maxExtract, boolean simulate) { - return stack.getCapability(CapabilityEnergy.ENERGY) + return stack.getCapability(ForgeCapabilities.ENERGY) .map(cap -> cap.extractEnergy(maxExtract, simulate)) .orElse(0); } public int getEnergyStored(ItemStack stack) { - return stack.getCapability(CapabilityEnergy.ENERGY, null) + return stack.getCapability(ForgeCapabilities.ENERGY, null) .map(IEnergyStorage::getEnergyStored) .orElse(0); } public int getMaxEnergyStored(ItemStack stack) { - return stack.getCapability(CapabilityEnergy.ENERGY, null) + return stack.getCapability(ForgeCapabilities.ENERGY, null) .map(IEnergyStorage::getMaxEnergyStored) .orElse(0); } @@ -169,7 +166,7 @@ public abstract class ItemEnergy extends ItemBase { @Nonnull @Override public LazyOptional getCapability(@Nonnull Capability cap, @Nullable Direction side) { - if (cap == CapabilityEnergy.ENERGY) { + if (cap == ForgeCapabilities.ENERGY) { return this.energyCapability.cast(); } return LazyOptional.empty(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java index 89d0d5770..705723a2f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemHoeAA.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items.base; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.world.item.HoeItem; import net.minecraft.world.item.Tier; @@ -26,7 +25,7 @@ public class ItemHoeAA extends HoeItem { // .addToolType(ToolType.SHOVEL, tier.getLevel()) // .addToolType(ToolType.PICKAXE, tier.getLevel()) .durability(tier.getUses() * 4) - .tab(ActuallyAdditions.GROUP) + ); this.tier = tier; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java index cdd1caee5..7cbafdbba 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemSwordAA.java @@ -10,7 +10,6 @@ package de.ellpeck.actuallyadditions.mod.items.base; -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import net.minecraft.world.item.SwordItem; import net.minecraft.world.item.Tier; @@ -26,7 +25,7 @@ public class ItemSwordAA extends SwordItem { // .addToolType(ToolType.SHOVEL, tier.getLevel()) // .addToolType(ToolType.PICKAXE, tier.getLevel()) .durability(tier.getUses() * 4) - .tab(ActuallyAdditions.GROUP) + ); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemToolAA.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemToolAA.java index 2ea59d686..01fa5d032 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemToolAA.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/base/ItemToolAA.java @@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.items.base; import de.ellpeck.actuallyadditions.api.misc.IDisableableItem; import de.ellpeck.actuallyadditions.mod.util.ItemUtil; import de.ellpeck.actuallyadditions.mod.util.StackUtil; -import net.minecraft.tags.Tag; import net.minecraft.tags.TagKey; import net.minecraft.world.item.DiggerItem; import net.minecraft.world.item.Item; @@ -21,8 +20,6 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Tier; import net.minecraft.world.level.block.Block; -import java.util.Set; - public class ItemToolAA extends DiggerItem implements IDisableableItem { private final String name; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java index f93d77faf..5a0993be0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensColor.java @@ -16,6 +16,7 @@ import de.ellpeck.actuallyadditions.mod.crafting.ColorChangeRecipe; import de.ellpeck.actuallyadditions.mod.util.StackUtil; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; +import net.minecraft.core.RegistryAccess; import net.minecraft.world.entity.item.ItemEntity; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.ItemStack; @@ -53,7 +54,7 @@ public class LensColor extends Lens { if (tile.getEnergy() >= ENERGY_USE) { BlockState state = tile.getWorldObject().getBlockState(hitBlock); Block block = state.getBlock(); - ItemStack returnStack = this.tryConvert(new ItemStack(block)); + ItemStack returnStack = this.tryConvert(new ItemStack(block), tile.getWorldObject().registryAccess()); if (!returnStack.isEmpty() && returnStack.getItem() instanceof BlockItem) { Block toPlace = Block.byItem(returnStack.getItem()); BlockState state2Place = toPlace.defaultBlockState(); @@ -65,7 +66,7 @@ public class LensColor extends Lens { List items = tile.getWorldObject().getEntitiesOfClass(ItemEntity.class, new AABB(hitBlock.getX(), hitBlock.getY(), hitBlock.getZ(), hitBlock.getX() + 1, hitBlock.getY() + 1, hitBlock.getZ() + 1)); for (ItemEntity item : items) { if (item.isAlive() && !item.getItem().isEmpty() && tile.getEnergy() >= ENERGY_USE) { - ItemStack newStack = this.tryConvert(item.getItem()); + ItemStack newStack = this.tryConvert(item.getItem(), tile.getWorldObject().registryAccess()); if (StackUtil.isValid(newStack)) { item.discard(); @@ -80,8 +81,8 @@ public class LensColor extends Lens { return false; } - private ItemStack tryConvert(ItemStack stack) { - return ColorChangeRecipe.getRecipeForStack(stack).map(ColorChangeRecipe::getResultItem).orElse(ItemStack.EMPTY); + private ItemStack tryConvert(ItemStack stack, RegistryAccess registryAccess) { + return ColorChangeRecipe.getRecipeForStack(stack).map(recipe -> recipe.getResultItem(registryAccess)).orElse(ItemStack.EMPTY); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java index f38985e0c..c558148ee 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDeath.java @@ -12,8 +12,11 @@ package de.ellpeck.actuallyadditions.mod.items.lens; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.lens.Lens; -import de.ellpeck.actuallyadditions.mod.misc.DamageSources; +import de.ellpeck.actuallyadditions.mod.misc.ActuallyDamageTypes; +import de.ellpeck.actuallyadditions.mod.misc.MultiMessageDamageSource; import net.minecraft.core.BlockPos; +import net.minecraft.core.Holder; +import net.minecraft.world.damagesource.DamageType; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.phys.AABB; @@ -38,7 +41,8 @@ public class LensDeath extends Lens { } protected void onAttacked(LivingEntity entity, IAtomicReconstructor tile) { - entity.hurt(DamageSources.DAMAGE_ATOMIC_RECONSTRUCTOR, 20F); + Holder type = entity.damageSources().damageTypes.getHolderOrThrow(ActuallyDamageTypes.ATOMIC_RECONSTRUCTOR); + entity.hurt(new MultiMessageDamageSource(type, 5), 20F); } protected int getUsePerEntity() { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java index 336fa5596..0c2444f99 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensDetonation.java @@ -14,7 +14,7 @@ import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import de.ellpeck.actuallyadditions.api.lens.Lens; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; -import net.minecraft.world.level.Explosion; +import net.minecraft.world.level.Level; import net.minecraft.world.level.block.state.BlockState; public class LensDetonation extends Lens { @@ -25,7 +25,7 @@ public class LensDetonation extends Lens { public boolean invoke(BlockState state, BlockPos hitBlock, IAtomicReconstructor tile) { if (hitBlock != null && !state.isAir()) { if (tile.getEnergy() >= ENERGY_USE) { - tile.getWorldObject().explode(null, hitBlock.getX() + 0.5, hitBlock.getY() + 0.5, hitBlock.getZ() + 0.5, 10F, true, Explosion.BlockInteraction.NONE); // TODO: [port][test] make sure this is the right explosion mode + tile.getWorldObject().explode(null, hitBlock.getX() + 0.5, hitBlock.getY() + 0.5, hitBlock.getZ() + 0.5, 10F, true, Level.ExplosionInteraction.NONE); // TODO: [port][test] make sure this is the right explosion mode tile.extractEnergy(ENERGY_USE); } return true; diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensKiller.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensKiller.java index 9e5178cd2..2112fefef 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensKiller.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensKiller.java @@ -12,7 +12,6 @@ package de.ellpeck.actuallyadditions.mod.items.lens; import de.ellpeck.actuallyadditions.api.internal.IAtomicReconstructor; import net.minecraft.server.level.ServerLevel; -import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.LivingEntity; import net.minecraftforge.common.util.FakePlayerFactory; @@ -21,7 +20,7 @@ public class LensKiller extends LensDeath { @Override protected void onAttacked(LivingEntity entity, IAtomicReconstructor tile) { if (!tile.getWorldObject().isClientSide) { - entity.hurt(DamageSource.playerAttack(FakePlayerFactory.getMinecraft((ServerLevel) tile.getWorldObject())), 20); + entity.hurt(entity.damageSources().playerAttack(FakePlayerFactory.getMinecraft((ServerLevel) tile.getWorldObject())), 20); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensMining.java b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensMining.java index b235f1596..5bd727d8d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensMining.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/items/lens/LensMining.java @@ -100,7 +100,7 @@ public class LensMining extends Lens { int totalWeight = WeightedRandom.getTotalWeight(ores); Optional ore = WeightedRandom.getRandomItem(tile.getWorldObject().random, ores); - ItemStack stack = ore.map(recipe -> recipe.getResultItem().copy()).orElse(ItemStack.EMPTY); + ItemStack stack = ore.map(recipe -> recipe.getResultItem(tile.getWorldObject().registryAccess()).copy()).orElse(ItemStack.EMPTY); if (!stack.isEmpty() && stack.getItem() instanceof BlockItem) { Block toPlace = Block.byItem(stack.getItem()); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/FermentingCategory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/FermentingCategory.java index f334795ed..8f5629763 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/FermentingCategory.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/FermentingCategory.java @@ -58,7 +58,7 @@ // // @Override // public void setRecipe(@Nonnull IRecipeLayout recipeLayout, @Nonnull FermentingRecipe fermentingRecipe, @Nonnull IIngredients ingredients) { -// int maxFluid = Math.max(FluidAttributes.BUCKET_VOLUME, Math.max(fermentingRecipe.getInput().getAmount(), fermentingRecipe.getOutput().getAmount())); +// int maxFluid = Math.max(FluidType.BUCKET_VOLUME, Math.max(fermentingRecipe.getInput().getAmount(), fermentingRecipe.getOutput().getAmount())); // // fermentingRecipe.setInputDisplay(new FluidDisplay(19, 1, fermentingRecipe.getInput(), maxFluid, false)); // fermentingRecipe.setOutputDisplay(new FluidDisplay(19+38, 1, fermentingRecipe.getOutput(), maxFluid, false)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/LaserRecipeCategory.java b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/LaserRecipeCategory.java index bd5a7e3fa..596cc2263 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/jei/LaserRecipeCategory.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/jei/LaserRecipeCategory.java @@ -50,7 +50,7 @@ // // @Override // public String getTitle() { -// return new TranslatableComponent("container.actuallyadditions.reconstructor").getString(); +// return Component.translatable("container.actuallyadditions.reconstructor").getString(); // } // // @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/material/ArmorMaterials.java b/src/main/java/de/ellpeck/actuallyadditions/mod/material/ArmorMaterials.java index eec7d1823..878527c21 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/material/ArmorMaterials.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/material/ArmorMaterials.java @@ -2,15 +2,17 @@ package de.ellpeck.actuallyadditions.mod.material; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.items.ActuallyItems; +import net.minecraft.Util; import net.minecraft.sounds.SoundEvent; import net.minecraft.sounds.SoundEvents; import net.minecraft.util.LazyLoadedValue; -import net.minecraft.world.entity.EquipmentSlot; +import net.minecraft.world.item.ArmorItem; import net.minecraft.world.item.ArmorMaterial; import net.minecraft.world.item.crafting.Ingredient; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import java.util.EnumMap; import java.util.function.Supplier; /** @@ -19,33 +21,47 @@ import java.util.function.Supplier; * todo validate all values refect correctly */ public enum ArmorMaterials implements ArmorMaterial { - // EMERALD("emerald_armor_material", 30, new int[] { 5, 8, 9, 4 }, 15, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 2, 0f, () -> Ingredient.fromItems(Items.EMERALD)), - // OBSIDIAN("obsidian_armor_material", 28, new int[] { 1, 3, 4, 3 }, 10, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 1, 0f, () -> Ingredient.fromItems(Items.OBSIDIAN)), + // EMERALD("emerald_armor_material", 30, createProtectionMap( 5, 8, 9, 4 ), 15, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 2, 0f, () -> Ingredient.fromItems(Items.EMERALD)), + // OBSIDIAN("obsidian_armor_material", 28, createProtectionMap( 1, 3, 4, 3 ), 10, SoundEvents.ITEM_ARMOR_EQUIP_GENERIC, 1, 0f, () -> Ingredient.fromItems(Items.OBSIDIAN)), - QUARTZ("quartz_armor_material", 15, new int[]{3, 5, 6, 3}, 8, SoundEvents.ARMOR_EQUIP_GENERIC, 1, 0f, () -> Ingredient.of(ActuallyItems.BLACK_QUARTZ.get())), - RESTONIA("restonia_armor_material", 18, new int[]{3, 6, 7, 3}, 9, SoundEvents.ARMOR_EQUIP_GENERIC, 0, 0f, () -> Ingredient.of(ActuallyItems.RESTONIA_CRYSTAL.get())), - PALIS("palis_armor_material", 10, new int[]{3, 6, 7, 3}, 10, SoundEvents.ARMOR_EQUIP_GENERIC, 0, 0f, () -> Ingredient.of(ActuallyItems.PALIS_CRYSTAL.get())), - DIAMATINE("diamatine_armor_material", 36, new int[]{4, 7, 8, 4}, 12, SoundEvents.ARMOR_EQUIP_GENERIC, 3, 0f, () -> Ingredient.of(ActuallyItems.DIAMATINE_CRYSTAL.get())), - VOID("void_armor_material", 23, new int[]{1, 3, 4, 1}, 13, SoundEvents.ARMOR_EQUIP_GENERIC, 0, 0f, () -> Ingredient.of(ActuallyItems.VOID_CRYSTAL.get())), - EMERADIC("emeradic_armor_material", 32, new int[]{6, 9, 9, 4}, 18, SoundEvents.ARMOR_EQUIP_GENERIC, 3, 0f, () -> Ingredient.of(ActuallyItems.EMERADIC_CRYSTAL.get())), - ENORI("enori_armor_material", 24, new int[]{3, 6, 6, 3}, 11, SoundEvents.ARMOR_EQUIP_GENERIC, 0, 0f, () -> Ingredient.of(ActuallyItems.ENORI_CRYSTAL.get())), - GOGGLES("goggles_armor_material", 0, new int[]{0, 0, 0, 0}, 0, SoundEvents.ARMOR_EQUIP_GENERIC, 0, 0f, () -> Ingredient.EMPTY); + QUARTZ("quartz_armor_material", 15, createProtectionMap(3, 5, 6, 3), 8, SoundEvents.ARMOR_EQUIP_GENERIC, 1, 0f, () -> Ingredient.of(ActuallyItems.BLACK_QUARTZ.get())), + RESTONIA("restonia_armor_material", 18, createProtectionMap(3, 6, 7, 3), 9, SoundEvents.ARMOR_EQUIP_GENERIC, 0, 0f, () -> Ingredient.of(ActuallyItems.RESTONIA_CRYSTAL.get())), + PALIS("palis_armor_material", 10, createProtectionMap(3, 6, 7, 3), 10, SoundEvents.ARMOR_EQUIP_GENERIC, 0, 0f, () -> Ingredient.of(ActuallyItems.PALIS_CRYSTAL.get())), + DIAMATINE("diamatine_armor_material", 36, createProtectionMap(4, 7, 8, 4), 12, SoundEvents.ARMOR_EQUIP_GENERIC, 3, 0f, () -> Ingredient.of(ActuallyItems.DIAMATINE_CRYSTAL.get())), + VOID("void_armor_material", 23, createProtectionMap(1, 3, 4, 1), 13, SoundEvents.ARMOR_EQUIP_GENERIC, 0, 0f, () -> Ingredient.of(ActuallyItems.VOID_CRYSTAL.get())), + EMERADIC("emeradic_armor_material", 32, createProtectionMap(6, 9, 9, 4), 18, SoundEvents.ARMOR_EQUIP_GENERIC, 3, 0f, () -> Ingredient.of(ActuallyItems.EMERADIC_CRYSTAL.get())), + ENORI("enori_armor_material", 24, createProtectionMap(3, 6, 6, 3), 11, SoundEvents.ARMOR_EQUIP_GENERIC, 0, 0f, () -> Ingredient.of(ActuallyItems.ENORI_CRYSTAL.get())), + GOGGLES("goggles_armor_material", 0, createProtectionMap(0, 0, 0, 0), 0, SoundEvents.ARMOR_EQUIP_GENERIC, 0, 0f, () -> Ingredient.EMPTY); + + private static EnumMap createProtectionMap(int boots, int leggings, int chest, int helmet) { + return Util.make(new EnumMap<>(ArmorItem.Type.class), (map) -> { + map.put(ArmorItem.Type.BOOTS, boots); + map.put(ArmorItem.Type.LEGGINGS, leggings); + map.put(ArmorItem.Type.CHESTPLATE, chest); + map.put(ArmorItem.Type.HELMET, helmet); + }); + } // HMMM Tasty stolen code from MC, how lovely. - private static final int[] MAX_DAMAGE_ARRAY = new int[]{13, 15, 16, 11}; + private static final EnumMap HEALTH_FUNCTION_FOR_TYPE = Util.make(new EnumMap<>(ArmorItem.Type.class), (map) -> { + map.put(ArmorItem.Type.BOOTS, 13); + map.put(ArmorItem.Type.LEGGINGS, 15); + map.put(ArmorItem.Type.CHESTPLATE, 16); + map.put(ArmorItem.Type.HELMET, 11); + }); private final String name; - private final int maxDamageFactor; - private final int[] damageReductionAmountArray; + private final int durabilityMultiplier; + private final EnumMap protectionFunctionForType; private final int enchantability; private final SoundEvent soundEvent; private final float toughness; private final float knockbackResistance; private final LazyLoadedValue repairMaterial; - ArmorMaterials(String name, int maxDamageFactor, int[] damageReductionAmountArray, int enchantability, SoundEvent soundEvent, float toughness, float knockbackResistance, Supplier repairMaterial) { + ArmorMaterials(String name, int durabilityMultiplier, EnumMap protectionFunctionForType, int enchantability, SoundEvent soundEvent, float toughness, float knockbackResistance, Supplier repairMaterial) { this.name = String.format("%s:%s", ActuallyAdditions.MODID, name); - this.maxDamageFactor = maxDamageFactor; - this.damageReductionAmountArray = damageReductionAmountArray; + this.durabilityMultiplier = durabilityMultiplier; + this.protectionFunctionForType = protectionFunctionForType; this.enchantability = enchantability; this.soundEvent = soundEvent; this.toughness = toughness; @@ -53,14 +69,12 @@ public enum ArmorMaterials implements ArmorMaterial { this.repairMaterial = new LazyLoadedValue<>(repairMaterial); } - @Override - public int getDurabilityForSlot(EquipmentSlot slotIn) { - return MAX_DAMAGE_ARRAY[slotIn.getIndex()] * this.maxDamageFactor; + public int getDurabilityForType(ArmorItem.Type type) { + return HEALTH_FUNCTION_FOR_TYPE.get(type) * this.durabilityMultiplier; } - @Override - public int getDefenseForSlot(EquipmentSlot slotIn) { - return this.damageReductionAmountArray[slotIn.getIndex()]; + public int getDefenseForType(ArmorItem.Type type) { + return this.protectionFunctionForType.get(type); } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/ActuallyDamageTypes.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/ActuallyDamageTypes.java new file mode 100644 index 000000000..30167aff5 --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/ActuallyDamageTypes.java @@ -0,0 +1,15 @@ +package de.ellpeck.actuallyadditions.mod.misc; + +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +import net.minecraft.core.registries.Registries; +import net.minecraft.resources.ResourceKey; +import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.damagesource.DamageType; + +public class ActuallyDamageTypes { + public static final ResourceKey ATOMIC_RECONSTRUCTOR = register("atomicreconstructor"); + + private static ResourceKey register(String name) { + return ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ActuallyAdditions.MODID, name)); + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DamageSources.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DamageSources.java deleted file mode 100644 index a59c1cc0a..000000000 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/DamageSources.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * This file ("DamageSources.java") is part of the Actually Additions mod for Minecraft. - * It is created and owned by Ellpeck and distributed - * under the Actually Additions License to be found at - * http://ellpeck.de/actaddlicense - * View the source code at https://github.com/Ellpeck/ActuallyAdditions - * - * © 2015-2017 Ellpeck - */ - -package de.ellpeck.actuallyadditions.mod.misc; - -import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; -import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; -import net.minecraft.world.damagesource.DamageSource; -import net.minecraft.world.entity.LivingEntity; - -public class DamageSources extends DamageSource { - - public static final DamageSource DAMAGE_ATOMIC_RECONSTRUCTOR = new DamageSources("atomicReconstructor", 5).bypassArmor(); - - private final int messageCount; - - public DamageSources(String name, int messageCount) { - super(name); - this.messageCount = messageCount; - } - - @Override - public Component getLocalizedDeathMessage(LivingEntity entity) { - String locTag = "death." + ActuallyAdditions.MODID + "." + this.msgId + "." + (entity.level.random.nextInt(this.messageCount) + 1); - return new TranslatableComponent(locTag, entity.getName()); - } -} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/MultiMessageDamageSource.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/MultiMessageDamageSource.java new file mode 100644 index 000000000..a27e7e816 --- /dev/null +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/MultiMessageDamageSource.java @@ -0,0 +1,34 @@ +/* + * This file ("DamageSources.java") is part of the Actually Additions mod for Minecraft. + * It is created and owned by Ellpeck and distributed + * under the Actually Additions License to be found at + * http://ellpeck.de/actaddlicense + * View the source code at https://github.com/Ellpeck/ActuallyAdditions + * + * © 2015-2017 Ellpeck + */ + +package de.ellpeck.actuallyadditions.mod.misc; + +import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; +import net.minecraft.core.Holder; +import net.minecraft.network.chat.Component; +import net.minecraft.world.damagesource.DamageSource; +import net.minecraft.world.damagesource.DamageType; +import net.minecraft.world.entity.LivingEntity; + +public class MultiMessageDamageSource extends DamageSource { + + private final int messageCount; + + public MultiMessageDamageSource(Holder damageTypeHolder, int messageCount) { + super(damageTypeHolder); + this.messageCount = messageCount; + } + + @Override + public Component getLocalizedDeathMessage(LivingEntity entity) { + String locTag = "death." + ActuallyAdditions.MODID + "." + this.getMsgId() + "." + (entity.level().random.nextInt(this.messageCount) + 1); + return Component.translatable(locTag, entity.getName()); + } +} diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/ConnectionPair.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/ConnectionPair.java index c872b4f9d..ae994009c 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/ConnectionPair.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/ConnectionPair.java @@ -100,9 +100,8 @@ public class ConnectionPair implements IConnectionPair { @Override public boolean equals(Object obj) { - if (obj instanceof ConnectionPair) { - ConnectionPair pair = (ConnectionPair) obj; - for (int i = 0; i < this.positions.length; i++) { + if (obj instanceof ConnectionPair pair) { + for (int i = 0; i < this.positions.length; i++) { if (this.positions[i] == pair.positions[i] || this.positions[i] != null && this.positions[i].equals(pair.positions[i])) { return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/MethodHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/MethodHandler.java index 4cdf4070e..4e657c424 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/MethodHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/MethodHandler.java @@ -159,7 +159,7 @@ public class MethodHandler implements IMethodHandler { } Optional recipe = LaserRecipe.getRecipeForStack(new ItemStack(state.getBlock())); if (recipe.isPresent() && tile.getEnergy() >= recipe.get().getEnergy()) { - ItemStack output = recipe.get().getResultItem().copy(); + ItemStack output = recipe.get().getResultItem(tile.getWorldObject().registryAccess()).copy(); if (!output.isEmpty()) { tile.getWorldObject().levelEvent(2001, pos, Block.getId(state)); if (output.getItem() instanceof BlockItem) { @@ -205,7 +205,7 @@ public class MethodHandler implements IMethodHandler { tile.getWorldObject().addFreshEntity(inputLeft); } - ItemStack outputCopy = recipe.get().getResultItem().copy(); + ItemStack outputCopy = recipe.get().getResultItem(tile.getWorldObject().registryAccess()).copy(); outputCopy.setCount(itemsPossible); ItemEntity newItem = new ItemEntity(tile.getWorldObject(), item.getX(), item.getY(), item.getZ(), outputCopy); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/CactusFarmerBehavior.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/CactusFarmerBehavior.java index 988f475b2..938b570ac 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/CactusFarmerBehavior.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/CactusFarmerBehavior.java @@ -22,7 +22,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.level.storage.loot.LootParams; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; import net.minecraft.world.phys.Vec3; @@ -54,26 +54,26 @@ public class CactusFarmerBehavior implements IFarmerBehavior { } @Override - public FarmerResult tryHarvestPlant(ServerLevel world, BlockPos pos, IFarmer farmer) { + public FarmerResult tryHarvestPlant(ServerLevel serverLevel, BlockPos pos, IFarmer farmer) { int use = 250; if (farmer.getEnergy() >= use) { - BlockState state = world.getBlockState(pos); + BlockState state = serverLevel.getBlockState(pos); if (state.getBlock() == Blocks.CACTUS) { FarmerResult result = FarmerResult.STOP_PROCESSING; for (int i = 2; i >= 1; i--) { if (farmer.getEnergy() >= use) { BlockPos up = pos.above(i); - BlockState upState = world.getBlockState(up); + BlockState upState = serverLevel.getBlockState(up); if (upState.getBlock() == Blocks.CACTUS) { - List drops = state.getDrops(new LootContext.Builder(world) - .withParameter(LootContextParams.ORIGIN, new Vec3(pos.getX(), pos.getY(), pos.getZ())) - .withParameter(LootContextParams.TOOL, ItemStack.EMPTY)); + List drops = state.getDrops((new LootParams.Builder(serverLevel)) + .withParameter(LootContextParams.ORIGIN, new Vec3(pos.getX(), pos.getY(), pos.getZ())) + .withParameter(LootContextParams.TOOL, ItemStack.EMPTY)); if (!drops.isEmpty()) { if (farmer.canAddToOutput(drops)) { - world.levelEvent(2001, up, Block.getId(upState)); - world.setBlockAndUpdate(up, Blocks.AIR.defaultBlockState()); + serverLevel.levelEvent(2001, up, Block.getId(upState)); + serverLevel.setBlockAndUpdate(up, Blocks.AIR.defaultBlockState()); farmer.extractEnergy(use); farmer.addToOutput(drops); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/DefaultFarmerBehavior.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/DefaultFarmerBehavior.java index 1a7c66720..36dd620cd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/DefaultFarmerBehavior.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/DefaultFarmerBehavior.java @@ -20,14 +20,12 @@ import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; import net.minecraft.tags.BlockTags; -import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.entity.player.Player; import net.minecraft.world.item.BlockItem; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; import net.minecraft.world.item.Items; -import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; @@ -36,9 +34,8 @@ import net.minecraft.world.level.block.CropBlock; import net.minecraft.world.level.block.StemBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.level.storage.loot.LootParams; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; -import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.IPlantable; import net.minecraftforge.common.util.FakePlayerFactory; @@ -107,12 +104,12 @@ public class DefaultFarmerBehavior implements IFarmerBehavior { return FarmerResult.FAIL; } - private FarmerResult doFarmerStuff(BlockState state, ServerLevel world, BlockPos pos, IFarmer farmer) { + private FarmerResult doFarmerStuff(BlockState state, ServerLevel serverLevel, BlockPos pos, IFarmer farmer) { List seeds = new ArrayList<>(); List other = new ArrayList<>(); - List drops = state.getDrops(new LootContext.Builder(world) - .withParameter(LootContextParams.ORIGIN, new Vec3(pos.getX(), pos.getY(), pos.getZ())) - .withParameter(LootContextParams.TOOL, ItemStack.EMPTY)); + List drops = state.getDrops((new LootParams.Builder(serverLevel)) + .withParameter(LootContextParams.ORIGIN, new Vec3(pos.getX(), pos.getY(), pos.getZ())) + .withParameter(LootContextParams.TOOL, ItemStack.EMPTY)); if (drops.isEmpty()) return FarmerResult.FAIL; for (ItemStack stack : drops) { @@ -136,8 +133,8 @@ public class DefaultFarmerBehavior implements IFarmerBehavior { farmer.addToSeeds(seeds); } - world.levelEvent(2001, pos, Block.getId(state)); - world.setBlockAndUpdate(pos, Blocks.AIR.defaultBlockState()); + serverLevel.levelEvent(2001, pos, Block.getId(state)); + serverLevel.setBlockAndUpdate(pos, Blocks.AIR.defaultBlockState()); farmer.extractEnergy(250); return FarmerResult.SUCCESS; @@ -194,13 +191,13 @@ public class DefaultFarmerBehavior implements IFarmerBehavior { if (!player.mayUseItemAt(pos.relative(Direction.UP), Direction.UP, itemstack)) { return InteractionResult.FAIL; } else { - UseOnContext dummyContext = new UseOnContext(world, player, InteractionHand.MAIN_HAND, itemstack, new BlockHitResult(new Vec3(0.5, 0.5, 0.5), Direction.UP, pos, false)); - int hook = net.minecraftforge.event.ForgeEventFactory.onHoeUse(dummyContext); - if (hook != 0) { - return hook > 0 - ? InteractionResult.SUCCESS - : InteractionResult.FAIL; - } +// UseOnContext dummyContext = new UseOnContext(world, player, InteractionHand.MAIN_HAND, itemstack, new BlockHitResult(new Vec3(0.5, 0.5, 0.5), Direction.UP, pos, false)); +// int hook = net.minecraftforge.event.ForgeEventFactory.onHoeUse(dummyContext); +// if (hook != 0) { +// return hook > 0 +// ? InteractionResult.SUCCESS +// : InteractionResult.FAIL; +// } TODO: Fire event for hoe use? if (world.isEmptyBlock(pos.above())) { BlockState state = world.getBlockState(pos); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/MelonPumpkinFarmerBehavior.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/MelonPumpkinFarmerBehavior.java index 70bf1ceef..074820f33 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/MelonPumpkinFarmerBehavior.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/MelonPumpkinFarmerBehavior.java @@ -23,7 +23,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.level.storage.loot.LootParams; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; import net.minecraft.world.phys.Vec3; @@ -62,7 +62,7 @@ public class MelonPumpkinFarmerBehavior implements IFarmerBehavior { BlockState state = world.getBlockState(pos); Block block = state.getBlock(); if (block == Blocks.PUMPKIN || block == Blocks.MELON) { - List drops = state.getDrops(new LootContext.Builder(world) + List drops = state.getDrops(new LootParams.Builder(world) .withParameter(LootContextParams.ORIGIN, new Vec3(pos.getX(), pos.getY(), pos.getZ())) .withParameter(LootContextParams.TOOL, ItemStack.EMPTY)); if (!drops.isEmpty()) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/NetherWartFarmerBehavior.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/NetherWartFarmerBehavior.java index 01bc1b0f9..c4ea452cd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/NetherWartFarmerBehavior.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/NetherWartFarmerBehavior.java @@ -24,7 +24,7 @@ import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.NetherWartBlock; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.level.storage.loot.LootParams; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.IPlantable; @@ -56,7 +56,7 @@ public class NetherWartFarmerBehavior implements IFarmerBehavior { BlockState state = world.getBlockState(pos); if (state.getBlock() instanceof NetherWartBlock) { if (state.getValue(BlockStateProperties.AGE_3) >= 3) { - List drops = state.getDrops(new LootContext.Builder(world) + List drops = state.getDrops(new LootParams.Builder(world) .withParameter(LootContextParams.ORIGIN, new Vec3(pos.getX(), pos.getY(), pos.getZ())) .withParameter(LootContextParams.TOOL, ItemStack.EMPTY)); if (!drops.isEmpty()) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/ReedFarmerBehavior.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/ReedFarmerBehavior.java index 4f062c700..4a8967c60 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/ReedFarmerBehavior.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/apiimpl/farmer/ReedFarmerBehavior.java @@ -22,7 +22,7 @@ import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.SugarCaneBlock; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.storage.loot.LootContext; +import net.minecraft.world.level.storage.loot.LootParams; import net.minecraft.world.level.storage.loot.parameters.LootContextParams; import net.minecraft.world.phys.Vec3; @@ -59,7 +59,7 @@ public class ReedFarmerBehavior implements IFarmerBehavior { BlockPos up = pos.above(i); BlockState upState = world.getBlockState(up); if (upState.getBlock() instanceof SugarCaneBlock) { - List drops = state.getDrops(new LootContext.Builder(world) + List drops = state.getDrops(new LootParams.Builder(world) .withParameter(LootContextParams.ORIGIN, new Vec3(pos.getX(), pos.getY(), pos.getZ())) .withParameter(LootContextParams.TOOL, ItemStack.EMPTY)); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java index 6a4829b8b..324e3e8cc 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/RenderSpecial.java @@ -11,15 +11,15 @@ package de.ellpeck.actuallyadditions.mod.misc.special; import com.mojang.blaze3d.vertex.PoseStack; -import com.mojang.math.Vector3f; +import com.mojang.math.Axis; import net.minecraft.Util; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.block.model.ItemTransforms; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.world.entity.player.Player; import net.minecraft.world.entity.player.PlayerModelPart; import net.minecraft.world.item.BlockItem; +import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; import net.minecraft.world.phys.Vec3; @@ -52,7 +52,7 @@ public class RenderSpecial { if (isBlock) { matrixStack.translate(0D, -0.1875D, 0D); } - matrixStack.mulPose(Vector3f.ZP.rotationDegrees(180)); + matrixStack.mulPose(Axis.ZP.rotationDegrees(180)); float size = isBlock ? 0.5F @@ -63,7 +63,7 @@ public class RenderSpecial { //Peck edit: What do you mean by "nice" you jackass? >_> double boop = Util.getMillis() / 1000D; matrixStack.translate(0D, Math.sin(boop % (2 * Math.PI)) * 0.25, 0D); - matrixStack.mulPose(Vector3f.YP.rotationDegrees((float) (boop * 40D % 360))); + matrixStack.mulPose(Axis.YP.rotationDegrees((float) (boop * 40D % 360))); // GlStateManager._disableLighting(); matrixStack.pushPose(); @@ -71,8 +71,8 @@ public class RenderSpecial { if (!isBlock) { matrixStack.translate(0D, 0.5D, 0D); } - matrixStack.mulPose(Vector3f.XN.rotationDegrees(180F)); - Minecraft.getInstance().getItemRenderer().renderStatic(theThingToRender, ItemTransforms.TransformType.FIXED, combinedLight, OverlayTexture.NO_OVERLAY, matrixStack, buffer, 0); + matrixStack.mulPose(Axis.XN.rotationDegrees(180F)); + Minecraft.getInstance().getItemRenderer().renderStatic(theThingToRender, ItemDisplayContext.FIXED, combinedLight, OverlayTexture.NO_OVERLAY, matrixStack, buffer, null, 0); matrixStack.popPose(); // GlStateManager._enableLighting(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java index 783b69979..8c8e475bf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/misc/special/SpecialRenderInit.java @@ -88,13 +88,13 @@ public class SpecialRenderInit { @SubscribeEvent(priority = EventPriority.HIGHEST) public void onPlayerRender(RenderPlayerEvent.Pre event) { - if (event.getPlayer() != null) { - String name = event.getPlayer().getName().getString(); + if (event.getEntity() != null) { + String name = event.getEntity().getName().getString(); String lower = name.toLowerCase(Locale.ROOT); if (SPECIAL_LIST.containsKey(lower)) { RenderSpecial render = SPECIAL_LIST.get(lower); if (render != null) { - render.render(event.getPoseStack(), event.getMultiBufferSource(), event.getPackedLight(), event.getPlayer(), event.getPartialTick()); + render.render(event.getPoseStack(), event.getMultiBufferSource(), event.getPackedLight(), event.getEntity(), event.getPartialTick()); } } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java index d8708195d..49ab45a74 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandler.java @@ -21,7 +21,7 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.client.Minecraft; import net.minecraft.core.BlockPos; -import net.minecraft.core.Registry; +import net.minecraft.core.registries.Registries; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceKey; import net.minecraft.resources.ResourceLocation; @@ -90,19 +90,18 @@ public final class PacketHandler { } }; public static final IDataHandler GUI_BUTTON_TO_TILE_HANDLER = (compound, context) -> { - Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("WorldID")))); + Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registries.DIMENSION, new ResourceLocation(compound.getString("WorldID")))); BlockEntity tile = world.getBlockEntity(new BlockPos(compound.getInt("X"), compound.getInt("Y"), compound.getInt("Z"))); - if (tile instanceof IButtonReactor) { - IButtonReactor reactor = (IButtonReactor) tile; - Entity entity = world.getEntity(compound.getInt("PlayerID")); + if (tile instanceof IButtonReactor reactor) { + Entity entity = world.getEntity(compound.getInt("PlayerID")); if (entity instanceof Player) { reactor.onButtonPressed(compound.getInt("ButtonID"), (Player) entity); } } }; public static final IDataHandler GUI_BUTTON_TO_CONTAINER_HANDLER = (compound, context) -> { - Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("WorldID")))); + Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registries.DIMENSION, new ResourceLocation(compound.getString("WorldID")))); Entity entity = world.getEntity(compound.getInt("PlayerID")); if (entity instanceof Player) { AbstractContainerMenu container = ((Player) entity).containerMenu; @@ -112,21 +111,19 @@ public final class PacketHandler { } }; public static final IDataHandler GUI_NUMBER_TO_TILE_HANDLER = (compound, context) -> { - Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("WorldID")))); + Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registries.DIMENSION, new ResourceLocation(compound.getString("WorldID")))); BlockEntity tile = world.getBlockEntity(new BlockPos(compound.getInt("X"), compound.getInt("Y"), compound.getInt("Z"))); - if (tile instanceof INumberReactor) { - INumberReactor reactor = (INumberReactor) tile; - reactor.onNumberReceived(compound.getDouble("Number"), compound.getInt("NumberID"), (Player) world.getEntity(compound.getInt("PlayerID"))); + if (tile instanceof INumberReactor reactor) { + reactor.onNumberReceived(compound.getDouble("Number"), compound.getInt("NumberID"), (Player) world.getEntity(compound.getInt("PlayerID"))); } }; public static final IDataHandler GUI_STRING_TO_TILE_HANDLER = (compound, context) -> { - Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("WorldID")))); + Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registries.DIMENSION, new ResourceLocation(compound.getString("WorldID")))); BlockEntity tile = world.getBlockEntity(new BlockPos(compound.getInt("X"), compound.getInt("Y"), compound.getInt("Z"))); - if (tile instanceof IStringReactor) { - IStringReactor reactor = (IStringReactor) tile; - reactor.onTextReceived(compound.getString("Text"), compound.getInt("TextID"), (Player) world.getEntity(compound.getInt("PlayerID"))); + if (tile instanceof IStringReactor reactor) { + reactor.onTextReceived(compound.getString("Text"), compound.getInt("TextID"), (Player) world.getEntity(compound.getInt("PlayerID"))); } }; public static final IDataHandler SYNC_PLAYER_DATA = new IDataHandler() { @@ -148,7 +145,7 @@ public final class PacketHandler { } }; public static final IDataHandler PLAYER_DATA_TO_SERVER = (compound, context) -> { - Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registry.DIMENSION_REGISTRY, new ResourceLocation(compound.getString("World")))); + Level world = context.getSender().getServer().getLevel(ResourceKey.create(Registries.DIMENSION, new ResourceLocation(compound.getString("World")))); Player player = world.getServer().getPlayerList().getPlayer(compound.getUUID("UUID")); if (player != null) { PlayerData.PlayerSave data = PlayerData.getDataFromPlayer(player); @@ -187,12 +184,12 @@ public final class PacketHandler { THE_NETWORK.messageBuilder(PacketServerToClient.class, 0, NetworkDirection.PLAY_TO_CLIENT) .decoder(PacketServerToClient::fromBytes) .encoder(PacketServerToClient::toBytes) - .consumer(PacketServerToClient::handle).add(); + .consumerNetworkThread(PacketServerToClient::handle).add(); THE_NETWORK.messageBuilder(PacketClientToServer.class, 1, NetworkDirection.PLAY_TO_SERVER) .decoder(PacketClientToServer::fromBytes) .encoder(PacketClientToServer::toBytes) - .consumer(PacketClientToServer::handle).add(); + .consumerNetworkThread(PacketClientToServer::handle).add(); DATA_HANDLERS.add(LASER_HANDLER); @@ -208,7 +205,7 @@ public final class PacketHandler { public static void sendTo(Object msg, ServerPlayer player) { if (!(player instanceof FakePlayer)) { - THE_NETWORK.sendTo(msg, player.connection.getConnection(), NetworkDirection.PLAY_TO_CLIENT); + THE_NETWORK.sendTo(msg, player.connection.connection, NetworkDirection.PLAY_TO_CLIENT); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandlerHelper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandlerHelper.java index c5fae13ba..985c86692 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandlerHelper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/network/PacketHandlerHelper.java @@ -60,7 +60,7 @@ public final class PacketHandlerHelper { Player player = Minecraft.getInstance().player; if (player != null) { - compound.putString("World", player.level.dimension().getRegistryName().toString()); + compound.putString("World", player.level().dimension().location().toString()); compound.putUUID("UUID", player.getUUID()); PlayerSave data = PlayerData.getDataFromPlayer(player); @@ -94,7 +94,7 @@ public final class PacketHandlerHelper { compound.putInt("X", tile.getBlockPos().getX()); compound.putInt("Y", tile.getBlockPos().getY()); compound.putInt("Z", tile.getBlockPos().getZ()); - compound.putString("WorldID", tile.getLevel().dimension().getRegistryName().toString()); + compound.putString("WorldID", tile.getLevel().dimension().location().toString()); compound.putInt("PlayerID", Minecraft.getInstance().player.getId()); compound.putInt("NumberID", id); compound.putDouble("Number", number); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleLaserItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleLaserItem.java index d0256a07a..17bf1f40f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleLaserItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/particle/ParticleLaserItem.java @@ -14,7 +14,7 @@ import com.mojang.blaze3d.platform.GlStateManager; import com.mojang.blaze3d.systems.RenderSystem; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.mojang.math.Vector3f; +import com.mojang.math.Axis; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import net.minecraft.Util; import net.minecraft.client.Camera; @@ -84,7 +84,7 @@ public class ParticleLaserItem extends Particle { matrices.scale(0.3F, 0.3F, 0.3F); double boop = Util.getMillis() / 600D; - matrices.mulPose(Vector3f.YP.rotationDegrees((float) (boop * 40D % 360))); + matrices.mulPose(Axis.YP.rotationDegrees((float) (boop * 40D % 360))); // RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); TODO: See if this is needed RenderSystem.blendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, @@ -96,8 +96,8 @@ public class ParticleLaserItem extends Particle { : ageRatio; // RenderSystem.blendColor(color, color, color, color); TODO: See if this is needed - int blockLight = level.getBrightness(LightLayer.BLOCK, new BlockPos(x, y, z)); - int skyLight = level.getBrightness(LightLayer.SKY, new BlockPos(x, y, z)); + int blockLight = level.getBrightness(LightLayer.BLOCK, BlockPos.containing(x, y, z)); + int skyLight = level.getBrightness(LightLayer.SKY, BlockPos.containing(x, y, z)); AssetUtil.renderItemWithoutScrewingWithColors(this.stack, matrices, LightTexture.pack(blockLight, skyLight), OverlayTexture.NO_OVERLAY); // Lighting.turnOff(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/FilterSettings.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/FilterSettings.java index 3a81dfc6c..68580d557 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/FilterSettings.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/FilterSettings.java @@ -17,6 +17,7 @@ import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA; import net.minecraft.nbt.CompoundTag; import net.minecraft.world.item.Item; import net.minecraft.world.item.ItemStack; +import net.minecraftforge.registries.ForgeRegistries; public class FilterSettings { public final ItemStackHandlerAA filterInventory; @@ -68,7 +69,7 @@ public class FilterSettings { private static boolean areEqualEnough(ItemStack first, ItemStack second, boolean nbt, boolean mod) { Item firstItem = first.getItem(); Item secondItem = second.getItem(); - if (mod && firstItem.getRegistryName().getNamespace().equals(secondItem.getRegistryName().getNamespace())) { + if (mod && ForgeRegistries.ITEMS.getKey(firstItem).getNamespace().equals(ForgeRegistries.ITEMS.getKey(secondItem).getNamespace())) { return true; } @@ -76,7 +77,7 @@ public class FilterSettings { return false; } - boolean nbtFine = !nbt || ItemStack.tagMatches(first, second); + boolean nbtFine = !nbt || ItemStack.isSameItemSameTags(first, second); if (nbtFine) { return true; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java index ce37cc284..0f0f49173 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBase.java @@ -22,12 +22,10 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.capabilities.Capability; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; -import net.minecraftforge.fluids.capability.CapabilityFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler; -import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import javax.annotation.Nonnull; @@ -267,11 +265,11 @@ public abstract class TileEntityBase extends BlockEntity { @Nonnull @Override public LazyOptional getCapability(@Nonnull Capability capability, @Nullable Direction side) { - if (capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY) { + if (capability == ForgeCapabilities.ITEM_HANDLER) { return this.getItemHandler(side).cast(); - } else if (capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY) { + } else if (capability == ForgeCapabilities.FLUID_HANDLER) { return this.getFluidHandler(side).cast(); - } else if (capability == CapabilityEnergy.ENERGY) { + } else if (capability == ForgeCapabilities.ENERGY) { return this.getEnergyStorage(side).cast(); } return LazyOptional.empty(); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBatteryBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBatteryBox.java index 3d3fa8fd4..b81879c69 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBatteryBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBatteryBox.java @@ -20,8 +20,8 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; import java.util.ArrayList; @@ -40,7 +40,7 @@ public class TileEntityBatteryBox extends TileEntityInventoryBase implements ISh public LazyOptional getEnergyStorage(Direction facing) { ItemStack stack = this.inv.getStackInSlot(0); if (stack.getItem() instanceof ItemBattery) { - return stack.getCapability(CapabilityEnergy.ENERGY, null); + return stack.getCapability(ForgeCapabilities.ENERGY, null); } return LazyOptional.empty(); } @@ -75,7 +75,7 @@ public class TileEntityBatteryBox extends TileEntityInventoryBase implements ISh for (TileEntityBatteryBox te : tiles) { ItemStack battery = te.inv.getStackInSlot(0); if (!battery.isEmpty() && !ItemUtil.isEnabled(battery)) { - int received = te.getCapability(CapabilityEnergy.ENERGY, null).map(e -> e.receiveEnergy(maxPer, false)).orElse(0); + int received = te.getCapability(ForgeCapabilities.ENERGY, null).map(e -> e.receiveEnergy(maxPer, false)).orElse(0); storage.extractEnergy(received, false); if (storage.getEnergyStored() <= 0) { @@ -134,9 +134,8 @@ public class TileEntityBatteryBox extends TileEntityInventoryBase implements ISh } for (BlockEntity tile : startTile.tilesAround) { - if (tile instanceof TileEntityBatteryBox) { - TileEntityBatteryBox box = (TileEntityBatteryBox) tile; - if (!pushOffTo.contains(box)) { + if (tile instanceof TileEntityBatteryBox box) { + if (!pushOffTo.contains(box)) { pushOffTo.add(box); this.energyPushOffLoop(box, pushOffTo); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBioReactor.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBioReactor.java index 99fbbab5d..1eaa879e9 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBioReactor.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBioReactor.java @@ -19,7 +19,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; @@ -190,7 +189,7 @@ public class TileEntityBioReactor extends TileEntityInventoryBase implements Men @Override public Component getDisplayName() { - return TextComponent.EMPTY; + return Component.empty(); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java index 853ebee1a..ecdac1286 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityBreaker.java @@ -20,7 +20,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; @@ -140,7 +139,7 @@ public class TileEntityBreaker extends TileEntityInventoryBase implements MenuPr @Nonnull @Override public Component getDisplayName() { - return new TranslatableComponent(isPlacer ? "container.actuallyadditions.placer" : "container.actuallyadditions.breaker"); + return Component.translatable(isPlacer ? "container.actuallyadditions.placer" : "container.actuallyadditions.breaker"); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java index 38c4cfe7b..e55cce3f3 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCanolaPress.java @@ -23,7 +23,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; @@ -36,8 +35,8 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; -import net.minecraftforge.fluids.FluidAttributes; import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidType; import net.minecraftforge.fluids.capability.IFluidHandler; import javax.annotation.Nullable; @@ -50,7 +49,7 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements Me public final CustomEnergyStorage storage = new CustomEnergyStorage(40000, 100, 0); public final LazyOptional lazyEnergy = LazyOptional.of(() -> this.storage); - public final OutputOnlyFluidTank tank = new OutputOnlyFluidTank(2 * FluidAttributes.BUCKET_VOLUME); + public final OutputOnlyFluidTank tank = new OutputOnlyFluidTank(2 * FluidType.BUCKET_VOLUME); public final LazyOptional lazyFluid = LazyOptional.of(() -> this.tank); public int currentProcessTime; @@ -180,7 +179,7 @@ public class TileEntityCanolaPress extends TileEntityInventoryBase implements Me @Override public Component getDisplayName() { - return new TranslatableComponent("container.actuallyadditions.canola_press"); + return Component.translatable("container.actuallyadditions.canola_press"); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java index 4774b8137..3ab329e85 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoalGenerator.java @@ -21,7 +21,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.resources.ResourceLocation; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; @@ -195,7 +194,7 @@ public class TileEntityCoalGenerator extends TileEntityInventoryBase implements @Override public Component getDisplayName() { - return new TranslatableComponent("container.actuallyadditions.coalGenerator"); + return Component.translatable("container.actuallyadditions.coalGenerator"); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java index 8dcf83b4c..cc5b91063 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCoffeeMachine.java @@ -25,7 +25,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.sounds.SoundSource; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; @@ -40,8 +39,8 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; -import net.minecraftforge.fluids.FluidAttributes; import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidType; import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.templates.FluidTank; @@ -62,7 +61,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements public final CustomEnergyStorage storage = new CustomEnergyStorage(300000, 250, 0); public final LazyOptional lazyEnergy = LazyOptional.of(() -> this.storage); - public final FluidTank tank = new FluidTank(4 * FluidAttributes.BUCKET_VOLUME) { + public final FluidTank tank = new FluidTank(4 * FluidType.BUCKET_VOLUME) { @Nonnull @Override public FluidStack drain(int maxDrain, FluidAction action) { @@ -252,7 +251,7 @@ public class TileEntityCoffeeMachine extends TileEntityInventoryBase implements @Override public Component getDisplayName() { - return new TranslatableComponent("container.actuallyadditions.coffeeMachine"); + return Component.translatable("container.actuallyadditions.coffeeMachine"); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusher.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusher.java index b19a637bb..af0f05012 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusher.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityCrusher.java @@ -23,7 +23,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.sounds.SoundSource; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; @@ -208,7 +207,7 @@ public class TileEntityCrusher extends TileEntityInventoryBase implements IButto ItemStack outputOne = recipe.getOutputOne(); ItemStack outputTwo = recipe.getOutputTwo(); if (!outputOne.isEmpty()) { - return (this.inv.getStackInSlot(theFirstOutput).isEmpty() || this.inv.getStackInSlot(theFirstOutput).sameItem(outputOne) && this.inv.getStackInSlot(theFirstOutput).getCount() <= this.inv.getStackInSlot(theFirstOutput).getMaxStackSize() - outputOne.getCount()) && (outputTwo.isEmpty() || this.inv.getStackInSlot(theSecondOutput).isEmpty() || this.inv.getStackInSlot(theSecondOutput).sameItem(outputTwo) && this.inv.getStackInSlot(theSecondOutput).getCount() <= this.inv.getStackInSlot(theSecondOutput).getMaxStackSize() - outputTwo.getCount()); + return (this.inv.getStackInSlot(theFirstOutput).isEmpty() || ItemStack.isSameItem(this.inv.getStackInSlot(theFirstOutput), outputOne) && this.inv.getStackInSlot(theFirstOutput).getCount() <= this.inv.getStackInSlot(theFirstOutput).getMaxStackSize() - outputOne.getCount()) && (outputTwo.isEmpty() || this.inv.getStackInSlot(theSecondOutput).isEmpty() || ItemStack.isSameItem(this.inv.getStackInSlot(theSecondOutput), outputTwo) && this.inv.getStackInSlot(theSecondOutput).getCount() <= this.inv.getStackInSlot(theSecondOutput).getMaxStackSize() - outputTwo.getCount()); } } return false; @@ -278,7 +277,7 @@ public class TileEntityCrusher extends TileEntityInventoryBase implements IButto @Override public Component getDisplayName() { - return new TranslatableComponent("container.actuallyadditions.crusher"); + return Component.translatable("container.actuallyadditions.crusher"); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java index 515ab15de..0dbbfe4d0 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityDropper.java @@ -17,7 +17,6 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; @@ -113,7 +112,7 @@ public class TileEntityDropper extends TileEntityInventoryBase implements MenuPr @Override public Component getDisplayName() { - return new TranslatableComponent("container.actuallyadditions.dropper"); + return Component.translatable("container.actuallyadditions.dropper"); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEmpowerer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEmpowerer.java index 1f9daf72b..3443c9547 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEmpowerer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEmpowerer.java @@ -166,7 +166,7 @@ public class TileEntityEmpowerer extends TileEntityInventoryBase { this.processTime = compound.getInt("ProcessTime"); } if (type == NBTType.SYNC && compound.contains("CurrentRecipe")) { - if (!compound.getString("CurrentRecipe").equals("")) { + if (!compound.getString("CurrentRecipe").isEmpty()) { ResourceLocation id = new ResourceLocation(compound.getString("CurrentRecipe")); for (EmpowererRecipe empowererRecipe : ActuallyAdditionsAPI.EMPOWERER_RECIPES) { if (empowererRecipe.getId().equals(id)) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java index 2f3c90e7a..2512e040f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnergizer.java @@ -19,7 +19,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; @@ -28,8 +27,8 @@ import net.minecraft.world.item.enchantment.EnchantmentHelper; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; import javax.annotation.Nullable; @@ -68,8 +67,8 @@ public class TileEntityEnergizer extends TileEntityInventoryBase implements Menu if (StackUtil.isValid(tile.inv.getStackInSlot(0)) && !StackUtil.isValid(tile.inv.getStackInSlot(1))) { if (tile.storage.getEnergyStored() > 0) { - int received = tile.inv.getStackInSlot(0).getCapability(CapabilityEnergy.ENERGY, null).map(cap -> cap.receiveEnergy(tile.storage.getEnergyStored(), false)).orElse(0); - boolean canTakeUp = tile.inv.getStackInSlot(0).getCapability(CapabilityEnergy.ENERGY, null).map(cap -> cap.getEnergyStored() >= cap.getMaxEnergyStored()).orElse(false); + int received = tile.inv.getStackInSlot(0).getCapability(ForgeCapabilities.ENERGY, null).map(cap -> cap.receiveEnergy(tile.storage.getEnergyStored(), false)).orElse(0); + boolean canTakeUp = tile.inv.getStackInSlot(0).getCapability(ForgeCapabilities.ENERGY, null).map(cap -> cap.getEnergyStored() >= cap.getMaxEnergyStored()).orElse(false); if (received > 0) { tile.storage.extractEnergyInternal(received, false); @@ -90,7 +89,7 @@ public class TileEntityEnergizer extends TileEntityInventoryBase implements Menu @Override public IAcceptor getAcceptor() { - return (slot, stack, automation) -> !automation || slot == 0 && stack.getCapability(CapabilityEnergy.ENERGY, null).isPresent(); + return (slot, stack, automation) -> !automation || slot == 0 && stack.getCapability(ForgeCapabilities.ENERGY, null).isPresent(); } @Override @@ -109,7 +108,7 @@ public class TileEntityEnergizer extends TileEntityInventoryBase implements Menu @Override public Component getDisplayName() { - return TextComponent.EMPTY; + return Component.empty(); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java index af743647b..4f345f30b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityEnervator.java @@ -19,7 +19,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; @@ -27,8 +26,8 @@ import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; import javax.annotation.Nullable; @@ -67,7 +66,7 @@ public class TileEntityEnervator extends TileEntityInventoryBase implements ISha if (StackUtil.isValid(tile.inv.getStackInSlot(0)) && !StackUtil.isValid(tile.inv.getStackInSlot(1))) { if (tile.storage.getEnergyStored() < tile.storage.getMaxEnergyStored()) { - LazyOptional capability = tile.inv.getStackInSlot(0).getCapability(CapabilityEnergy.ENERGY, null); + LazyOptional capability = tile.inv.getStackInSlot(0).getCapability(ForgeCapabilities.ENERGY, null); int maxExtract = tile.storage.getMaxEnergyStored() - tile.storage.getEnergyStored(); int extracted = capability.map(cap -> cap.extractEnergy(maxExtract, false)).orElse(0); @@ -92,7 +91,7 @@ public class TileEntityEnervator extends TileEntityInventoryBase implements ISha @Override public IAcceptor getAcceptor() { - return (slot, stack, automation) -> !automation || slot == 0 && stack.getCapability(CapabilityEnergy.ENERGY, null).isPresent(); + return (slot, stack, automation) -> !automation || slot == 0 && stack.getCapability(ForgeCapabilities.ENERGY, null).isPresent(); } @Override @@ -131,7 +130,7 @@ public class TileEntityEnervator extends TileEntityInventoryBase implements ISha @Override public Component getDisplayName() { - return TextComponent.EMPTY; + return Component.empty(); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFarmer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFarmer.java index e0818c858..caee49e52 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFarmer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFarmer.java @@ -25,7 +25,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; @@ -153,7 +152,7 @@ public class TileEntityFarmer extends TileEntityInventoryBase implements IFarmer for (int i = 0; i < 6; i++) { //Process seed slots only ItemStack stack = this.inv.getStackInSlot(i); BlockState state = this.level.getBlockState(query); - if (StackUtil.isValid(stack) && state.getMaterial().isReplaceable()) { + if (StackUtil.isValid(stack) && state.canBeReplaced()) { FarmerResult plantResult = behavior.tryPlantSeed(stack, this.level, query, this); if (plantResult == FarmerResult.SUCCESS) { this.inv.getStackInSlot(i).shrink(1); @@ -245,7 +244,7 @@ public class TileEntityFarmer extends TileEntityInventoryBase implements IFarmer @Override public Component getDisplayName() { - return new TranslatableComponent("container.actuallyadditions.farmer"); + return Component.translatable("container.actuallyadditions.farmer"); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java index d2ea8e026..1fd9c29ed 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFeeder.java @@ -17,7 +17,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.util.Mth; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.animal.Animal; @@ -114,10 +113,10 @@ public class TileEntityFeeder extends TileEntityInventoryBase implements MenuPro private static void feedAnimal(Animal animal) { animal.setInLove(null); for (int i = 0; i < 7; i++) { - double d = animal.level.random.nextGaussian() * 0.02D; - double d1 = animal.level.random.nextGaussian() * 0.02D; - double d2 = animal.level.random.nextGaussian() * 0.02D; - animal.level.addParticle(ParticleTypes.HEART, animal.getX() + animal.level.random.nextFloat() * animal.getBbWidth() * 2.0F - animal.getBbWidth(), animal.getY() + 0.5D + animal.level.random.nextFloat() * animal.getBbHeight(), animal.getZ() + animal.level.random.nextFloat() * animal.getBbWidth() * 2.0F - animal.getBbWidth(), d, d1, d2); + double d = animal.level().random.nextGaussian() * 0.02D; + double d1 = animal.level().random.nextGaussian() * 0.02D; + double d2 = animal.level().random.nextGaussian() * 0.02D; + animal.level().addParticle(ParticleTypes.HEART, animal.getX() + animal.level().random.nextFloat() * animal.getBbWidth() * 2.0F - animal.getBbWidth(), animal.getY() + 0.5D + animal.level().random.nextFloat() * animal.getBbHeight(), animal.getZ() + animal.level().random.nextFloat() * animal.getBbWidth() * 2.0F - animal.getBbWidth(), d, d1, d2); } } @@ -131,7 +130,7 @@ public class TileEntityFeeder extends TileEntityInventoryBase implements MenuPro @Override public Component getDisplayName() { - return TextComponent.EMPTY; + return Component.empty(); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java index 5c8c0d680..d35bb7b53 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFermentingBarrel.java @@ -18,7 +18,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; @@ -29,8 +28,8 @@ import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.fluids.FluidAttributes; import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidType; import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.templates.FluidTank; @@ -168,7 +167,7 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari @Nonnull @Override public Component getDisplayName() { - return new TranslatableComponent("container.actuallyadditions.fermenting_barrel"); + return Component.translatable("container.actuallyadditions.fermenting_barrel"); } @Nullable @@ -188,7 +187,7 @@ public class TileEntityFermentingBarrel extends TileEntityBase implements IShari public static class FermentingBarrelMultiTank implements IFluidHandler { - private final int capacity = FluidAttributes.BUCKET_VOLUME * 2; + private final int capacity = FluidType.BUCKET_VOLUME * 2; public FluidTank inputTank = new FluidTank(capacity); public FluidTank outputTank = new FluidTank(capacity); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java index 3505f7c6d..306371e64 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFireworkBox.java @@ -18,7 +18,6 @@ import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.ListTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.util.Mth; import net.minecraft.util.random.Weight; import net.minecraft.util.random.WeightedEntry; @@ -157,7 +156,7 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisp double newX = x + this.getRandomAoe(); double newZ = z + this.getRandomAoe(); - if (world.hasChunkAt(new BlockPos(newX, y, newZ))) { + if (world.hasChunkAt(BlockPos.containing(newX, y, newZ))) { FireworkRocketEntity rocket = new FireworkRocketEntity(world, newX, y + 1, newZ, firework); world.addFreshEntity(rocket); } @@ -296,7 +295,7 @@ public class TileEntityFireworkBox extends TileEntityBase implements IEnergyDisp @Override public Component getDisplayName() { - return TextComponent.EMPTY; + return Component.empty(); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java index 9d8fbe639..276dd8bbf 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityFluidCollector.java @@ -19,10 +19,10 @@ import net.minecraft.core.Direction; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.server.level.ServerLevel; import net.minecraft.sounds.SoundEvents; import net.minecraft.sounds.SoundSource; +import net.minecraft.tags.FluidTags; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; @@ -34,10 +34,9 @@ import net.minecraft.world.level.block.LiquidBlock; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.Material; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.fluids.FluidAttributes; import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidType; import net.minecraftforge.fluids.IFluidBlock; import net.minecraftforge.fluids.capability.IFluidHandler; @@ -47,7 +46,7 @@ import javax.annotation.Nullable; public class TileEntityFluidCollector extends TileEntityBase implements ISharingFluidHandler, MenuProvider { public boolean isPlacer; - public final AATank tank = new AATank(8 * FluidAttributes.BUCKET_VOLUME) { + public final AATank tank = new AATank(8 * FluidType.BUCKET_VOLUME) { @Override public int fill(FluidStack resource, FluidAction action) { if (!TileEntityFluidCollector.this.isPlacer) { @@ -106,24 +105,24 @@ public class TileEntityFluidCollector extends TileEntityBase implements ISharing BlockState stateToBreak = this.level.getBlockState(coordsBlock); Block blockToBreak = stateToBreak.getBlock(); - if (!this.isPlacer && FluidAttributes.BUCKET_VOLUME <= this.tank.getCapacity() - this.tank.getFluidAmount()) { + if (!this.isPlacer && FluidType.BUCKET_VOLUME <= this.tank.getCapacity() - this.tank.getFluidAmount()) { if (blockToBreak instanceof LiquidBlock && stateToBreak.getFluidState().isSource() && ((LiquidBlock) blockToBreak).getFluid() != null) { - if (this.tank.fillInternal(new FluidStack(((LiquidBlock) blockToBreak).getFluid(), FluidAttributes.BUCKET_VOLUME), IFluidHandler.FluidAction.SIMULATE) >= FluidAttributes.BUCKET_VOLUME) { - this.tank.fillInternal(new FluidStack(((LiquidBlock) blockToBreak).getFluid(), FluidAttributes.BUCKET_VOLUME), IFluidHandler.FluidAction.EXECUTE); + if (this.tank.fillInternal(new FluidStack(((LiquidBlock) blockToBreak).getFluid(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.SIMULATE) >= FluidType.BUCKET_VOLUME) { + this.tank.fillInternal(new FluidStack(((LiquidBlock) blockToBreak).getFluid(), FluidType.BUCKET_VOLUME), IFluidHandler.FluidAction.EXECUTE); this.level.setBlockAndUpdate(coordsBlock, Blocks.AIR.defaultBlockState()); } } - } else if (this.isPlacer && blockToBreak.defaultBlockState().getMaterial().isReplaceable()) { - if (this.tank.getFluidAmount() >= FluidAttributes.BUCKET_VOLUME) { + } else if (this.isPlacer && blockToBreak.defaultBlockState().canBeReplaced()) { + if (this.tank.getFluidAmount() >= FluidType.BUCKET_VOLUME) { FluidStack stack = this.tank.getFluid(); Block fluid = stack.getFluid().defaultFluidState().createLegacyBlock().getBlock(); if (fluid != null) { BlockPos offsetPos = this.worldPosition.relative(sideToManipulate); - boolean placeable = !(blockToBreak instanceof IFluidBlock) && blockToBreak.defaultBlockState().getMaterial().isReplaceable(); + boolean placeable = !(blockToBreak instanceof IFluidBlock) && blockToBreak.defaultBlockState().canBeReplaced(); if (placeable) { - this.tank.drainInternal(FluidAttributes.BUCKET_VOLUME, IFluidHandler.FluidAction.EXECUTE); + this.tank.drainInternal(FluidType.BUCKET_VOLUME, IFluidHandler.FluidAction.EXECUTE); // TODO: [port] validate this check is still valid. - if (this.level.dimensionType().ultraWarm() && fluid.defaultBlockState().getMaterial() == Material.WATER) { + if (this.level.dimensionType().ultraWarm() && stack.getFluid().is(FluidTags.WATER)) { this.level.playSound(null, offsetPos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (this.level.random.nextFloat() - this.level.random.nextFloat()) * 0.8F); if (this.level instanceof ServerLevel) { @@ -219,7 +218,7 @@ public class TileEntityFluidCollector extends TileEntityBase implements ISharing @Override public Component getDisplayName() { - return new TranslatableComponent(isPlacer ? "container.actuallyadditions.fluidPlacer" : "container.actuallyadditions.fluidCollector"); + return Component.translatable(isPlacer ? "container.actuallyadditions.fluidPlacer" : "container.actuallyadditions.fluidCollector"); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java index b639691d4..e19c70343 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityHeatCollector.java @@ -15,13 +15,13 @@ import de.ellpeck.actuallyadditions.mod.util.WorldUtil; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; +import net.minecraft.tags.FluidTags; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.MagmaBlock; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; -import net.minecraft.world.level.material.Material; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; @@ -76,7 +76,7 @@ public class TileEntityHeatCollector extends TileEntityBase implements ISharingE BlockPos coords = pos.relative(WorldUtil.getDirectionBySidesInOrder(i)); BlockState relativeState = level.getBlockState(coords); Block block = relativeState.getBlock(); - if (block != null && level.getBlockState(coords).getMaterial() == Material.LAVA || level.getBlockState(coords).getBlock() instanceof MagmaBlock) { + if (block != null && level.getFluidState(coords).is(FluidTags.LAVA) || level.getBlockState(coords).getBlock() instanceof MagmaBlock) { blocksAround.add(i); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterface.java index ae3856891..ff36c575f 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterface.java @@ -73,7 +73,7 @@ public class TileEntityItemInterface extends TileEntityBase { IItemHandlerInfo info = TileEntityItemInterface.this.getSwitchedIndexHandler(slot); if (info != null && info.isLoaded() && TileEntityItemInterface.this.isWhitelisted(info, stack, false)) { ItemStack remain = info.handler.insertItem(info.switchedIndex, stack, simulate); - if (!ItemStack.isSame(remain, stack) && !simulate) { + if (!ItemStack.isSameItem(remain, stack) && !simulate) { TileEntityItemInterface.this.setChanged(); TileEntityItemInterface.this.doItemParticle(stack, info.relayInQuestion.getBlockPos(), TileEntityItemInterface.this.connectedRelay.getBlockPos()); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterfaceHopping.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterfaceHopping.java index 9557da360..7002bff80 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterfaceHopping.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityItemInterfaceHopping.java @@ -26,8 +26,8 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.phys.AABB; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import java.util.List; @@ -111,7 +111,7 @@ public class TileEntityItemInterfaceHopping extends TileEntityItemInterface { BlockEntity from = this.level.getBlockEntity(this.getBlockPos().relative(Direction.UP)); if (from != null && !(from instanceof TileEntityItemInterface)) { - LazyOptional normal = from.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, Direction.DOWN); + LazyOptional normal = from.getCapability(ForgeCapabilities.ITEM_HANDLER, Direction.DOWN); Object slotless = null; // TODO: [port] add back @@ -132,7 +132,7 @@ public class TileEntityItemInterfaceHopping extends TileEntityItemInterface { if (this.level.isLoaded(toPos)) { BlockEntity to = this.level.getBlockEntity(toPos); if (to != null && !(to instanceof TileEntityItemInterface)) { - LazyOptional normal = to.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing.getOpposite()); + LazyOptional normal = to.getCapability(ForgeCapabilities.ITEM_HANDLER, facing.getOpposite()); Object slotless = null; // TODO: [port] Add back diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java index 3a43611ef..bbd51b46e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayEnergy.java @@ -30,8 +30,8 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; import java.util.HashMap; @@ -136,7 +136,7 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { if (this.level.hasChunkAt(pos)) { BlockEntity tile = this.level.getBlockEntity(pos); if (tile != null && !(tile instanceof TileEntityLaserRelay)) { - if (tile.getCapability(CapabilityEnergy.ENERGY, side.getOpposite()).isPresent()) { + if (tile.getCapability(ForgeCapabilities.ENERGY, side.getOpposite()).isPresent()) { this.receiversAround.put(side, tile); BlockEntity oldTile = old.get(side); @@ -169,9 +169,8 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { if (relay != null && this.level.hasChunkAt(relay) && !alreadyChecked.contains(relay)) { alreadyChecked.add(relay); BlockEntity relayTile = this.level.getBlockEntity(relay); - if (relayTile instanceof TileEntityLaserRelayEnergy) { - TileEntityLaserRelayEnergy theRelay = (TileEntityLaserRelayEnergy) relayTile; - if (theRelay.mode != Mode.INPUT_ONLY) { + if (relayTile instanceof TileEntityLaserRelayEnergy theRelay) { + if (theRelay.mode != Mode.INPUT_ONLY) { boolean workedOnce = false; for (Direction facing : theRelay.receiversAround.keySet()) { @@ -180,7 +179,7 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { Direction opp = facing.getOpposite(); if (tile != null) { - Boolean received = tile.getCapability(CapabilityEnergy.ENERGY, opp).map(cap -> cap.receiveEnergy(maxTransfer, true) > 0).orElse(false); + Boolean received = tile.getCapability(ForgeCapabilities.ENERGY, opp).map(cap -> cap.receiveEnergy(maxTransfer, true) > 0).orElse(false); if (received) { totalReceiverAmount++; workedOnce = true; @@ -214,7 +213,7 @@ public class TileEntityLaserRelayEnergy extends TileEntityLaserRelay { if (!alreadyChecked.contains(tile.getBlockPos())) { alreadyChecked.add(tile.getBlockPos()); if (theRelay != this || side != from) { - transmitted += tile.getCapability(CapabilityEnergy.ENERGY, opp).map(cap -> { + transmitted += tile.getCapability(ForgeCapabilities.ENERGY, opp).map(cap -> { int trans = 0; int theoreticalReceived = cap.receiveEnergy(Math.min(amountPer, lowestCap), true); if (theoreticalReceived > 0) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java index 4f1d13c08..871d39648 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayFluids.java @@ -28,9 +28,9 @@ import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.capability.CapabilityFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler; import javax.annotation.Nonnull; @@ -133,7 +133,7 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay { if (this.level.hasChunkAt(pos)) { BlockEntity tile = this.level.getBlockEntity(pos); if (tile != null && !(tile instanceof TileEntityLaserRelay)) { - if (tile.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, side.getOpposite()).isPresent()) { + if (tile.getCapability(ForgeCapabilities.FLUID_HANDLER, side.getOpposite()).isPresent()) { this.handlersAround.put(side, tile); BlockEntity oldTile = old.get(side); @@ -185,9 +185,8 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay { if (relay != null && this.level.hasChunkAt(relay) && !alreadyChecked.contains(relay)) { alreadyChecked.add(relay); BlockEntity relayTile = this.level.getBlockEntity(relay); - if (relayTile instanceof TileEntityLaserRelayFluids) { - TileEntityLaserRelayFluids theRelay = (TileEntityLaserRelayFluids) relayTile; - if (theRelay.mode != Mode.INPUT_ONLY) { + if (relayTile instanceof TileEntityLaserRelayFluids theRelay) { + if (theRelay.mode != Mode.INPUT_ONLY) { boolean workedOnce = false; for (Direction facing : theRelay.handlersAround.keySet()) { @@ -195,7 +194,7 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay { BlockEntity tile = theRelay.handlersAround.get(facing); Direction opp = facing.getOpposite(); - boolean received = tile.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, opp).map(cap -> cap.fill(stack, IFluidHandler.FluidAction.SIMULATE) > 0).orElse(false); + boolean received = tile.getCapability(ForgeCapabilities.FLUID_HANDLER, opp).map(cap -> cap.fill(stack, IFluidHandler.FluidAction.SIMULATE) > 0).orElse(false); if (received) { totalReceiverAmount++; workedOnce = true; @@ -226,7 +225,7 @@ public class TileEntityLaserRelayFluids extends TileEntityLaserRelay { if (!alreadyChecked.contains(tile.getBlockPos())) { alreadyChecked.add(tile.getBlockPos()); if (theRelay != this || side != from) { - transmitted += tile.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, opp).map(cap -> { + transmitted += tile.getCapability(ForgeCapabilities.FLUID_HANDLER, opp).map(cap -> { int trans = 0; FluidStack copy = stack.copy(); copy.setAmount(amountPer); diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java index 53cf3f8b9..ca72429f4 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItem.java @@ -31,8 +31,8 @@ import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; import java.util.HashMap; @@ -92,7 +92,7 @@ public class TileEntityLaserRelayItem extends TileEntityLaserRelay { if (this.level.hasChunkAt(pos)) { BlockEntity tile = this.level.getBlockEntity(pos); if (tile != null && !(tile instanceof TileEntityItemInterface) && !(tile instanceof TileEntityLaserRelay)) { - LazyOptional itemHandler = tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, side.getOpposite()); + LazyOptional itemHandler = tile.getCapability(ForgeCapabilities.ITEM_HANDLER, side.getOpposite()); Object slotlessHandler = null; // TODO: [port] add this back maybe? @@ -131,9 +131,8 @@ public class TileEntityLaserRelayItem extends TileEntityLaserRelay { if (relay != null && this.level.hasChunkAt(relay) && !alreadyChecked.contains(relay)) { alreadyChecked.add(relay); BlockEntity aRelayTile = this.level.getBlockEntity(relay); - if (aRelayTile instanceof TileEntityLaserRelayItem) { - TileEntityLaserRelayItem relayTile = (TileEntityLaserRelayItem) aRelayTile; - GenericItemHandlerInfo info = new GenericItemHandlerInfo(relayTile); + if (aRelayTile instanceof TileEntityLaserRelayItem relayTile) { + GenericItemHandlerInfo info = new GenericItemHandlerInfo(relayTile); for (Map.Entry handler : relayTile.handlersAround.entrySet()) { if (!alreadyChecked.contains(handler.getKey())) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemAdvanced.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemAdvanced.java index c0f9e9202..e95625d47 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemAdvanced.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLaserRelayItemAdvanced.java @@ -21,7 +21,6 @@ import de.ellpeck.actuallyadditions.mod.util.compat.SlotlessableItemHandlerWrapp import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; @@ -150,7 +149,7 @@ public class TileEntityLaserRelayItemAdvanced extends TileEntityLaserRelayItem i @Override public Component getDisplayName() { - return TextComponent.EMPTY; + return Component.empty(); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLongRangeBreaker.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLongRangeBreaker.java index 021e5aac0..c6e4b7eeb 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLongRangeBreaker.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityLongRangeBreaker.java @@ -19,7 +19,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; @@ -148,7 +147,7 @@ public class TileEntityLongRangeBreaker extends TileEntityInventoryBase implemen @Override public Component getDisplayName() { - return TextComponent.EMPTY; + return Component.empty(); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java index 14daa11a7..120c14417 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityOilGenerator.java @@ -19,7 +19,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; @@ -31,8 +30,8 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; -import net.minecraftforge.fluids.FluidAttributes; import net.minecraftforge.fluids.FluidStack; +import net.minecraftforge.fluids.FluidType; import net.minecraftforge.fluids.capability.IFluidHandler; import net.minecraftforge.fluids.capability.templates.FluidTank; @@ -42,7 +41,7 @@ import javax.annotation.Nullable; public class TileEntityOilGenerator extends TileEntityBase implements ISharingEnergyProvider, ISharingFluidHandler, MenuProvider { public final CustomEnergyStorage storage = new CustomEnergyStorage(50000, 0, CommonConfig.Machines.OIL_GENERATOR_TRANSFER.get()); public final LazyOptional lazyEnergy = LazyOptional.of(() -> this.storage); - public final FluidTank tank = new FluidTank(2 * FluidAttributes.BUCKET_VOLUME, fluid -> getRecipeForFluid(fluid) != null) { + public final FluidTank tank = new FluidTank(2 * FluidType.BUCKET_VOLUME, fluid -> getRecipeForFluid(fluid) != null) { @Nonnull @Override public FluidStack drain(FluidStack resource, FluidAction action) { @@ -224,7 +223,7 @@ public class TileEntityOilGenerator extends TileEntityBase implements ISharingEn @Override public Component getDisplayName() { - return new TranslatableComponent("container.actuallyadditions.oilGenerator"); + return Component.translatable("container.actuallyadditions.oilGenerator"); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java index ea1cf69ab..1cce4763e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomEnergyface.java @@ -18,7 +18,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.energy.CapabilityEnergy; +import net.minecraftforge.common.capabilities.ForgeCapabilities; public class TileEntityPhantomEnergyface extends TileEntityPhantomface implements ISharingEnergyProvider { @@ -45,7 +45,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement BlockEntity tile = this.level.getBlockEntity(this.boundPosition); if (tile != null && !(tile instanceof TileEntityLaserRelayEnergy)) { for (Direction facing : Direction.values()) { - if (tile.getCapability(CapabilityEnergy.ENERGY, facing).isPresent()) { + if (tile.getCapability(ForgeCapabilities.ENERGY, facing).isPresent()) { return true; } } @@ -56,7 +56,7 @@ public class TileEntityPhantomEnergyface extends TileEntityPhantomface implement @Override protected boolean isCapabilitySupported(Capability capability) { - return capability == CapabilityEnergy.ENERGY; + return capability == ForgeCapabilities.ENERGY; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomItemface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomItemface.java index 38ffdf134..810a4c46b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomItemface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomItemface.java @@ -20,7 +20,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.items.CapabilityItemHandler; +import net.minecraftforge.common.capabilities.ForgeCapabilities; public class TileEntityPhantomItemface extends TileEntityPhantomface { @@ -52,7 +52,7 @@ public class TileEntityPhantomItemface extends TileEntityPhantomface { BlockEntity tile = this.level.getBlockEntity(this.getBoundPosition()); if (tile != null) { for (Direction facing : Direction.values()) { - if (tile.getCapability(CapabilityItemHandler.ITEM_HANDLER_CAPABILITY, facing).isPresent()) { + if (tile.getCapability(ForgeCapabilities.ITEM_HANDLER, facing).isPresent()) { return true; } } @@ -63,7 +63,7 @@ public class TileEntityPhantomItemface extends TileEntityPhantomface { @Override protected boolean isCapabilitySupported(Capability capability) { - return capability == CapabilityItemHandler.ITEM_HANDLER_CAPABILITY; + return capability == ForgeCapabilities.ITEM_HANDLER; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java index 27bf1587c..0bf693d26 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomLiquiface.java @@ -18,7 +18,7 @@ import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.common.capabilities.Capability; -import net.minecraftforge.fluids.capability.CapabilityFluidHandler; +import net.minecraftforge.common.capabilities.ForgeCapabilities; public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements ISharingFluidHandler { @@ -45,7 +45,7 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements BlockEntity tile = this.level.getBlockEntity(this.boundPosition); if (tile != null && !(tile instanceof TileEntityLaserRelayFluids)) { for (Direction facing : Direction.values()) { - if (tile.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, facing).isPresent()) { + if (tile.getCapability(ForgeCapabilities.FLUID_HANDLER, facing).isPresent()) { return true; } } @@ -56,7 +56,7 @@ public class TileEntityPhantomLiquiface extends TileEntityPhantomface implements @Override protected boolean isCapabilitySupported(Capability capability) { - return capability == CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY; + return capability == ForgeCapabilities.FLUID_HANDLER; } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java index c075857ec..78242b1f5 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPhantomPlacer.java @@ -24,7 +24,6 @@ import net.minecraft.core.Direction; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; @@ -239,7 +238,7 @@ public class TileEntityPhantomPlacer extends TileEntityInventoryBase implements @Override public Component getDisplayName() { - return TextComponent.EMPTY; + return Component.empty(); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java index 08e3392bf..686bb0c40 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPlayerInterface.java @@ -20,8 +20,8 @@ import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.wrapper.PlayerInvWrapper; @@ -93,7 +93,7 @@ public class TileEntityPlayerInterface extends TileEntityBase implements IEnergy ItemStack slot = player.getInventory().getItem(i); if (StackUtil.isValid(slot) && slot.getCount() == 1) { - int received = slot.getCapability(CapabilityEnergy.ENERGY).map(cap -> cap.receiveEnergy(tile.storage.getEnergyStored(), false)).orElse(0); + int received = slot.getCapability(ForgeCapabilities.ENERGY).map(cap -> cap.receiveEnergy(tile.storage.getEnergyStored(), false)).orElse(0); if (received > 0) { tile.storage.extractEnergyInternal(received, false); } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPoweredFurnace.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPoweredFurnace.java index e50bd7295..5d0ce9930 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPoweredFurnace.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityPoweredFurnace.java @@ -22,13 +22,11 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.AbstractContainerMenu; import net.minecraft.world.item.ItemStack; -import net.minecraft.world.item.crafting.AbstractCookingRecipe; import net.minecraft.world.item.crafting.RecipeType; import net.minecraft.world.item.crafting.SmeltingRecipe; import net.minecraft.world.level.Level; @@ -196,7 +194,7 @@ public class TileEntityPoweredFurnace extends TileEntityInventoryBase implements } public Optional getOutputForInput(ItemStack stack) { - return level.getServer().getRecipeManager().getRecipeFor(RecipeType.SMELTING, new SingleItem(stack), level).map(AbstractCookingRecipe::getResultItem); + return level.getServer().getRecipeManager().getRecipeFor(RecipeType.SMELTING, new SingleItem(stack), level).map(recipe -> recipe.getResultItem(this.level.registryAccess())); } public Optional getRecipeForInput(ItemStack stack) { @@ -218,7 +216,7 @@ public class TileEntityPoweredFurnace extends TileEntityInventoryBase implements ItemStack output = this.inv.getStackInSlot(theOutput); if (!input.isEmpty()) { Optional recipe = getRecipeForInput(input); - return recipe.map($ -> output.isEmpty() || output.sameItem($.getResultItem()) && output.getCount() <= output.getMaxStackSize() - $.getResultItem().getCount()).orElse(false); + return recipe.map($ -> output.isEmpty() || ItemStack.isSameItem(output, $.getResultItem(this.level.registryAccess())) && output.getCount() <= output.getMaxStackSize() - $.getResultItem(this.level.registryAccess()).getCount()).orElse(false); } return false; } @@ -258,7 +256,7 @@ public class TileEntityPoweredFurnace extends TileEntityInventoryBase implements @Nonnull @Override public Component getDisplayName() { - return new TranslatableComponent("container.actuallyadditions.powered_furnace"); + return Component.translatable("container.actuallyadditions.powered_furnace"); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java index 022979ba5..12c890d7e 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityRangedCollector.java @@ -19,7 +19,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.item.ItemEntity; @@ -117,7 +116,7 @@ public class TileEntityRangedCollector extends TileEntityInventoryBase implement @Override public Component getDisplayName() { - return TextComponent.EMPTY; + return Component.empty(); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityVerticalDigger.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityVerticalDigger.java index ec4c3f0d2..51c228ac2 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityVerticalDigger.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityVerticalDigger.java @@ -13,7 +13,6 @@ package de.ellpeck.actuallyadditions.mod.tile; import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks; import de.ellpeck.actuallyadditions.mod.config.values.ConfigStringListValues; import de.ellpeck.actuallyadditions.mod.inventory.ContainerMiner; -import de.ellpeck.actuallyadditions.mod.items.DrillItem; import de.ellpeck.actuallyadditions.mod.network.gui.IButtonReactor; import de.ellpeck.actuallyadditions.mod.util.AssetUtil; import de.ellpeck.actuallyadditions.mod.util.ItemStackHandlerAA.IAcceptor; @@ -23,7 +22,6 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.server.level.ServerLevel; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.player.Inventory; @@ -43,6 +41,7 @@ import net.minecraftforge.common.util.FakePlayerFactory; import net.minecraftforge.common.util.LazyOptional; import net.minecraftforge.energy.IEnergyStorage; import net.minecraftforge.fluids.IFluidBlock; +import net.minecraftforge.registries.ForgeRegistries; import javax.annotation.Nullable; import java.util.List; @@ -190,7 +189,7 @@ public class TileEntityVerticalDigger extends TileEntityInventoryBase implements // } // } - String reg = block.getRegistryName().toString(); + String reg = ForgeRegistries.BLOCKS.getKey(block).toString(); if (!reg.isEmpty()) { for (String string : ConfigStringListValues.MINER_EXTRA_WHITELIST.getValue()) { if (reg.equals(string)) { @@ -211,7 +210,7 @@ public class TileEntityVerticalDigger extends TileEntityInventoryBase implements } private boolean isBlacklisted(Block block) { - String reg = block.getRegistryName().toString(); + String reg = ForgeRegistries.BLOCKS.getKey(block).toString(); if (!reg.isEmpty()) { for (String string : ConfigStringListValues.MINER_BLACKLIST.getValue()) { if (reg.equals(string)) { @@ -256,7 +255,7 @@ public class TileEntityVerticalDigger extends TileEntityInventoryBase implements @Override public Component getDisplayName() { - return TextComponent.EMPTY; + return Component.empty(); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java index 2912c3a52..796f4619d 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/tile/TileEntityXPSolidifier.java @@ -21,7 +21,6 @@ import de.ellpeck.actuallyadditions.mod.util.StackUtil; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.network.chat.Component; -import net.minecraft.network.chat.TextComponent; import net.minecraft.util.Mth; import net.minecraft.world.MenuProvider; import net.minecraft.world.entity.ExperienceOrb; @@ -224,7 +223,7 @@ public class TileEntityXPSolidifier extends TileEntityInventoryBase implements I @Override public Component getDisplayName() { - return TextComponent.EMPTY; + return Component.empty(); } @Nullable diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java index 2e47e0f10..a2260c9df 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/AssetUtil.java @@ -16,8 +16,7 @@ import com.mojang.blaze3d.vertex.BufferBuilder; import com.mojang.blaze3d.vertex.PoseStack; import com.mojang.blaze3d.vertex.Tesselator; import com.mojang.blaze3d.vertex.VertexConsumer; -import com.mojang.math.Matrix4f; -import com.mojang.math.Vector3f; +import com.mojang.math.Axis; import de.ellpeck.actuallyadditions.mod.ActuallyAdditions; import de.ellpeck.actuallyadditions.mod.blocks.render.RenderTypes; import de.ellpeck.actuallyadditions.mod.network.PacketHandler; @@ -26,9 +25,9 @@ import de.ellpeck.actuallyadditions.mod.tile.TileEntityAtomicReconstructor; import de.ellpeck.actuallyadditions.mod.tile.TileEntityBase; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.Font; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.renderer.LightTexture; import net.minecraft.client.renderer.MultiBufferSource; -import net.minecraft.client.renderer.block.model.ItemTransforms; import net.minecraft.client.renderer.entity.ItemRenderer; import net.minecraft.client.renderer.texture.TextureAtlas; import net.minecraft.client.renderer.texture.TextureManager; @@ -38,6 +37,7 @@ import net.minecraft.core.BlockPos; import net.minecraft.core.NonNullList; import net.minecraft.nbt.CompoundTag; import net.minecraft.resources.ResourceLocation; +import net.minecraft.world.item.ItemDisplayContext; import net.minecraft.world.item.ItemStack; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.entity.BlockEntity; @@ -46,6 +46,7 @@ import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.client.ForgeHooksClient; import net.minecraftforge.network.PacketDistributor; +import org.joml.Matrix4f; public final class AssetUtil { @@ -63,13 +64,13 @@ public final class AssetUtil { } @OnlyIn(Dist.CLIENT) - public static void displayNameString(PoseStack matrices, Font font, int xSize, int yPositionOfMachineText, String text) { - font.draw(matrices, text, xSize / 2f - font.width(text) / 2f, yPositionOfMachineText, 0xFFFFFF); + public static void displayNameString(GuiGraphics guiGraphics, Font font, int xSize, int yPositionOfMachineText, String text) { + guiGraphics.drawString(font, text, xSize / 2f - font.width(text) / 2f, yPositionOfMachineText, 0xFFFFFF, false); } @OnlyIn(Dist.CLIENT) - public static void displayNameString(PoseStack matrices, Font font, int xSize, int yPositionOfMachineText, TileEntityBase tile) { - displayNameString(matrices, font, xSize, yPositionOfMachineText, I18n.get(tile.getNameForTranslation())); + public static void displayNameString(GuiGraphics guiGraphics, Font font, int xSize, int yPositionOfMachineText, TileEntityBase tile) { + displayNameString(guiGraphics, font, xSize, yPositionOfMachineText, I18n.get(tile.getNameForTranslation())); } // public static void renderBlockInWorld(Block block, int meta) { @@ -80,7 +81,7 @@ public final class AssetUtil { public static void renderItemInWorld(ItemStack stack, int combinedLight, int combinedOverlay, PoseStack matrices, MultiBufferSource buffer) { if (!stack.isEmpty()) { Minecraft.getInstance().getItemRenderer().renderStatic( - stack, ItemTransforms.TransformType.FIXED, combinedLight, combinedOverlay, matrices, buffer, 0 + stack, ItemDisplayContext.FIXED, combinedLight, combinedOverlay, matrices, buffer, null, 0 ); } } @@ -114,8 +115,8 @@ public final class AssetUtil { RenderSystem.enableBlend(); // RenderSystem.pushMatrix(); matrices.pushPose(); - model = ForgeHooksClient.handleCameraTransforms(matrices, model, ItemTransforms.TransformType.FIXED, false); - renderer.render(stack, ItemTransforms.TransformType.FIXED, false, matrices, bufferSource, + model = ForgeHooksClient.handleCameraTransforms(matrices, model, ItemDisplayContext.FIXED, false); + renderer.render(stack, ItemDisplayContext.FIXED, false, matrices, bufferSource, combinedOverlay, combinedLight, model); // RenderSystem.popMatrix(); matrices.popPose(); @@ -238,7 +239,7 @@ public final class AssetUtil { @OnlyIn(Dist.CLIENT) public static void spawnLaserWithTimeClient(double startX, double startY, double startZ, double endX, double endY, double endZ, int color, int maxAge, double rotationTime, float size, float alpha) { Minecraft mc = Minecraft.getInstance(); - BlockEntity tile = mc.level.getBlockEntity(new BlockPos(startX, startY, startZ)); + BlockEntity tile = mc.level.getBlockEntity(BlockPos.containing(startX, startY, startZ)); if(tile instanceof TileEntityAtomicReconstructor) ((TileEntityAtomicReconstructor) tile).resetBeam(maxAge, color); @@ -271,9 +272,9 @@ public final class AssetUtil { matrixStack.translate(0.5f, 0.5f, 0.5f); matrixStack.translate(offX, offY, offZ); - matrixStack.mulPose(Vector3f.YP.rotationDegrees(yaw)); - matrixStack.mulPose(Vector3f.XP.rotationDegrees(pitch)); - matrixStack.mulPose(Vector3f.ZP.rotationDegrees(roll)); + matrixStack.mulPose(Axis.YP.rotationDegrees(yaw)); + matrixStack.mulPose(Axis.XP.rotationDegrees(pitch)); + matrixStack.mulPose(Axis.ZP.rotationDegrees(roll)); Matrix4f matrix = matrixStack.last().pose(); @@ -436,22 +437,23 @@ public final class AssetUtil { } @OnlyIn(Dist.CLIENT) - public static void renderTextInWorld(PoseStack matrixStack, double offsetX, double offsetY, double offsetZ, NonNullList text, int color) { - matrixStack.pushPose(); - matrixStack.translate(offsetX,offsetY,offsetZ); - matrixStack.scale(-1, -1, 1); - matrixStack.mulPose(Vector3f.YP.rotationDegrees(Minecraft.getInstance().cameraEntity.getYRot())); - matrixStack.scale(0.01F, 0.01F, 0.01F); + public static void renderTextInWorld(GuiGraphics guiGraphics, double offsetX, double offsetY, double offsetZ, NonNullList text, int color) { + PoseStack matrices = guiGraphics.pose(); + matrices.pushPose(); + matrices.translate(offsetX,offsetY,offsetZ); + matrices.scale(-1, -1, 1); + matrices.mulPose(Axis.YP.rotationDegrees(Minecraft.getInstance().cameraEntity.getYRot())); + matrices.scale(0.01F, 0.01F, 0.01F); Font font = Minecraft.getInstance().font; int y = 0; for (String s : text) { - font.draw(matrixStack, s, 0, y, color); + guiGraphics.drawString(font, s, 0, y, color); y+= 10; } - matrixStack.popPose(); + matrices.popPose(); } public static float[] getWheelColor(float pos) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemUtil.java index 7779515b2..79f0bdf3b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/ItemUtil.java @@ -48,7 +48,7 @@ public final class ItemUtil { @Deprecated public static boolean areItemsEqual(ItemStack stack1, ItemStack stack2, boolean checkWildcard) { - return stack1.sameItem(stack2); + return ItemStack.isSameItem(stack1,stack2); //return StackUtil.isValid(stack1) && StackUtil.isValid(stack2) && (stack1.isItemEqual(stack2) || checkWildcard && stack1.getItem() == stack2.getItem() && (stack1.getItemDamage() == Util.WILDCARD || stack2.getItemDamage() == Util.WILDCARD)); } @@ -75,7 +75,7 @@ public final class ItemUtil { } public static boolean canBeStacked(ItemStack stack1, ItemStack stack2) { - return ItemStack.isSame(stack1, stack2) && ItemStack.tagMatches(stack1, stack2); + return ItemStack.isSameItemSameTags(stack1, stack2); } public static boolean isEnabled(ItemStack stack) { diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/NetHandlerSpaghettiServer.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/NetHandlerSpaghettiServer.java index a0ed8500c..d7835f40b 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/NetHandlerSpaghettiServer.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/NetHandlerSpaghettiServer.java @@ -1,12 +1,10 @@ package de.ellpeck.actuallyadditions.mod.util; -import io.netty.util.concurrent.Future; -import io.netty.util.concurrent.GenericFutureListener; import net.minecraft.network.Connection; +import net.minecraft.network.PacketSendListener; import net.minecraft.network.chat.Component; import net.minecraft.network.protocol.Packet; import net.minecraft.network.protocol.PacketFlow; -import net.minecraft.network.protocol.game.ClientboundPlayerPositionPacket; import net.minecraft.network.protocol.game.ServerboundAcceptTeleportationPacket; import net.minecraft.network.protocol.game.ServerboundBlockEntityTagQuery; import net.minecraft.network.protocol.game.ServerboundChangeDifficultyPacket; @@ -52,6 +50,7 @@ import net.minecraft.network.protocol.game.ServerboundTeleportToEntityPacket; import net.minecraft.network.protocol.game.ServerboundUseItemOnPacket; import net.minecraft.network.protocol.game.ServerboundUseItemPacket; import net.minecraft.server.network.ServerGamePacketListenerImpl; +import net.minecraft.world.entity.RelativeMovement; import net.minecraftforge.common.util.FakePlayer; import javax.annotation.Nullable; @@ -152,7 +151,8 @@ public class NetHandlerSpaghettiServer extends ServerGamePacketListenerImpl { } @Override - public void teleport(double p_175089_1_, double p_175089_3_, double p_175089_5_, float p_175089_7_, float p_175089_8_, Set p_175089_9_) { + public void teleport(double pX, double pY, double pZ, float pYaw, float pPitch, Set pRelativeSet) { + } @Override @@ -188,7 +188,7 @@ public class NetHandlerSpaghettiServer extends ServerGamePacketListenerImpl { } @Override - public void send(Packet p_211148_1_, @Nullable GenericFutureListener> p_211148_2_) { + public void send(Packet pPacket, @Nullable PacketSendListener pListener) { } @Override diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/StackUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/StackUtil.java index 8fbb0597a..e51efc290 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/StackUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/StackUtil.java @@ -184,7 +184,7 @@ public final class StackUtil { ItemStack sc = s.copy(); s.shrink(i); if (s.isEmpty()) { - return sc.getItem().getContainerItem(sc); + return sc.getItem().getCraftingRemainingItem(sc); } return s; } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java index 7c646177d..6c04c0d90 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/StringUtil.java @@ -12,6 +12,7 @@ package de.ellpeck.actuallyadditions.mod.util; import com.mojang.blaze3d.vertex.PoseStack; import net.minecraft.client.gui.Font; +import net.minecraft.client.gui.GuiGraphics; import net.minecraft.client.resources.language.I18n; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -47,14 +48,15 @@ public final class StringUtil { // } @OnlyIn(Dist.CLIENT) - public static void renderScaledString(PoseStack matrices, Font font, String text, float x, float y, int color, boolean shadow, float scale) { + public static void renderScaledString(GuiGraphics guiGraphics, Font font, String text, float x, float y, int color, boolean shadow, float scale) { + PoseStack matrices = guiGraphics.pose(); matrices.pushPose(); matrices.translate(x, y, 0); matrices.scale(scale, scale, 1.0F); if (shadow) - font.drawShadow(matrices, text, 0, 0, color); + guiGraphics.drawString(font, text, 0, 0, color); else - font.draw(matrices, text, x, y, color); + guiGraphics.drawString(font, text, x, y, color, false); matrices.popPose(); } } diff --git a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java index 4a0334249..edda47bcd 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java +++ b/src/main/java/de/ellpeck/actuallyadditions/mod/util/WorldUtil.java @@ -30,20 +30,18 @@ import net.minecraft.world.level.block.Blocks; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.properties.BlockStateProperties; -import net.minecraft.world.level.material.Material; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.HitResult; import net.minecraft.world.phys.Vec3; import net.minecraftforge.common.ForgeHooks; import net.minecraftforge.common.MinecraftForge; +import net.minecraftforge.common.capabilities.ForgeCapabilities; import net.minecraftforge.common.util.FakePlayer; import net.minecraftforge.common.util.FakePlayerFactory; import net.minecraftforge.common.util.LazyOptional; -import net.minecraftforge.energy.CapabilityEnergy; import net.minecraftforge.energy.IEnergyStorage; -import net.minecraftforge.event.world.BlockEvent.BreakEvent; +import net.minecraftforge.event.level.BlockEvent.BreakEvent; import net.minecraftforge.fluids.FluidStack; -import net.minecraftforge.fluids.capability.CapabilityFluidHandler; import net.minecraftforge.fluids.capability.IFluidHandler; import java.util.ArrayList; @@ -120,8 +118,8 @@ public final class WorldUtil { Direction opp = sideTo == null ? null : sideTo.getOpposite(); - LazyOptional handlerFrom = tileFrom.getCapability(CapabilityEnergy.ENERGY, sideTo); - LazyOptional handlerTo = tileTo.getCapability(CapabilityEnergy.ENERGY, opp); + LazyOptional handlerFrom = tileFrom.getCapability(ForgeCapabilities.ENERGY, sideTo); + LazyOptional handlerTo = tileTo.getCapability(ForgeCapabilities.ENERGY, opp); handlerFrom.ifPresent((from) -> { handlerTo.ifPresent((to) -> { int drain = from.extractEnergy(maxTransfer, true); @@ -136,8 +134,8 @@ public final class WorldUtil { public static void doFluidInteraction(BlockEntity tileFrom, BlockEntity tileTo, Direction sideTo, int maxTransfer) { if (maxTransfer > 0) { - LazyOptional optionalFrom = tileFrom.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, sideTo); - LazyOptional optionalTo = tileTo.getCapability(CapabilityFluidHandler.FLUID_HANDLER_CAPABILITY, sideTo.getOpposite()); + LazyOptional optionalFrom = tileFrom.getCapability(ForgeCapabilities.FLUID_HANDLER, sideTo); + LazyOptional optionalTo = tileTo.getCapability(ForgeCapabilities.FLUID_HANDLER, sideTo.getOpposite()); optionalFrom.ifPresent((from) -> { optionalTo.ifPresent((to) -> { FluidStack drain = from.drain(maxTransfer, IFluidHandler.FluidAction.SIMULATE); @@ -242,12 +240,12 @@ public final class WorldUtil { return state.getValue(BlockStateProperties.FACING); } - public static ArrayList getMaterialsAround(Level level, BlockPos pos) { - ArrayList blocks = new ArrayList<>(); - blocks.add(level.getBlockState(pos.relative(Direction.NORTH)).getMaterial()); - blocks.add(level.getBlockState(pos.relative(Direction.EAST)).getMaterial()); - blocks.add(level.getBlockState(pos.relative(Direction.SOUTH)).getMaterial()); - blocks.add(level.getBlockState(pos.relative(Direction.WEST)).getMaterial()); + public static ArrayList getStatesAround(Level level, BlockPos pos) { + ArrayList blocks = new ArrayList<>(); + blocks.add(level.getBlockState(pos.relative(Direction.NORTH))); + blocks.add(level.getBlockState(pos.relative(Direction.EAST))); + blocks.add(level.getBlockState(pos.relative(Direction.SOUTH))); + blocks.add(level.getBlockState(pos.relative(Direction.WEST))); return blocks; } diff --git a/src/main/resources/META-INF/accesstransformer.cfg b/src/main/resources/META-INF/accesstransformer.cfg new file mode 100644 index 000000000..456baad49 --- /dev/null +++ b/src/main/resources/META-INF/accesstransformer.cfg @@ -0,0 +1,3 @@ +public net.minecraft.world.damagesource.DamageSources *() # DamageSources +public net.minecraft.world.damagesource.DamageSources f_268645_ # damageTypes +public-f net.minecraft.data.recipes.RecipeProvider m_6055_()Ljava/lang/String; # getName \ No newline at end of file diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 1f7524923..694c2f555 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,6 +1,6 @@ modLoader="javafml" -loaderVersion="[40,)" +loaderVersion="[47,)" license="MIT" [[mods]] modId="actuallyadditions" @@ -16,13 +16,13 @@ Do you want Automation? Wireless Transport? Better Machines? A cup o' Coffee? Ch [[dependencies.actuallyadditions]] modId="forge" mandatory=true - versionRange="[40,)" + versionRange="[47,)" ordering="NONE" side="BOTH" [[dependencies.actuallyadditions]] modId="minecraft" mandatory=true - versionRange="[1.18.2,1.21)" + versionRange="[1.20.1,1.21)" ordering="NONE" side="BOTH"