From 3d68bec18ac119deb37226d7d580cb483a7f09fc Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Thu, 28 May 2020 01:29:26 +0200 Subject: [PATCH] Item registrates, and more porty - All Items are now using registrate - Blockzapper now renders an outline around its affected area - Ported rainbow debug :tm: - Reworked the custom item model/renderer system - Schematics now preview their structure again - SuperByteBuffers now support being rendered into non-BufferBuilders --- src/generated/resources/.cache/cache | 66 ++++- .../create/blockstates/rotation_chassis.json | 48 ++-- .../resources/assets/create/lang/en_ud.json | 52 +++- .../resources/assets/create/lang/en_us.json | 51 ++++ .../create/models/item/andesite_alloy.json | 0 .../create/models/item/belt_connector.json} | 2 +- .../assets/create/models/item/brass_hand.json | 0 .../create/models/item/brass_ingot.json | 0 .../create/models/item/brass_nugget.json | 0 .../create/models/item/brass_sheet.json | 0 .../create/models/item/copper_ingot.json | 0 .../create/models/item/copper_nugget.json | 0 .../create/models/item/copper_sheet.json | 0 .../models/item/crafter_slot_cover.json | 6 + .../create/models/item/crushed_brass.json | 0 .../models/item/crushed_copper_ore.json | 6 + .../create/models/item/crushed_gold_ore.json} | 2 +- .../create/models/item/crushed_iron_ore.json | 6 + .../create/models/item/crushed_zinc_ore.json | 6 + .../assets/create/models/item/deforester.json | 3 + .../assets/create/models/item/dough.json | 0 .../create/models/item/electron_tube.json | 0 .../create/models/item/empty_schematic.json} | 2 +- .../item/furnace_minecart_contraption.json | 6 + .../create/models/item/golden_sheet.json} | 2 +- .../models/item/handheld_blockzapper.json | 3 + .../models/item/handheld_worldshaper.json | 3 + .../models/item/integrated_circuit.json | 0 .../assets/create/models/item/iron_sheet.json | 0 .../create/models/item/lapis_sheet.json} | 2 +- .../models/item/minecart_contraption.json | 0 .../models/item/polished_rose_quartz.json | 0 .../create/models/item/powdered_obsidian.json | 6 + .../assets/create/models/item/propeller.json | 0 .../create/models/item/red_sand_paper.json | 0 .../create/models/item/refined_radiance.json | 0 .../create/models/item/rose_quartz.json | 0 .../assets/create/models/item/sand_paper.json | 0 .../assets/create/models/item/schematic.json} | 2 +- .../models/item/schematic_and_quill.json} | 2 +- .../create/models/item/shadow_steel.json | 0 .../assets/create/models/item/super_glue.json | 0 .../create/models/item/tree_fertilizer.json | 0 .../create/models/item/vertical_gearbox.json | 3 + .../create/models/item/wand_of_symmetry.json | 3 + .../create/models/item/wheat_flour.json} | 2 +- .../assets/create/models/item/whisk.json | 0 .../assets/create/models/item/wrench.json | 3 + .../assets/create/models/item/zinc_ingot.json | 0 .../create/models/item/zinc_nugget.json | 0 .../create/advancements/symmetry_wand.json | 4 +- .../create/advancements/upgraded_zapper.json | 2 +- .../data/create/advancements/zapper.json | 4 +- .../data/forge/tags/items/ingots.json | 8 - .../data/forge/tags/items/nuggets.json | 8 - .../data/forge/tags/items/plates.json | 10 - .../data/forge/tags/items/plates/gold.json | 2 +- .../data/forge/tags/items/plates/lapis.json | 6 - .../com/simibubi/create/AllBlockTags.java | 32 --- .../java/com/simibubi/create/AllBlocks.java | 46 +-- .../java/com/simibubi/create/AllItemTags.java | 25 -- .../java/com/simibubi/create/AllItems.java | 249 ----------------- .../java/com/simibubi/create/AllItemsNew.java | 241 ++++++++++++++++ .../com/simibubi/create/AllSpriteShifts.java | 2 +- .../java/com/simibubi/create/AllTags.java | 65 +++++ .../com/simibubi/create/AllTileEntities.java | 34 +-- .../com/simibubi/create/ClientEvents.java | 5 +- src/main/java/com/simibubi/create/Create.java | 5 +- .../com/simibubi/create/CreateClient.java | 76 ++--- .../simibubi/create/compat/jei/CreateJEI.java | 18 +- .../jei/category/BlastingViaFanCategory.java | 4 +- .../category/BlockzapperUpgradeCategory.java | 4 +- .../compat/jei/category/CrushingCategory.java | 4 +- .../compat/jei/category/MillingCategory.java | 15 +- .../MysteriousItemConversionCategory.java | 8 +- .../jei/category/PolishingCategory.java | 6 +- .../compat/jei/category/PressingCategory.java | 4 +- .../jei/category/SmokingViaFanCategory.java | 4 +- .../jei/category/SplashingCategory.java | 4 +- .../simibubi/create/content/AllSections.java | 10 +- .../content/contraptions/KineticDebugger.java | 55 ++-- .../crafter/MechanicalCrafterBlock.java | 15 +- .../crafter/MechanicalCrafterTileEntity.java | 4 +- .../crusher/CrushingWheelBlock.java | 5 - .../components/deployer/DeployerBlock.java | 17 +- .../components/fan/EncasedFanBlock.java | 5 - .../components/fan/EncasedFanTileEntity.java | 2 +- .../mixer/MechanicalMixerBlock.java | 5 - .../components/mixer/MixingRecipe.java | 2 +- .../press/MechanicalPressBlock.java | 4 +- .../BlockMovementTraits.java | 2 +- .../ChassisRangeDisplay.java | 4 +- .../structureMovement/Contraption.java | 4 +- .../structureMovement/ContraptionEntity.java | 2 +- .../bearing/BearingContraption.java | 2 +- .../chassis/AbstractChassisBlock.java | 7 +- .../glue/SuperGlueEntity.java | 6 +- .../glue/SuperGlueHandler.java | 19 +- .../glue/SuperGlueRenderer.java | 8 +- .../mounted/MinecartContraptionItem.java | 65 +++-- .../goggles/GoggleOverlayRenderer.java | 6 +- .../contraptions/goggles/GogglesItem.java | 4 +- .../sequencer/SequencedGearshiftBlock.java | 4 +- .../contraptions/relays/belt/BeltBlock.java | 8 +- .../relays/belt/BeltTileEntity.java | 2 +- .../belt/item/BeltConnectorHandler.java | 6 +- .../relays/belt/transport/BeltInventory.java | 4 +- .../belt/transport/BeltMovementHandler.java | 4 +- .../relays/gearbox/GearboxBlock.java | 8 +- .../relays/gearbox/VerticalGearboxItem.java | 5 + .../contraptions/wrench/WrenchItem.java | 20 +- .../curiosities/ChromaticCompoundColor.java | 28 ++ ...beItem.java => ChromaticCompoundItem.java} | 72 ++--- .../curiosities/symmetry/SymmetryHandler.java | 12 +- .../symmetry/SymmetryWandItem.java | 103 ++++--- .../client/SymmetryWandItemRenderer.java | 4 - .../symmetry/client/SymmetryWandModel.java | 2 +- .../curiosities/tools/AllToolTiers.java | 4 +- .../curiosities/tools/DeforesterItem.java | 17 +- .../curiosities/tools/SandPaperItem.java | 45 ++- .../curiosities/zapper/ZapperItem.java | 92 +++--- .../curiosities/zapper/ZapperScreen.java | 1 - .../zapper/blockzapper/BlockzapperItem.java | 88 +++--- .../zapper/blockzapper/BlockzapperModel.java | 2 +- .../blockzapper/BlockzapperRenderHandler.java | 63 +++++ .../blockzapper/BlockzapperUpgradeRecipe.java | 6 +- ...inzapperItem.java => WorldshaperItem.java} | 25 +- ...erer.java => WorldshaperItemRenderer.java} | 8 +- ...zapperModel.java => WorldshaperModel.java} | 10 +- ...ler.java => WorldshaperRenderHandler.java} | 13 +- ...pperScreen.java => WorldshaperScreen.java} | 4 +- .../belts/BeltAttachableLogisticalBlock.java | 2 +- .../belts/observer/BeltObserverBlock.java | 4 +- .../block/belts/tunnel/BeltTunnelBlock.java | 7 - .../block/diodes/ToggleLatchBlock.java | 12 +- .../logistics/block/funnel/FunnelBlock.java | 4 +- .../block/redstone/RedstoneLinkBlock.java | 5 - .../block/redstone/StockpileSwitchBlock.java | 4 +- .../logistics/item/filter/FilterItem.java | 33 ++- .../content/palettes/AllPaletteBlocks.java | 2 +- .../palettes/PalettesVariantEntry.java | 7 +- .../block/SchematicTableContainer.java | 9 +- .../block/SchematicannonInventory.java | 7 +- .../block/SchematicannonTileEntity.java | 12 +- .../client/SchematicAndQuillHandler.java | 5 +- .../client/SchematicEditScreen.java | 4 +- .../schematics/client/SchematicHandler.java | 18 +- .../schematics/client/SchematicRenderer.java | 102 +++---- .../schematics/client/tools/DeployTool.java | 5 +- .../schematics/client/tools/FlipTool.java | 6 +- .../client/tools/ISchematicTool.java | 6 +- .../client/tools/PlacementToolBase.java | 18 +- .../schematics/client/tools/RotateTool.java | 4 +- .../client/tools/SchematicToolBase.java | 6 +- .../schematics/item/SchematicItem.java | 4 +- .../advancement/AllAdvancements.java | 44 +-- .../foundation/data/AllItemsTagProvider.java | 48 ---- .../create/foundation/data/AssetLookup.java | 8 + .../foundation/data/BuilderTransformers.java | 2 +- .../foundation/data/CreateRegistrate.java | 54 +++- .../create/foundation/data/ITaggable.java | 92 ------ .../create/foundation/data/WindowGen.java | 21 +- .../foundation/item/CreateItemGroupBase.java | 53 ++-- .../foundation/item/CustomItemModels.java | 48 ++++ .../foundation/item/CustomRenderedItems.java | 49 ++++ .../foundation/item/IHaveCustomItemModel.java | 16 -- .../item/IItemWithColorHandler.java | 12 - .../foundation/item/ItemDescription.java | 34 ++- .../create/foundation/item/TooltipHelper.java | 20 +- .../scrollvalue/ScrollValueHandler.java | 4 +- .../scrollvalue/ScrollValueRenderer.java | 5 +- .../foundation/utility/SuperByteBuffer.java | 53 ++-- .../foundation/utility/TessellatorHelper.java | 261 ------------------ .../models/block/deployer/hand_holding.json | 2 +- .../models/block/deployer/hand_pointing.json | 2 +- .../models/block/deployer/hand_punching.json | 2 +- .../models/block/deployer/horizontal.json | 2 +- .../create/models/block/deployer/pole.json | 2 +- .../models/block/deployer/vertical.json | 2 +- .../gearbox/item_vertical.json} | 0 ...erty_filter.json => attribute_filter.json} | 0 .../create/models/item/crushed_zinc.json | 6 - .../create/models/item/deforester/blade.json | 2 +- .../models/item/deforester/deforester.bbmodel | 1 - .../create/models/item/deforester/gear.json | 2 +- .../{deforester.json => deforester/item.json} | 0 .../create/models/item/deforester/light.json | 2 +- .../create/models/item/empty_blueprint.json | 6 - .../item/furnace_minecart_contraption.json | 6 - .../accelerator.json | 2 +- .../amplifier_core.json | 2 +- .../body.json | 2 +- .../chorus_accelerator.json | 2 +- .../chorus_amplifier.json | 2 +- .../chorus_body.json | 2 +- .../chorus_retriever.json | 2 +- .../chorus_scope.json | 2 +- .../core.json | 2 +- .../gold_accelerator.json | 2 +- .../gold_amplifier.json | 2 +- .../gold_body.json | 2 +- .../gold_retriever.json | 2 +- .../gold_scope.json | 2 +- .../item.json} | 0 .../accelerator.json} | 2 +- .../core.json} | 2 +- .../item.json} | 2 +- .../create/models/item/lapis_plate.json | 6 - .../create/models/item/obsidian_dust.json | 6 - .../assets/create/models/item/slot_cover.json | 6 - .../bits.json | 2 +- .../core.json | 2 +- .../item.json} | 0 .../create/models/item/wrench/gear.json | 2 +- .../item/{wrench.json => wrench/item.json} | 0 .../item/{belt.png => belt_connector.png} | Bin ...{slot_cover.png => crafter_slot_cover.png} | Bin ...shed_copper.png => crushed_copper_ore.png} | Bin ...{crushed_gold.png => crushed_gold_ore.png} | Bin ...{crushed_iron.png => crushed_iron_ore.png} | Bin ...{crushed_zinc.png => crushed_zinc_ore.png} | Bin ...lueprint_empty.png => empty_schematic.png} | Bin .../item/furnace_minecart_contraption.png | Bin 0 -> 582 bytes .../item/{gold_sheet.png => golden_sheet.png} | Bin .../item/{lapis_plate.png => lapis_sheet.png} | Bin ...bsidian_dust.png => powdered_obsidian.png} | Bin .../{blueprint_filled.png => schematic.png} | Bin ..._and_quill.png => schematic_and_quill.png} | Bin .../textures/item/unused/TEMPLATE_crushed.png | Bin 395 -> 0 bytes .../textures/item/unused/blaze_brass_cube.png | Bin 423 -> 0 bytes .../textures/item/unused/motion_scarf.png | Bin 603 -> 0 bytes .../textures/item/unused/time_scarf.png | Bin 630 -> 0 bytes .../item/{flour.png => wheat_flour.png} | Bin 233 files changed, 1595 insertions(+), 1705 deletions(-) rename src/{main => generated}/resources/assets/create/models/item/andesite_alloy.json (100%) rename src/{main/resources/assets/create/models/item/crushed_iron.json => generated/resources/assets/create/models/item/belt_connector.json} (55%) rename src/{main => generated}/resources/assets/create/models/item/brass_hand.json (100%) rename src/{main => generated}/resources/assets/create/models/item/brass_ingot.json (100%) rename src/{main => generated}/resources/assets/create/models/item/brass_nugget.json (100%) rename src/{main => generated}/resources/assets/create/models/item/brass_sheet.json (100%) rename src/{main => generated}/resources/assets/create/models/item/copper_ingot.json (100%) rename src/{main => generated}/resources/assets/create/models/item/copper_nugget.json (100%) rename src/{main => generated}/resources/assets/create/models/item/copper_sheet.json (100%) create mode 100644 src/generated/resources/assets/create/models/item/crafter_slot_cover.json rename src/{main => generated}/resources/assets/create/models/item/crushed_brass.json (100%) create mode 100644 src/generated/resources/assets/create/models/item/crushed_copper_ore.json rename src/{main/resources/assets/create/models/item/blueprint.json => generated/resources/assets/create/models/item/crushed_gold_ore.json} (54%) create mode 100644 src/generated/resources/assets/create/models/item/crushed_iron_ore.json create mode 100644 src/generated/resources/assets/create/models/item/crushed_zinc_ore.json create mode 100644 src/generated/resources/assets/create/models/item/deforester.json rename src/{main => generated}/resources/assets/create/models/item/dough.json (100%) rename src/{main => generated}/resources/assets/create/models/item/electron_tube.json (100%) rename src/{main/resources/assets/create/models/item/crushed_copper.json => generated/resources/assets/create/models/item/empty_schematic.json} (54%) create mode 100644 src/generated/resources/assets/create/models/item/furnace_minecart_contraption.json rename src/{main/resources/assets/create/models/item/crushed_gold.json => generated/resources/assets/create/models/item/golden_sheet.json} (56%) create mode 100644 src/generated/resources/assets/create/models/item/handheld_blockzapper.json create mode 100644 src/generated/resources/assets/create/models/item/handheld_worldshaper.json rename src/{main => generated}/resources/assets/create/models/item/integrated_circuit.json (100%) rename src/{main => generated}/resources/assets/create/models/item/iron_sheet.json (100%) rename src/{main/resources/assets/create/models/item/gold_sheet.json => generated/resources/assets/create/models/item/lapis_sheet.json} (56%) rename src/{main => generated}/resources/assets/create/models/item/minecart_contraption.json (100%) rename src/{main => generated}/resources/assets/create/models/item/polished_rose_quartz.json (100%) create mode 100644 src/generated/resources/assets/create/models/item/powdered_obsidian.json rename src/{main => generated}/resources/assets/create/models/item/propeller.json (100%) rename src/{main => generated}/resources/assets/create/models/item/red_sand_paper.json (100%) rename src/{main => generated}/resources/assets/create/models/item/refined_radiance.json (100%) rename src/{main => generated}/resources/assets/create/models/item/rose_quartz.json (100%) rename src/{main => generated}/resources/assets/create/models/item/sand_paper.json (100%) rename src/{main/resources/assets/create/models/item/flour.json => generated/resources/assets/create/models/item/schematic.json} (58%) rename src/{main/resources/assets/create/models/item/blueprint_and_quill.json => generated/resources/assets/create/models/item/schematic_and_quill.json} (52%) rename src/{main => generated}/resources/assets/create/models/item/shadow_steel.json (100%) rename src/{main => generated}/resources/assets/create/models/item/super_glue.json (100%) rename src/{main => generated}/resources/assets/create/models/item/tree_fertilizer.json (100%) create mode 100644 src/generated/resources/assets/create/models/item/vertical_gearbox.json create mode 100644 src/generated/resources/assets/create/models/item/wand_of_symmetry.json rename src/{main/resources/assets/create/models/item/belt_connector.json => generated/resources/assets/create/models/item/wheat_flour.json} (56%) rename src/{main => generated}/resources/assets/create/models/item/whisk.json (100%) create mode 100644 src/generated/resources/assets/create/models/item/wrench.json rename src/{main => generated}/resources/assets/create/models/item/zinc_ingot.json (100%) rename src/{main => generated}/resources/assets/create/models/item/zinc_nugget.json (100%) delete mode 100644 src/generated/resources/data/forge/tags/items/ingots.json delete mode 100644 src/generated/resources/data/forge/tags/items/nuggets.json delete mode 100644 src/generated/resources/data/forge/tags/items/plates.json delete mode 100644 src/generated/resources/data/forge/tags/items/plates/lapis.json delete mode 100644 src/main/java/com/simibubi/create/AllBlockTags.java delete mode 100644 src/main/java/com/simibubi/create/AllItemTags.java delete mode 100644 src/main/java/com/simibubi/create/AllItems.java create mode 100644 src/main/java/com/simibubi/create/AllItemsNew.java create mode 100644 src/main/java/com/simibubi/create/AllTags.java create mode 100644 src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundColor.java rename src/main/java/com/simibubi/create/content/curiosities/{ChromaticCompoundCubeItem.java => ChromaticCompoundItem.java} (69%) create mode 100644 src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperRenderHandler.java rename src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/{TerrainzapperItem.java => WorldshaperItem.java} (78%) rename src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/{TerrainzapperItemRenderer.java => WorldshaperItemRenderer.java} (91%) rename src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/{TerrainzapperModel.java => WorldshaperModel.java} (59%) rename src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/{TerrainZapperRenderHandler.java => WorldshaperRenderHandler.java} (87%) rename src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/{TerrainzapperScreen.java => WorldshaperScreen.java} (98%) delete mode 100644 src/main/java/com/simibubi/create/foundation/data/AllItemsTagProvider.java delete mode 100644 src/main/java/com/simibubi/create/foundation/data/ITaggable.java create mode 100644 src/main/java/com/simibubi/create/foundation/item/CustomItemModels.java create mode 100644 src/main/java/com/simibubi/create/foundation/item/CustomRenderedItems.java delete mode 100644 src/main/java/com/simibubi/create/foundation/item/IHaveCustomItemModel.java delete mode 100644 src/main/java/com/simibubi/create/foundation/item/IItemWithColorHandler.java delete mode 100644 src/main/java/com/simibubi/create/foundation/utility/TessellatorHelper.java rename src/main/resources/assets/create/models/{item/vertical_gearbox.json => block/gearbox/item_vertical.json} (100%) rename src/main/resources/assets/create/models/item/{property_filter.json => attribute_filter.json} (100%) delete mode 100644 src/main/resources/assets/create/models/item/crushed_zinc.json delete mode 100644 src/main/resources/assets/create/models/item/deforester/deforester.bbmodel rename src/main/resources/assets/create/models/item/{deforester.json => deforester/item.json} (100%) delete mode 100644 src/main/resources/assets/create/models/item/empty_blueprint.json delete mode 100644 src/main/resources/assets/create/models/item/furnace_minecart_contraption.json rename src/main/resources/assets/create/models/item/{blockzapper => handheld_blockzapper}/accelerator.json (97%) rename src/main/resources/assets/create/models/item/{blockzapper => handheld_blockzapper}/amplifier_core.json (95%) rename src/main/resources/assets/create/models/item/{blockzapper => handheld_blockzapper}/body.json (98%) rename src/main/resources/assets/create/models/item/{blockzapper => handheld_blockzapper}/chorus_accelerator.json (97%) rename src/main/resources/assets/create/models/item/{blockzapper => handheld_blockzapper}/chorus_amplifier.json (96%) rename src/main/resources/assets/create/models/item/{blockzapper => handheld_blockzapper}/chorus_body.json (98%) rename src/main/resources/assets/create/models/item/{blockzapper => handheld_blockzapper}/chorus_retriever.json (94%) rename src/main/resources/assets/create/models/item/{blockzapper => handheld_blockzapper}/chorus_scope.json (96%) rename src/main/resources/assets/create/models/item/{blockzapper => handheld_blockzapper}/core.json (95%) rename src/main/resources/assets/create/models/item/{blockzapper => handheld_blockzapper}/gold_accelerator.json (97%) rename src/main/resources/assets/create/models/item/{blockzapper => handheld_blockzapper}/gold_amplifier.json (96%) rename src/main/resources/assets/create/models/item/{blockzapper => handheld_blockzapper}/gold_body.json (98%) rename src/main/resources/assets/create/models/item/{blockzapper => handheld_blockzapper}/gold_retriever.json (94%) rename src/main/resources/assets/create/models/item/{blockzapper => handheld_blockzapper}/gold_scope.json (96%) rename src/main/resources/assets/create/models/item/{placement_handgun.json => handheld_blockzapper/item.json} (100%) rename src/main/resources/assets/create/models/item/{blockzapper/terrain_accelerator.json => handheld_worldshaper/accelerator.json} (98%) rename src/main/resources/assets/create/models/item/{blockzapper/terrain_core.json => handheld_worldshaper/core.json} (98%) rename src/main/resources/assets/create/models/item/{terrain_zapper.json => handheld_worldshaper/item.json} (99%) delete mode 100644 src/main/resources/assets/create/models/item/lapis_plate.json delete mode 100644 src/main/resources/assets/create/models/item/obsidian_dust.json delete mode 100644 src/main/resources/assets/create/models/item/slot_cover.json rename src/main/resources/assets/create/models/item/{symmetry_wand => wand_of_symmetry}/bits.json (98%) rename src/main/resources/assets/create/models/item/{symmetry_wand => wand_of_symmetry}/core.json (97%) rename src/main/resources/assets/create/models/item/{symmetry_wand.json => wand_of_symmetry/item.json} (100%) rename src/main/resources/assets/create/models/item/{wrench.json => wrench/item.json} (100%) rename src/main/resources/assets/create/textures/item/{belt.png => belt_connector.png} (100%) rename src/main/resources/assets/create/textures/item/{slot_cover.png => crafter_slot_cover.png} (100%) rename src/main/resources/assets/create/textures/item/{crushed_copper.png => crushed_copper_ore.png} (100%) rename src/main/resources/assets/create/textures/item/{crushed_gold.png => crushed_gold_ore.png} (100%) rename src/main/resources/assets/create/textures/item/{crushed_iron.png => crushed_iron_ore.png} (100%) rename src/main/resources/assets/create/textures/item/{crushed_zinc.png => crushed_zinc_ore.png} (100%) rename src/main/resources/assets/create/textures/item/{blueprint_empty.png => empty_schematic.png} (100%) create mode 100644 src/main/resources/assets/create/textures/item/furnace_minecart_contraption.png rename src/main/resources/assets/create/textures/item/{gold_sheet.png => golden_sheet.png} (100%) rename src/main/resources/assets/create/textures/item/{lapis_plate.png => lapis_sheet.png} (100%) rename src/main/resources/assets/create/textures/item/{obsidian_dust.png => powdered_obsidian.png} (100%) rename src/main/resources/assets/create/textures/item/{blueprint_filled.png => schematic.png} (100%) rename src/main/resources/assets/create/textures/item/{blueprint_and_quill.png => schematic_and_quill.png} (100%) delete mode 100644 src/main/resources/assets/create/textures/item/unused/TEMPLATE_crushed.png delete mode 100644 src/main/resources/assets/create/textures/item/unused/blaze_brass_cube.png delete mode 100644 src/main/resources/assets/create/textures/item/unused/motion_scarf.png delete mode 100644 src/main/resources/assets/create/textures/item/unused/time_scarf.png rename src/main/resources/assets/create/textures/item/{flour.png => wheat_flour.png} (100%) diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index c62faf7b1..efca77cab 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -274,7 +274,7 @@ e8b0a401c10d1ba67ed71ba31bd5f9bc28571b65 assets\create\blockstates\powered_toggl c29213b77ac0c78d8979c5f6188d2b265696f9b9 assets\create\blockstates\redstone_link.json e2990fe70ad5d10437a376e70e167d1856277cc1 assets\create\blockstates\rope.json e14d5f7252105934295b4e156ec0e6d62d3d6b1c assets\create\blockstates\rope_pulley.json -d42b4ead9307a83e2a106cfa440572575e8664b2 assets\create\blockstates\rotation_chassis.json +0133b3765943096c2541538ba927d49501f89e2f assets\create\blockstates\rotation_chassis.json cc4cf3420fa290cb844f9cf4dfdd836aa9b70500 assets\create\blockstates\rotation_speed_controller.json 56b63575c87065bc82eb9410175c501cdf959c66 assets\create\blockstates\saw.json 36592a6542332b35445931e8e9531adf786b63ba assets\create\blockstates\schematicannon.json @@ -323,8 +323,8 @@ c60c3115fd6eeaa3a696428a87a74d184ab7d62d assets\create\blockstates\weathered_lim c77b46d8b459e5c7cc495393546f3fcca8a1fa1d assets\create\blockstates\weathered_limestone_pillar.json 7f39521b211441f5c3e06d60c5978cebe16cacfb assets\create\blockstates\zinc_block.json b7181bcd8182b2f17088e5aa881f374c9c65470c assets\create\blockstates\zinc_ore.json -efa942851f247891194d2c6ecdd8724a23b05aa0 assets\create\lang\en_ud.json -fe4c49a84016a3861a86e116df2c7603d6d4b91f assets\create\lang\en_us.json +ed3d1d71c739bbf457acc152301514e2bb8d221b assets\create\lang\en_ud.json +b60610388c3cfb638bf3d4a635cd3ac9d33beab0 assets\create\lang\en_us.json 846200eb548d3bfa2e77b41039de159b4b6cfb45 assets\create\models\block\acacia_window.json 1930fa3a3c98d53dd19e4ee7f55bc27fd47aa281 assets\create\models\block\acacia_window_pane_noside.json 1763ea2c9b981d187f5031ba608f3d5d3be3986a assets\create\models\block\acacia_window_pane_noside_alt.json @@ -900,6 +900,7 @@ cbc0ebadda4497663437f99622914de678d0ffaf assets\create\models\item\acacia_window 96fcec285c0c26a8cb55e126f8c7053c70ad188b assets\create\models\item\adjustable_pulse_repeater.json 30292e874dd36e45eaeebb8d0bb8c4867866a38b assets\create\models\item\adjustable_repeater.json e7759d9b3cd64d2719a58dc35fc75ca65b9e14fa assets\create\models\item\analog_lever.json +168786b05674b17fb1eea530e3575a6f34edc798 assets\create\models\item\andesite_alloy.json a513af38f164a48fd44693b70a93012f3546caff assets\create\models\item\andesite_bricks.json 851090d21c6e6c67444324d975c6b3270eaf4ff2 assets\create\models\item\andesite_bricks_slab.json d283f86cd05ed378efd82ce46cf49bc83783069b assets\create\models\item\andesite_bricks_stairs.json @@ -911,12 +912,17 @@ b0f664dd6de3d0ee9afcb6223fbcd53b97fa0d65 assets\create\models\item\andesite_cobb 4856d13a72ec0af9f10226b4a4bf0567eb580b9a assets\create\models\item\andesite_cobblestone_wall.json 75b8b00c2418b9660d35a7fabd0774925cf1c02f assets\create\models\item\andesite_pillar.json bf1fc6bdf7fca6f1958a2d3e96202c1cecb50669 assets\create\models\item\basin.json +1da382e7e58eaa9788f5b1d92221ccac573e068f assets\create\models\item\belt_connector.json 695a69d5854e2eb134b55d855bd2b7b18808a01d assets\create\models\item\belt_observer.json 5006164d5bdb17cc5ec9759d7cdaf218e2b45f04 assets\create\models\item\belt_tunnel.json 9044243882cfd49a2827e1b910a4c9b0e46daa47 assets\create\models\item\birch_window.json 6ed49f59ea91068ef68720f43e67a9237594bdf0 assets\create\models\item\birch_window_pane.json 17d340c3678bd24cb085ba49490b2b4cb341a9e7 assets\create\models\item\brass_block.json f5a18f4279c2e845a5967b1c2f9e807c2bb77afb assets\create\models\item\brass_casing.json +361f75a79de5007d7a99ad0a38103c9aa8c3017c assets\create\models\item\brass_hand.json +1786bdffa2ab5a07c88d2797db3d7b54461323c4 assets\create\models\item\brass_ingot.json +a37be4a0ec9bf6c381527403c57ced4f81abd67c assets\create\models\item\brass_nugget.json +14ea6ee4db6e7e76446e331a70b6b6bec31e8eb7 assets\create\models\item\brass_sheet.json 7fcb2a4d0bbe434f269b5bcaffebe410913297be assets\create\models\item\cart_assembler.json 99d64b76b3baa84c3bd4b96ccd3376ca12425950 assets\create\models\item\chiseled_dark_scoria.json 83d3571eacde52568786802b268f24c6578c1e5d assets\create\models\item\chiseled_dolomite.json @@ -929,10 +935,19 @@ b1531a7bd3f7f27b9587d13e818a93dc2d088bc8 assets\create\models\item\clockwork_bea dcb09deae110077bcddf090996b51cc66e9a7de3 assets\create\models\item\cogwheel.json 965a90a882d85dba93b30af9bce7ecf8e68ce747 assets\create\models\item\copper_block.json 759bcb5fe7dfdd628716f9b4ff19a5ab00393381 assets\create\models\item\copper_casing.json +c5bcfba46f5824654dedaa2c5d5f42deb29e3baf assets\create\models\item\copper_ingot.json +3cdb321193355af630ee0e0b18bf24a9469aabad assets\create\models\item\copper_nugget.json 51be7da59368681522de870f1e09036dac55aa77 assets\create\models\item\copper_ore.json +200ef8378a9c014571c414433d4aef73a204dc01 assets\create\models\item\copper_sheet.json d7cb2f7bac8fae893fc5179af8140786a908f3f5 assets\create\models\item\copper_shingles.json +4e9126b349d55c65aa5407f05700579e52101c1f assets\create\models\item\crafter_slot_cover.json 7b333dea353afaa27b182aedc647c9e9e34e92ef assets\create\models\item\creative_crate.json 5b39403f6c81f05e566b621b62e267267de47c41 assets\create\models\item\creative_motor.json +19c8492ced64a872a040005dd212a9a14e20477c assets\create\models\item\crushed_brass.json +8167f2a6d05d65a4ebd809b9c114027862afb38e assets\create\models\item\crushed_copper_ore.json +371f1c74cf327c3c48a4ba1cffd5f6003ba5ab77 assets\create\models\item\crushed_gold_ore.json +604931d2906bc545a468987a4f151d64f20e79de assets\create\models\item\crushed_iron_ore.json +8b9c0aa8aaf979ec85eac59b27799cc1c0cf427a assets\create\models\item\crushed_zinc_ore.json 823c91f63565db54ec3944a1e90e7aee18e41062 assets\create\models\item\crushing_wheel.json dae5cffa4e1263d6a113469f79fba8695fa8232a assets\create\models\item\cuckoo_clock.json f786a43e296d9f10d7c302fe3ae9cddf4ba9984e assets\create\models\item\dark_oak_window.json @@ -947,6 +962,7 @@ b50e3471476783be80f28bb4e3543f5a426b9eb6 assets\create\models\item\dark_scoria_b e67fe11e9036c81f0f54d368b41a971822a84a32 assets\create\models\item\dark_scoria_cobblestone_stairs.json 59c87e6a439fbcbbbb254e07e7b48209ea31e40c assets\create\models\item\dark_scoria_cobblestone_wall.json f5b2995929ac9dca9857d4618660ffa7778d5618 assets\create\models\item\dark_scoria_pillar.json +f06f56ffb1cd7c9a2b81c65f7796726692e5cc59 assets\create\models\item\deforester.json 2104c1276259ab67b94f3d4fe97e14b6bc6941ac assets\create\models\item\deployer.json a97ca9b6fc3e10a9c9409b27458a852222045e4e assets\create\models\item\diorite_bricks.json 7a28bb619d37a37ed82509d2ff395d76b4435961 assets\create\models\item\diorite_bricks_slab.json @@ -967,7 +983,10 @@ f92bc71df40567367d08798a6ea45e7e8d0b07b0 assets\create\models\item\dolomite_cobb be7de1e1529fb2a2e842204136520a760676d4e9 assets\create\models\item\dolomite_cobblestone_stairs.json 6b03f2be8fa1e62a89d59859e7d40f9e45ab8b65 assets\create\models\item\dolomite_cobblestone_wall.json e974cd23a5456baef8b634f2d21fd8c3822931ab assets\create\models\item\dolomite_pillar.json +82b73fafdb8bf4f0706012d5baab44cd0e1aa7bc assets\create\models\item\dough.json a2b3820eb87b5e3eaf0c315c4482ba24d9ebd610 assets\create\models\item\drill.json +36139f3de5fc9e57cb96f2d2daad108bc0635b7b assets\create\models\item\electron_tube.json +3bbf9f6b33ef075fb2e1d20d58a6169e2e942314 assets\create\models\item\empty_schematic.json f2d6b88c3174de01e16da555236727efc33b490c assets\create\models\item\encased_belt.json 250bd0716cc1f04b03892ab74eb0b3a0f32a6158 assets\create\models\item\encased_fan.json e0f9ad7e7d790e9e21a38fa57395fd3ff892359b assets\create\models\item\encased_shaft.json @@ -1013,6 +1032,7 @@ d62b93d3c274d280f3eec22a28b5175943411d25 assets\create\models\item\framed_glass. 1041d462c6e856f7f3f2365c299c0599703d1ed7 assets\create\models\item\framed_glass_pane.json 2dc08da54182756cd3520f1420d0506ab50063e1 assets\create\models\item\funnel.json 0bee2855dc9bad52e941153b87e9c35797c246ee assets\create\models\item\furnace_engine.json +090edb6a728fc3803e870d647c7c4e826faadca0 assets\create\models\item\furnace_minecart_contraption.json 2c1608c114ccc285a84e936dc3f1233c535e1a26 assets\create\models\item\gabbro.json c35900cae8508c292a73239e560cebae17980f96 assets\create\models\item\gabbro_bricks.json b10971277417369f421324b28f0a4b47ce4c8625 assets\create\models\item\gabbro_bricks_slab.json @@ -1025,6 +1045,7 @@ b3d7398dbc16c450928bd76b772c273382687447 assets\create\models\item\gabbro_cobble 20950b692eecfccd77d96678bb3d909d51f6d787 assets\create\models\item\gabbro_pillar.json 6ab0d17f3d02678ed992e188ff09f6b2c00b5b03 assets\create\models\item\gearbox.json 2fe29893d74c176ea35aed73a169c13dd4ddb2a8 assets\create\models\item\gearshift.json +52108a61865dab38133b9f916496ca680ae364ea assets\create\models\item\golden_sheet.json 46d813bcb6676078347383295bb7dbda1d9dd060 assets\create\models\item\granite_bricks.json 032a31c66d3de63595d478165d54b4f562e9831d assets\create\models\item\granite_bricks_slab.json 9d7a989d644af91a4ca5985396375863cc5de6a7 assets\create\models\item\granite_bricks_stairs.json @@ -1034,12 +1055,17 @@ c1bb87fdbbefaf74e1ead186c43417a051ab3965 assets\create\models\item\granite_cobbl 3c5f83809f945134a861d4ea600a1708de58a422 assets\create\models\item\granite_cobblestone_stairs.json e2d8561a8048fe6144362d13478bba4825588810 assets\create\models\item\granite_cobblestone_wall.json b84a947a1b297513c85bb8d2dbbb780304c95e43 assets\create\models\item\granite_pillar.json +cfab82a2cf7495d21778c1de9730a26afbdd523d assets\create\models\item\handheld_blockzapper.json +dee43bf1a9c211a752fac2c07aeba123f7f0c914 assets\create\models\item\handheld_worldshaper.json 398b1a7c76c7bdb6a23b1248fdce98f6d835467f assets\create\models\item\hand_crank.json 74d745d5e702d3561921d3abb763534cee7d1cf7 assets\create\models\item\harvester.json e7ec65ad5be13cae5f7d60836b8df9e4a5baad56 assets\create\models\item\horizontal_framed_glass.json f0e3b2b8a553b6e61746c922c27302dabfff71b6 assets\create\models\item\horizontal_framed_glass_pane.json +771d439eac70b52f593fa7381f2c48729fbdaec7 assets\create\models\item\integrated_circuit.json +d254f47bc185f2a2f01608a875aa63ed2c4ceb0f assets\create\models\item\iron_sheet.json 83fa8699318e51f838b483b40b3e897c34ed53d1 assets\create\models\item\jungle_window.json 34dc05da3edef554dad1cfde834773aecd861293 assets\create\models\item\jungle_window_pane.json +0c9b16c3f5f0a5f77110b3fc2467bde8c1b288b7 assets\create\models\item\lapis_sheet.json bcaaf60d9a853cce90169dabcb36d29a3ce19e18 assets\create\models\item\large_cogwheel.json 281e2b055c6eb6994ca306c8957fc80a98fb5473 assets\create\models\item\layered_andesite.json 7afeb6170b37cb464ea91be18928d21970d556d3 assets\create\models\item\layered_dark_scoria.json @@ -1069,6 +1095,7 @@ eb0053df13e362e0a05be65252944f0c94eab3db assets\create\models\item\linked_extrac f8d0d4b2a890ea7a69ab0c390947b48fe0478d3f assets\create\models\item\mechanical_piston.json 6c2acb80e53256fbb85f76851f335f9248ace6da assets\create\models\item\mechanical_press.json 0eb5726c8c0de462f432411c210d6132b2c446a4 assets\create\models\item\millstone.json +1134bc8ecdfefe5d30ee4973c37aa9a349c368b4 assets\create\models\item\minecart_contraption.json dc43c88dc8ae1f425e1c10f422b09d97719af5bc assets\create\models\item\mossy_andesite.json 4ce9aabf9fa9e9e6af6b4339291e635708bdbcdf assets\create\models\item\mossy_dark_scoria.json d084f03d068d0b8c3b7c4d00014c168f61836770 assets\create\models\item\mossy_diorite.json @@ -1148,6 +1175,7 @@ cee4881472e679583d4ab8c2b3d21280093926af assets\create\models\item\polished_gabb 6c899db964025a4e61245063ba2b917c5e14e5c0 assets\create\models\item\polished_limestone_slab.json 7b7e357c0d9abd524d267b197c3c7c8a031da493 assets\create\models\item\polished_limestone_stairs.json 64119ad6c26e988b3c0886e572b3a6cd16617d8e assets\create\models\item\polished_limestone_wall.json +c2cf33c3b01db2403193c0f187e90d0268d7e82d assets\create\models\item\polished_rose_quartz.json 7f4ada06f5fc6647e6ba7fe3195efc116bfb2189 assets\create\models\item\polished_scoria.json 143139799880ed94c0b41bacfe3dc0a821d96c49 assets\create\models\item\polished_scoria_slab.json e95125318055b8557afd7d108488cf0bdd81fe49 assets\create\models\item\polished_scoria_stairs.json @@ -1157,16 +1185,24 @@ e95125318055b8557afd7d108488cf0bdd81fe49 assets\create\models\item\polished_scor 6d92ee7112aa20e8a1adfe73d8933031c299bed1 assets\create\models\item\polished_weathered_limestone_stairs.json b4995fb4799f33508cd6bf2ded80c0b3e866ad43 assets\create\models\item\polished_weathered_limestone_wall.json ef2c9dcd5f6385a0f0cdc2e9120c984827863100 assets\create\models\item\portable_storage_interface.json +d3cfc1a1137c4bc98848947d425d2972df144c95 assets\create\models\item\powdered_obsidian.json 1e501c1f2e9250aaaadcf17db62646d08177d4e1 assets\create\models\item\powered_latch.json 3a6dfc7f36e31ebfcd650c3144a7f2210e8a4f9f assets\create\models\item\powered_toggle_latch.json +16f363038d5afeae34e0724a6a9f0b8f6e65424a assets\create\models\item\propeller.json 4b8a27ff05ed5331889dfc4b0b4562f3e94b0dfe assets\create\models\item\pulse_repeater.json b9a4ac219a27e60a82f55129f2df5ae6183981e2 assets\create\models\item\redstone_contact.json 52e561abeb954d0349e640566de92ef80ccbf919 assets\create\models\item\redstone_link.json +ba99e2fdb64892f4f479a8ac51c226cb5f71f659 assets\create\models\item\red_sand_paper.json +d9dd4546f4f4c6ed5fef66de9d272d469db4e81f assets\create\models\item\refined_radiance.json 6daff6b82b33374d7add65e352e05ecb2fd9ebdd assets\create\models\item\rope_pulley.json +fc54acc37695f21ef650c8310110407647e9a023 assets\create\models\item\rose_quartz.json 1c76eabeac012b18ef0b7cf2ec7ed794877c1d98 assets\create\models\item\rotation_chassis.json acfbf487ee65c2c58d89cb2644e33fda75751fde assets\create\models\item\rotation_speed_controller.json +be86c8156d55d2f128feb66abd70923b3be765cc assets\create\models\item\sand_paper.json 03027a6080a9f1c2f0d8e4eb09a0f6647bf860de assets\create\models\item\saw.json +69196df5122a27573112dad49b334dea96aafed0 assets\create\models\item\schematic.json 0a1c4080ca572106c19a0ba6e2df4baba5f45d35 assets\create\models\item\schematicannon.json +533483999f61e3b091af567a473875247edaedb3 assets\create\models\item\schematic_and_quill.json 8dd5caa4d7a0ee45bd9b39e09c4503159933d089 assets\create\models\item\schematic_table.json 22a6dfdc3cbb1b6ac20ec123b490e15c72dfbfcf assets\create\models\item\scoria.json 44a99d0a4ec37dd33ea184e0f4b4bd54289eb19f assets\create\models\item\scoria_bricks.json @@ -1179,6 +1215,7 @@ fe8c7476b1386fc05a57a93319f71455ba4cf29b assets\create\models\item\scoria_cobble b0061419cf7b7bd2dd548ff00ee28f1227ee2663 assets\create\models\item\scoria_cobblestone_wall.json 1f0cfa084107c05b010556f609371285295a0d12 assets\create\models\item\scoria_pillar.json 0df94333da5700f01dcf4ffa46e3f3bf26bb8cf7 assets\create\models\item\sequenced_gearshift.json +da72ccdc893fbdd3efa9c22143b88eb756c20e44 assets\create\models\item\shadow_steel.json 106ae694f7e03a218c37003dca8291b1d39b3c55 assets\create\models\item\shaft.json d6fb0d38b1b5bcc199b52ac8889eaecd167f6725 assets\create\models\item\speedometer.json b305e81f1dc5272634745b6e822af40955a2ef28 assets\create\models\item\spruce_window.json @@ -1186,14 +1223,18 @@ b305e81f1dc5272634745b6e822af40955a2ef28 assets\create\models\item\spruce_window 891abc24593d53d282773eca5534065056d89b4c assets\create\models\item\sticky_mechanical_piston.json bbb5773adc23128c70174bfc531af936e6e063e3 assets\create\models\item\stockpile_switch.json bab8f78c319b2a79ed55c5d2a94b521ddaa44996 assets\create\models\item\stressometer.json +29d571a061e3addf92ee51bfc55d96edc3a517a5 assets\create\models\item\super_glue.json b1d3d00ff05908feacad06a86800da96cc9bc65d assets\create\models\item\tiled_glass.json 8a2a81a8cbc52b6021e57107d79a32f73b82d8fe assets\create\models\item\tiled_glass_pane.json f368a48b20fa0948a4dc61cb7169f2a4c8720d65 assets\create\models\item\translation_chassis.json 2b7e6213706c9f107a74971818bafad8902c081c assets\create\models\item\translation_chassis_secondary.json a9f6592275a4c8592e3c88a95fbe88bd93de67c6 assets\create\models\item\transposer.json +c081317f106a2b04700aafde12c57445844c20ab assets\create\models\item\tree_fertilizer.json fb24881c4e92bbb7ffa54a71e0af6b1c66d84829 assets\create\models\item\turntable.json 32f49b724af10c8d7e2ed5a3c82280e83b75f789 assets\create\models\item\vertical_framed_glass.json 5e331da9d4086412f5722923e3008246ed286a00 assets\create\models\item\vertical_framed_glass_pane.json +00c2929de9b7171656bea74e1a6d694c6a45b075 assets\create\models\item\vertical_gearbox.json +2d4a31321cc13f62f5fd73aabdc5fd97e635bfbc assets\create\models\item\wand_of_symmetry.json ae20383b0b0806431d0fdd8ffdd16fe2b0cc61ad assets\create\models\item\water_wheel.json 1d097a315c2817d16c241c86f66bd48e5e52f4b4 assets\create\models\item\weathered_limestone.json fcc8ab312989ec485e2d86b856d81dbafaf0e930 assets\create\models\item\weathered_limestone_bricks.json @@ -1205,7 +1246,12 @@ def7382f3216c59d835ab64f534678f3d31ecc51 assets\create\models\item\weathered_lim 3d26cb5616182ba6926d0bf703119ebfbeacbe31 assets\create\models\item\weathered_limestone_cobblestone_stairs.json 62cba55cef305e8fcbc545363919f75d702a617b assets\create\models\item\weathered_limestone_cobblestone_wall.json 40bed7f5e9e97da45c5d9cebc3fcf87b2b13a808 assets\create\models\item\weathered_limestone_pillar.json +8914910270736f8f15364c623cd08d4638383cc5 assets\create\models\item\wheat_flour.json +0cc80844db689404d4722c93f1002b0bed05edcd assets\create\models\item\whisk.json +2527b52413965a3e84b4718e08a9b8bb30a741ea assets\create\models\item\wrench.json 9365b5cf29e35d070d077c54520f6cc780aeb842 assets\create\models\item\zinc_block.json +9dfaa12884667458f8f727ae7666e7e4e50181d9 assets\create\models\item\zinc_ingot.json +9f9455ccb5fc9e3cbfce73862b46078346a522a5 assets\create\models\item\zinc_nugget.json b1689617190c05ef34bd18456b0c7ae09bb3210f assets\create\models\item\zinc_ore.json 187921fa131b06721bfaf63f2623a28c141aae9a data\create\advancements\andesite_alloy.json 0ea2db7173b5be28b289ea7c9a6a0cf5805c60c7 data\create\advancements\andesite_casing.json @@ -1244,11 +1290,11 @@ c1f162e773518f6b1481221e3e63f9ba33fed647 data\create\advancements\shadow_steel.j 290e1248254abcfd7f1e73906be25662331378ec data\create\advancements\shifting_gears.json 7eac9a5f9f96087a74cab1576c59b1b4a9f99ffe data\create\advancements\speed_gauge.json b457a54be7202999be24bb6bcce534f310489412 data\create\advancements\stress_gauge.json -5e460cc958989e6e72ac5d6604430711d8099690 data\create\advancements\symmetry_wand.json -ff5f41874304e709d6f3a59da00edd033047b81b data\create\advancements\upgraded_zapper.json +1d7fb82b7c05914b399167dc58b84da10f1a5ae3 data\create\advancements\symmetry_wand.json +6b815a2e05e3cd09354e05578515a0060675b67a data\create\advancements\upgraded_zapper.json 50935316d27336ef0858d5a7c5ccc563d288a494 data\create\advancements\water_wheel.json 4513d0c4dd40c948028a3fc8e6f3b4d0356c0a90 data\create\advancements\wrench.json -d9bc04a6d11fb4fac6ed43982d3db5d34e8bdc65 data\create\advancements\zapper.json +33c1224f4f6a7bb0a3439eb0f8b8af9341b62574 data\create\advancements\zapper.json aa22b35bb0564055114dcec6dca8a2d603de2481 data\create\loot_tables\blocks\acacia_window.json 6bd966ac4678affb255d64fe0aea7fc0f2448757 data\create\loot_tables\blocks\acacia_window_pane.json 191b117d0a25940248ed54d419ea0bb0afb482d0 data\create\loot_tables\blocks\adjustable_crate.json @@ -1369,7 +1415,7 @@ e4d0fe35d3441a5815bd4e1357329b284e63ecd8 data\create\loot_tables\blocks\fancy_we f37526c092c645045c22674dea6c7b1ec503c9c3 data\create\loot_tables\blocks\flywheel.json 8fbd865f350c615031ec3f56eb98b51ce3008de3 data\create\loot_tables\blocks\framed_glass.json 44c8bc7271fa367ff052bef242e1ae26fb435175 data\create\loot_tables\blocks\framed_glass_pane.json -205f5899101262f31f5c1a88bb7d954918d08d04 data\create\loot_tables\blocks\funnel.json +ed895ef7dcb97ad9b00d80a4fa9c331229dd532e data\create\loot_tables\blocks\funnel.json 4063880eda871fe63a4eb549a19daecabce849e5 data\create\loot_tables\blocks\furnace_engine.json 1070cba1c0f46cf7ebe31089f35333f5eadda6e4 data\create\loot_tables\blocks\gabbro.json 0356e003d8890d31b89d0ad98e32aae892da71f9 data\create\loot_tables\blocks\gabbro_bricks.json @@ -1578,22 +1624,18 @@ d5ea262a0f5fb210612d22521818e26cf08e591a data\forge\tags\blocks\ores\zinc.json ff1900963bc4cd8ceffa78d58ef1952ceacb2fb7 data\forge\tags\blocks\storage_blocks\brass.json f6c8f34ceb475546dba5cc6ff288863ea795d20b data\forge\tags\blocks\storage_blocks\copper.json 7f71a774800111e50b42de0e6159ed2d2a807d32 data\forge\tags\blocks\storage_blocks\zinc.json -689000fe8dde7ac020ac84875f01a27331ce8f3b data\forge\tags\items\ingots.json 2dfd21017cb51d4bdc18d977a7d16f103cc3a985 data\forge\tags\items\ingots\brass.json 8e0ca32df10a50544f54fbe3dbfe485971b23315 data\forge\tags\items\ingots\copper.json 2f9ac80569a5cc168061742f9e3c36277d4d056e data\forge\tags\items\ingots\zinc.json -28e41220b4d933cb95fe7e4f8d1b062f5922e29c data\forge\tags\items\nuggets.json cc82188fe8d986f4457301ed4f75ae833d263601 data\forge\tags\items\nuggets\brass.json 7affb30e30a252566a77467994b0c99331f1076c data\forge\tags\items\nuggets\copper.json 0d8cb5092ee6ec01ea09324c80d649ba05549799 data\forge\tags\items\nuggets\zinc.json 4a0b13a9835106de9a1dd0a71a02372abb48e7b6 data\forge\tags\items\ores\copper.json d5ea262a0f5fb210612d22521818e26cf08e591a data\forge\tags\items\ores\zinc.json -9db8fecba63944baec58a6059a3c4ce29ef79313 data\forge\tags\items\plates.json 39f0d70ec10597e85df7c4783bbc5e0e4a5ffb80 data\forge\tags\items\plates\brass.json c3dab5fe379bc1b7b10d4a0ba7009eee1b75a27c data\forge\tags\items\plates\copper.json -e5d4131644a084c9dd724e5f0dfa2a418ffee45d data\forge\tags\items\plates\gold.json +fb9bfb4c84ed9cf2da8c4b2fbc4cd4d9f37d3016 data\forge\tags\items\plates\gold.json 04d947ed7a5066f3cfe75a8dc564fe2dca8a9c93 data\forge\tags\items\plates\iron.json -56c0ccf7a6995f41f21e6ab5c0088e61b12e23fc data\forge\tags\items\plates\lapis.json ff1900963bc4cd8ceffa78d58ef1952ceacb2fb7 data\forge\tags\items\storage_blocks\brass.json f6c8f34ceb475546dba5cc6ff288863ea795d20b data\forge\tags\items\storage_blocks\copper.json 7f71a774800111e50b42de0e6159ed2d2a807d32 data\forge\tags\items\storage_blocks\zinc.json diff --git a/src/generated/resources/assets/create/blockstates/rotation_chassis.json b/src/generated/resources/assets/create/blockstates/rotation_chassis.json index 84c795b7a..8667ab9ad 100644 --- a/src/generated/resources/assets/create/blockstates/rotation_chassis.json +++ b/src/generated/resources/assets/create/blockstates/rotation_chassis.json @@ -29,8 +29,8 @@ }, { "when": { - "axis": "x", - "sticky_south": "true" + "sticky_south": "true", + "axis": "x" }, "apply": { "model": "create:block/rotation_chassis_side_x_sticky", @@ -39,8 +39,8 @@ }, { "when": { - "axis": "y", - "sticky_south": "true" + "sticky_south": "true", + "axis": "y" }, "apply": { "model": "create:block/rotation_chassis_side_y_sticky" @@ -48,8 +48,8 @@ }, { "when": { - "axis": "z", - "sticky_south": "true" + "sticky_south": "true", + "axis": "z" }, "apply": { "model": "create:block/rotation_chassis_side_x_sticky", @@ -59,8 +59,8 @@ }, { "when": { - "axis": "x", - "sticky_south": "false" + "sticky_south": "false", + "axis": "x" }, "apply": { "model": "create:block/rotation_chassis_side_x", @@ -69,8 +69,8 @@ }, { "when": { - "axis": "y", - "sticky_south": "false" + "sticky_south": "false", + "axis": "y" }, "apply": { "model": "create:block/rotation_chassis_side_y" @@ -78,8 +78,8 @@ }, { "when": { - "axis": "z", - "sticky_south": "false" + "sticky_south": "false", + "axis": "z" }, "apply": { "model": "create:block/rotation_chassis_side_x", @@ -207,8 +207,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "x" + "axis": "x", + "sticky_east": "true" }, "apply": { "model": "create:block/rotation_chassis_side_x_sticky", @@ -217,8 +217,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "y" + "axis": "y", + "sticky_east": "true" }, "apply": { "model": "create:block/rotation_chassis_side_y_sticky", @@ -227,8 +227,8 @@ }, { "when": { - "sticky_east": "true", - "axis": "z" + "axis": "z", + "sticky_east": "true" }, "apply": { "model": "create:block/rotation_chassis_side_z_sticky" @@ -236,8 +236,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "x" + "axis": "x", + "sticky_east": "false" }, "apply": { "model": "create:block/rotation_chassis_side_x", @@ -246,8 +246,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "y" + "axis": "y", + "sticky_east": "false" }, "apply": { "model": "create:block/rotation_chassis_side_y", @@ -256,8 +256,8 @@ }, { "when": { - "sticky_east": "false", - "axis": "z" + "axis": "z", + "sticky_east": "false" }, "apply": { "model": "create:block/rotation_chassis_side_z" diff --git a/src/generated/resources/assets/create/lang/en_ud.json b/src/generated/resources/assets/create/lang/en_ud.json index a7c591e39..601c47f9d 100644 --- a/src/generated/resources/assets/create/lang/en_ud.json +++ b/src/generated/resources/assets/create/lang/en_ud.json @@ -323,5 +323,55 @@ "block.create.weathered_limestone_cobblestone_wall": "\u05DF\u05DF\u0250M \u01DDuo\u0287s\u01DD\u05DFqqo\u0186 \u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u0265\u0287\u0250\u01DDM", "block.create.weathered_limestone_pillar": "\u0279\u0250\u05DF\u05DF\u0131\u0500 \u01DDuo\u0287s\u01DD\u026F\u0131\uA780 p\u01DD\u0279\u01DD\u0265\u0287\u0250\u01DDM", "block.create.zinc_block": "\u029E\u0254o\u05DF\u15FA \u0254u\u0131Z", - "block.create.zinc_ore": "\u01DD\u0279O \u0254u\u0131Z" + "block.create.zinc_ore": "\u01DD\u0279O \u0254u\u0131Z", + "item.create.andesite_alloy": "\u028Eo\u05DF\u05DF\u2C6F \u01DD\u0287\u0131s\u01DDpu\u2C6F", + "item.create.attribute_filter": "\u0279\u01DD\u0287\u05DF\u0131\u2132 \u01DD\u0287nq\u0131\u0279\u0287\u0287\u2C6F", + "item.create.belt_connector": "\u0287\u05DF\u01DD\u15FA \u05DF\u0250\u0254\u0131u\u0250\u0265\u0254\u01DDW", + "item.create.brass_hand": "pu\u0250H ss\u0250\u0279\u15FA", + "item.create.brass_ingot": "\u0287obuI ss\u0250\u0279\u15FA", + "item.create.brass_nugget": "\u0287\u01DDbbnN ss\u0250\u0279\u15FA", + "item.create.brass_sheet": "\u0287\u01DD\u01DD\u0265S ss\u0250\u0279\u15FA", + "item.create.chromatic_compound": "punod\u026Fo\u0186 \u0254\u0131\u0287\u0250\u026Fo\u0279\u0265\u0186", + "item.create.copper_ingot": "\u0287obuI \u0279\u01DDddo\u0186", + "item.create.copper_nugget": "\u0287\u01DDbbnN \u0279\u01DDddo\u0186", + "item.create.copper_sheet": "\u0287\u01DD\u01DD\u0265S \u0279\u01DDddo\u0186", + "item.create.crafter_slot_cover": "\u0279\u01DD\u028Co\u0186 \u0287o\u05DFS \u0279\u01DD\u0287\u025F\u0250\u0279\u0186", + "item.create.crushed_brass": "ss\u0250\u0279\u15FA p\u01DD\u0265sn\u0279\u0186", + "item.create.crushed_copper_ore": "\u01DD\u0279O \u0279\u01DDddo\u0186 p\u01DD\u0265sn\u0279\u0186", + "item.create.crushed_gold_ore": "\u01DD\u0279O p\u05DFo\u2141 p\u01DD\u0265sn\u0279\u0186", + "item.create.crushed_iron_ore": "\u01DD\u0279O uo\u0279I p\u01DD\u0265sn\u0279\u0186", + "item.create.crushed_zinc_ore": "\u01DD\u0279O \u0254u\u0131Z p\u01DD\u0265sn\u0279\u0186", + "item.create.deforester": "\u0279\u01DD\u0287s\u01DD\u0279o\u025F\u01DD\u15E1", + "item.create.dough": "\u0265bno\u15E1", + "item.create.electron_tube": "\u01DDqn\u27D8 uo\u0279\u0287\u0254\u01DD\u05DF\u018E", + "item.create.empty_schematic": "\u0254\u0131\u0287\u0250\u026F\u01DD\u0265\u0254S \u028E\u0287d\u026F\u018E", + "item.create.filter": "\u0279\u01DD\u0287\u05DF\u0131\u2132", + "item.create.furnace_minecart_contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186 \u0287\u0279\u0250\u0254\u01DDu\u0131W \u01DD\u0254\u0250u\u0279n\u2132", + "item.create.goggles": "s\u01DD\u05DFbbo\u2141 s,\u0279\u01DD\u01DDu\u0131bu\u018E", + "item.create.golden_sheet": "\u0287\u01DD\u01DD\u0265S u\u01DDp\u05DFo\u2141", + "item.create.handheld_blockzapper": "\u0279\u01DDdd\u0250z\u029E\u0254o\u05DF\u15FA p\u05DF\u01DD\u0265pu\u0250H", + "item.create.handheld_worldshaper": "\u0279\u01DDd\u0250\u0265sp\u05DF\u0279oM p\u05DF\u01DD\u0265pu\u0250H", + "item.create.integrated_circuit": "\u0287\u0131n\u0254\u0279\u0131\u0186 p\u01DD\u0287\u0250\u0279b\u01DD\u0287uI", + "item.create.iron_sheet": "\u0287\u01DD\u01DD\u0265S uo\u0279I", + "item.create.lapis_sheet": "\u0287\u01DD\u01DD\u0265S s\u0131d\u0250\uA780", + "item.create.minecart_contraption": "uo\u0131\u0287d\u0250\u0279\u0287uo\u0186 \u0287\u0279\u0250\u0254\u01DDu\u0131W", + "item.create.polished_rose_quartz": "z\u0287\u0279\u0250n\u1F49 \u01DDso\u1D1A p\u01DD\u0265s\u0131\u05DFo\u0500", + "item.create.powdered_obsidian": "u\u0250\u0131p\u0131sqO p\u01DD\u0279\u01DDp\u028Do\u0500", + "item.create.propeller": "\u0279\u01DD\u05DF\u05DF\u01DDdo\u0279\u0500", + "item.create.red_sand_paper": "\u0279\u01DDd\u0250\u0500 pu\u0250S p\u01DD\u1D1A", + "item.create.refined_radiance": "\u01DD\u0254u\u0250\u0131p\u0250\u1D1A p\u01DDu\u0131\u025F\u01DD\u1D1A", + "item.create.rose_quartz": "z\u0287\u0279\u0250n\u1F49 \u01DDso\u1D1A", + "item.create.sand_paper": "\u0279\u01DDd\u0250\u0500 pu\u0250S", + "item.create.schematic": "\u0254\u0131\u0287\u0250\u026F\u01DD\u0265\u0254S", + "item.create.schematic_and_quill": "\u05DF\u05DF\u0131n\u1F49 pu\u2C6F \u0254\u0131\u0287\u0250\u026F\u01DD\u0265\u0254S", + "item.create.shadow_steel": "\u05DF\u01DD\u01DD\u0287S \u028Dop\u0250\u0265S", + "item.create.super_glue": "\u01DDn\u05DF\u2141 \u0279\u01DDdnS", + "item.create.tree_fertilizer": "\u0279\u01DDz\u0131\u05DF\u0131\u0287\u0279\u01DD\u2132 \u01DD\u01DD\u0279\u27D8", + "item.create.vertical_gearbox": "xoq\u0279\u0250\u01DD\u2141 \u05DF\u0250\u0254\u0131\u0287\u0279\u01DD\u039B", + "item.create.wand_of_symmetry": "\u028E\u0279\u0287\u01DD\u026F\u026F\u028ES \u025FO pu\u0250M", + "item.create.wheat_flour": "\u0279no\u05DF\u2132 \u0287\u0250\u01DD\u0265M", + "item.create.whisk": "\u029Es\u0131\u0265M", + "item.create.wrench": "\u0265\u0254u\u01DD\u0279M", + "item.create.zinc_ingot": "\u0287obuI \u0254u\u0131Z", + "item.create.zinc_nugget": "\u0287\u01DDbbnN \u0254u\u0131Z" } \ No newline at end of file diff --git a/src/generated/resources/assets/create/lang/en_us.json b/src/generated/resources/assets/create/lang/en_us.json index 543735496..d78578850 100644 --- a/src/generated/resources/assets/create/lang/en_us.json +++ b/src/generated/resources/assets/create/lang/en_us.json @@ -328,6 +328,57 @@ "block.create.zinc_block": "Zinc Block", "block.create.zinc_ore": "Zinc Ore", + "item.create.andesite_alloy": "Andesite Alloy", + "item.create.attribute_filter": "Attribute Filter", + "item.create.belt_connector": "Mechanical Belt", + "item.create.brass_hand": "Brass Hand", + "item.create.brass_ingot": "Brass Ingot", + "item.create.brass_nugget": "Brass Nugget", + "item.create.brass_sheet": "Brass Sheet", + "item.create.chromatic_compound": "Chromatic Compound", + "item.create.copper_ingot": "Copper Ingot", + "item.create.copper_nugget": "Copper Nugget", + "item.create.copper_sheet": "Copper Sheet", + "item.create.crafter_slot_cover": "Crafter Slot Cover", + "item.create.crushed_brass": "Crushed Brass", + "item.create.crushed_copper_ore": "Crushed Copper Ore", + "item.create.crushed_gold_ore": "Crushed Gold Ore", + "item.create.crushed_iron_ore": "Crushed Iron Ore", + "item.create.crushed_zinc_ore": "Crushed Zinc Ore", + "item.create.deforester": "Deforester", + "item.create.dough": "Dough", + "item.create.electron_tube": "Electron Tube", + "item.create.empty_schematic": "Empty Schematic", + "item.create.filter": "Filter", + "item.create.furnace_minecart_contraption": "Furnace Minecart Contraption", + "item.create.goggles": "Engineer's Goggles", + "item.create.golden_sheet": "Golden Sheet", + "item.create.handheld_blockzapper": "Handheld Blockzapper", + "item.create.handheld_worldshaper": "Handheld Worldshaper", + "item.create.integrated_circuit": "Integrated Circuit", + "item.create.iron_sheet": "Iron Sheet", + "item.create.lapis_sheet": "Lapis Sheet", + "item.create.minecart_contraption": "Minecart Contraption", + "item.create.polished_rose_quartz": "Polished Rose Quartz", + "item.create.powdered_obsidian": "Powdered Obsidian", + "item.create.propeller": "Propeller", + "item.create.red_sand_paper": "Red Sand Paper", + "item.create.refined_radiance": "Refined Radiance", + "item.create.rose_quartz": "Rose Quartz", + "item.create.sand_paper": "Sand Paper", + "item.create.schematic": "Schematic", + "item.create.schematic_and_quill": "Schematic And Quill", + "item.create.shadow_steel": "Shadow Steel", + "item.create.super_glue": "Super Glue", + "item.create.tree_fertilizer": "Tree Fertilizer", + "item.create.vertical_gearbox": "Vertical Gearbox", + "item.create.wand_of_symmetry": "Wand Of Symmetry", + "item.create.wheat_flour": "Wheat Flour", + "item.create.whisk": "Whisk", + "item.create.wrench": "Wrench", + "item.create.zinc_ingot": "Zinc Ingot", + "item.create.zinc_nugget": "Zinc Nugget", + "_": "->------------------------] We aren't in Registrate yet [------------------------<-", diff --git a/src/main/resources/assets/create/models/item/andesite_alloy.json b/src/generated/resources/assets/create/models/item/andesite_alloy.json similarity index 100% rename from src/main/resources/assets/create/models/item/andesite_alloy.json rename to src/generated/resources/assets/create/models/item/andesite_alloy.json diff --git a/src/main/resources/assets/create/models/item/crushed_iron.json b/src/generated/resources/assets/create/models/item/belt_connector.json similarity index 55% rename from src/main/resources/assets/create/models/item/crushed_iron.json rename to src/generated/resources/assets/create/models/item/belt_connector.json index 80447ba62..cf99abfa8 100644 --- a/src/main/resources/assets/create/models/item/crushed_iron.json +++ b/src/generated/resources/assets/create/models/item/belt_connector.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "create:item/crushed_iron" + "layer0": "create:item/belt_connector" } } \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/brass_hand.json b/src/generated/resources/assets/create/models/item/brass_hand.json similarity index 100% rename from src/main/resources/assets/create/models/item/brass_hand.json rename to src/generated/resources/assets/create/models/item/brass_hand.json diff --git a/src/main/resources/assets/create/models/item/brass_ingot.json b/src/generated/resources/assets/create/models/item/brass_ingot.json similarity index 100% rename from src/main/resources/assets/create/models/item/brass_ingot.json rename to src/generated/resources/assets/create/models/item/brass_ingot.json diff --git a/src/main/resources/assets/create/models/item/brass_nugget.json b/src/generated/resources/assets/create/models/item/brass_nugget.json similarity index 100% rename from src/main/resources/assets/create/models/item/brass_nugget.json rename to src/generated/resources/assets/create/models/item/brass_nugget.json diff --git a/src/main/resources/assets/create/models/item/brass_sheet.json b/src/generated/resources/assets/create/models/item/brass_sheet.json similarity index 100% rename from src/main/resources/assets/create/models/item/brass_sheet.json rename to src/generated/resources/assets/create/models/item/brass_sheet.json diff --git a/src/main/resources/assets/create/models/item/copper_ingot.json b/src/generated/resources/assets/create/models/item/copper_ingot.json similarity index 100% rename from src/main/resources/assets/create/models/item/copper_ingot.json rename to src/generated/resources/assets/create/models/item/copper_ingot.json diff --git a/src/main/resources/assets/create/models/item/copper_nugget.json b/src/generated/resources/assets/create/models/item/copper_nugget.json similarity index 100% rename from src/main/resources/assets/create/models/item/copper_nugget.json rename to src/generated/resources/assets/create/models/item/copper_nugget.json diff --git a/src/main/resources/assets/create/models/item/copper_sheet.json b/src/generated/resources/assets/create/models/item/copper_sheet.json similarity index 100% rename from src/main/resources/assets/create/models/item/copper_sheet.json rename to src/generated/resources/assets/create/models/item/copper_sheet.json diff --git a/src/generated/resources/assets/create/models/item/crafter_slot_cover.json b/src/generated/resources/assets/create/models/item/crafter_slot_cover.json new file mode 100644 index 000000000..aead8089a --- /dev/null +++ b/src/generated/resources/assets/create/models/item/crafter_slot_cover.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/crafter_slot_cover" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/crushed_brass.json b/src/generated/resources/assets/create/models/item/crushed_brass.json similarity index 100% rename from src/main/resources/assets/create/models/item/crushed_brass.json rename to src/generated/resources/assets/create/models/item/crushed_brass.json diff --git a/src/generated/resources/assets/create/models/item/crushed_copper_ore.json b/src/generated/resources/assets/create/models/item/crushed_copper_ore.json new file mode 100644 index 000000000..02f7c29b0 --- /dev/null +++ b/src/generated/resources/assets/create/models/item/crushed_copper_ore.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/crushed_copper_ore" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/blueprint.json b/src/generated/resources/assets/create/models/item/crushed_gold_ore.json similarity index 54% rename from src/main/resources/assets/create/models/item/blueprint.json rename to src/generated/resources/assets/create/models/item/crushed_gold_ore.json index a4e80c0b2..44e5efa43 100644 --- a/src/main/resources/assets/create/models/item/blueprint.json +++ b/src/generated/resources/assets/create/models/item/crushed_gold_ore.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "create:item/blueprint_filled" + "layer0": "create:item/crushed_gold_ore" } } \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/crushed_iron_ore.json b/src/generated/resources/assets/create/models/item/crushed_iron_ore.json new file mode 100644 index 000000000..54a2ceabe --- /dev/null +++ b/src/generated/resources/assets/create/models/item/crushed_iron_ore.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/crushed_iron_ore" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/crushed_zinc_ore.json b/src/generated/resources/assets/create/models/item/crushed_zinc_ore.json new file mode 100644 index 000000000..b7ef1e42d --- /dev/null +++ b/src/generated/resources/assets/create/models/item/crushed_zinc_ore.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/crushed_zinc_ore" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/deforester.json b/src/generated/resources/assets/create/models/item/deforester.json new file mode 100644 index 000000000..00fa0cc0c --- /dev/null +++ b/src/generated/resources/assets/create/models/item/deforester.json @@ -0,0 +1,3 @@ +{ + "parent": "create:item/deforester/item" +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/dough.json b/src/generated/resources/assets/create/models/item/dough.json similarity index 100% rename from src/main/resources/assets/create/models/item/dough.json rename to src/generated/resources/assets/create/models/item/dough.json diff --git a/src/main/resources/assets/create/models/item/electron_tube.json b/src/generated/resources/assets/create/models/item/electron_tube.json similarity index 100% rename from src/main/resources/assets/create/models/item/electron_tube.json rename to src/generated/resources/assets/create/models/item/electron_tube.json diff --git a/src/main/resources/assets/create/models/item/crushed_copper.json b/src/generated/resources/assets/create/models/item/empty_schematic.json similarity index 54% rename from src/main/resources/assets/create/models/item/crushed_copper.json rename to src/generated/resources/assets/create/models/item/empty_schematic.json index 6dbd89981..ba58f5579 100644 --- a/src/main/resources/assets/create/models/item/crushed_copper.json +++ b/src/generated/resources/assets/create/models/item/empty_schematic.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "create:item/crushed_copper" + "layer0": "create:item/empty_schematic" } } \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/furnace_minecart_contraption.json b/src/generated/resources/assets/create/models/item/furnace_minecart_contraption.json new file mode 100644 index 000000000..635a09c5b --- /dev/null +++ b/src/generated/resources/assets/create/models/item/furnace_minecart_contraption.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/furnace_minecart_contraption" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/crushed_gold.json b/src/generated/resources/assets/create/models/item/golden_sheet.json similarity index 56% rename from src/main/resources/assets/create/models/item/crushed_gold.json rename to src/generated/resources/assets/create/models/item/golden_sheet.json index d8b33543e..0f58cdeba 100644 --- a/src/main/resources/assets/create/models/item/crushed_gold.json +++ b/src/generated/resources/assets/create/models/item/golden_sheet.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "create:item/crushed_gold" + "layer0": "create:item/golden_sheet" } } \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/handheld_blockzapper.json b/src/generated/resources/assets/create/models/item/handheld_blockzapper.json new file mode 100644 index 000000000..a48ce16e4 --- /dev/null +++ b/src/generated/resources/assets/create/models/item/handheld_blockzapper.json @@ -0,0 +1,3 @@ +{ + "parent": "create:item/handheld_blockzapper/item" +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/handheld_worldshaper.json b/src/generated/resources/assets/create/models/item/handheld_worldshaper.json new file mode 100644 index 000000000..154ecd763 --- /dev/null +++ b/src/generated/resources/assets/create/models/item/handheld_worldshaper.json @@ -0,0 +1,3 @@ +{ + "parent": "create:item/handheld_worldshaper/item" +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/integrated_circuit.json b/src/generated/resources/assets/create/models/item/integrated_circuit.json similarity index 100% rename from src/main/resources/assets/create/models/item/integrated_circuit.json rename to src/generated/resources/assets/create/models/item/integrated_circuit.json diff --git a/src/main/resources/assets/create/models/item/iron_sheet.json b/src/generated/resources/assets/create/models/item/iron_sheet.json similarity index 100% rename from src/main/resources/assets/create/models/item/iron_sheet.json rename to src/generated/resources/assets/create/models/item/iron_sheet.json diff --git a/src/main/resources/assets/create/models/item/gold_sheet.json b/src/generated/resources/assets/create/models/item/lapis_sheet.json similarity index 56% rename from src/main/resources/assets/create/models/item/gold_sheet.json rename to src/generated/resources/assets/create/models/item/lapis_sheet.json index 84fabd09e..885db4f8d 100644 --- a/src/main/resources/assets/create/models/item/gold_sheet.json +++ b/src/generated/resources/assets/create/models/item/lapis_sheet.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "create:item/gold_sheet" + "layer0": "create:item/lapis_sheet" } } \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/minecart_contraption.json b/src/generated/resources/assets/create/models/item/minecart_contraption.json similarity index 100% rename from src/main/resources/assets/create/models/item/minecart_contraption.json rename to src/generated/resources/assets/create/models/item/minecart_contraption.json diff --git a/src/main/resources/assets/create/models/item/polished_rose_quartz.json b/src/generated/resources/assets/create/models/item/polished_rose_quartz.json similarity index 100% rename from src/main/resources/assets/create/models/item/polished_rose_quartz.json rename to src/generated/resources/assets/create/models/item/polished_rose_quartz.json diff --git a/src/generated/resources/assets/create/models/item/powdered_obsidian.json b/src/generated/resources/assets/create/models/item/powdered_obsidian.json new file mode 100644 index 000000000..f67579368 --- /dev/null +++ b/src/generated/resources/assets/create/models/item/powdered_obsidian.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "create:item/powdered_obsidian" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/propeller.json b/src/generated/resources/assets/create/models/item/propeller.json similarity index 100% rename from src/main/resources/assets/create/models/item/propeller.json rename to src/generated/resources/assets/create/models/item/propeller.json diff --git a/src/main/resources/assets/create/models/item/red_sand_paper.json b/src/generated/resources/assets/create/models/item/red_sand_paper.json similarity index 100% rename from src/main/resources/assets/create/models/item/red_sand_paper.json rename to src/generated/resources/assets/create/models/item/red_sand_paper.json diff --git a/src/main/resources/assets/create/models/item/refined_radiance.json b/src/generated/resources/assets/create/models/item/refined_radiance.json similarity index 100% rename from src/main/resources/assets/create/models/item/refined_radiance.json rename to src/generated/resources/assets/create/models/item/refined_radiance.json diff --git a/src/main/resources/assets/create/models/item/rose_quartz.json b/src/generated/resources/assets/create/models/item/rose_quartz.json similarity index 100% rename from src/main/resources/assets/create/models/item/rose_quartz.json rename to src/generated/resources/assets/create/models/item/rose_quartz.json diff --git a/src/main/resources/assets/create/models/item/sand_paper.json b/src/generated/resources/assets/create/models/item/sand_paper.json similarity index 100% rename from src/main/resources/assets/create/models/item/sand_paper.json rename to src/generated/resources/assets/create/models/item/sand_paper.json diff --git a/src/main/resources/assets/create/models/item/flour.json b/src/generated/resources/assets/create/models/item/schematic.json similarity index 58% rename from src/main/resources/assets/create/models/item/flour.json rename to src/generated/resources/assets/create/models/item/schematic.json index eb88f7f82..8346b8975 100644 --- a/src/main/resources/assets/create/models/item/flour.json +++ b/src/generated/resources/assets/create/models/item/schematic.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "create:item/flour" + "layer0": "create:item/schematic" } } \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/blueprint_and_quill.json b/src/generated/resources/assets/create/models/item/schematic_and_quill.json similarity index 52% rename from src/main/resources/assets/create/models/item/blueprint_and_quill.json rename to src/generated/resources/assets/create/models/item/schematic_and_quill.json index 1266c975f..84133c5f9 100644 --- a/src/main/resources/assets/create/models/item/blueprint_and_quill.json +++ b/src/generated/resources/assets/create/models/item/schematic_and_quill.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "create:item/blueprint_and_quill" + "layer0": "create:item/schematic_and_quill" } } \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/shadow_steel.json b/src/generated/resources/assets/create/models/item/shadow_steel.json similarity index 100% rename from src/main/resources/assets/create/models/item/shadow_steel.json rename to src/generated/resources/assets/create/models/item/shadow_steel.json diff --git a/src/main/resources/assets/create/models/item/super_glue.json b/src/generated/resources/assets/create/models/item/super_glue.json similarity index 100% rename from src/main/resources/assets/create/models/item/super_glue.json rename to src/generated/resources/assets/create/models/item/super_glue.json diff --git a/src/main/resources/assets/create/models/item/tree_fertilizer.json b/src/generated/resources/assets/create/models/item/tree_fertilizer.json similarity index 100% rename from src/main/resources/assets/create/models/item/tree_fertilizer.json rename to src/generated/resources/assets/create/models/item/tree_fertilizer.json diff --git a/src/generated/resources/assets/create/models/item/vertical_gearbox.json b/src/generated/resources/assets/create/models/item/vertical_gearbox.json new file mode 100644 index 000000000..0a8af5c1f --- /dev/null +++ b/src/generated/resources/assets/create/models/item/vertical_gearbox.json @@ -0,0 +1,3 @@ +{ + "parent": "create:block/gearbox/item_vertical" +} \ No newline at end of file diff --git a/src/generated/resources/assets/create/models/item/wand_of_symmetry.json b/src/generated/resources/assets/create/models/item/wand_of_symmetry.json new file mode 100644 index 000000000..9b5d5f69a --- /dev/null +++ b/src/generated/resources/assets/create/models/item/wand_of_symmetry.json @@ -0,0 +1,3 @@ +{ + "parent": "create:item/wand_of_symmetry/item" +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/belt_connector.json b/src/generated/resources/assets/create/models/item/wheat_flour.json similarity index 56% rename from src/main/resources/assets/create/models/item/belt_connector.json rename to src/generated/resources/assets/create/models/item/wheat_flour.json index b94222daf..33c6e53c9 100644 --- a/src/main/resources/assets/create/models/item/belt_connector.json +++ b/src/generated/resources/assets/create/models/item/wheat_flour.json @@ -1,6 +1,6 @@ { "parent": "item/generated", "textures": { - "layer0": "create:item/belt" + "layer0": "create:item/wheat_flour" } } \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/whisk.json b/src/generated/resources/assets/create/models/item/whisk.json similarity index 100% rename from src/main/resources/assets/create/models/item/whisk.json rename to src/generated/resources/assets/create/models/item/whisk.json diff --git a/src/generated/resources/assets/create/models/item/wrench.json b/src/generated/resources/assets/create/models/item/wrench.json new file mode 100644 index 000000000..235e21e16 --- /dev/null +++ b/src/generated/resources/assets/create/models/item/wrench.json @@ -0,0 +1,3 @@ +{ + "parent": "create:item/wrench/item" +} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/zinc_ingot.json b/src/generated/resources/assets/create/models/item/zinc_ingot.json similarity index 100% rename from src/main/resources/assets/create/models/item/zinc_ingot.json rename to src/generated/resources/assets/create/models/item/zinc_ingot.json diff --git a/src/main/resources/assets/create/models/item/zinc_nugget.json b/src/generated/resources/assets/create/models/item/zinc_nugget.json similarity index 100% rename from src/main/resources/assets/create/models/item/zinc_nugget.json rename to src/generated/resources/assets/create/models/item/zinc_nugget.json diff --git a/src/generated/resources/data/create/advancements/symmetry_wand.json b/src/generated/resources/data/create/advancements/symmetry_wand.json index 4a8ace7f4..8b3b3633b 100644 --- a/src/generated/resources/data/create/advancements/symmetry_wand.json +++ b/src/generated/resources/data/create/advancements/symmetry_wand.json @@ -2,7 +2,7 @@ "parent": "create:refined_radiance", "display": { "icon": { - "item": "create:symmetry_wand" + "item": "create:wand_of_symmetry" }, "title": { "translate": "advancement.create.symmetry_wand" @@ -21,7 +21,7 @@ "conditions": { "items": [ { - "item": "create:symmetry_wand" + "item": "create:wand_of_symmetry" } ] } diff --git a/src/generated/resources/data/create/advancements/upgraded_zapper.json b/src/generated/resources/data/create/advancements/upgraded_zapper.json index 283a70ea8..2b3a5be9f 100644 --- a/src/generated/resources/data/create/advancements/upgraded_zapper.json +++ b/src/generated/resources/data/create/advancements/upgraded_zapper.json @@ -2,7 +2,7 @@ "parent": "create:zapper", "display": { "icon": { - "item": "create:placement_handgun", + "item": "create:handheld_blockzapper", "nbt": "{Retriever:\"Chromatic\",Scope:\"Chromatic\",Amplifier:\"Chromatic\",Body:\"Chromatic\",Accelerator:\"Chromatic\"}" }, "title": { diff --git a/src/generated/resources/data/create/advancements/zapper.json b/src/generated/resources/data/create/advancements/zapper.json index 8fd2c563c..07313062d 100644 --- a/src/generated/resources/data/create/advancements/zapper.json +++ b/src/generated/resources/data/create/advancements/zapper.json @@ -2,7 +2,7 @@ "parent": "create:refined_radiance", "display": { "icon": { - "item": "create:placement_handgun" + "item": "create:handheld_blockzapper" }, "title": { "translate": "advancement.create.zapper" @@ -21,7 +21,7 @@ "conditions": { "items": [ { - "item": "create:placement_handgun" + "item": "create:handheld_blockzapper" } ] } diff --git a/src/generated/resources/data/forge/tags/items/ingots.json b/src/generated/resources/data/forge/tags/items/ingots.json deleted file mode 100644 index 67624f22f..000000000 --- a/src/generated/resources/data/forge/tags/items/ingots.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "replace": false, - "values": [ - "#forge:ingots/copper", - "#forge:ingots/zinc", - "#forge:ingots/brass" - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/nuggets.json b/src/generated/resources/data/forge/tags/items/nuggets.json deleted file mode 100644 index 00ed383ec..000000000 --- a/src/generated/resources/data/forge/tags/items/nuggets.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "replace": false, - "values": [ - "#forge:nuggets/copper", - "#forge:nuggets/zinc", - "#forge:nuggets/brass" - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/plates.json b/src/generated/resources/data/forge/tags/items/plates.json deleted file mode 100644 index 6a8dc83bf..000000000 --- a/src/generated/resources/data/forge/tags/items/plates.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "replace": false, - "values": [ - "#forge:plates/iron", - "#forge:plates/gold", - "#forge:plates/copper", - "#forge:plates/brass", - "#forge:plates/lapis" - ] -} \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/plates/gold.json b/src/generated/resources/data/forge/tags/items/plates/gold.json index ba9349551..eeb5ecfdd 100644 --- a/src/generated/resources/data/forge/tags/items/plates/gold.json +++ b/src/generated/resources/data/forge/tags/items/plates/gold.json @@ -1,6 +1,6 @@ { "replace": false, "values": [ - "create:gold_sheet" + "create:golden_sheet" ] } \ No newline at end of file diff --git a/src/generated/resources/data/forge/tags/items/plates/lapis.json b/src/generated/resources/data/forge/tags/items/plates/lapis.json deleted file mode 100644 index 2700c9935..000000000 --- a/src/generated/resources/data/forge/tags/items/plates/lapis.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "replace": false, - "values": [ - "create:lapis_plate" - ] -} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/AllBlockTags.java b/src/main/java/com/simibubi/create/AllBlockTags.java deleted file mode 100644 index 94a42df87..000000000 --- a/src/main/java/com/simibubi/create/AllBlockTags.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.simibubi.create; - -import com.simibubi.create.foundation.utility.Lang; - -import net.minecraft.block.Block; -import net.minecraft.block.BlockState; -import net.minecraft.tags.BlockTags; -import net.minecraft.tags.Tag; -import net.minecraft.util.ResourceLocation; - -public enum AllBlockTags { - - WINDMILL_SAILS, FAN_HEATERS, WINDOWABLE, - - ; - - public Tag tag; - - private AllBlockTags() { - this(""); - } - - private AllBlockTags(String path) { - tag = new BlockTags.Wrapper( - new ResourceLocation(Create.ID, (path.isEmpty() ? "" : path + "/") + Lang.asId(name()))); - } - - public boolean matches(BlockState block) { - return tag.contains(block.getBlock()); - } - -} diff --git a/src/main/java/com/simibubi/create/AllBlocks.java b/src/main/java/com/simibubi/create/AllBlocks.java index 223d9ea7f..da2828b9b 100644 --- a/src/main/java/com/simibubi/create/AllBlocks.java +++ b/src/main/java/com/simibubi/create/AllBlocks.java @@ -1,5 +1,7 @@ package com.simibubi.create; +import static com.simibubi.create.AllTags.forgeItemTag; +import static com.simibubi.create.AllTags.tagBlockAndItem; import static com.simibubi.create.content.AllSections.SCHEMATICS; import static com.simibubi.create.foundation.data.BlockStateGen.oxidizedBlockstate; import static com.simibubi.create.foundation.data.CreateRegistrate.connectedTextures; @@ -100,26 +102,17 @@ import com.simibubi.create.foundation.data.CreateRegistrate; import com.simibubi.create.foundation.data.ModelGen; import com.simibubi.create.foundation.data.SharedProperties; import com.simibubi.create.foundation.worldgen.OxidizingBlock; -import com.tterrag.registrate.builders.BlockBuilder; -import com.tterrag.registrate.builders.ItemBuilder; import com.tterrag.registrate.util.DataIngredient; import com.tterrag.registrate.util.entry.BlockEntry; -import com.tterrag.registrate.util.nullness.NonNullFunction; import net.minecraft.block.Block; import net.minecraft.block.Blocks; import net.minecraft.block.SoundType; import net.minecraft.block.material.MaterialColor; import net.minecraft.client.renderer.RenderType; -import net.minecraft.item.BlockItem; -import net.minecraft.item.Item; import net.minecraft.state.properties.PistonType; import net.minecraft.tags.BlockTags; -import net.minecraft.tags.ItemTags; -import net.minecraft.tags.Tag; -import net.minecraft.tags.TagCollection; import net.minecraft.util.Direction.Axis; -import net.minecraft.util.ResourceLocation; import net.minecraftforge.client.model.generators.ConfiguredModel; import net.minecraftforge.common.ToolType; @@ -242,7 +235,7 @@ public class AllBlocks { .initialProperties(SharedProperties.beltMaterial, MaterialColor.GRAY) .properties(p -> p.sound(SoundType.CLOTH)) .transform(StressConfigDefaults.setImpact(1.0)) - .transform(CreateRegistrate.blockColors(() -> BeltColor::new)) + .onRegister(CreateRegistrate.blockColors(() -> BeltColor::new)) .blockstate(new BeltGenerator()::generate) .register(); @@ -460,7 +453,7 @@ public class AllBlocks { REGISTRATE.block("translation_chassis", LinearChassisBlock::new) .initialProperties(SharedProperties::wooden) .blockstate(BlockStateGen.linearChassis()) - .transform(connectedTextures(new ChassisCTBehaviour())) + .onRegister(connectedTextures(new ChassisCTBehaviour())) .lang("Linear Chassis") .simpleItem() .register(); @@ -469,7 +462,7 @@ public class AllBlocks { REGISTRATE.block("translation_chassis_secondary", LinearChassisBlock::new) .initialProperties(SharedProperties::wooden) .blockstate(BlockStateGen.linearChassis()) - .transform(connectedTextures(new ChassisCTBehaviour())) + .onRegister(connectedTextures(new ChassisCTBehaviour())) .lang("Secondary Linear Chassis") .simpleItem() .register(); @@ -557,7 +550,7 @@ public class AllBlocks { .properties(p -> p.nonOpaque()) .blockstate(BlockStateGen.horizontalBlockProvider(true)) .transform(StressConfigDefaults.setImpact(2.0)) - .transform(CreateRegistrate.connectedTextures(new CrafterCTBehaviour())) + .onRegister(CreateRegistrate.connectedTextures(new CrafterCTBehaviour())) .addLayer(() -> RenderType::getCutoutMipped) .item() .transform(customItemModel()) @@ -841,31 +834,8 @@ public class AllBlocks { .recipe((ctx, prov) -> prov.square(DataIngredient.tag(forgeItemTag("ingots/brass")), ctx, false)) .register(); - // Utility - - private static NonNullFunction, ItemBuilder>> tagBlockAndItem( - String tagName) { - return b -> b.tag(forgeBlockTag(tagName)) - .item() - .tag(forgeItemTag(tagName)); - } - - private static Tag forgeBlockTag(String name) { - return forgeTag(BlockTags.getCollection(), name); - } - - private static Tag forgeItemTag(String name) { - return forgeTag(ItemTags.getCollection(), name); - } - - private static Tag forgeTag(TagCollection collection, String name) { - return tag(collection, "forge", name); - } - - private static Tag tag(TagCollection collection, String domain, String name) { - return collection.getOrCreate(new ResourceLocation(domain, name)); - } - + // Load this class + public static void register() {} } diff --git a/src/main/java/com/simibubi/create/AllItemTags.java b/src/main/java/com/simibubi/create/AllItemTags.java deleted file mode 100644 index 77dab7504..000000000 --- a/src/main/java/com/simibubi/create/AllItemTags.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.simibubi.create; - -import com.simibubi.create.foundation.utility.Lang; - -import net.minecraft.item.Item; -import net.minecraft.item.ItemStack; -import net.minecraft.tags.ItemTags; -import net.minecraft.tags.Tag; -import net.minecraft.util.ResourceLocation; - -public enum AllItemTags { - - ; - - public Tag tag; - - private AllItemTags(String path) { - tag = new ItemTags.Wrapper(new ResourceLocation(Create.ID, path + "/" + Lang.asId(name()))); - } - - public boolean matches(ItemStack item) { - return tag.contains(item.getItem()); - } - -} diff --git a/src/main/java/com/simibubi/create/AllItems.java b/src/main/java/com/simibubi/create/AllItems.java deleted file mode 100644 index 703b09d72..000000000 --- a/src/main/java/com/simibubi/create/AllItems.java +++ /dev/null @@ -1,249 +0,0 @@ -package com.simibubi.create; - -import java.util.HashSet; -import java.util.Set; -import java.util.function.Function; - -import com.simibubi.create.content.AllSections; -import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueItem; -import com.simibubi.create.content.contraptions.components.structureMovement.mounted.MinecartContraptionItem; -import com.simibubi.create.content.contraptions.goggles.GogglesItem; -import com.simibubi.create.content.contraptions.relays.belt.item.BeltConnectorItem; -import com.simibubi.create.content.contraptions.relays.gearbox.VerticalGearboxItem; -import com.simibubi.create.content.contraptions.wrench.WrenchItem; -import com.simibubi.create.content.curiosities.ChromaticCompoundCubeItem; -import com.simibubi.create.content.curiosities.RefinedRadianceItem; -import com.simibubi.create.content.curiosities.ShadowSteelItem; -import com.simibubi.create.content.curiosities.TreeFertilizerItem; -import com.simibubi.create.content.curiosities.symmetry.SymmetryWandItem; -import com.simibubi.create.content.curiosities.tools.DeforesterItem; -import com.simibubi.create.content.curiosities.tools.SandPaperItem; -import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem; -import com.simibubi.create.content.curiosities.zapper.terrainzapper.TerrainzapperItem; -import com.simibubi.create.content.logistics.item.filter.FilterItem; -import com.simibubi.create.content.schematics.item.SchematicAndQuillItem; -import com.simibubi.create.content.schematics.item.SchematicItem; -import com.simibubi.create.foundation.data.ITaggable; -import com.simibubi.create.foundation.item.IHaveCustomItemModel; -import com.simibubi.create.foundation.item.IItemWithColorHandler; -import com.simibubi.create.foundation.utility.Lang; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.color.ItemColors; -import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer; -import net.minecraft.entity.item.minecart.AbstractMinecartEntity.Type; -import net.minecraft.item.Item; -import net.minecraft.item.Item.Properties; -import net.minecraft.item.ItemStack; -import net.minecraft.item.Rarity; -import net.minecraft.util.ResourceLocation; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; -import net.minecraftforge.event.RegistryEvent; -import net.minecraftforge.fml.common.Mod.EventBusSubscriber; -import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus; -import net.minecraftforge.registries.IForgeRegistry; - -@EventBusSubscriber(value = Dist.CLIENT, bus = Bus.MOD) -public enum AllItems { - - _1_(AllSections.MATERIALS), - - COPPER_NUGGET((TaggedItem) new TaggedItem().withForgeTags("nuggets/copper")), - ZINC_NUGGET((TaggedItem) new TaggedItem().withForgeTags("nuggets/zinc")), - BRASS_NUGGET((TaggedItem) new TaggedItem().withForgeTags("nuggets/brass")), - IRON_SHEET((TaggedItem) new TaggedItem().withForgeTags("plates/iron")), - GOLD_SHEET((TaggedItem) new TaggedItem().withForgeTags("plates/gold")), - COPPER_SHEET((TaggedItem) new TaggedItem().withForgeTags("plates/copper")), - BRASS_SHEET((TaggedItem) new TaggedItem().withForgeTags("plates/brass")), - LAPIS_PLATE((TaggedItem) new TaggedItem().withForgeTags("plates/lapis")), - - CRUSHED_IRON, - CRUSHED_GOLD, - CRUSHED_COPPER, - CRUSHED_ZINC, - CRUSHED_BRASS, - - ANDESITE_ALLOY, - COPPER_INGOT((TaggedItem) new TaggedItem().withForgeTags("ingots/copper")), - ZINC_INGOT((TaggedItem) new TaggedItem().withForgeTags("ingots/zinc")), - BRASS_INGOT((TaggedItem) new TaggedItem().withForgeTags("ingots/brass")), - - FLOUR, - DOUGH, - OBSIDIAN_DUST, - ROSE_QUARTZ, - POLISHED_ROSE_QUARTZ, - CHROMATIC_COMPOUND(ChromaticCompoundCubeItem::new, rarity(Rarity.UNCOMMON)), - SHADOW_STEEL(ShadowSteelItem::new, rarity(Rarity.UNCOMMON)), - REFINED_RADIANCE(RefinedRadianceItem::new, rarity(Rarity.UNCOMMON)), - ELECTRON_TUBE, - INTEGRATED_CIRCUIT, - - _2_(AllSections.KINETICS), - - BELT_CONNECTOR(BeltConnectorItem::new), - VERTICAL_GEARBOX(VerticalGearboxItem::new), - PROPELLER, - WHISK, - BRASS_HAND, - SLOT_COVER, - SUPER_GLUE(SuperGlueItem::new), - SAND_PAPER(SandPaperItem::new), - RED_SAND_PAPER(SandPaperItem::new), - WRENCH(WrenchItem::new), - GOGGLES(GogglesItem::new), - MINECART_CONTRAPTION(p -> new MinecartContraptionItem(Type.RIDEABLE, p)), - FURNACE_MINECART_CONTRAPTION(p -> new MinecartContraptionItem(Type.FURNACE, p)), - - _3_(AllSections.LOGISTICS), - - FILTER(FilterItem::new), - PROPERTY_FILTER(FilterItem::new), - - _4_(AllSections.CURIOSITIES), - - TREE_FERTILIZER(TreeFertilizerItem::new), - PLACEMENT_HANDGUN(BlockzapperItem::new), - TERRAIN_ZAPPER(TerrainzapperItem::new), - DEFORESTER(DeforesterItem::new), - SYMMETRY_WAND(SymmetryWandItem::new), - - _5_(AllSections.SCHEMATICS), - - EMPTY_BLUEPRINT(Item::new, stackSize(1)), - BLUEPRINT_AND_QUILL(SchematicAndQuillItem::new, stackSize(1)), - BLUEPRINT(SchematicItem::new), - - ; - - private static class SectionTracker { - static AllSections currentSection; - } - - // Common - - public AllSections section; - private Function specialProperties; - private TaggedItem taggedItem; - private Item item; - - AllItems(AllSections section) { - SectionTracker.currentSection = section; - taggedItem = new TaggedItem(null); - } - - AllItems(Function itemSupplier) { - this(new TaggedItem(itemSupplier), Function.identity()); - } - - AllItems(Function itemSupplier, Function specialProperties) { - this(new TaggedItem(itemSupplier), specialProperties); - } - - AllItems() { - this(new TaggedItem(Item::new)); - } - - AllItems(TaggedItem taggedItemIn) { - this(taggedItemIn, Function.identity()); - } - - AllItems(TaggedItem taggedItemIn, Function specialProperties) { - this.taggedItem = taggedItemIn; - this.section = SectionTracker.currentSection; - this.specialProperties = specialProperties; - } - - private static Function rarity(Rarity rarity) { - return p -> p.rarity(rarity); - } - - private static Function stackSize(int stackSize) { - return p -> p.maxStackSize(stackSize); - } - - private static Properties defaultProperties(AllItems item) { - return includeInItemGroup().setISTER(() -> item::getRenderer); - } - - public static Properties includeInItemGroup() { - return new Properties().group(Create.baseCreativeTab); - } - - public static void register(RegistryEvent.Register event) { - IForgeRegistry registry = event.getRegistry(); - - for (AllItems entry : values()) { - if (entry.taggedItem == null || entry.taggedItem.getItemSupplier() == null) - continue; - - entry.item = entry.taggedItem.getItemSupplier().apply(new Properties()); - entry.item = - entry.taggedItem.getItemSupplier().apply(entry.specialProperties.apply(defaultProperties(entry))); - entry.item.setRegistryName(Create.ID, Lang.asId(entry.name())); - registry.register(entry.item); - } - } - - public Item get() { - return item; - } - - public TaggedItem getTaggable() { - return taggedItem; - } - - public boolean typeOf(ItemStack stack) { - return stack.getItem() == item; - } - - public ItemStack asStack() { - return new ItemStack(item); - } - - public static class TaggedItem extends ITaggable.Impl { - - private Set tagSetItem = new HashSet<>(); - private Function itemSupplier; - - public TaggedItem() { - this(Item::new); - } - - public TaggedItem(Function itemSupplierIn) { - this.itemSupplier = itemSupplierIn; - } - - public Function getItemSupplier() { - return itemSupplier; - } - - @Override - public Set getTagSet(TagType type) { - return tagSetItem; - } - } - - // Client - - @OnlyIn(Dist.CLIENT) - public ItemStackTileEntityRenderer getRenderer() { - if (!(item instanceof IHaveCustomItemModel)) - return null; - IHaveCustomItemModel specialItem = (IHaveCustomItemModel) item; - return specialItem.createModel(null).getRenderer(); - } - - @OnlyIn(Dist.CLIENT) - @Deprecated // Use CreateRegistrate#itemColor when porting AllItems - public static void registerColorHandlers() { - ItemColors itemColors = Minecraft.getInstance().getItemColors(); - for (AllItems item : values()) { - if (item.item instanceof IItemWithColorHandler) { - itemColors.register(((IItemWithColorHandler) item.item).getColorHandler(), item.item); - } - } - } - -} diff --git a/src/main/java/com/simibubi/create/AllItemsNew.java b/src/main/java/com/simibubi/create/AllItemsNew.java new file mode 100644 index 000000000..6b7580de1 --- /dev/null +++ b/src/main/java/com/simibubi/create/AllItemsNew.java @@ -0,0 +1,241 @@ +package com.simibubi.create; + +import static com.simibubi.create.AllTags.forgeItemTag; +import static com.simibubi.create.content.AllSections.CURIOSITIES; +import static com.simibubi.create.content.AllSections.KINETICS; +import static com.simibubi.create.content.AllSections.LOGISTICS; +import static com.simibubi.create.content.AllSections.MATERIALS; +import static com.simibubi.create.content.AllSections.SCHEMATICS; + +import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueItem; +import com.simibubi.create.content.contraptions.components.structureMovement.mounted.MinecartContraptionItem; +import com.simibubi.create.content.contraptions.goggles.GogglesItem; +import com.simibubi.create.content.contraptions.relays.belt.item.BeltConnectorItem; +import com.simibubi.create.content.contraptions.relays.gearbox.VerticalGearboxItem; +import com.simibubi.create.content.contraptions.wrench.WrenchItem; +import com.simibubi.create.content.contraptions.wrench.WrenchModel; +import com.simibubi.create.content.curiosities.ChromaticCompoundColor; +import com.simibubi.create.content.curiosities.ChromaticCompoundItem; +import com.simibubi.create.content.curiosities.RefinedRadianceItem; +import com.simibubi.create.content.curiosities.ShadowSteelItem; +import com.simibubi.create.content.curiosities.TreeFertilizerItem; +import com.simibubi.create.content.curiosities.symmetry.SymmetryWandItem; +import com.simibubi.create.content.curiosities.symmetry.client.SymmetryWandModel; +import com.simibubi.create.content.curiosities.tools.DeforesterItem; +import com.simibubi.create.content.curiosities.tools.DeforesterModel; +import com.simibubi.create.content.curiosities.tools.SandPaperItem; +import com.simibubi.create.content.curiosities.tools.SandPaperItemRenderer.SandPaperModel; +import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem; +import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperModel; +import com.simibubi.create.content.curiosities.zapper.terrainzapper.WorldshaperItem; +import com.simibubi.create.content.curiosities.zapper.terrainzapper.WorldshaperModel; +import com.simibubi.create.content.logistics.item.filter.FilterItem; +import com.simibubi.create.content.schematics.item.SchematicAndQuillItem; +import com.simibubi.create.content.schematics.item.SchematicItem; +import com.simibubi.create.foundation.data.AssetLookup; +import com.simibubi.create.foundation.data.CreateRegistrate; +import com.tterrag.registrate.util.entry.ItemEntry; + +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.item.Rarity; +import net.minecraft.tags.Tag; + +public class AllItemsNew { + + private static final CreateRegistrate REGISTRATE = Create.registrate() + .itemGroup(() -> Create.baseCreativeTab); + + // Schematics + + static { + REGISTRATE.startSection(MATERIALS); + } + + public static final ItemEntry + COPPER_NUGGET = taggedIngredient("copper_nugget", forgeItemTag("nuggets/copper")), + ZINC_NUGGET = taggedIngredient("zinc_nugget", forgeItemTag("nuggets/zinc")), + BRASS_NUGGET = taggedIngredient("brass_nugget", forgeItemTag("nuggets/brass")), + + COPPER_SHEET = taggedIngredient("copper_sheet", forgeItemTag("plates/copper")), + BRASS_SHEET = taggedIngredient("brass_sheet", forgeItemTag("plates/brass")), + IRON_SHEET = taggedIngredient("iron_sheet", forgeItemTag("plates/iron")), + GOLDEN_SHEET = taggedIngredient("golden_sheet", forgeItemTag("plates/gold")), + LAPIS_SHEET = ingredient("lapis_sheet"), + + CRUSHED_IRON = ingredient("crushed_iron_ore"), + CRUSHED_GOLD = ingredient("crushed_gold_ore"), + CRUSHED_COPPER = ingredient("crushed_copper_ore"), + CRUSHED_ZINC = ingredient("crushed_zinc_ore"), + CRUSHED_BRASS = ingredient("crushed_brass"), + + ANDESITE_ALLOY = ingredient("andesite_alloy"), + COPPER_INGOT = taggedIngredient("copper_ingot", forgeItemTag("ingots/copper")), + ZINC_INGOT = taggedIngredient("zinc_ingot", forgeItemTag("ingots/zinc")), + BRASS_INGOT = taggedIngredient("brass_ingot", forgeItemTag("ingots/brass")), + + WHEAT_FLOUR = ingredient("wheat_flour"), + DOUGH = ingredient("dough"), + POWDERED_OBSIDIAN = ingredient("powdered_obsidian"), + ROSE_QUARTZ = ingredient("rose_quartz"), + POLISHED_ROSE_QUARTZ = ingredient("polished_rose_quartz"), + PROPELLER = ingredient("propeller"), + WHISK = ingredient("whisk"), + BRASS_HAND = ingredient("brass_hand"), + CRAFTER_SLOT_COVER = ingredient("crafter_slot_cover"); + + public static final ItemEntry CHROMATIC_COMPOUND = + REGISTRATE.item("chromatic_compound", ChromaticCompoundItem::new) + .properties(p -> p.rarity(Rarity.UNCOMMON)) + .model(AssetLookup.existingItemModel()) + .onRegister(CreateRegistrate.itemColors(() -> ChromaticCompoundColor::new)) + .register(); + + public static final ItemEntry SHADOW_STEEL = REGISTRATE.item("shadow_steel", ShadowSteelItem::new) + .properties(p -> p.rarity(Rarity.UNCOMMON)) + .register(); + + public static final ItemEntry REFINED_RADIANCE = + REGISTRATE.item("refined_radiance", RefinedRadianceItem::new) + .properties(p -> p.rarity(Rarity.UNCOMMON)) + .register(); + + public static final ItemEntry + + ELECTRON_TUBE = ingredient("electron_tube"), INTEGRATED_CIRCUIT = ingredient("integrated_circuit"); + + // Kinetics + + static { + REGISTRATE.startSection(KINETICS); + } + + public static final ItemEntry BELT_CONNECTOR = + REGISTRATE.item("belt_connector", BeltConnectorItem::new) + .lang("Mechanical Belt") + .register(); + + public static final ItemEntry VERTICAL_GEARBOX = REGISTRATE.item("vertical_gearbox", VerticalGearboxItem::new) + .model(AssetLookup.customItemModel("gearbox", "item_vertical")) + .register(); + + public static final ItemEntry SUPER_GLUE = REGISTRATE.item("super_glue", SuperGlueItem::new) + .register(); + + public static final ItemEntry SAND_PAPER = REGISTRATE.item("sand_paper", SandPaperItem::new) + .transform(CreateRegistrate.customRenderedItem(() -> SandPaperModel::new)) + .register(); + + public static final ItemEntry RED_SAND_PAPER = REGISTRATE.item("red_sand_paper", SandPaperItem::new) + .transform(CreateRegistrate.customRenderedItem(() -> SandPaperModel::new)) + .register(); + + public static final ItemEntry WRENCH = REGISTRATE.item("wrench", WrenchItem::new) + .transform(CreateRegistrate.customRenderedItem(() -> WrenchModel::new)) + .model(AssetLookup.itemModelWithPartials()) + .register(); + + public static final ItemEntry GOGGLES = REGISTRATE.item("goggles", GogglesItem::new) + .model(AssetLookup.existingItemModel()) + .lang("Engineer's Goggles") + .register(); + + public static final ItemEntry MINECART_CONTRAPTION = + REGISTRATE.item("minecart_contraption", MinecartContraptionItem::rideable) + .register(); + + public static final ItemEntry FURNACE_MINECART_CONTRAPTION = + REGISTRATE.item("furnace_minecart_contraption", MinecartContraptionItem::furnace) + .register(); + + // Logistics + + static { + REGISTRATE.startSection(LOGISTICS); + } + + public static final ItemEntry FILTER = REGISTRATE.item("filter", FilterItem::regular) + .model(AssetLookup.existingItemModel()) + .register(); + + public static final ItemEntry ATTRIBUTE_FILTER = + REGISTRATE.item("attribute_filter", FilterItem::attribute) + .model(AssetLookup.existingItemModel()) + .register(); + + // Curiosities + + static { + REGISTRATE.startSection(CURIOSITIES); + } + + public static final ItemEntry TREE_FERTILIZER = + REGISTRATE.item("tree_fertilizer", TreeFertilizerItem::new) + .register(); + + public static final ItemEntry BLOCKZAPPER = + REGISTRATE.item("handheld_blockzapper", BlockzapperItem::new) + .transform(CreateRegistrate.customRenderedItem(() -> BlockzapperModel::new)) + .model(AssetLookup.itemModelWithPartials()) + .register(); + + public static final ItemEntry WORLDSHAPER = + REGISTRATE.item("handheld_worldshaper", WorldshaperItem::new) + .transform(CreateRegistrate.customRenderedItem(() -> WorldshaperModel::new)) + .model(AssetLookup.itemModelWithPartials()) + .register(); + + public static final ItemEntry DEFORESTER = REGISTRATE.item("deforester", DeforesterItem::new) + .transform(CreateRegistrate.customRenderedItem(() -> DeforesterModel::new)) + .model(AssetLookup.itemModelWithPartials()) + .register(); + + public static final ItemEntry WAND_OF_SYMMETRY = + REGISTRATE.item("wand_of_symmetry", SymmetryWandItem::new) + .transform(CreateRegistrate.customRenderedItem(() -> SymmetryWandModel::new)) + .model(AssetLookup.itemModelWithPartials()) + .register(); + + // Schematics + + static { + REGISTRATE.startSection(SCHEMATICS); + } + + public static final ItemEntry EMPTY_SCHEMATIC = REGISTRATE.item("empty_schematic", Item::new) + .properties(p -> p.maxStackSize(1)) + .register(); + + public static final ItemEntry SCHEMATIC_AND_QUILL = + REGISTRATE.item("schematic_and_quill", SchematicAndQuillItem::new) + .properties(p -> p.maxStackSize(1)) + .register(); + + public static final ItemEntry SCHEMATIC = REGISTRATE.item("schematic", SchematicItem::new) + .properties(p -> p.maxStackSize(1)) + .register(); + + // Shortcuts + + private static ItemEntry ingredient(String name) { + return REGISTRATE.item(name, Item::new) + .register(); + } + + private static ItemEntry taggedIngredient(String name, Tag tag) { + return REGISTRATE.item(name, Item::new) + .tag(tag) + .register(); + } + + // Helper + + public static boolean typeOf(ItemEntry entry, ItemStack stack) { + return stack != null && stack.getItem() == entry.get(); + } + + // Load this class + + public static void register() {} + +} diff --git a/src/main/java/com/simibubi/create/AllSpriteShifts.java b/src/main/java/com/simibubi/create/AllSpriteShifts.java index 80aecb153..807956034 100644 --- a/src/main/java/com/simibubi/create/AllSpriteShifts.java +++ b/src/main/java/com/simibubi/create/AllSpriteShifts.java @@ -9,8 +9,8 @@ import java.util.IdentityHashMap; import java.util.Map; import com.simibubi.create.content.palettes.PaletteBlockPatterns; -import com.simibubi.create.content.palettes.PaletteStoneVariants; import com.simibubi.create.content.palettes.PaletteBlockPatterns.CTs; +import com.simibubi.create.content.palettes.PaletteStoneVariants; import com.simibubi.create.foundation.block.connected.CTSpriteShiftEntry; import com.simibubi.create.foundation.block.connected.CTSpriteShifter.CTType; import com.simibubi.create.foundation.block.render.SpriteShiftEntry; diff --git a/src/main/java/com/simibubi/create/AllTags.java b/src/main/java/com/simibubi/create/AllTags.java new file mode 100644 index 000000000..8086db7ec --- /dev/null +++ b/src/main/java/com/simibubi/create/AllTags.java @@ -0,0 +1,65 @@ +package com.simibubi.create; + +import com.simibubi.create.foundation.utility.Lang; +import com.tterrag.registrate.builders.BlockBuilder; +import com.tterrag.registrate.builders.ItemBuilder; +import com.tterrag.registrate.util.nullness.NonNullFunction; + +import net.minecraft.block.Block; +import net.minecraft.block.BlockState; +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; +import net.minecraft.tags.BlockTags; +import net.minecraft.tags.ItemTags; +import net.minecraft.tags.Tag; +import net.minecraft.tags.TagCollection; +import net.minecraft.util.ResourceLocation; + +public class AllTags { + + public static NonNullFunction, ItemBuilder>> tagBlockAndItem( + String tagName) { + return b -> b.tag(forgeBlockTag(tagName)) + .item() + .tag(forgeItemTag(tagName)); + } + + public static Tag forgeBlockTag(String name) { + return forgeTag(BlockTags.getCollection(), name); + } + + public static Tag forgeItemTag(String name) { + return forgeTag(ItemTags.getCollection(), name); + } + + public static Tag forgeTag(TagCollection collection, String name) { + return tag(collection, "forge", name); + } + + public static Tag tag(TagCollection collection, String domain, String name) { + return collection.getOrCreate(new ResourceLocation(domain, name)); + } + + public static enum AllItemTags { + ; + } + + public static enum AllBlockTags { + WINDMILL_SAILS, FAN_HEATERS, WINDOWABLE,; + public Tag tag; + + private AllBlockTags() { + this(""); + } + + private AllBlockTags(String path) { + tag = new BlockTags.Wrapper( + new ResourceLocation(Create.ID, (path.isEmpty() ? "" : path + "/") + Lang.asId(name()))); + } + + public boolean matches(BlockState block) { + return tag.contains(block.getBlock()); + } + } + +} diff --git a/src/main/java/com/simibubi/create/AllTileEntities.java b/src/main/java/com/simibubi/create/AllTileEntities.java index d8dc5a1fb..5e2335380 100644 --- a/src/main/java/com/simibubi/create/AllTileEntities.java +++ b/src/main/java/com/simibubi/create/AllTileEntities.java @@ -4,22 +4,22 @@ import java.util.function.Function; import java.util.function.Supplier; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; -import com.simibubi.create.content.contraptions.components.actors.DrillTileEntity; import com.simibubi.create.content.contraptions.components.actors.DrillRenderer; +import com.simibubi.create.content.contraptions.components.actors.DrillTileEntity; import com.simibubi.create.content.contraptions.components.actors.HarvesterRenderer; import com.simibubi.create.content.contraptions.components.actors.HarvesterTileEntity; import com.simibubi.create.content.contraptions.components.clock.CuckooClockRenderer; import com.simibubi.create.content.contraptions.components.clock.CuckooClockTileEntity; -import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity; import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterRenderer; -import com.simibubi.create.content.contraptions.components.crank.HandCrankTileEntity; +import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity; import com.simibubi.create.content.contraptions.components.crank.HandCrankRenderer; +import com.simibubi.create.content.contraptions.components.crank.HandCrankTileEntity; import com.simibubi.create.content.contraptions.components.crusher.CrushingWheelControllerTileEntity; import com.simibubi.create.content.contraptions.components.crusher.CrushingWheelTileEntity; -import com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity; import com.simibubi.create.content.contraptions.components.deployer.DeployerRenderer; -import com.simibubi.create.content.contraptions.components.fan.EncasedFanTileEntity; +import com.simibubi.create.content.contraptions.components.deployer.DeployerTileEntity; import com.simibubi.create.content.contraptions.components.fan.EncasedFanRenderer; +import com.simibubi.create.content.contraptions.components.fan.EncasedFanTileEntity; import com.simibubi.create.content.contraptions.components.fan.NozzleTileEntity; import com.simibubi.create.content.contraptions.components.flywheel.FlywheelRenderer; import com.simibubi.create.content.contraptions.components.flywheel.FlywheelTileEntity; @@ -27,49 +27,49 @@ import com.simibubi.create.content.contraptions.components.flywheel.engine.Engin import com.simibubi.create.content.contraptions.components.flywheel.engine.FurnaceEngineTileEntity; import com.simibubi.create.content.contraptions.components.millstone.MillstoneRenderer; import com.simibubi.create.content.contraptions.components.millstone.MillstoneTileEntity; -import com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerTileEntity; import com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerRenderer; -import com.simibubi.create.content.contraptions.components.motor.CreativeMotorTileEntity; +import com.simibubi.create.content.contraptions.components.mixer.MechanicalMixerTileEntity; import com.simibubi.create.content.contraptions.components.motor.CreativeMotorRenderer; -import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity; +import com.simibubi.create.content.contraptions.components.motor.CreativeMotorTileEntity; import com.simibubi.create.content.contraptions.components.press.MechanicalPressRenderer; -import com.simibubi.create.content.contraptions.components.saw.SawTileEntity; +import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity; import com.simibubi.create.content.contraptions.components.saw.SawRenderer; +import com.simibubi.create.content.contraptions.components.saw.SawTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.bearing.BearingRenderer; import com.simibubi.create.content.contraptions.components.structureMovement.bearing.ClockworkBearingTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.bearing.MechanicalBearingTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.chassis.ChassisTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerTileEntity; -import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonRenderer; +import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyRenderer; import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyTileEntity; import com.simibubi.create.content.contraptions.components.turntable.TurntableTileEntity; import com.simibubi.create.content.contraptions.components.waterwheel.WaterWheelTileEntity; -import com.simibubi.create.content.contraptions.processing.BasinTileEntity; import com.simibubi.create.content.contraptions.processing.BasinRenderer; +import com.simibubi.create.content.contraptions.processing.BasinTileEntity; import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerRenderer; import com.simibubi.create.content.contraptions.relays.advanced.SpeedControllerTileEntity; import com.simibubi.create.content.contraptions.relays.advanced.sequencer.SequencedGearshiftTileEntity; -import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.belt.BeltRenderer; +import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.elementary.SimpleKineticTileEntity; import com.simibubi.create.content.contraptions.relays.encased.AdjustablePulleyTileEntity; import com.simibubi.create.content.contraptions.relays.encased.ClutchTileEntity; -import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftTileEntity; import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftRenderer; +import com.simibubi.create.content.contraptions.relays.encased.EncasedShaftTileEntity; import com.simibubi.create.content.contraptions.relays.encased.SplitShaftRenderer; import com.simibubi.create.content.contraptions.relays.gauge.GaugeBlock; import com.simibubi.create.content.contraptions.relays.gauge.GaugeRenderer; import com.simibubi.create.content.contraptions.relays.gauge.SpeedGaugeTileEntity; import com.simibubi.create.content.contraptions.relays.gauge.StressGaugeTileEntity; -import com.simibubi.create.content.contraptions.relays.gearbox.GearboxTileEntity; import com.simibubi.create.content.contraptions.relays.gearbox.GearboxRenderer; +import com.simibubi.create.content.contraptions.relays.gearbox.GearboxTileEntity; import com.simibubi.create.content.contraptions.relays.gearbox.GearshiftTileEntity; -import com.simibubi.create.content.logistics.block.belts.observer.BeltObserverTileEntity; import com.simibubi.create.content.logistics.block.belts.observer.BeltObserverRenderer; -import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelTileEntity; +import com.simibubi.create.content.logistics.block.belts.observer.BeltObserverTileEntity; import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelRenderer; +import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelTileEntity; import com.simibubi.create.content.logistics.block.diodes.AdjustablePulseRepeaterTileEntity; import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterRenderer; import com.simibubi.create.content.logistics.block.diodes.AdjustableRepeaterTileEntity; @@ -78,8 +78,8 @@ import com.simibubi.create.content.logistics.block.extractor.LinkedExtractorTile import com.simibubi.create.content.logistics.block.funnel.FunnelTileEntity; import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateTileEntity; import com.simibubi.create.content.logistics.block.inventories.CreativeCrateTileEntity; -import com.simibubi.create.content.logistics.block.redstone.AnalogLeverTileEntity; import com.simibubi.create.content.logistics.block.redstone.AnalogLeverRenderer; +import com.simibubi.create.content.logistics.block.redstone.AnalogLeverTileEntity; import com.simibubi.create.content.logistics.block.redstone.RedstoneLinkTileEntity; import com.simibubi.create.content.logistics.block.redstone.StockpileSwitchTileEntity; import com.simibubi.create.content.logistics.block.transposer.LinkedTransposerTileEntity; diff --git a/src/main/java/com/simibubi/create/ClientEvents.java b/src/main/java/com/simibubi/create/ClientEvents.java index 4eea3d809..69ee0d919 100644 --- a/src/main/java/com/simibubi/create/ClientEvents.java +++ b/src/main/java/com/simibubi/create/ClientEvents.java @@ -4,7 +4,6 @@ import java.util.ArrayList; import java.util.List; import com.mojang.blaze3d.matrix.MatrixStack; -import com.mojang.blaze3d.systems.RenderSystem; import com.simibubi.create.content.contraptions.KineticDebugger; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.content.contraptions.components.turntable.TurntableHandler; @@ -17,7 +16,6 @@ import com.simibubi.create.foundation.utility.AnimationTickHolder; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ActiveRenderInfo; -import net.minecraft.client.renderer.Atlases; import net.minecraft.client.renderer.IRenderTypeBuffer; import net.minecraft.client.renderer.texture.OverlayTexture; import net.minecraft.item.ItemStack; @@ -74,9 +72,8 @@ public class ClientEvents { .getBufferBuilders() .getEntityVertexConsumers(); - CreateClient.schematicHandler.render(ms, buffer, 0xF000F0, OverlayTexture.DEFAULT_UV); + CreateClient.schematicHandler.render(ms, buffer); CreateClient.outliner.renderOutlines(ms, buffer); - KineticDebugger.renderSourceOutline(ms, buffer); ms.pop(); buffer.draw(); } diff --git a/src/main/java/com/simibubi/create/Create.java b/src/main/java/com/simibubi/create/Create.java index 2c0a8bb9e..864c18e3c 100644 --- a/src/main/java/com/simibubi/create/Create.java +++ b/src/main/java/com/simibubi/create/Create.java @@ -13,7 +13,6 @@ import com.simibubi.create.foundation.advancement.AllAdvancements; import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.command.ServerLagger; import com.simibubi.create.foundation.config.AllConfigs; -import com.simibubi.create.foundation.data.AllItemsTagProvider; import com.simibubi.create.foundation.data.CreateRegistrate; import com.simibubi.create.foundation.data.LangMerger; import com.simibubi.create.foundation.networking.AllPackets; @@ -23,7 +22,6 @@ import com.tterrag.registrate.util.NonNullLazyValue; import net.minecraft.data.DataGenerator; import net.minecraft.entity.EntityType; import net.minecraft.inventory.container.ContainerType; -import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; import net.minecraft.item.crafting.IRecipeSerializer; import net.minecraft.particles.ParticleType; @@ -61,9 +59,9 @@ public class Create { modEventBus.addListener(Create::init); AllBlocks.register(); + AllItemsNew.register(); AllPaletteBlocks.register(); - modEventBus.addGenericListener(Item.class, AllItems::register); modEventBus.addGenericListener(IRecipeSerializer.class, AllRecipeTypes::register); modEventBus.addGenericListener(TileEntityType.class, AllTileEntities::register); modEventBus.addGenericListener(ContainerType.class, AllContainerTypes::register); @@ -115,7 +113,6 @@ public class Create { public void gatherData(GatherDataEvent event) { DataGenerator gen = event.getGenerator(); - gen.addProvider(new AllItemsTagProvider(gen)); gen.addProvider(new AllAdvancements(gen)); gen.addProvider(new LangMerger(gen)); } diff --git a/src/main/java/com/simibubi/create/CreateClient.java b/src/main/java/com/simibubi/create/CreateClient.java index ea4fb67dc..ab8d286bc 100644 --- a/src/main/java/com/simibubi/create/CreateClient.java +++ b/src/main/java/com/simibubi/create/CreateClient.java @@ -5,19 +5,22 @@ import java.util.List; import java.util.Map; import java.util.function.Function; +import com.simibubi.create.content.contraptions.KineticDebugger; import com.simibubi.create.content.contraptions.base.KineticTileEntityRenderer; import com.simibubi.create.content.contraptions.components.structureMovement.ChassisRangeDisplay; import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionRenderer; import com.simibubi.create.content.contraptions.relays.belt.item.BeltConnectorHandler; import com.simibubi.create.content.curiosities.zapper.ZapperRenderHandler; -import com.simibubi.create.content.curiosities.zapper.terrainzapper.TerrainZapperRenderHandler; +import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperRenderHandler; +import com.simibubi.create.content.curiosities.zapper.terrainzapper.WorldshaperRenderHandler; import com.simibubi.create.content.schematics.ClientSchematicLoader; import com.simibubi.create.content.schematics.client.SchematicAndQuillHandler; import com.simibubi.create.content.schematics.client.SchematicHandler; import com.simibubi.create.foundation.ResourceReloadHandler; import com.simibubi.create.foundation.block.render.CustomBlockModels; import com.simibubi.create.foundation.block.render.SpriteShifter; -import com.simibubi.create.foundation.item.IHaveCustomItemModel; +import com.simibubi.create.foundation.item.CustomItemModels; +import com.simibubi.create.foundation.item.CustomRenderedItems; import com.simibubi.create.foundation.tileEntity.behaviour.edgeInteraction.EdgeInteractionRenderer; import com.simibubi.create.foundation.tileEntity.behaviour.filtering.FilteringRenderer; import com.simibubi.create.foundation.tileEntity.behaviour.linked.LinkRenderer; @@ -31,6 +34,7 @@ import net.minecraft.client.renderer.BlockModelShapes; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.model.ModelResourceLocation; import net.minecraft.inventory.container.PlayerContainer; +import net.minecraft.item.Item; import net.minecraft.resources.IReloadableResourceManager; import net.minecraft.resources.IResourceManager; import net.minecraft.util.ResourceLocation; @@ -51,8 +55,10 @@ public class CreateClient { public static SchematicAndQuillHandler schematicAndQuillHandler; public static SuperByteBufferCache bufferCache; public static Outliner outliner; - + private static CustomBlockModels customBlockModels; + private static CustomItemModels customItemModels; + private static CustomRenderedItems customRenderedItems; private static AllColorHandlers colorHandlers; public static void addListeners(IEventBus modEventBus) { @@ -78,7 +84,6 @@ public class CreateClient { AllKeys.register(); AllContainerTypes.registerScreenFactories(); AllTileEntities.registerRenderers(); - AllItems.registerColorHandlers(); AllEntityTypes.registerRenderers(); getColorHandler().init(); @@ -87,18 +92,20 @@ public class CreateClient { if (resourceManager instanceof IReloadableResourceManager) ((IReloadableResourceManager) resourceManager).addReloadListener(new ResourceReloadHandler()); } - + public static void gameTick() { schematicSender.tick(); schematicAndQuillHandler.tick(); schematicHandler.tick(); - BeltConnectorHandler.gameTick(); + BeltConnectorHandler.tick(); FilteringRenderer.tick(); LinkRenderer.tick(); ScrollValueRenderer.tick(); ChassisRangeDisplay.tick(); EdgeInteractionRenderer.tick(); - TerrainZapperRenderHandler.tick(); + WorldshaperRenderHandler.tick(); + BlockzapperRenderHandler.tick(); + KineticDebugger.tick(); ZapperRenderHandler.tick(); outliner.tickOutlines(); } @@ -120,33 +127,26 @@ public class CreateClient { getCustomBlockModels() .foreach((block, modelFunc) -> swapModels(modelRegistry, getAllBlockStateModelLocations(block), modelFunc)); - - // todo modelswap for item registrate - for (AllItems item : AllItems.values()) { - if (item.get() instanceof IHaveCustomItemModel) - swapModels(modelRegistry, getItemModelLocation(item), - m -> ((IHaveCustomItemModel) item.get()).createModel(m) - .loadPartials(event)); - } + getCustomItemModels() + .foreach((item, modelFunc) -> swapModels(modelRegistry, getItemModelLocation(item), modelFunc)); + getCustomRenderedItems().foreach((item, modelFunc) -> { + swapModels(modelRegistry, getItemModelLocation(item), m -> modelFunc.apply(m) + .loadPartials(event)); + }); } @OnlyIn(Dist.CLIENT) public static void onModelRegistry(ModelRegistryEvent event) { AllBlockPartials.onModelRegistry(event); - // Register submodels for custom rendered item models - for (AllItems item : AllItems.values()) { - if (item.get() instanceof IHaveCustomItemModel) - ((IHaveCustomItemModel) item.get()).createModel(null) - .getModelLocations() - .forEach(ModelLoader::addSpecialModel); - } + getCustomRenderedItems().foreach((item, modelFunc) -> modelFunc.apply(null) + .getModelLocations() + .forEach(ModelLoader::addSpecialModel)); } @OnlyIn(Dist.CLIENT) - protected static ModelResourceLocation getItemModelLocation(AllItems item) { - return new ModelResourceLocation(item.get() - .getRegistryName(), "inventory"); + protected static ModelResourceLocation getItemModelLocation(Item item) { + return new ModelResourceLocation(item.getRegistryName(), "inventory"); } @OnlyIn(Dist.CLIENT) @@ -165,12 +165,6 @@ public class CreateClient { return new ModelResourceLocation(block.getRegistryName(), suffix); } - @OnlyIn(Dist.CLIENT) - protected static void swapModels(Map modelRegistry, - ModelResourceLocation location, Function factory) { - modelRegistry.put(location, factory.apply(modelRegistry.get(location))); - } - @OnlyIn(Dist.CLIENT) protected static void swapModels(Map modelRegistry, List locations, Function factory) { @@ -179,12 +173,30 @@ public class CreateClient { }); } + @OnlyIn(Dist.CLIENT) + protected static void swapModels(Map modelRegistry, + ModelResourceLocation location, Function factory) { + modelRegistry.put(location, factory.apply(modelRegistry.get(location))); + } + + public static CustomItemModels getCustomItemModels() { + if (customItemModels == null) + customItemModels = new CustomItemModels(); + return customItemModels; + } + + public static CustomRenderedItems getCustomRenderedItems() { + if (customRenderedItems == null) + customRenderedItems = new CustomRenderedItems(); + return customRenderedItems; + } + public static CustomBlockModels getCustomBlockModels() { if (customBlockModels == null) customBlockModels = new CustomBlockModels(); return customBlockModels; } - + public static AllColorHandlers getColorHandler() { if (colorHandlers == null) colorHandlers = new AllColorHandlers(); diff --git a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java index 12bf61b45..6d9607d27 100644 --- a/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java +++ b/src/main/java/com/simibubi/create/compat/jei/CreateJEI.java @@ -5,16 +5,12 @@ import java.util.stream.Collectors; import com.google.common.base.Predicate; import com.simibubi.create.AllBlocks; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.Create; import com.simibubi.create.compat.jei.category.BlastingViaFanCategory; import com.simibubi.create.compat.jei.category.BlockCuttingCategory; import com.simibubi.create.compat.jei.category.BlockCuttingCategory.CondensedBlockCuttingRecipe; -import com.simibubi.create.content.contraptions.components.mixer.MixingRecipe; -import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity; -import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateScreen; -import com.simibubi.create.content.schematics.block.SchematicannonScreen; import com.simibubi.create.compat.jei.category.BlockzapperUpgradeCategory; import com.simibubi.create.compat.jei.category.CrushingCategory; import com.simibubi.create.compat.jei.category.MechanicalCraftingCategory; @@ -27,6 +23,10 @@ import com.simibubi.create.compat.jei.category.PressingCategory; import com.simibubi.create.compat.jei.category.SawingCategory; import com.simibubi.create.compat.jei.category.SmokingViaFanCategory; import com.simibubi.create.compat.jei.category.SplashingCategory; +import com.simibubi.create.content.contraptions.components.mixer.MixingRecipe; +import com.simibubi.create.content.contraptions.components.press.MechanicalPressTileEntity; +import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateScreen; +import com.simibubi.create.content.schematics.block.SchematicannonScreen; import com.simibubi.create.foundation.utility.Lang; import mezz.jei.api.IModPlugin; @@ -91,7 +91,7 @@ public class CreateJEI implements IModPlugin { @Override public void registerItemSubtypes(ISubtypeRegistration registration) { - registration.useNbtForSubtypes(AllItems.PLACEMENT_HANDGUN.get()); + registration.useNbtForSubtypes(AllItemsNew.BLOCKZAPPER.get()); } @Override @@ -159,7 +159,7 @@ public class CreateJEI implements IModPlugin { registration.addRecipeCatalyst(smokingFan, smokingCategory.getUid()); registration.addRecipeCatalyst(blastingFan, blastingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_PRESS.get()), pressingCategory.getUid()); - registration.addRecipeCatalyst(new ItemStack(AllItems.PLACEMENT_HANDGUN.get()), blockzapperCategory.getUid()); + registration.addRecipeCatalyst(new ItemStack(AllItemsNew.BLOCKZAPPER.get()), blockzapperCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_MIXER.get()), mixingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.BASIN.get()), mixingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.SAW.get()), sawingCategory.getUid()); @@ -167,8 +167,8 @@ public class CreateJEI implements IModPlugin { registration.addRecipeCatalyst(new ItemStack(Blocks.STONECUTTER), blockCuttingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_PRESS.get()), packingCategory.getUid()); registration.addRecipeCatalyst(new ItemStack(AllBlocks.BASIN.get()), packingCategory.getUid()); - registration.addRecipeCatalyst(AllItems.SAND_PAPER.asStack(), polishingCategory.getUid()); - registration.addRecipeCatalyst(AllItems.RED_SAND_PAPER.asStack(), polishingCategory.getUid()); + registration.addRecipeCatalyst(AllItemsNew.SAND_PAPER.asStack(), polishingCategory.getUid()); + registration.addRecipeCatalyst(AllItemsNew.RED_SAND_PAPER.asStack(), polishingCategory.getUid()); registration .addRecipeCatalyst(new ItemStack(AllBlocks.MECHANICAL_CRAFTER.get()), mechanicalCraftingCategory.getUid()); diff --git a/src/main/java/com/simibubi/create/compat/jei/category/BlastingViaFanCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/BlastingViaFanCategory.java index 96b526d40..f8310999c 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/BlastingViaFanCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/BlastingViaFanCategory.java @@ -1,7 +1,7 @@ package com.simibubi.create.compat.jei.category; import com.mojang.blaze3d.systems.RenderSystem; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.foundation.gui.GuiGameElement; import net.minecraft.fluid.Fluids; @@ -11,7 +11,7 @@ import net.minecraft.item.crafting.AbstractCookingRecipe; public class BlastingViaFanCategory extends ProcessingViaFanCategory { public BlastingViaFanCategory() { - super("blasting_via_fan", doubleItemIcon(AllItems.PROPELLER.get(), Items.LAVA_BUCKET)); + super("blasting_via_fan", doubleItemIcon(AllItemsNew.PROPELLER.get(), Items.LAVA_BUCKET)); } @Override diff --git a/src/main/java/com/simibubi/create/compat/jei/category/BlockzapperUpgradeCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/BlockzapperUpgradeCategory.java index 3d70fb229..93ec66f6e 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/BlockzapperUpgradeCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/BlockzapperUpgradeCategory.java @@ -8,7 +8,7 @@ import java.util.List; import java.util.stream.Collectors; import com.mojang.blaze3d.systems.RenderSystem; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.compat.jei.ScreenResourceWrapper; import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperUpgradeRecipe; import com.simibubi.create.foundation.gui.GuiGameElement; @@ -29,7 +29,7 @@ import net.minecraft.util.text.ITextComponent; public class BlockzapperUpgradeCategory extends CreateRecipeCategory { public BlockzapperUpgradeCategory() { - super("blockzapper_upgrade", itemIcon(AllItems.PLACEMENT_HANDGUN.get()), + super("blockzapper_upgrade", itemIcon(AllItemsNew.BLOCKZAPPER.get()), new ScreenResourceWrapper(BLOCKZAPPER_UPGRADE_RECIPE)); } diff --git a/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java index 5e95a3c2c..a016dcb71 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/CrushingCategory.java @@ -4,7 +4,7 @@ import java.util.Arrays; import java.util.List; import com.simibubi.create.AllBlocks; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.compat.jei.category.animations.AnimatedCrushingWheels; import com.simibubi.create.content.contraptions.components.crusher.AbstractCrushingRecipe; import com.simibubi.create.content.contraptions.processing.ProcessingOutput; @@ -20,7 +20,7 @@ public class CrushingCategory extends CreateRecipeCategory results = recipe.getRollableResults(); boolean single = results.size() == 1; @@ -47,7 +50,8 @@ public class MillingCategory extends CreateRecipeCategory getRecipes() { List recipes = new ArrayList<>(); - recipes.add(ConversionRecipe.create(AllItems.CHROMATIC_COMPOUND.asStack(), AllItems.SHADOW_STEEL.asStack())); - recipes.add(ConversionRecipe.create(AllItems.CHROMATIC_COMPOUND.asStack(), AllItems.REFINED_RADIANCE.asStack())); + recipes.add(ConversionRecipe.create(AllItemsNew.CHROMATIC_COMPOUND.asStack(), AllItemsNew.SHADOW_STEEL.asStack())); + recipes.add(ConversionRecipe.create(AllItemsNew.CHROMATIC_COMPOUND.asStack(), AllItemsNew.REFINED_RADIANCE.asStack())); return recipes; } public MysteriousItemConversionCategory() { - super("mystery_conversion", itemIcon(AllItems.CHROMATIC_COMPOUND.get()), emptyBackground(177, 50)); + super("mystery_conversion", itemIcon(AllItemsNew.CHROMATIC_COMPOUND.get()), emptyBackground(177, 50)); } @Override diff --git a/src/main/java/com/simibubi/create/compat/jei/category/PolishingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/PolishingCategory.java index 3b3399f27..cb08114be 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/PolishingCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/PolishingCategory.java @@ -4,7 +4,7 @@ import java.util.Arrays; import java.util.List; import com.mojang.blaze3d.systems.RenderSystem; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.content.contraptions.processing.ProcessingOutput; import com.simibubi.create.content.curiosities.tools.SandPaperPolishingRecipe; import com.simibubi.create.foundation.gui.AllGuiTextures; @@ -25,8 +25,8 @@ public class PolishingCategory extends CreateRecipeCategory { private AnimatedPress press = new AnimatedPress(false); public PressingCategory() { - super("pressing", doubleItemIcon(AllBlocks.MECHANICAL_PRESS.get(), AllItems.IRON_SHEET.get()), + super("pressing", doubleItemIcon(AllBlocks.MECHANICAL_PRESS.get(), AllItemsNew.IRON_SHEET.get()), emptyBackground(177, 70)); } diff --git a/src/main/java/com/simibubi/create/compat/jei/category/SmokingViaFanCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/SmokingViaFanCategory.java index 5be594658..11e307b77 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/SmokingViaFanCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/SmokingViaFanCategory.java @@ -1,6 +1,6 @@ package com.simibubi.create.compat.jei.category; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.foundation.gui.GuiGameElement; import net.minecraft.block.Blocks; @@ -10,7 +10,7 @@ import net.minecraft.item.crafting.SmokingRecipe; public class SmokingViaFanCategory extends ProcessingViaFanCategory { public SmokingViaFanCategory() { - super("smoking_via_fan", doubleItemIcon(AllItems.PROPELLER.get(), Items.BLAZE_POWDER)); + super("smoking_via_fan", doubleItemIcon(AllItemsNew.PROPELLER.get(), Items.BLAZE_POWDER)); } @Override diff --git a/src/main/java/com/simibubi/create/compat/jei/category/SplashingCategory.java b/src/main/java/com/simibubi/create/compat/jei/category/SplashingCategory.java index 9fe2eb3c6..59c61d9f3 100644 --- a/src/main/java/com/simibubi/create/compat/jei/category/SplashingCategory.java +++ b/src/main/java/com/simibubi/create/compat/jei/category/SplashingCategory.java @@ -4,7 +4,7 @@ import java.util.Arrays; import java.util.List; import com.mojang.blaze3d.systems.RenderSystem; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.content.contraptions.components.fan.SplashingRecipe; import com.simibubi.create.content.contraptions.processing.ProcessingOutput; import com.simibubi.create.foundation.gui.AllGuiTextures; @@ -20,7 +20,7 @@ import net.minecraft.item.Items; public class SplashingCategory extends ProcessingViaFanCategory { public SplashingCategory() { - super("splashing", doubleItemIcon(AllItems.PROPELLER.get(), Items.WATER_BUCKET)); + super("splashing", doubleItemIcon(AllItemsNew.PROPELLER.get(), Items.WATER_BUCKET)); } @Override diff --git a/src/main/java/com/simibubi/create/content/AllSections.java b/src/main/java/com/simibubi/create/content/AllSections.java index 011d4b853..9cc4e920a 100644 --- a/src/main/java/com/simibubi/create/content/AllSections.java +++ b/src/main/java/com/simibubi/create/content/AllSections.java @@ -1,6 +1,5 @@ package com.simibubi.create.content; -import com.simibubi.create.AllItems; import com.simibubi.create.Create; import com.simibubi.create.foundation.item.ItemDescription.Palette; @@ -52,14 +51,13 @@ public enum AllSections { } static AllSections ofItem(Item item) { - for (AllItems allItems : AllItems.values()) - if (allItems.get() == item) - return allItems.section; - return UNASSIGNED; + return Create.registrate() + .getSection(item); } static AllSections ofBlock(Block block) { - return Create.registrate().getSection(block); + return Create.registrate() + .getSection(block); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/KineticDebugger.java b/src/main/java/com/simibubi/create/content/contraptions/KineticDebugger.java index 22de500d7..74a5e515f 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/KineticDebugger.java +++ b/src/main/java/com/simibubi/create/content/contraptions/KineticDebugger.java @@ -1,29 +1,29 @@ package com.simibubi.create.content.contraptions; -import com.mojang.blaze3d.matrix.MatrixStack; -import com.mojang.blaze3d.vertex.IVertexBuilder; +import com.simibubi.create.CreateClient; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.foundation.config.AllConfigs; +import com.simibubi.create.foundation.utility.ColorHelper; +import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.IRenderTypeBuffer; -import net.minecraft.client.renderer.RenderType; -import net.minecraft.client.renderer.WorldRenderer; import net.minecraft.client.world.ClientWorld; import net.minecraft.tileentity.TileEntity; +import net.minecraft.util.Direction; import net.minecraft.util.Direction.Axis; +import net.minecraft.util.Direction.AxisDirection; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.util.math.RayTraceResult; -import net.minecraft.util.math.Vec3i; +import net.minecraft.util.math.Vec3d; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.World; public class KineticDebugger { - public static void renderSourceOutline(MatrixStack ms, IRenderTypeBuffer buffer) { + public static void tick() { if (!isActive()) return; KineticTileEntity te = getSelectedTE(); @@ -33,39 +33,24 @@ public class KineticDebugger { World world = Minecraft.getInstance().world; BlockPos toOutline = te.hasSource() ? te.source : te.getPos(); BlockState state = te.getBlockState(); - VoxelShape shape = world.getBlockState(toOutline).getShape(world, toOutline); + VoxelShape shape = world.getBlockState(toOutline) + .getRenderShape(world, toOutline); - IVertexBuilder vb = buffer.getBuffer(RenderType.getLines()); + if (te.getTheoreticalSpeed() != 0) + CreateClient.outliner.chaseAABB("kineticSource", shape.getBoundingBox() + .offset(toOutline)) + .lineWidth(1 / 16f) + .colored(te.hasSource() ? ColorHelper.colorFromLong(te.network) : 0xffcc00); - ms.push(); - ms.translate(toOutline.getX(), toOutline.getY(), toOutline.getZ()); - float f = 1 + 1 / 128f; - ms.scale(f, f, f); - - WorldRenderer.func_228431_a_(ms, vb, shape, 0, 0, 0, te.hasSource() ? .5f : 1, .75f, .75f, 1); - - Vec3i offset = te.getPos().subtract(toOutline); - ms.translate(offset.getX(), offset.getY(), offset.getZ()); - if (state.getBlock() instanceof IRotate) { - Axis axis = ((IRotate)state.getBlock()).getRotationAxis(state); - switch (axis) { - case X: - vb.vertex(ms.peek().getModel(), 0, 0.5f, 0.5f).color(1f, 1f, 1f, 1f).endVertex(); - vb.vertex(ms.peek().getModel(), 1, 0.5f, 0.5f).color(1f, 1f, 1f, 1f).endVertex(); - break; - case Y: - vb.vertex(ms.peek().getModel(), 0.5f, 0, 0.5f).color(1f, 1f, 1f, 1f).endVertex(); - vb.vertex(ms.peek().getModel(), 0.5f, 1, 0.5f).color(1f, 1f, 1f, 1f).endVertex(); - break; - case Z: - vb.vertex(ms.peek().getModel(), 0.5f, 0.5f, 0).color(1f, 1f, 1f, 1f).endVertex(); - vb.vertex(ms.peek().getModel(), 0.5f, 0.5f, 1).color(1f, 1f, 1f, 1f).endVertex(); - break; - } + Axis axis = ((IRotate) state.getBlock()).getRotationAxis(state); + Vec3d vec = new Vec3d(Direction.getFacingFromAxis(AxisDirection.POSITIVE, axis) + .getDirectionVec()); + Vec3d center = VecHelper.getCenterOf(te.getPos()); + CreateClient.outliner.showLine("rotationAxis", center.add(vec), center.subtract(vec)) + .lineWidth(1 / 16f); } - ms.pop(); } public static boolean isActive() { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java index 20cb17feb..0338e71bf 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterBlock.java @@ -1,7 +1,7 @@ package com.simibubi.create.content.contraptions.components.crafter; import com.simibubi.create.AllBlocks; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock; import com.simibubi.create.content.contraptions.components.crafter.ConnectedInputHandler.ConnectedInput; import com.simibubi.create.content.contraptions.components.crafter.MechanicalCrafterTileEntity.Phase; @@ -109,7 +109,7 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock implements IT MechanicalCrafterTileEntity crafter = CrafterHelper.getCrafter(worldIn, pos); if (crafter != null) { if (crafter.covered) - Block.spawnAsEntity(worldIn, pos, AllItems.SLOT_COVER.asStack()); + Block.spawnAsEntity(worldIn, pos, AllItemsNew.CRAFTER_SLOT_COVER.asStack()); crafter.ejectWholeGrid(); } @@ -172,7 +172,7 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock implements IT if (!(te instanceof MechanicalCrafterTileEntity)) return ActionResultType.PASS; MechanicalCrafterTileEntity crafter = (MechanicalCrafterTileEntity) te; - boolean wrenched = AllItems.WRENCH.typeOf(heldItem); + boolean wrenched = AllItemsNew.typeOf(AllItemsNew.WRENCH, heldItem); if (hit.getFace() == state.get(HORIZONTAL_FACING)) { @@ -185,7 +185,7 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock implements IT if (worldIn.isRemote) return ActionResultType.SUCCESS; - if (AllItems.SLOT_COVER.typeOf(heldItem)) { + if (AllItemsNew.typeOf(AllItemsNew.CRAFTER_SLOT_COVER, heldItem)) { if (crafter.covered) return ActionResultType.PASS; crafter.covered = true; @@ -216,7 +216,7 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock implements IT crafter.markDirty(); crafter.sendData(); if (!player.isCreative()) - player.inventory.placeItemBackInInventory(worldIn, AllItems.SLOT_COVER.asStack()); + player.inventory.placeItemBackInInventory(worldIn, AllItemsNew.CRAFTER_SLOT_COVER.asStack()); return ActionResultType.SUCCESS; } return ActionResultType.PASS; @@ -233,11 +233,6 @@ public class MechanicalCrafterBlock extends HorizontalKineticBlock implements IT return ActionResultType.PASS; } -// @Override // TODO 1.15 register layer -// public BlockRenderLayer getRenderLayer() { -// return BlockRenderLayer.CUTOUT_MIPPED; -// } - @Override public float getParticleTargetRadius() { return .85f; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java index a1f9c8487..e2e9ef13a 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crafter/MechanicalCrafterTileEntity.java @@ -9,7 +9,7 @@ import java.util.List; import org.apache.commons.lang3.tuple.Pair; import com.simibubi.create.AllBlocks; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.contraptions.base.KineticTileEntity; import com.simibubi.create.content.contraptions.components.crafter.ConnectedInputHandler.ConnectedInput; @@ -98,7 +98,7 @@ public class MechanicalCrafterTileEntity extends KineticTileEntity { inserting = new InsertingBehaviour(this, Attachments.toward(this::getTargetFacing)); connectivity = new EdgeInteractionBehaviour(this, ConnectedInputHandler::toggleConnection) .connectivity(ConnectedInputHandler::shouldConnect) - .require(AllItems.WRENCH.get()); + .require(AllItemsNew.WRENCH.get()); behaviours.add(inserting); behaviours.add(connectivity); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelBlock.java index e6c275ff4..7046e6c10 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/crusher/CrushingWheelBlock.java @@ -172,11 +172,6 @@ public class CrushingWheelBlock extends RotatedPillarKineticBlock implements ITE return face.getAxis() == state.get(AXIS); } -// @Override // TODO 1.15 register layer -// public BlockRenderLayer getRenderLayer() { -// return BlockRenderLayer.CUTOUT; -// } - @Override protected boolean hasStaticPart() { return false; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlock.java index 2587d5391..9f319cdde 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/deployer/DeployerBlock.java @@ -1,6 +1,6 @@ package com.simibubi.create.content.contraptions.components.deployer; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.AllShapes; import com.simibubi.create.content.contraptions.base.DirectionalAxisKineticBlock; import com.simibubi.create.content.contraptions.components.structureMovement.IPortableBlock; @@ -24,8 +24,7 @@ import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.world.IBlockReader; import net.minecraft.world.World; -public class DeployerBlock extends DirectionalAxisKineticBlock - implements ITE, IPortableBlock { +public class DeployerBlock extends DirectionalAxisKineticBlock implements ITE, IPortableBlock { public static MovementBehaviour MOVEMENT = new DeployerMovementBehaviour(); @@ -74,7 +73,7 @@ public class DeployerBlock extends DirectionalAxisKineticBlock te.player = null; } }); - + TileEntityBehaviour.destroy(worldIn, pos, FilteringBehaviour.TYPE); worldIn.removeTileEntity(pos); } @@ -82,9 +81,10 @@ public class DeployerBlock extends DirectionalAxisKineticBlock @Override public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, - BlockRayTraceResult hit) { - ItemStack heldByPlayer = player.getHeldItem(handIn).copy(); - if (AllItems.WRENCH.typeOf(heldByPlayer)) + BlockRayTraceResult hit) { + ItemStack heldByPlayer = player.getHeldItem(handIn) + .copy(); + if (AllItemsNew.typeOf(AllItemsNew.WRENCH, heldByPlayer)) return ActionResultType.PASS; if (hit.getFace() != state.get(FACING)) @@ -93,7 +93,8 @@ public class DeployerBlock extends DirectionalAxisKineticBlock return ActionResultType.SUCCESS; withTileEntityDo(worldIn, pos, te -> { - ItemStack heldByDeployer = te.player.getHeldItemMainhand().copy(); + ItemStack heldByDeployer = te.player.getHeldItemMainhand() + .copy(); if (heldByDeployer.isEmpty() && heldByPlayer.isEmpty()) return; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanBlock.java index d13bf43f1..20a8fb794 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/fan/EncasedFanBlock.java @@ -67,11 +67,6 @@ public class EncasedFanBlock extends DirectionalKineticBlock implements ITE iterator = entries.keySet() .iterator(); iterator.hasNext();) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java index 38b3dc708..c1ccd9928 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/Contraption.java @@ -28,12 +28,12 @@ import com.simibubi.create.content.contraptions.components.structureMovement.cha import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueEntity; import com.simibubi.create.content.contraptions.components.structureMovement.glue.SuperGlueHandler; import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock; -import com.simibubi.create.content.contraptions.components.structureMovement.piston.PistonExtensionPoleBlock; import com.simibubi.create.content.contraptions.components.structureMovement.piston.MechanicalPistonBlock.PistonState; +import com.simibubi.create.content.contraptions.components.structureMovement.piston.PistonExtensionPoleBlock; import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyBlock; -import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyTileEntity; import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyBlock.MagnetBlock; import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyBlock.RopeBlock; +import com.simibubi.create.content.contraptions.components.structureMovement.pulley.PulleyTileEntity; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock; import com.simibubi.create.content.logistics.block.inventories.AdjustableCrateBlock; import com.simibubi.create.content.logistics.block.redstone.RedstoneContactBlock; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionEntity.java index f137d7a5c..bf36fac2d 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/ContraptionEntity.java @@ -12,8 +12,8 @@ import org.apache.commons.lang3.tuple.MutablePair; import com.google.common.collect.ImmutableSet; import com.simibubi.create.AllEntityTypes; import com.simibubi.create.content.contraptions.components.structureMovement.bearing.BearingContraption; -import com.simibubi.create.content.contraptions.components.structureMovement.mounted.MountedContraption; import com.simibubi.create.content.contraptions.components.structureMovement.mounted.CartAssemblerTileEntity.CartMovementMode; +import com.simibubi.create.content.contraptions.components.structureMovement.mounted.MountedContraption; import com.simibubi.create.content.contraptions.components.structureMovement.piston.LinearActuatorTileEntity; import com.simibubi.create.foundation.item.ItemHelper; import com.simibubi.create.foundation.networking.AllPackets; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java index e77880345..4806c00e0 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/bearing/BearingContraption.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.contraptions.components.structureMovement.be import org.apache.commons.lang3.tuple.Pair; -import com.simibubi.create.AllBlockTags; +import com.simibubi.create.AllTags.AllBlockTags; import com.simibubi.create.content.contraptions.components.structureMovement.AllContraptionTypes; import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/AbstractChassisBlock.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/AbstractChassisBlock.java index c4c3b8285..fa80408d8 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/AbstractChassisBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/chassis/AbstractChassisBlock.java @@ -1,6 +1,6 @@ package com.simibubi.create.content.contraptions.components.structureMovement.chassis; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.AllSoundEvents; import com.simibubi.create.content.contraptions.wrench.IWrenchable; @@ -42,12 +42,13 @@ public abstract class AbstractChassisBlock extends RotatedPillarBlock implements @Override public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, - BlockRayTraceResult hit) { + BlockRayTraceResult hit) { if (!player.isAllowEdit()) return ActionResultType.PASS; ItemStack heldItem = player.getHeldItem(handIn); - boolean isSlimeBall = heldItem.getItem().isIn(Tags.Items.SLIMEBALLS) || AllItems.SUPER_GLUE.typeOf(heldItem); + boolean isSlimeBall = heldItem.getItem() + .isIn(Tags.Items.SLIMEBALLS) || AllItemsNew.typeOf(AllItemsNew.SUPER_GLUE, heldItem); BooleanProperty affectedSide = getGlueableSide(state, hit.getFace()); if (affectedSide == null) diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueEntity.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueEntity.java index 56199fb23..ebdb6b6b6 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueEntity.java @@ -5,7 +5,7 @@ import javax.annotation.Nullable; import org.apache.commons.lang3.Validate; import com.simibubi.create.AllEntityTypes; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.AllSoundEvents; import com.simibubi.create.content.contraptions.components.structureMovement.BlockMovementTraits; import com.simibubi.create.content.schematics.ISpecialEntityItemRequirement; @@ -225,7 +225,7 @@ public class SuperGlueEntity extends Entity implements IEntityAdditionalSpawnDat @Override public ItemStack getPickedResult(RayTraceResult target) { - return AllItems.SUPER_GLUE.asStack(); + return AllItemsNew.SUPER_GLUE.asStack(); } @Override @@ -386,7 +386,7 @@ public class SuperGlueEntity extends Entity implements IEntityAdditionalSpawnDat @Override public ItemRequirement getRequiredItems() { - return new ItemRequirement(ItemUseType.DAMAGE, AllItems.SUPER_GLUE.get()); + return new ItemRequirement(ItemUseType.DAMAGE, AllItemsNew.SUPER_GLUE.get()); } } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java index 67a6d7be7..47b07ad32 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueHandler.java @@ -4,7 +4,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.foundation.networking.AllPackets; import com.simibubi.create.foundation.utility.worldWrappers.RayTraceWorld; @@ -55,7 +55,7 @@ public class SuperGlueHandler { Map gatheredGlue = gatherGlue(world, pos); for (Direction direction : gatheredGlue.keySet()) AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(() -> entity), - new GlueEffectPacket(pos, direction, true)); + new GlueEffectPacket(pos, direction, true)); if (entity instanceof PlayerEntity) glueInOffHandAppliesOnBlockPlace(event, pos, (PlayerEntity) entity); @@ -63,10 +63,11 @@ public class SuperGlueHandler { public static void glueInOffHandAppliesOnBlockPlace(EntityPlaceEvent event, BlockPos pos, PlayerEntity placer) { ItemStack itemstack = placer.getHeldItemOffhand(); - if (!AllItems.SUPER_GLUE.typeOf(itemstack)) + if (!AllItemsNew.typeOf(AllItemsNew.SUPER_GLUE, itemstack)) return; - double distance = placer.getAttribute(PlayerEntity.REACH_DISTANCE).getValue(); + double distance = placer.getAttribute(PlayerEntity.REACH_DISTANCE) + .getValue(); Vec3d start = placer.getEyePosition(1); Vec3d look = placer.getLook(1); Vec3d end = start.add(look.x * distance, look.y * distance, look.z * distance); @@ -74,14 +75,16 @@ public class SuperGlueHandler { RayTraceWorld rayTraceWorld = new RayTraceWorld(world, (p, state) -> p.equals(pos) ? Blocks.AIR.getDefaultState() : state); - BlockRayTraceResult ray = rayTraceWorld.rayTraceBlocks(new RayTraceContext(start, end, - RayTraceContext.BlockMode.OUTLINE, RayTraceContext.FluidMode.NONE, placer)); + BlockRayTraceResult ray = rayTraceWorld.rayTraceBlocks( + new RayTraceContext(start, end, RayTraceContext.BlockMode.OUTLINE, RayTraceContext.FluidMode.NONE, placer)); Direction face = ray.getFace(); if (ray == null || face == null || ray.getType() == Type.MISS) return; - if (!ray.getPos().offset(face).equals(pos)) { + if (!ray.getPos() + .offset(face) + .equals(pos)) { event.setCanceled(true); return; } @@ -96,7 +99,7 @@ public class SuperGlueHandler { entity.playPlaceSound(); world.addEntity(entity); AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(() -> entity), - new GlueEffectPacket(ray.getPos(), face, true)); + new GlueEffectPacket(ray.getPos(), face, true)); } itemstack.damageItem(1, placer, SuperGlueItem::onBroken); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueRenderer.java index e4f9fef00..eb32fd8cc 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/glue/SuperGlueRenderer.java @@ -1,9 +1,11 @@ package com.simibubi.create.content.contraptions.components.structureMovement.glue; +import static com.simibubi.create.AllItemsNew.typeOf; + import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.matrix.MatrixStack.Entry; import com.mojang.blaze3d.vertex.IVertexBuilder; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.Create; import com.simibubi.create.foundation.utility.AngleHelper; import com.simibubi.create.foundation.utility.VecHelper; @@ -52,8 +54,8 @@ public class SuperGlueRenderer extends EntityRenderer { PlayerEntity player = Minecraft.getInstance().player; boolean visible = isVisible(entity); - boolean holdingGlue = AllItems.SUPER_GLUE.typeOf(player.getHeldItemMainhand()) - || AllItems.SUPER_GLUE.typeOf(player.getHeldItemOffhand()); + boolean holdingGlue = typeOf(AllItemsNew.SUPER_GLUE, player.getHeldItemMainhand()) + || typeOf(AllItemsNew.SUPER_GLUE, player.getHeldItemOffhand()); if (!visible && !holdingGlue) return; diff --git a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MinecartContraptionItem.java b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MinecartContraptionItem.java index 7ed6c90f9..8a9af5bff 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MinecartContraptionItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/components/structureMovement/mounted/MinecartContraptionItem.java @@ -4,7 +4,7 @@ import java.util.List; import javax.annotation.Nullable; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.content.contraptions.components.structureMovement.Contraption; import com.simibubi.create.content.contraptions.components.structureMovement.ContraptionEntity; @@ -39,7 +39,15 @@ public class MinecartContraptionItem extends Item { private final AbstractMinecartEntity.Type minecartType; - public MinecartContraptionItem(Type minecartTypeIn, Properties builder) { + public static MinecartContraptionItem rideable(Properties builder) { + return new MinecartContraptionItem(Type.RIDEABLE, builder); + } + + public static MinecartContraptionItem furnace(Properties builder) { + return new MinecartContraptionItem(Type.FURNACE, builder); + } + + private MinecartContraptionItem(Type minecartTypeIn, Properties builder) { super(builder); this.minecartType = minecartTypeIn; DispenserBlock.registerDispenseBehavior(this, DISPENSER_BEHAVIOR); @@ -51,16 +59,18 @@ public class MinecartContraptionItem extends Item { @Override public ItemStack dispenseStack(IBlockSource source, ItemStack stack) { - Direction direction = source.getBlockState().get(DispenserBlock.FACING); + Direction direction = source.getBlockState() + .get(DispenserBlock.FACING); World world = source.getWorld(); double d0 = source.getX() + (double) direction.getXOffset() * 1.125D; double d1 = Math.floor(source.getY()) + (double) direction.getYOffset(); double d2 = source.getZ() + (double) direction.getZOffset() * 1.125D; - BlockPos blockpos = source.getBlockPos().offset(direction); + BlockPos blockpos = source.getBlockPos() + .offset(direction); BlockState blockstate = world.getBlockState(blockpos); RailShape railshape = blockstate.getBlock() instanceof AbstractRailBlock - ? ((AbstractRailBlock) blockstate.getBlock()).getRailDirection(blockstate, world, blockpos, null) - : RailShape.NORTH_SOUTH; + ? ((AbstractRailBlock) blockstate.getBlock()).getRailDirection(blockstate, world, blockpos, null) + : RailShape.NORTH_SOUTH; double d3; if (blockstate.isIn(BlockTags.RAILS)) { if (railshape.isAscending()) { @@ -69,15 +79,16 @@ public class MinecartContraptionItem extends Item { d3 = 0.1D; } } else { - if (!blockstate.isAir(world, blockpos) || !world.getBlockState(blockpos.down()).isIn(BlockTags.RAILS)) { + if (!blockstate.isAir(world, blockpos) || !world.getBlockState(blockpos.down()) + .isIn(BlockTags.RAILS)) { return this.behaviourDefaultDispenseItem.dispense(source, stack); } BlockState blockstate1 = world.getBlockState(blockpos.down()); RailShape railshape1 = blockstate1.getBlock() instanceof AbstractRailBlock - ? ((AbstractRailBlock) blockstate1.getBlock()).getRailDirection(blockstate1, world, - blockpos.down(), null) - : RailShape.NORTH_SOUTH; + ? ((AbstractRailBlock) blockstate1.getBlock()).getRailDirection(blockstate1, world, blockpos.down(), + null) + : RailShape.NORTH_SOUTH; if (direction != Direction.DOWN && railshape1.isAscending()) { d3 = -0.4D; } else { @@ -86,7 +97,7 @@ public class MinecartContraptionItem extends Item { } AbstractMinecartEntity abstractminecartentity = AbstractMinecartEntity.create(world, d0, d1 + d3, d2, - ((MinecartContraptionItem) stack.getItem()).minecartType); + ((MinecartContraptionItem) stack.getItem()).minecartType); if (stack.hasDisplayName()) abstractminecartentity.setCustomName(stack.getDisplayName()); world.addEntity(abstractminecartentity); @@ -98,7 +109,8 @@ public class MinecartContraptionItem extends Item { @Override protected void playDispenseSound(IBlockSource source) { - source.getWorld().playEvent(1000, source.getBlockPos(), 0); + source.getWorld() + .playEvent(1000, source.getBlockPos(), 0); } }; @@ -114,23 +126,22 @@ public class MinecartContraptionItem extends Item { ItemStack itemstack = context.getItem(); if (!world.isRemote) { RailShape railshape = blockstate.getBlock() instanceof AbstractRailBlock - ? ((AbstractRailBlock) blockstate.getBlock()).getRailDirection(blockstate, world, blockpos, - null) - : RailShape.NORTH_SOUTH; + ? ((AbstractRailBlock) blockstate.getBlock()).getRailDirection(blockstate, world, blockpos, null) + : RailShape.NORTH_SOUTH; double d0 = 0.0D; if (railshape.isAscending()) { d0 = 0.5D; } - AbstractMinecartEntity abstractminecartentity = AbstractMinecartEntity.create(world, - (double) blockpos.getX() + 0.5D, (double) blockpos.getY() + 0.0625D + d0, - (double) blockpos.getZ() + 0.5D, this.minecartType); + AbstractMinecartEntity abstractminecartentity = + AbstractMinecartEntity.create(world, (double) blockpos.getX() + 0.5D, + (double) blockpos.getY() + 0.0625D + d0, (double) blockpos.getZ() + 0.5D, this.minecartType); if (itemstack.hasDisplayName()) abstractminecartentity.setCustomName(itemstack.getDisplayName()); PlayerEntity player = context.getPlayer(); world.addEntity(abstractminecartentity); addContraptionToMinecart(world, itemstack, abstractminecartentity, - player == null ? null : player.getHorizontalFacing()); + player == null ? null : player.getHorizontalFacing()); } itemstack.shrink(1); @@ -139,7 +150,7 @@ public class MinecartContraptionItem extends Item { } public static void addContraptionToMinecart(World world, ItemStack itemstack, AbstractMinecartEntity cart, - @Nullable Direction newFacing) { + @Nullable Direction newFacing) { CompoundNBT tag = itemstack.getOrCreateTag(); if (tag.contains("Contraption")) { CompoundNBT contraptionTag = tag.getCompound("Contraption"); @@ -164,8 +175,7 @@ public class MinecartContraptionItem extends Item { } @Override - public void fillItemGroup(ItemGroup group, NonNullList items) { - } + public void fillItemGroup(ItemGroup group, NonNullList items) {} @SubscribeEvent public static void wrenchCanBeUsedToPickUpMinecartContraptions(PlayerInteractEvent.EntityInteract event) { @@ -175,7 +185,7 @@ public class MinecartContraptionItem extends Item { return; ItemStack wrench = player.getHeldItem(event.getHand()); - if (!AllItems.WRENCH.typeOf(wrench)) + if (!AllItemsNew.typeOf(AllItemsNew.WRENCH, wrench)) return; if (entity instanceof ContraptionEntity) entity = entity.getRidingEntity(); @@ -202,13 +212,16 @@ public class MinecartContraptionItem extends Item { public static ItemStack create(Type type, ContraptionEntity entity) { ItemStack stack = - (type == Type.RIDEABLE ? AllItems.MINECART_CONTRAPTION : AllItems.FURNACE_MINECART_CONTRAPTION).asStack(); - CompoundNBT tag = entity.getContraption().writeNBT(); + (type == Type.RIDEABLE ? AllItemsNew.MINECART_CONTRAPTION : AllItemsNew.FURNACE_MINECART_CONTRAPTION) + .asStack(); + CompoundNBT tag = entity.getContraption() + .writeNBT(); tag.remove("UUID"); tag.remove("Pos"); tag.remove("Motion"); tag.putFloat("InitialAngle", entity.getInitialAngle()); - stack.getOrCreateTag().put("Contraption", tag); + stack.getOrCreateTag() + .put("Contraption", tag); return stack; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java b/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java index 87821818f..638de5236 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java +++ b/src/main/java/com/simibubi/create/content/contraptions/goggles/GoggleOverlayRenderer.java @@ -4,7 +4,7 @@ import java.util.ArrayList; import java.util.List; import com.mojang.blaze3d.systems.RenderSystem; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.foundation.gui.GuiGameElement; import net.minecraft.client.Minecraft; @@ -51,7 +51,7 @@ public class GoggleOverlayRenderer { List tooltip = new ArrayList<>(); - if (goggleInformation && AllItems.GOGGLES.typeOf(goggles)) { + if (goggleInformation && AllItemsNew.typeOf(AllItemsNew.GOGGLES, goggles)) { IHaveGoggleInformation gte = (IHaveGoggleInformation) te; if (!gte.addToGoggleTooltip(tooltip, mc.player.isSneaking())) goggleInformation = false; @@ -78,7 +78,7 @@ public class GoggleOverlayRenderer { tooltipScreen.init(mc, mc.getWindow().getScaledWidth(), mc.getWindow().getScaledHeight()); tooltipScreen.renderTooltip(tooltip, tooltipScreen.width / 2, tooltipScreen.height / 2); - ItemStack item = AllItems.GOGGLES.asStack(); + ItemStack item = AllItemsNew.GOGGLES.asStack(); GuiGameElement.of(item).at(tooltipScreen.width / 2 + 10, tooltipScreen.height / 2 - 16).render(); RenderSystem.popMatrix(); } diff --git a/src/main/java/com/simibubi/create/content/contraptions/goggles/GogglesItem.java b/src/main/java/com/simibubi/create/content/contraptions/goggles/GogglesItem.java index 831e93244..55e953b57 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/goggles/GogglesItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/goggles/GogglesItem.java @@ -1,6 +1,6 @@ package com.simibubi.create.content.contraptions.goggles; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import net.minecraft.block.DispenserBlock; import net.minecraft.entity.MobEntity; @@ -41,7 +41,7 @@ public class GogglesItem extends Item { public static boolean canSeeParticles(PlayerEntity player) { for (ItemStack itemStack : player.getArmorInventoryList()) - if (AllItems.GOGGLES.typeOf(itemStack)) + if (AllItemsNew.typeOf(AllItemsNew.GOGGLES, itemStack)) return true; return false; } diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java index 9a46ffa13..bbd3f68ec 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/advanced/sequencer/SequencedGearshiftBlock.java @@ -1,6 +1,6 @@ package com.simibubi.create.content.contraptions.relays.advanced.sequencer; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.content.contraptions.base.HorizontalAxisKineticBlock; import com.simibubi.create.content.contraptions.base.KineticBlock; import com.simibubi.create.content.contraptions.base.RotatedPillarKineticBlock; @@ -79,7 +79,7 @@ public class SequencedGearshiftBlock extends HorizontalAxisKineticBlock implemen public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, BlockRayTraceResult hit) { ItemStack held = player.getHeldItemMainhand(); - if (AllItems.WRENCH.typeOf(held)) + if (AllItemsNew.typeOf(AllItemsNew.WRENCH, held)) return ActionResultType.PASS; if (held.getItem() instanceof BlockItem) { BlockItem blockItem = (BlockItem) held.getItem(); diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltBlock.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltBlock.java index dd202a31a..357ba36ca 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltBlock.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltBlock.java @@ -8,7 +8,7 @@ import java.util.List; import org.apache.commons.lang3.mutable.MutableInt; import com.simibubi.create.AllBlocks; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.content.contraptions.base.HorizontalKineticBlock; import com.simibubi.create.content.contraptions.relays.belt.transport.BeltMovementHandler.TransportedEntityInfo; import com.simibubi.create.content.logistics.block.belts.tunnel.BeltTunnelBlock; @@ -82,7 +82,7 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE p_149666_2_) { - p_149666_2_.add(AllItems.BELT_CONNECTOR.asStack()); + p_149666_2_.add(AllItemsNew.BELT_CONNECTOR.asStack()); } @Override @@ -106,7 +106,7 @@ public class BeltBlock extends HorizontalKineticBlock implements ITE items) { super.fillItemGroup(group, items); - items.add(AllItems.VERTICAL_GEARBOX.asStack()); + items.add(AllItemsNew.VERTICAL_GEARBOX.asStack()); } @SuppressWarnings("deprecation") @@ -49,7 +49,7 @@ public class GearboxBlock extends RotatedPillarKineticBlock { public List getDrops(BlockState state, Builder builder) { if (state.get(AXIS).isVertical()) return super.getDrops(state, builder); - return Arrays.asList(new ItemStack(AllItems.VERTICAL_GEARBOX.get())); + return Arrays.asList(new ItemStack(AllItemsNew.VERTICAL_GEARBOX.get())); } @Override @@ -57,7 +57,7 @@ public class GearboxBlock extends RotatedPillarKineticBlock { PlayerEntity player) { if (state.get(AXIS).isVertical()) return super.getPickBlock(state, target, world, pos, player); - return new ItemStack(AllItems.VERTICAL_GEARBOX.get()); + return new ItemStack(AllItemsNew.VERTICAL_GEARBOX.get()); } @Override diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/VerticalGearboxItem.java b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/VerticalGearboxItem.java index 02c3f1fae..d2346ab30 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/VerticalGearboxItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/gearbox/VerticalGearboxItem.java @@ -28,6 +28,11 @@ public class VerticalGearboxItem extends BlockItem { @Override public void fillItemGroup(ItemGroup p_150895_1_, NonNullList p_150895_2_) { } + + @Override + public String getTranslationKey() { + return "item.create.vertical_gearbox"; + } @Override public void addToBlockToItemMap(Map p_195946_1_, Item p_195946_2_) { diff --git a/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItem.java b/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItem.java index 3263e9ecd..11ce1e717 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItem.java +++ b/src/main/java/com/simibubi/create/content/contraptions/wrench/WrenchItem.java @@ -1,11 +1,7 @@ package com.simibubi.create.content.contraptions.wrench; -import com.simibubi.create.foundation.block.render.CustomRenderedItemModel; -import com.simibubi.create.foundation.item.IHaveCustomItemModel; - import net.minecraft.block.Block; import net.minecraft.block.BlockState; -import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; @@ -14,10 +10,8 @@ import net.minecraft.util.ActionResultType; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraft.world.server.ServerWorld; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; -public class WrenchItem extends Item implements IHaveCustomItemModel { +public class WrenchItem extends Item { public WrenchItem(Properties properties) { super(properties); @@ -40,9 +34,9 @@ public class WrenchItem extends Item implements IHaveCustomItemModel { if (world instanceof ServerWorld) { if (!player.isCreative()) Block.getDrops(state, (ServerWorld) world, pos, world.getTileEntity(pos), player, context.getItem()) - .forEach(itemStack -> { - player.inventory.placeItemBackInInventory(world, itemStack); - }); + .forEach(itemStack -> { + player.inventory.placeItemBackInInventory(world, itemStack); + }); state.spawnAdditionalDrops(world, pos, ItemStack.EMPTY); world.destroyBlock(pos, false); } @@ -52,10 +46,4 @@ public class WrenchItem extends Item implements IHaveCustomItemModel { return actor.onWrenched(state, context); } - @Override - @OnlyIn(Dist.CLIENT) - public CustomRenderedItemModel createModel(IBakedModel original) { - return new WrenchModel(original); - } - } diff --git a/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundColor.java b/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundColor.java new file mode 100644 index 000000000..34b5b503d --- /dev/null +++ b/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundColor.java @@ -0,0 +1,28 @@ +package com.simibubi.create.content.curiosities; + +import com.simibubi.create.foundation.utility.AnimationTickHolder; +import com.simibubi.create.foundation.utility.ColorHelper; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.color.IItemColor; +import net.minecraft.item.ItemStack; +import net.minecraft.util.math.MathHelper; + +public class ChromaticCompoundColor implements IItemColor { + + @Override + public int getColor(ItemStack stack, int layer) { + Minecraft mc = Minecraft.getInstance(); + float pt = mc.getRenderPartialTicks(); + float progress = (float) ((mc.player.getYaw(pt)) / 180 * Math.PI) + (AnimationTickHolder.getRenderTick() / 10f); + if (layer == 0) + return ColorHelper.mixColors(0x6e5773, 0x6B3074, ((float) MathHelper.sin(progress) + 1) / 2); + if (layer == 1) + return ColorHelper.mixColors(0xd45d79, 0x6e5773, + ((float) MathHelper.sin((float) (progress + Math.PI)) + 1) / 2); + if (layer == 2) + return ColorHelper.mixColors(0xea9085, 0xd45d79, + ((float) MathHelper.sin((float) (progress * 1.5f + Math.PI)) + 1) / 2); + return 0; + } +} \ No newline at end of file diff --git a/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundCubeItem.java b/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundItem.java similarity index 69% rename from src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundCubeItem.java rename to src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundItem.java index e7810999f..c514eb685 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundCubeItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/ChromaticCompoundItem.java @@ -3,19 +3,15 @@ package com.simibubi.create.content.curiosities; import java.util.List; import java.util.Random; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.foundation.advancement.AllTriggers; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.CCuriosities; -import com.simibubi.create.foundation.item.IItemWithColorHandler; -import com.simibubi.create.foundation.utility.AnimationTickHolder; import com.simibubi.create.foundation.utility.ColorHelper; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.color.IItemColor; import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.item.Item; @@ -27,38 +23,15 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.Direction; import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.MathHelper; import net.minecraft.util.math.RayTraceContext; import net.minecraft.util.math.RayTraceContext.BlockMode; import net.minecraft.util.math.RayTraceContext.FluidMode; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; -public class ChromaticCompoundCubeItem extends Item implements IItemWithColorHandler { +public class ChromaticCompoundItem extends Item { - @OnlyIn(value = Dist.CLIENT) - public static class Color implements IItemColor { - @Override - public int getColor(ItemStack stack, int layer) { - Minecraft mc = Minecraft.getInstance(); - float pt = mc.getRenderPartialTicks(); - float progress = - (float) ((mc.player.getYaw(pt)) / 180 * Math.PI) + (AnimationTickHolder.getRenderTick() / 10f); - if (layer == 0) - return ColorHelper.mixColors(0x6e5773, 0x6B3074, ((float) MathHelper.sin(progress) + 1) / 2); - if (layer == 1) - return ColorHelper.mixColors(0xd45d79, 0x6e5773, - ((float) MathHelper.sin((float) (progress + Math.PI)) + 1) / 2); - if (layer == 2) - return ColorHelper.mixColors(0xea9085, 0xd45d79, - ((float) MathHelper.sin((float) (progress * 1.5f + Math.PI)) + 1) / 2); - return 0; - } - } - - public ChromaticCompoundCubeItem(Properties properties) { + public ChromaticCompoundItem(Properties properties) { super(properties); } @@ -69,13 +42,15 @@ public class ChromaticCompoundCubeItem extends Item implements IItemWithColorHan @Override public double getDurabilityForDisplay(ItemStack stack) { - int light = stack.getOrCreateTag().getInt("CollectingLight"); + int light = stack.getOrCreateTag() + .getInt("CollectingLight"); return 1 - light / (float) AllConfigs.SERVER.curiosities.lightSourceCountForRefinedRadiance.get(); } @Override public boolean showDurabilityBar(ItemStack stack) { - int light = stack.getOrCreateTag().getInt("CollectingLight"); + int light = stack.getOrCreateTag() + .getInt("CollectingLight"); return light > 0; } @@ -95,7 +70,8 @@ public class ChromaticCompoundCubeItem extends Item implements IItemWithColorHan double yMotion = entity.getMotion().y; World world = entity.world; CompoundNBT data = entity.getPersistentData(); - CompoundNBT itemData = entity.getItem().getOrCreateTag(); + CompoundNBT itemData = entity.getItem() + .getOrCreateTag(); Vec3d positionVec = entity.getPositionVec(); CCuriosities config = AllConfigs.SERVER.curiosities; @@ -103,7 +79,9 @@ public class ChromaticCompoundCubeItem extends Item implements IItemWithColorHan int light = itemData.getInt("CollectingLight"); if (random.nextInt(config.lightSourceCountForRefinedRadiance.get() + 20) < light) { Vec3d start = VecHelper.offsetRandomly(positionVec, random, 3); - Vec3d motion = positionVec.subtract(start).normalize().scale(.2f); + Vec3d motion = positionVec.subtract(start) + .normalize() + .scale(.2f); world.addParticle(ParticleTypes.END_ROD, start.x, start.y, start.z, motion.x, motion.y, motion.z); } return false; @@ -111,7 +89,7 @@ public class ChromaticCompoundCubeItem extends Item implements IItemWithColorHan // Convert to Shadow steel if in void if (y < 0 && y - yMotion < -10 && config.enableShadowSteelRecipe.get()) { - ItemStack newStack = AllItems.SHADOW_STEEL.asStack(); + ItemStack newStack = AllItemsNew.SHADOW_STEEL.asStack(); newStack.setCount(stack.getCount()); data.putBoolean("FromVoid", true); entity.setItem(newStack); @@ -122,10 +100,11 @@ public class ChromaticCompoundCubeItem extends Item implements IItemWithColorHan // Convert to Refined Radiance if eaten enough light sources if (itemData.getInt("CollectingLight") >= config.lightSourceCountForRefinedRadiance.get()) { - ItemStack newStack = AllItems.REFINED_RADIANCE.asStack(); + ItemStack newStack = AllItemsNew.REFINED_RADIANCE.asStack(); ItemEntity newEntity = new ItemEntity(world, entity.getX(), entity.getY(), entity.getZ(), newStack); newEntity.setMotion(entity.getMotion()); - newEntity.getPersistentData().putBoolean("FromLight", true); + newEntity.getPersistentData() + .putBoolean("FromLight", true); itemData.remove("CollectingLight"); world.addEntity(newEntity); @@ -156,12 +135,13 @@ public class ChromaticCompoundCubeItem extends Item implements IItemWithColorHan } if (isOverBeacon) { - ItemStack newStack = AllItems.REFINED_RADIANCE.asStack(); + ItemStack newStack = AllItemsNew.REFINED_RADIANCE.asStack(); newStack.setCount(stack.getCount()); data.putBoolean("FromLight", true); entity.setItem(newStack); - List players = world.getEntitiesWithinAABB(ServerPlayerEntity.class, new AxisAlignedBB(entity.getPosition()).grow(8)); + List players = + world.getEntitiesWithinAABB(ServerPlayerEntity.class, new AxisAlignedBB(entity.getPosition()).grow(8)); players.forEach(AllTriggers.ABSORBED_LIGHT::trigger); return false; @@ -184,14 +164,16 @@ public class ChromaticCompoundCubeItem extends Item implements IItemWithColorHan return false; RayTraceContext context = new RayTraceContext(positionVec, VecHelper.getCenterOf(randomOffset), - BlockMode.COLLIDER, FluidMode.NONE, entity); - if (!randomOffset.equals(world.rayTraceBlocks(context).getPos())) + BlockMode.COLLIDER, FluidMode.NONE, entity); + if (!randomOffset.equals(world.rayTraceBlocks(context) + .getPos())) return false; world.destroyBlock(randomOffset, false); ItemStack newStack = stack.split(1); - newStack.getOrCreateTag().putInt("CollectingLight", itemData.getInt("CollectingLight") + 1); + newStack.getOrCreateTag() + .putInt("CollectingLight", itemData.getInt("CollectingLight") + 1); ItemEntity newEntity = new ItemEntity(world, entity.getX(), entity.getY(), entity.getZ(), newStack); newEntity.setMotion(entity.getMotion()); newEntity.setDefaultPickupDelay(); @@ -203,10 +185,4 @@ public class ChromaticCompoundCubeItem extends Item implements IItemWithColorHan return false; } - @Override - @OnlyIn(value = Dist.CLIENT) - public IItemColor getColorHandler() { - return new Color(); - } - } diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryHandler.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryHandler.java index a1ce041c2..c01821adb 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryHandler.java +++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryHandler.java @@ -1,10 +1,12 @@ package com.simibubi.create.content.curiosities.symmetry; +import static com.simibubi.create.AllItemsNew.typeOf; + import java.util.Random; import com.mojang.blaze3d.matrix.MatrixStack; import com.mojang.blaze3d.vertex.IVertexBuilder; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.content.curiosities.symmetry.mirror.EmptyMirror; import com.simibubi.create.content.curiosities.symmetry.mirror.SymmetryMirror; import com.simibubi.create.foundation.utility.AnimationTickHolder; @@ -58,7 +60,7 @@ public class SymmetryHandler { if (!inv.getStackInSlot(i) .isEmpty() && inv.getStackInSlot(i) - .getItem() == AllItems.SYMMETRY_WAND.get()) { + .getItem() == AllItemsNew.WAND_OF_SYMMETRY.get()) { SymmetryWandItem.apply(player.world, inv.getStackInSlot(i), player, event.getPos(), event.getPlacedBlock()); } @@ -75,7 +77,7 @@ public class SymmetryHandler { PlayerInventory inv = player.inventory; for (int i = 0; i < PlayerInventory.getHotbarSize(); i++) { if (!inv.getStackInSlot(i) - .isEmpty() && AllItems.SYMMETRY_WAND.typeOf(inv.getStackInSlot(i))) { + .isEmpty() && typeOf(AllItemsNew.WAND_OF_SYMMETRY, inv.getStackInSlot(i))) { SymmetryWandItem.remove(player.world, inv.getStackInSlot(i), player, event.getPos()); } } @@ -89,7 +91,7 @@ public class SymmetryHandler { for (int i = 0; i < PlayerInventory.getHotbarSize(); i++) { ItemStack stackInSlot = player.inventory.getStackInSlot(i); - if (!AllItems.SYMMETRY_WAND.typeOf(stackInSlot)) + if (!typeOf(AllItemsNew.WAND_OF_SYMMETRY, stackInSlot)) continue; if (!SymmetryWandItem.isEnabled(stackInSlot)) continue; @@ -153,7 +155,7 @@ public class SymmetryHandler { for (int i = 0; i < PlayerInventory.getHotbarSize(); i++) { ItemStack stackInSlot = player.inventory.getStackInSlot(i); - if (stackInSlot != null && AllItems.SYMMETRY_WAND.typeOf(stackInSlot) + if (stackInSlot != null && typeOf(AllItemsNew.WAND_OF_SYMMETRY, stackInSlot) && SymmetryWandItem.isEnabled(stackInSlot)) { SymmetryMirror mirror = SymmetryWandItem.getMirror(stackInSlot); diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java index e6d86516b..40b5fb682 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/SymmetryWandItem.java @@ -5,22 +5,18 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import com.simibubi.create.content.curiosities.symmetry.client.SymmetryWandModel; import com.simibubi.create.content.curiosities.symmetry.mirror.CrossPlaneMirror; import com.simibubi.create.content.curiosities.symmetry.mirror.EmptyMirror; import com.simibubi.create.content.curiosities.symmetry.mirror.PlaneMirror; import com.simibubi.create.content.curiosities.symmetry.mirror.SymmetryMirror; -import com.simibubi.create.foundation.block.render.CustomRenderedItemModel; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.gui.ScreenOpener; -import com.simibubi.create.foundation.item.IHaveCustomItemModel; import com.simibubi.create.foundation.networking.AllPackets; import com.simibubi.create.foundation.utility.BlockHelper; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; -import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.BlockItem; import net.minecraft.item.Item; @@ -42,20 +38,22 @@ import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.fml.network.PacketDistributor; -public class SymmetryWandItem extends Item implements IHaveCustomItemModel { +public class SymmetryWandItem extends Item { public static final String SYMMETRY = "symmetry"; private static final String ENABLE = "enable"; public SymmetryWandItem(Properties properties) { - super(properties.maxStackSize(1).rarity(Rarity.UNCOMMON)); + super(properties.maxStackSize(1) + .rarity(Rarity.UNCOMMON)); } @Override public ActionResultType onItemUse(ItemUseContext context) { PlayerEntity player = context.getPlayer(); BlockPos pos = context.getPos(); - player.getCooldownTracker().setCooldown(this, 5); + player.getCooldownTracker() + .setCooldown(this, 5); ItemStack wand = player.getHeldItem(context.getHand()); checkNBT(wand); @@ -65,7 +63,8 @@ public class SymmetryWandItem extends Item implements IHaveCustomItemModel { DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { openWandGUI(wand, context.getHand()); }); - player.getCooldownTracker().setCooldown(this, 5); + player.getCooldownTracker() + .setCooldown(this, 5); } return ActionResultType.SUCCESS; } @@ -73,45 +72,50 @@ public class SymmetryWandItem extends Item implements IHaveCustomItemModel { if (context.getWorld().isRemote || context.getHand() != Hand.MAIN_HAND) return ActionResultType.SUCCESS; - CompoundNBT compound = wand.getTag().getCompound(SYMMETRY); + CompoundNBT compound = wand.getTag() + .getCompound(SYMMETRY); pos = pos.offset(context.getFace()); SymmetryMirror previousElement = SymmetryMirror.fromNBT(compound); // No Shift -> Make / Move Mirror - wand.getTag().putBoolean(ENABLE, true); + wand.getTag() + .putBoolean(ENABLE, true); Vec3d pos3d = new Vec3d(pos.getX(), pos.getY(), pos.getZ()); SymmetryMirror newElement = new PlaneMirror(pos3d); if (previousElement instanceof EmptyMirror) { newElement.setOrientation( - (player.getHorizontalFacing() == Direction.NORTH || player.getHorizontalFacing() == Direction.SOUTH) - ? PlaneMirror.Align.XY.ordinal() - : PlaneMirror.Align.YZ.ordinal()); + (player.getHorizontalFacing() == Direction.NORTH || player.getHorizontalFacing() == Direction.SOUTH) + ? PlaneMirror.Align.XY.ordinal() + : PlaneMirror.Align.YZ.ordinal()); newElement.enable = true; - wand.getTag().putBoolean(ENABLE, true); + wand.getTag() + .putBoolean(ENABLE, true); } else { previousElement.setPosition(pos3d); if (previousElement instanceof PlaneMirror) { - previousElement.setOrientation((player.getHorizontalFacing() == Direction.NORTH - || player.getHorizontalFacing() == Direction.SOUTH) ? PlaneMirror.Align.XY.ordinal() - : PlaneMirror.Align.YZ.ordinal()); + previousElement.setOrientation( + (player.getHorizontalFacing() == Direction.NORTH || player.getHorizontalFacing() == Direction.SOUTH) + ? PlaneMirror.Align.XY.ordinal() + : PlaneMirror.Align.YZ.ordinal()); } if (previousElement instanceof CrossPlaneMirror) { float rotation = player.getRotationYawHead(); float abs = Math.abs(rotation % 90); boolean diagonal = abs > 22 && abs < 45 + 22; - previousElement.setOrientation( - diagonal ? CrossPlaneMirror.Align.D.ordinal() : CrossPlaneMirror.Align.Y.ordinal()); + previousElement + .setOrientation(diagonal ? CrossPlaneMirror.Align.D.ordinal() : CrossPlaneMirror.Align.Y.ordinal()); } newElement = previousElement; } compound = newElement.writeToNbt(); - wand.getTag().put(SYMMETRY, compound); + wand.getTag() + .put(SYMMETRY, compound); player.setHeldItem(context.getHand(), wand); return ActionResultType.SUCCESS; @@ -128,13 +132,15 @@ public class SymmetryWandItem extends Item implements IHaveCustomItemModel { DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { openWandGUI(playerIn.getHeldItem(handIn), handIn); }); - playerIn.getCooldownTracker().setCooldown(this, 5); + playerIn.getCooldownTracker() + .setCooldown(this, 5); } return new ActionResult(ActionResultType.SUCCESS, wand); } // No Shift -> Clear Mirror - wand.getTag().putBoolean(ENABLE, false); + wand.getTag() + .putBoolean(ENABLE, false); return new ActionResult(ActionResultType.SUCCESS, wand); } @@ -144,21 +150,26 @@ public class SymmetryWandItem extends Item implements IHaveCustomItemModel { } private static void checkNBT(ItemStack wand) { - if (!wand.hasTag() || !wand.getTag().contains(SYMMETRY)) { + if (!wand.hasTag() || !wand.getTag() + .contains(SYMMETRY)) { wand.setTag(new CompoundNBT()); - wand.getTag().put(SYMMETRY, new EmptyMirror(new Vec3d(0, 0, 0)).writeToNbt()); - wand.getTag().putBoolean(ENABLE, false); + wand.getTag() + .put(SYMMETRY, new EmptyMirror(new Vec3d(0, 0, 0)).writeToNbt()); + wand.getTag() + .putBoolean(ENABLE, false); } } public static boolean isEnabled(ItemStack stack) { checkNBT(stack); - return stack.getTag().getBoolean(ENABLE); + return stack.getTag() + .getBoolean(ENABLE); } public static SymmetryMirror getMirror(ItemStack stack) { checkNBT(stack); - return SymmetryMirror.fromNBT((CompoundNBT) stack.getTag().getCompound(SYMMETRY)); + return SymmetryMirror.fromNBT((CompoundNBT) stack.getTag() + .getCompound(SYMMETRY)); } public static void apply(World world, ItemStack wand, PlayerEntity player, BlockPos pos, BlockState block) { @@ -170,13 +181,14 @@ public class SymmetryWandItem extends Item implements IHaveCustomItemModel { Map blockSet = new HashMap<>(); blockSet.put(pos, block); - SymmetryMirror symmetry = SymmetryMirror.fromNBT((CompoundNBT) wand.getTag().getCompound(SYMMETRY)); + SymmetryMirror symmetry = SymmetryMirror.fromNBT((CompoundNBT) wand.getTag() + .getCompound(SYMMETRY)); Vec3d mirrorPos = symmetry.getPosition(); if (mirrorPos.distanceTo(new Vec3d(pos)) > AllConfigs.SERVER.curiosities.maxSymmetryWandRange.get()) return; if (!player.isCreative() && isHoldingBlock(player, block) - && BlockHelper.findAndRemoveInInventory(block, player, 1) == 0) + && BlockHelper.findAndRemoveInInventory(block, player, 1) == 0) return; symmetry.process(blockSet); @@ -192,7 +204,7 @@ public class SymmetryWandItem extends Item implements IHaveCustomItemModel { BlockState blockState = blockSet.get(position); for (Direction face : Direction.values()) blockState = blockState.updatePostPlacement(face, world.getBlockState(position.offset(face)), world, - position, position.offset(face)); + position, position.offset(face)); if (player.isCreative()) { world.setBlockState(position, blockState); @@ -201,7 +213,8 @@ public class SymmetryWandItem extends Item implements IHaveCustomItemModel { } BlockState toReplace = world.getBlockState(position); - if (!toReplace.getMaterial().isReplaceable()) + if (!toReplace.getMaterial() + .isReplaceable()) continue; if (toReplace.getBlockHardness(world, position) == -1) continue; @@ -214,13 +227,15 @@ public class SymmetryWandItem extends Item implements IHaveCustomItemModel { } AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(() -> player), - new SymmetryEffectPacket(to, targets)); + new SymmetryEffectPacket(to, targets)); } private static boolean isHoldingBlock(PlayerEntity player, BlockState block) { ItemStack itemBlock = BlockHelper.getRequiredItem(block); - return player.getHeldItemMainhand().isItemEqual(itemBlock) - || player.getHeldItemOffhand().isItemEqual(itemBlock); + return player.getHeldItemMainhand() + .isItemEqual(itemBlock) + || player.getHeldItemOffhand() + .isItemEqual(itemBlock); } public static void remove(World world, ItemStack wand, PlayerEntity player, BlockPos pos) { @@ -232,7 +247,8 @@ public class SymmetryWandItem extends Item implements IHaveCustomItemModel { Map blockSet = new HashMap<>(); blockSet.put(pos, air); - SymmetryMirror symmetry = SymmetryMirror.fromNBT((CompoundNBT) wand.getTag().getCompound(SYMMETRY)); + SymmetryMirror symmetry = SymmetryMirror.fromNBT((CompoundNBT) wand.getTag() + .getCompound(SYMMETRY)); Vec3d mirrorPos = symmetry.getPosition(); if (mirrorPos.distanceTo(new Vec3d(pos)) > AllConfigs.SERVER.curiosities.maxSymmetryWandRange.get()) @@ -245,7 +261,8 @@ public class SymmetryWandItem extends Item implements IHaveCustomItemModel { targets.add(pos); for (BlockPos position : blockSet.keySet()) { - if (!player.isCreative() && ogBlock.getBlock() != world.getBlockState(position).getBlock()) + if (!player.isCreative() && ogBlock.getBlock() != world.getBlockState(position) + .getBlock()) continue; if (position.equals(pos)) continue; @@ -259,8 +276,10 @@ public class SymmetryWandItem extends Item implements IHaveCustomItemModel { world.setBlockState(position, air, 3); if (!player.isCreative()) { - if (!player.getHeldItemMainhand().isEmpty()) - player.getHeldItemMainhand().onBlockDestroyed(world, blockstate, position, player); + if (!player.getHeldItemMainhand() + .isEmpty()) + player.getHeldItemMainhand() + .onBlockDestroyed(world, blockstate, position, player); TileEntity tileentity = blockstate.hasTileEntity() ? world.getTileEntity(position) : null; Block.spawnDrops(blockstate, world, pos, tileentity); } @@ -268,13 +287,7 @@ public class SymmetryWandItem extends Item implements IHaveCustomItemModel { } AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY_AND_SELF.with(() -> player), - new SymmetryEffectPacket(to, targets)); - } - - @Override - @OnlyIn(Dist.CLIENT) - public CustomRenderedItemModel createModel(IBakedModel original) { - return new SymmetryWandModel(original); + new SymmetryEffectPacket(to, targets)); } } diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/client/SymmetryWandItemRenderer.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/client/SymmetryWandItemRenderer.java index 3b3024842..bb610ff69 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/client/SymmetryWandItemRenderer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/client/SymmetryWandItemRenderer.java @@ -24,10 +24,6 @@ public class SymmetryWandItemRenderer extends ItemStackTileEntityRenderer { ms.push(); ms.translate(0.5F, 0.5F, 0.5F); itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, light, overlay, mainModel.getBakedModel()); - - float lastCoordx = 0; - float lastCoordy = 0; - itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, 0xF000F0, overlay, mainModel.getPartial("core")); float floating = MathHelper.sin(worldTime) * .05f; diff --git a/src/main/java/com/simibubi/create/content/curiosities/symmetry/client/SymmetryWandModel.java b/src/main/java/com/simibubi/create/content/curiosities/symmetry/client/SymmetryWandModel.java index a5a379177..88b34b185 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/symmetry/client/SymmetryWandModel.java +++ b/src/main/java/com/simibubi/create/content/curiosities/symmetry/client/SymmetryWandModel.java @@ -8,7 +8,7 @@ import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer; public class SymmetryWandModel extends CustomRenderedItemModel { public SymmetryWandModel(IBakedModel template) { - super(template, "symmetry_wand"); + super(template, "wand_of_symmetry"); addPartials("bits", "core"); } diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/AllToolTiers.java b/src/main/java/com/simibubi/create/content/curiosities/tools/AllToolTiers.java index 22ba52060..16065080b 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/AllToolTiers.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/AllToolTiers.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.curiosities.tools; import java.util.function.Supplier; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import net.minecraft.item.IItemTier; import net.minecraft.item.crafting.Ingredient; @@ -11,7 +11,7 @@ import net.minecraft.util.LazyValue; public enum AllToolTiers implements IItemTier { RADIANT(4, 1024, 16.0F, 3.5F, 10, () -> { - return Ingredient.fromItems(AllItems.REFINED_RADIANCE.get()); + return Ingredient.fromItems(AllItemsNew.REFINED_RADIANCE.get()); }), ; diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/DeforesterItem.java b/src/main/java/com/simibubi/create/content/curiosities/tools/DeforesterItem.java index adf043e9e..7fe57fb14 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/DeforesterItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/DeforesterItem.java @@ -1,15 +1,12 @@ package com.simibubi.create.content.curiosities.tools; -import com.simibubi.create.AllItems; -import com.simibubi.create.foundation.block.render.CustomRenderedItemModel; -import com.simibubi.create.foundation.item.IHaveCustomItemModel; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.foundation.utility.BlockHelper; import com.simibubi.create.foundation.utility.TreeCutter; import com.simibubi.create.foundation.utility.TreeCutter.Tree; import com.simibubi.create.foundation.utility.VecHelper; import net.minecraft.block.BlockState; -import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.entity.item.ItemEntity; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.AxeItem; @@ -20,15 +17,13 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.Vec3d; import net.minecraft.world.IWorld; import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod.EventBusSubscriber; import net.minecraftforge.fml.common.Mod.EventBusSubscriber.Bus; @EventBusSubscriber(bus = Bus.FORGE) -public class DeforesterItem extends AxeItem implements IHaveCustomItemModel { +public class DeforesterItem extends AxeItem { public DeforesterItem(Properties builder) { super(AllToolTiers.RADIANT, 5.0F, -3.1F, builder); @@ -65,7 +60,7 @@ public class DeforesterItem extends AxeItem implements IHaveCustomItemModel { @SubscribeEvent public static void onBlockDestroyed(BlockEvent.BreakEvent event) { ItemStack heldItemMainhand = event.getPlayer().getHeldItemMainhand(); - if (!AllItems.DEFORESTER.typeOf(heldItemMainhand)) + if (!AllItemsNew.typeOf(AllItemsNew.DEFORESTER, heldItemMainhand)) return; destroyTree(heldItemMainhand, event.getWorld(), event.getState(), event.getPos(), event.getPlayer()); } @@ -79,10 +74,4 @@ public class DeforesterItem extends AxeItem implements IHaveCustomItemModel { world.addEntity(entity); } - @Override - @OnlyIn(Dist.CLIENT) - public CustomRenderedItemModel createModel(IBakedModel original) { - return new DeforesterModel(original); - } - } diff --git a/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItem.java b/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItem.java index 7428b871f..c1c4c7f0f 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/tools/SandPaperItem.java @@ -1,11 +1,7 @@ package com.simibubi.create.content.curiosities.tools; -import com.simibubi.create.content.curiosities.tools.SandPaperItemRenderer.SandPaperModel; -import com.simibubi.create.foundation.block.render.CustomRenderedItemModel; -import com.simibubi.create.foundation.item.IHaveCustomItemModel; import com.simibubi.create.foundation.utility.VecHelper; -import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.enchantment.Enchantment; import net.minecraft.entity.LivingEntity; import net.minecraft.entity.item.ItemEntity; @@ -26,11 +22,9 @@ import net.minecraft.util.math.RayTraceContext; import net.minecraft.util.math.RayTraceResult; import net.minecraft.util.math.Vec3d; import net.minecraft.world.World; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.FakePlayer; -public class SandPaperItem extends Item implements IHaveCustomItemModel { +public class SandPaperItem extends Item { public SandPaperItem(Properties properties) { super(properties.maxDamage(8)); @@ -51,7 +45,8 @@ public class SandPaperItem extends Item implements IHaveCustomItemModel { ItemStack itemstack = playerIn.getHeldItem(handIn); ActionResult FAIL = new ActionResult<>(ActionResultType.FAIL, itemstack); - if (itemstack.getOrCreateTag().contains("Polishing")) { + if (itemstack.getOrCreateTag() + .contains("Polishing")) { playerIn.setActiveHand(handIn); return new ActionResult<>(ActionResultType.PASS, itemstack); } @@ -62,7 +57,8 @@ public class SandPaperItem extends Item implements IHaveCustomItemModel { ItemStack item = itemInOtherHand.copy(); ItemStack toPolish = item.split(1); playerIn.setActiveHand(handIn); - itemstack.getOrCreateTag().put("Polishing", toPolish.serializeNBT()); + itemstack.getOrCreateTag() + .put("Polishing", toPolish.serializeNBT()); playerIn.setHeldItem(otherHand, item); return new ActionResult<>(ActionResultType.SUCCESS, itemstack); } @@ -78,7 +74,8 @@ public class SandPaperItem extends Item implements IHaveCustomItemModel { AxisAlignedBB bb = new AxisAlignedBB(hitVec, hitVec).grow(1f); ItemEntity pickUp = null; for (ItemEntity itemEntity : worldIn.getEntitiesWithinAABB(ItemEntity.class, bb)) { - if (itemEntity.getPositionVec().distanceTo(playerIn.getPositionVec()) > 3) + if (itemEntity.getPositionVec() + .distanceTo(playerIn.getPositionVec()) > 3) continue; ItemStack stack = itemEntity.getItem(); if (!SandPaperPolishingRecipe.canPolish(worldIn, stack)) @@ -90,13 +87,15 @@ public class SandPaperItem extends Item implements IHaveCustomItemModel { if (pickUp == null) return FAIL; - ItemStack item = pickUp.getItem().copy(); + ItemStack item = pickUp.getItem() + .copy(); ItemStack toPolish = item.split(1); playerIn.setActiveHand(handIn); if (!worldIn.isRemote) { - itemstack.getOrCreateTag().put("Polishing", toPolish.serializeNBT()); + itemstack.getOrCreateTag() + .put("Polishing", toPolish.serializeNBT()); if (item.isEmpty()) pickUp.remove(); else @@ -110,12 +109,12 @@ public class SandPaperItem extends Item implements IHaveCustomItemModel { public boolean canApplyAtEnchantingTable(ItemStack stack, Enchantment enchantment) { return super.canApplyAtEnchantingTable(stack, enchantment); } - + @Override public int getItemEnchantability(ItemStack stack) { return 1; } - + @Override public ItemStack onItemUseFinish(ItemStack stack, World worldIn, LivingEntity entityLiving) { if (!(entityLiving instanceof PlayerEntity)) @@ -124,12 +123,14 @@ public class SandPaperItem extends Item implements IHaveCustomItemModel { CompoundNBT tag = stack.getOrCreateTag(); if (tag.contains("Polishing")) { ItemStack toPolish = ItemStack.read(tag.getCompound("Polishing")); - ItemStack polished = SandPaperPolishingRecipe.applyPolish(worldIn, entityLiving.getPositionVec(), toPolish, - stack); + ItemStack polished = + SandPaperPolishingRecipe.applyPolish(worldIn, entityLiving.getPositionVec(), toPolish, stack); if (worldIn.isRemote) { - spawnParticles(entityLiving.getEyePosition(1).add(entityLiving.getLookVec().scale(.5f)), toPolish, - worldIn); + spawnParticles(entityLiving.getEyePosition(1) + .add(entityLiving.getLookVec() + .scale(.5f)), + toPolish, worldIn); return stack; } @@ -151,7 +152,7 @@ public class SandPaperItem extends Item implements IHaveCustomItemModel { for (int i = 0; i < 20; i++) { Vec3d motion = VecHelper.offsetRandomly(Vec3d.ZERO, world.rand, 1 / 8f); world.addParticle(new ItemParticleData(ParticleTypes.ITEM, polishedStack), location.x, location.y, - location.z, motion.x, motion.y, motion.z); + location.z, motion.x, motion.y, motion.z); } } @@ -178,10 +179,4 @@ public class SandPaperItem extends Item implements IHaveCustomItemModel { return 5; } - @Override - @OnlyIn(Dist.CLIENT) - public CustomRenderedItemModel createModel(IBakedModel original) { - return new SandPaperModel(original); - } - } diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java index c84d8246a..925e8ad1b 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperItem.java @@ -47,27 +47,35 @@ import net.minecraftforge.fml.network.PacketDistributor; public abstract class ZapperItem extends Item { public ZapperItem(Properties properties) { - super(properties.maxStackSize(1).rarity(Rarity.UNCOMMON)); + super(properties.maxStackSize(1) + .rarity(Rarity.UNCOMMON)); } @Override @OnlyIn(Dist.CLIENT) public void addInformation(ItemStack stack, World worldIn, List tooltip, ITooltipFlag flagIn) { - if (stack.hasTag() && stack.getTag().contains("BlockUsed")) { - String usedblock = - NBTUtil.readBlockState(stack.getTag().getCompound("BlockUsed")).getBlock().getTranslationKey(); + if (stack.hasTag() && stack.getTag() + .contains("BlockUsed")) { + String usedblock = NBTUtil.readBlockState(stack.getTag() + .getCompound("BlockUsed")) + .getBlock() + .getTranslationKey(); ItemDescription.add(tooltip, TextFormatting.DARK_GRAY + Lang.translate("blockzapper.usingBlock", - TextFormatting.GRAY + new TranslationTextComponent(usedblock).getFormattedText())); + TextFormatting.GRAY + new TranslationTextComponent(usedblock).getFormattedText())); } } @Override public boolean shouldCauseReequipAnimation(ItemStack oldStack, ItemStack newStack, boolean slotChanged) { boolean differentBlock = false; - if (oldStack.hasTag() && newStack.hasTag() && oldStack.getTag().contains("BlockUsed") - && newStack.getTag().contains("BlockUsed")) - differentBlock = NBTUtil.readBlockState(oldStack.getTag().getCompound("BlockUsed")) != NBTUtil - .readBlockState(newStack.getTag().getCompound("BlockUsed")); + if (oldStack.hasTag() && newStack.hasTag() && oldStack.getTag() + .contains("BlockUsed") + && newStack.getTag() + .contains("BlockUsed")) + differentBlock = NBTUtil.readBlockState(oldStack.getTag() + .getCompound("BlockUsed")) != NBTUtil.readBlockState( + newStack.getTag() + .getCompound("BlockUsed")); return slotChanged || !isZapper(newStack) || differentBlock; } @@ -78,7 +86,8 @@ public abstract class ZapperItem extends Item { @Override public ActionResultType onItemUse(ItemUseContext context) { // Shift -> open GUI - if (context.getPlayer().isSneaking()) { + if (context.getPlayer() + .isSneaking()) { if (context.getWorld().isRemote) { DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> { openHandgunGUI(context.getItem(), context.getHand() == Hand.OFF_HAND); @@ -107,38 +116,45 @@ public abstract class ZapperItem extends Item { } boolean mainHand = hand == Hand.MAIN_HAND; - boolean isSwap = item.getTag().contains("_Swap"); + boolean isSwap = item.getTag() + .contains("_Swap"); boolean gunInOtherHand = isZapper(player.getHeldItem(mainHand ? Hand.OFF_HAND : Hand.MAIN_HAND)); // Pass To Offhand if (mainHand && isSwap && gunInOtherHand) return new ActionResult(ActionResultType.FAIL, item); if (mainHand && !isSwap && gunInOtherHand) - item.getTag().putBoolean("_Swap", true); + item.getTag() + .putBoolean("_Swap", true); if (!mainHand && isSwap) - item.getTag().remove("_Swap"); + item.getTag() + .remove("_Swap"); if (!mainHand && gunInOtherHand) - player.getHeldItem(Hand.MAIN_HAND).getTag().remove("_Swap"); + player.getHeldItem(Hand.MAIN_HAND) + .getTag() + .remove("_Swap"); player.setActiveHand(hand); // Check if can be used String msg = validateUsage(item); if (msg != null) { world.playSound(player, player.getPosition(), AllSoundEvents.BLOCKZAPPER_DENY.get(), SoundCategory.BLOCKS, - 1f, 0.5f); + 1f, 0.5f); player.sendStatusMessage(new StringTextComponent(TextFormatting.RED + msg), true); return new ActionResult(ActionResultType.FAIL, item); } - + BlockState stateToUse = Blocks.AIR.getDefaultState(); if (nbt.contains("BlockUsed")) stateToUse = NBTUtil.readBlockState(nbt.getCompound("BlockUsed")); // Raytrace - Find the target - Vec3d start = player.getPositionVec().add(0, player.getEyeHeight(), 0); - Vec3d range = player.getLookVec().scale(getRange(item)); - BlockRayTraceResult raytrace = world.rayTraceBlocks( - new RayTraceContext(start, start.add(range), BlockMode.OUTLINE, FluidMode.NONE, player)); + Vec3d start = player.getPositionVec() + .add(0, player.getEyeHeight(), 0); + Vec3d range = player.getLookVec() + .scale(getZappingRange(item)); + BlockRayTraceResult raytrace = world + .rayTraceBlocks(new RayTraceContext(start, start.add(range), BlockMode.OUTLINE, FluidMode.NONE, player)); BlockPos pos = raytrace.getPos(); BlockState stateReplaced = world.getBlockState(pos); @@ -153,7 +169,8 @@ public abstract class ZapperItem extends Item { float pitch = (float) ((player.rotationPitch) / -180 * Math.PI); Vec3d barrelPosNoTransform = new Vec3d(mainHand == (player.getPrimaryHand() == HandSide.RIGHT) ? -.35f : .35f, -0.1f, 1); - Vec3d barrelPos = start.add(barrelPosNoTransform.rotatePitch(pitch).rotateYaw(yaw)); + Vec3d barrelPos = start.add(barrelPosNoTransform.rotatePitch(pitch) + .rotateYaw(yaw)); // Client side if (world.isRemote) { @@ -165,9 +182,9 @@ public abstract class ZapperItem extends Item { if (activate(world, player, item, stateToUse, raytrace)) { applyCooldown(player, item, gunInOtherHand); AllPackets.channel.send(PacketDistributor.TRACKING_ENTITY.with(() -> player), - new ZapperBeamPacket(barrelPos, raytrace.getHitVec(), hand, false)); + new ZapperBeamPacket(barrelPos, raytrace.getHitVec(), hand, false)); AllPackets.channel.send(PacketDistributor.PLAYER.with(() -> (ServerPlayerEntity) player), - new ZapperBeamPacket(barrelPos, raytrace.getHitVec(), hand, true)); + new ZapperBeamPacket(barrelPos, raytrace.getHitVec(), hand, true)); } return new ActionResult(ActionResultType.SUCCESS, item); @@ -181,14 +198,14 @@ public abstract class ZapperItem extends Item { } protected abstract boolean activate(World world, PlayerEntity player, ItemStack item, BlockState stateToUse, - BlockRayTraceResult raytrace); + BlockRayTraceResult raytrace); @OnlyIn(Dist.CLIENT) protected abstract void openHandgunGUI(ItemStack item, boolean b); protected abstract int getCooldownDelay(ItemStack item); - protected abstract int getRange(ItemStack stack); + protected abstract int getZappingRange(ItemStack stack); protected boolean canActivateWithoutSelectedBlock(ItemStack stack) { return false; @@ -196,7 +213,8 @@ public abstract class ZapperItem extends Item { protected void applyCooldown(PlayerEntity playerIn, ItemStack item, boolean dual) { int delay = getCooldownDelay(item); - playerIn.getCooldownTracker().setCooldown(item.getItem(), dual ? delay * 2 / 3 : delay); + playerIn.getCooldownTracker() + .setCooldown(item.getItem(), dual ? delay * 2 / 3 : delay); } @Override @@ -215,11 +233,15 @@ public abstract class ZapperItem extends Item { return false; if (entity.isSneaking()) return true; + if (entity.world.isRemote) + return true; - Vec3d start = entity.getPositionVec().add(0, entity.getEyeHeight(), 0); - Vec3d range = entity.getLookVec().scale(getRange(stack)); - BlockRayTraceResult raytrace = entity.world.rayTraceBlocks( - new RayTraceContext(start, start.add(range), BlockMode.OUTLINE, FluidMode.NONE, entity)); + Vec3d start = entity.getPositionVec() + .add(0, entity.getEyeHeight(), 0); + Vec3d range = entity.getLookVec() + .scale(getZappingRange(stack)); + BlockRayTraceResult raytrace = entity.world + .rayTraceBlocks(new RayTraceContext(start, start.add(range), BlockMode.OUTLINE, FluidMode.NONE, entity)); BlockPos pos = raytrace.getPos(); if (pos == null) return true; @@ -227,7 +249,8 @@ public abstract class ZapperItem extends Item { entity.world.sendBlockBreakProgress(entity.getEntityId(), pos, -1); BlockState newState = entity.world.getBlockState(pos); - if (BlockHelper.getRequiredItem(newState).isEmpty()) + if (BlockHelper.getRequiredItem(newState) + .isEmpty()) return true; if (entity.world.getTileEntity(pos) != null) return true; @@ -245,12 +268,13 @@ public abstract class ZapperItem extends Item { newState = newState.with(BlockStateProperties.PERSISTENT, true); CompoundNBT tag = stack.getOrCreateTag(); - if (tag.contains("BlockUsed") && NBTUtil.readBlockState(stack.getTag().getCompound("BlockUsed")) == newState) + if (tag.contains("BlockUsed") && NBTUtil.readBlockState(stack.getTag() + .getCompound("BlockUsed")) == newState) return true; tag.put("BlockUsed", NBTUtil.writeBlockState(newState)); - entity.world.playSound((PlayerEntity) entity, entity.getPosition(), AllSoundEvents.BLOCKZAPPER_CONFIRM.get(), - SoundCategory.BLOCKS, 0.5f, 0.8f); + entity.world.playSound(null, entity.getPosition(), AllSoundEvents.BLOCKZAPPER_CONFIRM.get(), + SoundCategory.BLOCKS, 0.5f, 0.8f); return true; } diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperScreen.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperScreen.java index c87b3f0a2..647a658da 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperScreen.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/ZapperScreen.java @@ -25,7 +25,6 @@ import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.NBTUtil; import net.minecraft.util.Hand; -import net.minecraftforge.client.model.data.EmptyModelData; @SuppressWarnings("deprecation") public class ZapperScreen extends AbstractSimiScreen { diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperItem.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperItem.java index 8075b73fb..3f39ac7d1 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperItem.java @@ -5,14 +5,12 @@ import java.util.LinkedList; import java.util.List; import java.util.Set; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.Create; import com.simibubi.create.content.curiosities.zapper.PlacementPatterns; import com.simibubi.create.content.curiosities.zapper.ZapperItem; import com.simibubi.create.foundation.advancement.AllTriggers; -import com.simibubi.create.foundation.block.render.CustomRenderedItemModel; import com.simibubi.create.foundation.gui.ScreenOpener; -import com.simibubi.create.foundation.item.IHaveCustomItemModel; import com.simibubi.create.foundation.item.ItemDescription; import com.simibubi.create.foundation.item.ItemDescription.Palette; import com.simibubi.create.foundation.utility.BlockHelper; @@ -23,7 +21,6 @@ import net.minecraft.advancements.CriteriaTriggers; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.client.gui.screen.Screen; -import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.util.ITooltipFlag; import net.minecraft.entity.Entity; import net.minecraft.entity.player.PlayerEntity; @@ -51,7 +48,7 @@ import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.common.util.BlockSnapshot; import net.minecraftforge.event.ForgeEventFactory; -public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel { +public class BlockzapperItem extends ZapperItem { public BlockzapperItem(Properties properties) { super(properties); @@ -94,7 +91,7 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel } protected boolean activate(World world, PlayerEntity player, ItemStack stack, BlockState selectedState, - BlockRayTraceResult raytrace) { + BlockRayTraceResult raytrace) { CompoundNBT nbt = stack.getOrCreateTag(); boolean replace = nbt.contains("Replace") && nbt.getBoolean("Replace"); @@ -110,11 +107,10 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel if (!player.isCreative() && !canBreak(stack, world.getBlockState(placed), world, placed)) continue; if (!player.isCreative() && BlockHelper.findAndRemoveInInventory(selectedState, player, 1) == 0) { - player.getCooldownTracker().setCooldown(stack.getItem(), 20); - player - .sendStatusMessage( - new StringTextComponent(TextFormatting.RED + Lang.translate("blockzapper.empty")), - true); + player.getCooldownTracker() + .setCooldown(stack.getItem(), 20); + player.sendStatusMessage( + new StringTextComponent(TextFormatting.RED + Lang.translate("blockzapper.empty")), true); return false; } @@ -122,9 +118,8 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel dropBlocks(world, player, stack, face, placed); for (Direction updateDirection : Direction.values()) - selectedState = selectedState - .updatePostPlacement(updateDirection, world.getBlockState(placed.offset(updateDirection)), - world, placed, placed.offset(updateDirection)); + selectedState = selectedState.updatePostPlacement(updateDirection, + world.getBlockState(placed.offset(updateDirection)), world, placed, placed.offset(updateDirection)); BlockSnapshot blocksnapshot = BlockSnapshot.getBlockSnapshot(world, placed); IFluidState ifluidstate = world.getFluidState(placed); @@ -156,7 +151,7 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel @Override public void inventoryTick(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected) { - if (AllItems.PLACEMENT_HANDGUN.typeOf(stack)) { + if (AllItemsNew.typeOf(AllItemsNew.BLOCKZAPPER, stack)) { CompoundNBT nbt = stack.getOrCreateTag(); if (!nbt.contains("Replace")) nbt.putBoolean("Replace", false); @@ -177,7 +172,7 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel ScreenOpener.open(new BlockzapperScreen(handgun, offhand)); } - public List getSelectedBlocks(ItemStack stack, World worldIn, PlayerEntity player) { + public static List getSelectedBlocks(ItemStack stack, World worldIn, PlayerEntity player) { List list = new LinkedList<>(); CompoundNBT tag = stack.getTag(); if (tag == null) @@ -191,12 +186,14 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel Set visited = new HashSet<>(); List frontier = new LinkedList<>(); - Vec3d start = player.getPositionVec().add(0, player.getEyeHeight(), 0); - Vec3d range = player.getLookVec().scale(getRange(stack)); + Vec3d start = player.getPositionVec() + .add(0, player.getEyeHeight(), 0); + Vec3d range = player.getLookVec() + .scale(getRange(stack)); BlockRayTraceResult raytrace = player.world - .rayTraceBlocks( - new RayTraceContext(start, start.add(range), BlockMode.COLLIDER, FluidMode.NONE, player)); - BlockPos pos = raytrace.getPos().toImmutable(); + .rayTraceBlocks(new RayTraceContext(start, start.add(range), BlockMode.COLLIDER, FluidMode.NONE, player)); + BlockPos pos = raytrace.getPos() + .toImmutable(); if (pos == null) return list; @@ -209,7 +206,8 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel for (int y = -1; y <= 1; y++) for (int z = -1; z <= 1; z++) if (Math.abs(x) + Math.abs(y) + Math.abs(z) < 2 || searchDiagonals) - if (face.getAxis().getCoordinate(x, y, z) == 0) + if (face.getAxis() + .getCoordinate(x, y, z) == 0) offsets.add(new BlockPos(x, y, z)); BlockPos startPos = replace ? pos : pos.offset(face); @@ -233,7 +231,8 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel continue; if (stateToReplace.getBlock() != state.getBlock() && !searchAcrossMaterials) continue; - if (stateToReplace.getMaterial().isReplaceable()) + if (stateToReplace.getMaterial() + .isReplaceable()) continue; if (stateAboveStateToReplace.isSolid()) continue; @@ -250,11 +249,13 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel BlockState stateToPlaceOn = worldIn.getBlockState(currentPos.offset(face.getOpposite())); // Criteria - if (stateToPlaceOn.getMaterial().isReplaceable()) + if (stateToPlaceOn.getMaterial() + .isReplaceable()) continue; if (stateToPlaceOn.getBlock() != state.getBlock() && !searchAcrossMaterials) continue; - if (!stateToPlaceAt.getMaterial().isReplaceable()) + if (!stateToPlaceAt.getMaterial() + .isReplaceable()) continue; list.add(currentPos); @@ -297,6 +298,10 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel @Override protected int getCooldownDelay(ItemStack stack) { + return getCooldown(stack); + } + + public static int getCooldown(ItemStack stack) { ComponentTier tier = getTier(Components.Accelerator, stack); if (tier == ComponentTier.None) return 10; @@ -309,7 +314,11 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel } @Override - protected int getRange(ItemStack stack) { + protected int getZappingRange(ItemStack stack) { + return getRange(stack); + } + + public static int getRange(ItemStack stack) { ComponentTier tier = getTier(Components.Scope, stack); if (tier == ComponentTier.None) return 15; @@ -322,8 +331,9 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel } protected static void dropBlocks(World worldIn, PlayerEntity playerIn, ItemStack item, Direction face, - BlockPos placed) { - TileEntity tileentity = worldIn.getBlockState(placed).hasTileEntity() ? worldIn.getTileEntity(placed) : null; + BlockPos placed) { + TileEntity tileentity = worldIn.getBlockState(placed) + .hasTileEntity() ? worldIn.getTileEntity(placed) : null; if (getTier(Components.Retriever, item) == ComponentTier.None) { Block.spawnDrops(worldIn.getBlockState(placed), worldIn, placed.offset(face), tileentity); @@ -333,20 +343,24 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel Block.spawnDrops(worldIn.getBlockState(placed), worldIn, playerIn.getPosition(), tileentity); if (getTier(Components.Retriever, item) == ComponentTier.Chromatic) - for (ItemStack stack : Block - .getDrops(worldIn.getBlockState(placed), (ServerWorld) worldIn, placed, tileentity)) + for (ItemStack stack : Block.getDrops(worldIn.getBlockState(placed), (ServerWorld) worldIn, placed, + tileentity)) if (!playerIn.inventory.addItemStackToInventory(stack)) Block.spawnAsEntity(worldIn, placed, stack); } public static ComponentTier getTier(Components component, ItemStack stack) { - if (!stack.hasTag() || !stack.getTag().contains(component.name())) - stack.getOrCreateTag().putString(component.name(), ComponentTier.None.name()); - return NBTHelper.readEnum(stack.getTag().getString(component.name()), ComponentTier.class); + if (!stack.hasTag() || !stack.getTag() + .contains(component.name())) + stack.getOrCreateTag() + .putString(component.name(), ComponentTier.None.name()); + return NBTHelper.readEnum(stack.getTag() + .getString(component.name()), ComponentTier.class); } public static void setTier(Components component, ComponentTier tier, ItemStack stack) { - stack.getOrCreateTag().putString(component.name(), NBTHelper.writeEnum(tier)); + stack.getOrCreateTag() + .putString(component.name(), NBTHelper.writeEnum(tier)); } public static enum ComponentTier { @@ -363,10 +377,4 @@ public class BlockzapperItem extends ZapperItem implements IHaveCustomItemModel Body, Amplifier, Accelerator, Retriever, Scope } - @Override - @OnlyIn(value = Dist.CLIENT) - public CustomRenderedItemModel createModel(IBakedModel original) { - return new BlockzapperModel(original); - } - } diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperModel.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperModel.java index 64b2ae43a..a3f26f370 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperModel.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperModel.java @@ -12,7 +12,7 @@ import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer; public class BlockzapperModel extends CustomRenderedItemModel { public BlockzapperModel(IBakedModel template) { - super(template, "blockzapper"); + super(template, "handheld_blockzapper"); addPartials("core", "body", "amplifier_core", "accelerator", "gold_body", "gold_scope", "gold_amplifier", "gold_retriever", "gold_accelerator", "chorus_body", "chorus_scope", "chorus_amplifier", "chorus_retriever", "chorus_accelerator"); diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperRenderHandler.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperRenderHandler.java new file mode 100644 index 000000000..c0ed6ae27 --- /dev/null +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperRenderHandler.java @@ -0,0 +1,63 @@ +package com.simibubi.create.content.curiosities.zapper.blockzapper; + +import java.util.Collections; +import java.util.List; + +import com.simibubi.create.AllItemsNew; +import com.simibubi.create.AllSpecialTextures; +import com.simibubi.create.CreateClient; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.player.ClientPlayerEntity; +import net.minecraft.item.ItemStack; +import net.minecraft.nbt.CompoundNBT; +import net.minecraft.util.math.BlockPos; + +public class BlockzapperRenderHandler { + + private static List renderedShape; + + public static void tick() { + gatherSelectedBlocks(); + if (renderedShape.isEmpty()) + return; + + CreateClient.outliner.showCluster("blockzapper", renderedShape) + .colored(0x999999) + .disableNormals() + .lineWidth(1 / 32f) + .withFaceTexture(AllSpecialTextures.CHECKERED); + } + + protected static void gatherSelectedBlocks() { + ClientPlayerEntity player = Minecraft.getInstance().player; + ItemStack heldMain = player.getHeldItemMainhand(); + ItemStack heldOff = player.getHeldItemOffhand(); + boolean zapperInMain = AllItemsNew.typeOf(AllItemsNew.BLOCKZAPPER, heldMain); + boolean zapperInOff = AllItemsNew.typeOf(AllItemsNew.BLOCKZAPPER, heldOff); + + if (zapperInMain) { + CompoundNBT tag = heldMain.getOrCreateTag(); + if (!tag.contains("_Swap")) { + createOutline(player, heldMain); + return; + } + } + + if (zapperInOff) { + createOutline(player, heldOff); + return; + } + + renderedShape = Collections.emptyList(); + } + + private static void createOutline(ClientPlayerEntity player, ItemStack held) { + if (!held.getOrCreateTag().contains("BlockUsed")) { + renderedShape = Collections.emptyList(); + return; + } + renderedShape = BlockzapperItem.getSelectedBlocks(held, player.world, player); + } + +} diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperUpgradeRecipe.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperUpgradeRecipe.java index c3a7dbc2d..c310557d2 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperUpgradeRecipe.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/blockzapper/BlockzapperUpgradeRecipe.java @@ -1,7 +1,7 @@ package com.simibubi.create.content.curiosities.zapper.blockzapper; import com.google.gson.JsonObject; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.AllRecipeTypes; import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.ComponentTier; import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.Components; @@ -45,7 +45,7 @@ public class BlockzapperUpgradeRecipe implements ICraftingRecipe { public ItemStack getCraftingResult(CraftingInventory inv) { for (int slot = 0; slot < inv.getSizeInventory(); slot++) { ItemStack handgun = inv.getStackInSlot(slot).copy(); - if (!AllItems.PLACEMENT_HANDGUN.typeOf(handgun)) + if (!AllItemsNew.typeOf(AllItemsNew.BLOCKZAPPER, handgun)) continue; BlockzapperItem.setTier(getUpgradedComponent(), getTier(), handgun); return handgun; @@ -55,7 +55,7 @@ public class BlockzapperUpgradeRecipe implements ICraftingRecipe { @Override public ItemStack getRecipeOutput() { - ItemStack handgun = new ItemStack(AllItems.PLACEMENT_HANDGUN.get()); + ItemStack handgun = new ItemStack(AllItemsNew.BLOCKZAPPER.get()); BlockzapperItem.setTier(getUpgradedComponent(), getTier(), handgun); return handgun; } diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainzapperItem.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperItem.java similarity index 78% rename from src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainzapperItem.java rename to src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperItem.java index e872c5b38..c3b375f8f 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainzapperItem.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperItem.java @@ -5,14 +5,11 @@ import java.util.List; import com.simibubi.create.content.curiosities.zapper.PlacementPatterns; import com.simibubi.create.content.curiosities.zapper.ZapperItem; -import com.simibubi.create.foundation.block.render.CustomRenderedItemModel; import com.simibubi.create.foundation.gui.ScreenOpener; -import com.simibubi.create.foundation.item.IHaveCustomItemModel; import com.simibubi.create.foundation.utility.Lang; import com.simibubi.create.foundation.utility.NBTHelper; import net.minecraft.block.BlockState; -import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.entity.player.PlayerEntity; import net.minecraft.item.ItemStack; import net.minecraft.nbt.CompoundNBT; @@ -23,20 +20,20 @@ import net.minecraft.world.World; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; -public class TerrainzapperItem extends ZapperItem implements IHaveCustomItemModel { +public class WorldshaperItem extends ZapperItem { - public TerrainzapperItem(Properties properties) { + public WorldshaperItem(Properties properties) { super(properties); } @Override @OnlyIn(value = Dist.CLIENT) protected void openHandgunGUI(ItemStack item, boolean b) { - ScreenOpener.open(new TerrainzapperScreen(item, b)); + ScreenOpener.open(new WorldshaperScreen(item, b)); } @Override - protected int getRange(ItemStack stack) { + protected int getZappingRange(ItemStack stack) { return 128; } @@ -45,15 +42,10 @@ public class TerrainzapperItem extends ZapperItem implements IHaveCustomItemMode return 2; } - @Override - @OnlyIn(value = Dist.CLIENT) - public CustomRenderedItemModel createModel(IBakedModel original) { - return new TerrainzapperModel(original); - } - @Override public String validateUsage(ItemStack item) { - if (!item.getOrCreateTag().contains("BrushParams")) + if (!item.getOrCreateTag() + .contains("BrushParams")) return Lang.translate("terrainzapper.shiftRightClickToSet"); return super.validateUsage(item); } @@ -67,13 +59,14 @@ public class TerrainzapperItem extends ZapperItem implements IHaveCustomItemMode @Override protected boolean activate(World world, PlayerEntity player, ItemStack stack, BlockState stateToUse, - BlockRayTraceResult raytrace) { + BlockRayTraceResult raytrace) { BlockPos targetPos = raytrace.getPos(); List affectedPositions = new ArrayList<>(); CompoundNBT tag = stack.getOrCreateTag(); - Brush brush = NBTHelper.readEnum(tag.getString("Brush"), TerrainBrushes.class).get(); + Brush brush = NBTHelper.readEnum(tag.getString("Brush"), TerrainBrushes.class) + .get(); BlockPos params = NBTUtil.readBlockPos(tag.getCompound("BrushParams")); PlacementOptions option = NBTHelper.readEnum(tag.getString("Placement"), PlacementOptions.class); TerrainTools tool = NBTHelper.readEnum(tag.getString("Tool"), TerrainTools.class); diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainzapperItemRenderer.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperItemRenderer.java similarity index 91% rename from src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainzapperItemRenderer.java rename to src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperItemRenderer.java index e8a85bc16..d12301424 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainzapperItemRenderer.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperItemRenderer.java @@ -16,12 +16,12 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.HandSide; import net.minecraft.util.math.MathHelper; -public class TerrainzapperItemRenderer extends ZapperItemRenderer { +public class WorldshaperItemRenderer extends ZapperItemRenderer { @Override public void render(ItemStack stack, MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { ItemRenderer itemRenderer = Minecraft.getInstance().getItemRenderer(); - TerrainzapperModel mainModel = (TerrainzapperModel) itemRenderer.getItemModelWithOverrides(stack, Minecraft.getInstance().world, null); + WorldshaperModel mainModel = (WorldshaperModel) itemRenderer.getItemModelWithOverrides(stack, Minecraft.getInstance().world, null); float pt = Minecraft.getInstance().getRenderPartialTicks(); float worldTime = AnimationTickHolder.getRenderTick() / 20; @@ -55,7 +55,7 @@ public class TerrainzapperItemRenderer extends ZapperItemRenderer { } itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, - LightTexture.pack((int) (15 * multiplier), 7), overlay, mainModel.getPartial("terrain_core")); + LightTexture.pack((int) (15 * multiplier), 7), overlay, mainModel.getPartial("core")); // Accelerator spins float angle = worldTime * -25; @@ -68,7 +68,7 @@ public class TerrainzapperItemRenderer extends ZapperItemRenderer { ms.multiply(Vector3f.POSITIVE_Z.getDegreesQuaternion(angle)); ms.translate(0, -offset, 0); itemRenderer.renderItem(stack, TransformType.NONE, false, ms, buffer, light, overlay, - mainModel.getPartial("terrain_accelerator")); + mainModel.getPartial("accelerator")); ms.pop(); } diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainzapperModel.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperModel.java similarity index 59% rename from src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainzapperModel.java rename to src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperModel.java index 781b8d7d9..983dc7872 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainzapperModel.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperModel.java @@ -5,16 +5,16 @@ import com.simibubi.create.foundation.block.render.CustomRenderedItemModel; import net.minecraft.client.renderer.model.IBakedModel; import net.minecraft.client.renderer.tileentity.ItemStackTileEntityRenderer; -public class TerrainzapperModel extends CustomRenderedItemModel { +public class WorldshaperModel extends CustomRenderedItemModel { - public TerrainzapperModel(IBakedModel template) { - super(template, "blockzapper"); - addPartials("terrain_core", "terrain_accelerator"); + public WorldshaperModel(IBakedModel template) { + super(template, "handheld_worldshaper"); + addPartials("core", "accelerator"); } @Override public ItemStackTileEntityRenderer createRenderer() { - return new TerrainzapperItemRenderer(); + return new WorldshaperItemRenderer(); } } diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainZapperRenderHandler.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperRenderHandler.java similarity index 87% rename from src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainZapperRenderHandler.java rename to src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperRenderHandler.java index 4e6be429d..df32f5c02 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainZapperRenderHandler.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperRenderHandler.java @@ -3,7 +3,7 @@ package com.simibubi.create.content.curiosities.zapper.terrainzapper; import java.util.List; import java.util.stream.Collectors; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.AllSpecialTextures; import com.simibubi.create.CreateClient; import com.simibubi.create.foundation.utility.NBTHelper; @@ -21,18 +21,17 @@ import net.minecraft.util.math.RayTraceContext.FluidMode; import net.minecraft.util.math.RayTraceResult.Type; import net.minecraft.util.math.Vec3d; -public class TerrainZapperRenderHandler { +public class WorldshaperRenderHandler { - private static Iterable renderedShape; + private static List renderedShape; private static BlockPos renderedPosition; public static void tick() { gatherSelectedBlocks(); if (renderedPosition == null) return; - List shape = (List) renderedShape; - CreateClient.outliner.showCluster("terrainZapper", shape.stream() + CreateClient.outliner.showCluster("terrainZapper", renderedShape.stream() .map(pos -> pos.add(renderedPosition)) .collect(Collectors.toList())) .colored(0x999999) @@ -45,8 +44,8 @@ public class TerrainZapperRenderHandler { ClientPlayerEntity player = Minecraft.getInstance().player; ItemStack heldMain = player.getHeldItemMainhand(); ItemStack heldOff = player.getHeldItemOffhand(); - boolean zapperInMain = AllItems.TERRAIN_ZAPPER.typeOf(heldMain); - boolean zapperInOff = AllItems.TERRAIN_ZAPPER.typeOf(heldOff); + boolean zapperInMain = AllItemsNew.typeOf(AllItemsNew.WORLDSHAPER, heldMain); + boolean zapperInOff = AllItemsNew.typeOf(AllItemsNew.WORLDSHAPER, heldOff); if (zapperInMain) { CompoundNBT tag = heldMain.getOrCreateTag(); diff --git a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainzapperScreen.java b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperScreen.java similarity index 98% rename from src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainzapperScreen.java rename to src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperScreen.java index 9bdf6e77b..351ee6dfe 100644 --- a/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/TerrainzapperScreen.java +++ b/src/main/java/com/simibubi/create/content/curiosities/zapper/terrainzapper/WorldshaperScreen.java @@ -18,7 +18,7 @@ import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.NBTUtil; import net.minecraft.util.math.BlockPos; -public class TerrainzapperScreen extends ZapperScreen { +public class WorldshaperScreen extends ZapperScreen { protected final String placementSection = Lang.translate("gui.terrainzapper.placement"); protected final String toolSection = Lang.translate("gui.terrainzapper.tool"); @@ -36,7 +36,7 @@ public class TerrainzapperScreen extends ZapperScreen { private int j; private CompoundNBT nbt; - public TerrainzapperScreen(ItemStack zapper, boolean offhand) { + public WorldshaperScreen(ItemStack zapper, boolean offhand) { super(AllGuiTextures.TERRAINZAPPER, zapper, offhand); brightColor = 0xDFF6FF; fontColor = 0x436B77; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/BeltAttachableLogisticalBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/BeltAttachableLogisticalBlock.java index cd6f9a272..314cf7c67 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/BeltAttachableLogisticalBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/BeltAttachableLogisticalBlock.java @@ -4,9 +4,9 @@ import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; -import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.belt.AllBeltAttachments.BeltAttachmentState; import com.simibubi.create.content.contraptions.relays.belt.AllBeltAttachments.IBeltAttachment; +import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack; import com.simibubi.create.content.logistics.block.AttachedLogisticalBlock; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/observer/BeltObserverBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/observer/BeltObserverBlock.java index 5d8d92e58..29656f230 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/observer/BeltObserverBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/observer/BeltObserverBlock.java @@ -5,12 +5,12 @@ import java.util.List; import java.util.Random; import com.simibubi.create.AllBlocks; -import com.simibubi.create.content.contraptions.relays.belt.BeltBlock; -import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.belt.AllBeltAttachments.BeltAttachmentState; import com.simibubi.create.content.contraptions.relays.belt.AllBeltAttachments.IBeltAttachment; +import com.simibubi.create.content.contraptions.relays.belt.BeltBlock; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock.Part; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock.Slope; +import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack; import com.simibubi.create.content.contraptions.wrench.IWrenchable; import com.simibubi.create.foundation.block.ITE; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelBlock.java index d17adfffb..0bcc7f48c 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/belts/tunnel/BeltTunnelBlock.java @@ -80,13 +80,6 @@ public class BeltTunnelBlock extends Block implements ITE, return true; } -// @Override // TODO 1.15 register layer -// public boolean canRenderInLayer(BlockState state, BlockRenderLayer layer) { -// if (hasWindow(state)) -// return layer == BlockRenderLayer.CUTOUT_MIPPED; -// return super.canRenderInLayer(state, layer); -// } - public static boolean hasWindow(BlockState state) { Shape shape = state.get(SHAPE); return shape == Shape.WINDOW || shape == Shape.HALFSHADE || shape == Shape.FULLSHADE; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/diodes/ToggleLatchBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/diodes/ToggleLatchBlock.java index 9f6c1ef7c..5c8e81141 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/diodes/ToggleLatchBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/diodes/ToggleLatchBlock.java @@ -2,7 +2,7 @@ package com.simibubi.create.content.logistics.block.diodes; import java.util.Random; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import net.minecraft.block.Block; import net.minecraft.block.BlockState; @@ -24,7 +24,8 @@ public class ToggleLatchBlock extends AbstractDiodeBlock { public ToggleLatchBlock(Properties properties) { super(properties); - setDefaultState(getDefaultState().with(POWERING, false).with(POWERED, false)); + setDefaultState(getDefaultState().with(POWERING, false) + .with(POWERED, false)); } @Override @@ -44,12 +45,12 @@ public class ToggleLatchBlock extends AbstractDiodeBlock { @Override public ActionResultType onUse(BlockState state, World worldIn, BlockPos pos, PlayerEntity player, Hand handIn, - BlockRayTraceResult hit) { + BlockRayTraceResult hit) { if (!player.isAllowEdit()) return ActionResultType.PASS; if (player.isSneaking()) return ActionResultType.PASS; - if (AllItems.WRENCH.typeOf(player.getHeldItem(handIn))) + if (AllItemsNew.typeOf(AllItemsNew.WRENCH, player.getHeldItem(handIn))) return ActionResultType.PASS; return activated(worldIn, pos, state); } @@ -78,7 +79,8 @@ public class ToggleLatchBlock extends AbstractDiodeBlock { public boolean canConnectRedstone(BlockState state, IBlockReader world, BlockPos pos, Direction side) { if (side == null) return false; - return side.getAxis() == state.get(HORIZONTAL_FACING).getAxis(); + return side.getAxis() == state.get(HORIZONTAL_FACING) + .getAxis(); } } diff --git a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelBlock.java index 26879a44b..ad77e36c4 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/funnel/FunnelBlock.java @@ -8,10 +8,10 @@ import com.simibubi.create.AllBlocks; import com.simibubi.create.AllShapes; import com.simibubi.create.content.contraptions.components.structureMovement.IPortableBlock; import com.simibubi.create.content.contraptions.components.structureMovement.MovementBehaviour; -import com.simibubi.create.content.contraptions.relays.belt.BeltHelper; -import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.belt.AllBeltAttachments.BeltAttachmentState; import com.simibubi.create.content.contraptions.relays.belt.AllBeltAttachments.IBeltAttachment; +import com.simibubi.create.content.contraptions.relays.belt.BeltHelper; +import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.belt.transport.TransportedItemStack; import com.simibubi.create.content.logistics.block.AttachedLogisticalBlock; import com.simibubi.create.foundation.block.ITE; diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkBlock.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkBlock.java index fe337ccaf..eb5d973a3 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkBlock.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/RedstoneLinkBlock.java @@ -149,11 +149,6 @@ public class RedstoneLinkBlock extends ProperDirectionalBlock implements ITE () -> withTileEntityDo(worldIn, pos, te -> this.displayScreen(te, player))); diff --git a/src/main/java/com/simibubi/create/content/logistics/item/filter/FilterItem.java b/src/main/java/com/simibubi/create/content/logistics/item/filter/FilterItem.java index 7b539b902..6a71a0c79 100644 --- a/src/main/java/com/simibubi/create/content/logistics/item/filter/FilterItem.java +++ b/src/main/java/com/simibubi/create/content/logistics/item/filter/FilterItem.java @@ -4,7 +4,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.List; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.AllKeys; import com.simibubi.create.content.logistics.item.filter.AttributeFilterContainer.WhitelistMode; import com.simibubi.create.foundation.item.ItemDescription; @@ -38,8 +38,23 @@ import net.minecraftforge.items.ItemStackHandler; public class FilterItem extends Item implements INamedContainerProvider { - public FilterItem(Properties properties) { + private FilterType type; + + private enum FilterType { + REGULAR, ATTRIBUTE; + } + + public static FilterItem regular(Properties properties) { + return new FilterItem(FilterType.REGULAR, properties); + } + + public static FilterItem attribute(Properties properties) { + return new FilterItem(FilterType.ATTRIBUTE, properties); + } + + private FilterItem(FilterType type, Properties properties) { super(properties); + this.type = type; } @Override @@ -62,7 +77,7 @@ public class FilterItem extends Item implements INamedContainerProvider { private List makeSummary(ItemStack filter) { List list = new ArrayList<>(); - if (AllItems.FILTER.typeOf(filter)) { + if (type == FilterType.REGULAR) { ItemStackHandler filterItems = getFilterItems(filter); boolean blacklist = filter.getOrCreateTag().getBoolean("Blacklist"); @@ -86,7 +101,7 @@ public class FilterItem extends Item implements INamedContainerProvider { return Collections.emptyList(); } - if (AllItems.PROPERTY_FILTER.typeOf(filter)) { + if (type == FilterType.ATTRIBUTE) { WhitelistMode whitelistMode = WhitelistMode.values()[filter.getOrCreateTag().getInt("WhitelistMode")]; list.add(TextFormatting.GOLD + (whitelistMode == WhitelistMode.WHITELIST_CONJ ? Lang.translate("gui.attribute_filter.whitelist_conjunctive") @@ -130,9 +145,9 @@ public class FilterItem extends Item implements INamedContainerProvider { @Override public Container createMenu(int id, PlayerInventory inv, PlayerEntity player) { ItemStack heldItem = player.getHeldItemMainhand(); - if (AllItems.FILTER.typeOf(heldItem)) + if (type == FilterType.REGULAR) return new FilterContainer(id, inv, heldItem); - if (AllItems.PROPERTY_FILTER.typeOf(heldItem)) + if (type == FilterType.ATTRIBUTE) return new AttributeFilterContainer(id, inv, heldItem); return null; } @@ -144,7 +159,7 @@ public class FilterItem extends Item implements INamedContainerProvider { public static ItemStackHandler getFilterItems(ItemStack stack) { ItemStackHandler newInv = new ItemStackHandler(18); - if (!AllItems.FILTER.typeOf(stack)) + if (AllItemsNew.FILTER.get() != stack.getItem()) throw new IllegalArgumentException("Cannot get filter items from non-filter: " + stack); CompoundNBT invNBT = stack.getOrCreateChildTag("Items"); if (!invNBT.isEmpty()) @@ -164,7 +179,7 @@ public class FilterItem extends Item implements INamedContainerProvider { return (matchNBT ? ItemHandlerHelper.canItemStacksStack(filter, stack) : ItemStack.areItemsEqual(filter, stack)); - if (AllItems.FILTER.typeOf(filter)) { + if (AllItemsNew.FILTER.get() == filter.getItem()) { ItemStackHandler filterItems = getFilterItems(filter); boolean respectNBT = filter.getOrCreateTag().getBoolean("RespectNBT"); boolean blacklist = filter.getOrCreateTag().getBoolean("Blacklist"); @@ -179,7 +194,7 @@ public class FilterItem extends Item implements INamedContainerProvider { return blacklist; } - if (AllItems.PROPERTY_FILTER.typeOf(filter)) { + if (AllItemsNew.ATTRIBUTE_FILTER.get() == filter.getItem()) { WhitelistMode whitelistMode = WhitelistMode.values()[filter.getOrCreateTag().getInt("WhitelistMode")]; ListNBT attributes = filter.getOrCreateTag().getList("MatchedAttributes", NBT.TAG_COMPOUND); for (INBT inbt : attributes) { diff --git a/src/main/java/com/simibubi/create/content/palettes/AllPaletteBlocks.java b/src/main/java/com/simibubi/create/content/palettes/AllPaletteBlocks.java index 8ce4d0900..ead27af6c 100644 --- a/src/main/java/com/simibubi/create/content/palettes/AllPaletteBlocks.java +++ b/src/main/java/com/simibubi/create/content/palettes/AllPaletteBlocks.java @@ -127,7 +127,7 @@ public class AllPaletteBlocks { public static final BlockEntry NATURAL_SCORIA = REGISTRATE.block("natural_scoria", Block::new) .initialProperties(() -> Blocks.ANDESITE) - .transform(CreateRegistrate.blockVertexColors(new ScoriaVertexColor())) + .onRegister(CreateRegistrate.blockVertexColors(new ScoriaVertexColor())) .blockstate(palettesCubeAll()) .simpleItem() .register(); diff --git a/src/main/java/com/simibubi/create/content/palettes/PalettesVariantEntry.java b/src/main/java/com/simibubi/create/content/palettes/PalettesVariantEntry.java index 0e53e1833..8623c4b89 100644 --- a/src/main/java/com/simibubi/create/content/palettes/PalettesVariantEntry.java +++ b/src/main/java/com/simibubi/create/content/palettes/PalettesVariantEntry.java @@ -38,13 +38,14 @@ public class PalettesVariantEntry { if (pattern.isTranslucent()) builder.addLayer(() -> RenderType::getTranslucent); if (pattern.hasFoliage()) - builder.transform(CreateRegistrate.blockColors(() -> AllColorHandlers::getGrassyBlock)); + builder.onRegister(CreateRegistrate.blockColors(() -> AllColorHandlers::getGrassyBlock)); pattern.createCTBehaviour(variant) - .ifPresent(b -> builder.transform(connectedTextures(b))); + .ifPresent(b -> builder.onRegister(connectedTextures(b))); if (pattern.hasFoliage()) builder.item() - .transform(CreateRegistrate.itemColors(() -> AllColorHandlers::getGrassyItem)); + .onRegister(CreateRegistrate.itemColors(() -> AllColorHandlers::getGrassyItem)) + .build(); else builder.simpleItem(); diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableContainer.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableContainer.java index 0aa49dfd4..98e2a83d1 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableContainer.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicTableContainer.java @@ -1,7 +1,9 @@ package com.simibubi.create.content.schematics.block; +import static com.simibubi.create.AllItemsNew.typeOf; + import com.simibubi.create.AllContainerTypes; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import net.minecraft.client.Minecraft; import net.minecraft.client.world.ClientWorld; @@ -44,8 +46,9 @@ public class SchematicTableContainer extends Container { inputSlot = new SlotItemHandler(te.inventory, 0, -9, 40) { @Override public boolean isItemValid(ItemStack stack) { - return AllItems.EMPTY_BLUEPRINT.typeOf(stack) || AllItems.BLUEPRINT_AND_QUILL.typeOf(stack) - || AllItems.BLUEPRINT.typeOf(stack); + return typeOf(AllItemsNew.EMPTY_SCHEMATIC, stack) + || typeOf(AllItemsNew.SCHEMATIC_AND_QUILL, stack) + || typeOf(AllItemsNew.SCHEMATIC, stack); } }; diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInventory.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInventory.java index db2e502ac..a8d422fc9 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInventory.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonInventory.java @@ -1,6 +1,6 @@ package com.simibubi.create.content.schematics.block; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; @@ -27,12 +27,11 @@ public class SchematicannonInventory extends ItemStackHandler { public boolean isItemValid(int slot, ItemStack stack) { switch (slot) { case 0: // Blueprint Slot - return AllItems.BLUEPRINT.typeOf(stack); + return AllItemsNew.typeOf(AllItemsNew.SCHEMATIC, stack); case 1: // Blueprint output return false; case 2: // Book input - return stack.isItemEqual(new ItemStack(Items.BOOK)) - || stack.isItemEqual(new ItemStack(Items.WRITTEN_BOOK)); + return stack.isItemEqual(new ItemStack(Items.BOOK)) || stack.isItemEqual(new ItemStack(Items.WRITTEN_BOOK)); case 3: // Material List output return false; case 4: // Gunpowder diff --git a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java index c56382b3c..d3ab120f3 100644 --- a/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java +++ b/src/main/java/com/simibubi/create/content/schematics/block/SchematicannonTileEntity.java @@ -4,18 +4,18 @@ import java.util.LinkedList; import java.util.List; import com.simibubi.create.AllBlocks; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.AllSoundEvents; import com.simibubi.create.AllTileEntities; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock; -import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock.Part; import com.simibubi.create.content.contraptions.relays.belt.BeltBlock.Slope; +import com.simibubi.create.content.contraptions.relays.belt.BeltTileEntity; import com.simibubi.create.content.contraptions.relays.elementary.ShaftBlock; import com.simibubi.create.content.schematics.ItemRequirement; +import com.simibubi.create.content.schematics.ItemRequirement.ItemUseType; import com.simibubi.create.content.schematics.MaterialChecklist; import com.simibubi.create.content.schematics.SchematicWorld; -import com.simibubi.create.content.schematics.ItemRequirement.ItemUseType; import com.simibubi.create.content.schematics.item.SchematicItem; import com.simibubi.create.foundation.config.AllConfigs; import com.simibubi.create.foundation.config.CSchematics; @@ -541,7 +541,7 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC state = State.STOPPED; statusMsg = "schematicExpired"; inventory.setStackInSlot(0, ItemStack.EMPTY); - inventory.setStackInSlot(1, new ItemStack(AllItems.EMPTY_BLUEPRINT.get())); + inventory.setStackInSlot(1, new ItemStack(AllItemsNew.EMPTY_SCHEMATIC.get())); return; } @@ -678,7 +678,7 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC public void finishedPrinting() { inventory.setStackInSlot(0, ItemStack.EMPTY); - inventory.setStackInSlot(1, new ItemStack(AllItems.EMPTY_BLUEPRINT.get(), inventory.getStackInSlot(1) + inventory.setStackInSlot(1, new ItemStack(AllItemsNew.EMPTY_SCHEMATIC.get(), inventory.getStackInSlot(1) .getCount() + 1)); state = State.STOPPED; statusMsg = "finished"; @@ -828,7 +828,7 @@ public class SchematicannonTileEntity extends SmartTileEntity implements INamedC protected void launchBelt(BlockPos target, BlockState state, int length) { blocksPlaced++; - ItemStack connector = AllItems.BELT_CONNECTOR.asStack(); + ItemStack connector = AllItemsNew.BELT_CONNECTOR.asStack(); flyingBlocks.add(new LaunchedItem.ForBelt(this.getPos(), target, connector, state, length)); playFiringSound(); } diff --git a/src/main/java/com/simibubi/create/content/schematics/client/SchematicAndQuillHandler.java b/src/main/java/com/simibubi/create/content/schematics/client/SchematicAndQuillHandler.java index 03f6a5907..436771937 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/SchematicAndQuillHandler.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/SchematicAndQuillHandler.java @@ -8,7 +8,7 @@ import java.nio.file.StandardOpenOption; import org.apache.commons.io.IOUtils; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.AllKeys; import com.simibubi.create.AllSpecialTextures; import com.simibubi.create.CreateClient; @@ -192,7 +192,8 @@ public class SchematicAndQuillHandler { } private boolean isActive() { - return isPresent() && AllItems.BLUEPRINT_AND_QUILL.typeOf(Minecraft.getInstance().player.getHeldItemMainhand()); + return isPresent() && AllItemsNew.typeOf(AllItemsNew.SCHEMATIC_AND_QUILL, + Minecraft.getInstance().player.getHeldItemMainhand()); } private boolean isPresent() { diff --git a/src/main/java/com/simibubi/create/content/schematics/client/SchematicEditScreen.java b/src/main/java/com/simibubi/create/content/schematics/client/SchematicEditScreen.java index efbe230f8..fc7fb2e5e 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/SchematicEditScreen.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/SchematicEditScreen.java @@ -4,7 +4,7 @@ import java.util.Collections; import java.util.List; import com.mojang.blaze3d.systems.RenderSystem; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.CreateClient; import com.simibubi.create.foundation.gui.AbstractSimiScreen; import com.simibubi.create.foundation.gui.AllGuiTextures; @@ -141,7 +141,7 @@ public class SchematicEditScreen extends AbstractSimiScreen { RenderSystem.pushMatrix(); RenderSystem.translated(guiLeft + 220, guiTop + 20, 0); RenderSystem.scaled(3, 3, 3); - itemRenderer.renderItemIntoGUI(new ItemStack(AllItems.BLUEPRINT.get()), 0, 0); + itemRenderer.renderItemIntoGUI(new ItemStack(AllItemsNew.SCHEMATIC.get()), 0, 0); RenderSystem.popMatrix(); } diff --git a/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java b/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java index 6c5348ed0..1186355ba 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java @@ -4,7 +4,7 @@ import java.util.List; import com.google.common.collect.ImmutableList; import com.mojang.blaze3d.matrix.MatrixStack; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.AllKeys; import com.simibubi.create.content.schematics.SchematicWorld; import com.simibubi.create.content.schematics.client.tools.Tools; @@ -116,10 +116,10 @@ public class SchematicHandler { SchematicWorld w = new SchematicWorld(BlockPos.ZERO, Minecraft.getInstance().world); schematic.addBlocksToWorld(w, BlockPos.ZERO, new PlacementSettings()); - renderer.startHologram(w); + renderer.display(w); } - public void render(MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { + public void render(MatrixStack ms, IRenderTypeBuffer buffer) { boolean present = activeSchematicItem != null; if (!active && !present) return; @@ -127,16 +127,16 @@ public class SchematicHandler { if (active) { ms.push(); currentTool.getTool() - .renderTool(ms, buffer, light, overlay); + .renderTool(ms, buffer); ms.pop(); } - + ms.push(); transformation.applyGLTransformations(ms); renderer.render(ms, buffer); - if (active) + if (active) currentTool.getTool() - .renderOnSchematic(ms, buffer, light, overlay); + .renderOnSchematic(ms, buffer); ms.pop(); } @@ -148,7 +148,7 @@ public class SchematicHandler { this.overlay.renderOn(activeHotbarSlot); currentTool.getTool() - .renderOverlay(ms, buffer, light, overlay); + .renderOverlay(ms, buffer); selectionScreen.renderPassive(Minecraft.getInstance() .getRenderPartialTicks()); } @@ -195,7 +195,7 @@ public class SchematicHandler { private ItemStack findBlueprintInHand(PlayerEntity player) { ItemStack stack = player.getHeldItemMainhand(); - if (!AllItems.BLUEPRINT.typeOf(stack)) + if (!AllItemsNew.typeOf(AllItemsNew.SCHEMATIC, stack)) return null; if (!stack.hasTag()) return null; diff --git a/src/main/java/com/simibubi/create/content/schematics/client/SchematicRenderer.java b/src/main/java/com/simibubi/create/content/schematics/client/SchematicRenderer.java index 542c5af03..766419e96 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/SchematicRenderer.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/SchematicRenderer.java @@ -1,21 +1,24 @@ package com.simibubi.create.content.schematics.client; +import java.util.HashMap; import java.util.HashSet; import java.util.LinkedList; import java.util.List; +import java.util.Map; import java.util.Set; import org.lwjgl.opengl.GL11; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.content.schematics.SchematicWorld; +import com.simibubi.create.foundation.utility.MatrixStacker; +import com.simibubi.create.foundation.utility.SuperByteBuffer; import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.BlockRendererDispatcher; import net.minecraft.client.renderer.BufferBuilder; import net.minecraft.client.renderer.IRenderTypeBuffer; -import net.minecraft.client.renderer.RegionRenderCacheBuilder; import net.minecraft.client.renderer.RenderType; import net.minecraft.client.renderer.RenderTypeLookup; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; @@ -25,11 +28,9 @@ import net.minecraftforge.client.model.data.EmptyModelData; public class SchematicRenderer { - private final RegionRenderCacheBuilder bufferCache = new RegionRenderCacheBuilder(); - private final Set usedBlockRenderLayers = new HashSet<>(RenderType.getBlockLayers() - .size()); - private final Set startedBufferBuilders = new HashSet<>(RenderType.getBlockLayers() - .size()); + private final Map bufferCache = new HashMap<>(getLayerCount()); + private final Set usedBlockRenderLayers = new HashSet<>(getLayerCount()); + private final Set startedBufferBuilders = new HashSet<>(getLayerCount()); private boolean active; private boolean changed; private SchematicWorld schematic; @@ -39,7 +40,7 @@ public class SchematicRenderer { changed = false; } - public void startHologram(SchematicWorld world) { + public void display(SchematicWorld world) { this.anchor = world.anchor; this.schematic = world; this.active = true; @@ -66,41 +67,14 @@ public class SchematicRenderer { } public void render(MatrixStack ms, IRenderTypeBuffer buffer) { - // TODO 1.15 buffered render -// if (!active) -// return; -// -// final Entity entity = Minecraft.getInstance() -// .getRenderViewEntity(); -// -// if (entity == null) { -// return; -// } -// -// ActiveRenderInfo renderInfo = Minecraft.getInstance().gameRenderer.getActiveRenderInfo(); -// Vec3d view = renderInfo.getProjectedView(); -// double renderPosX = view.x; -// double renderPosY = view.y; -// double renderPosZ = view.z; -// -// RenderSystem.enableAlphaTest(); -// RenderSystem.enableBlend(); -// Minecraft.getInstance() -// .getTextureManager() -// .bindTexture(PlayerContainer.BLOCK_ATLAS_TEXTURE); -// -// for (RenderType layer : RenderType.getBlockLayers()) { -// if (!usedBlockRenderLayers.contains(layer)) { -// continue; -// } -// final BufferBuilder bufferBuilder = bufferCache.get(layer); -// RenderSystem.pushMatrix(); -// RenderSystem.translated(-renderPosX, -renderPosY, -renderPosZ); -// drawBuffer(bufferBuilder); -// RenderSystem.popMatrix(); -// } -// RenderSystem.disableAlphaTest(); -// RenderSystem.disableBlend(); + if (!active) + return; + for (RenderType layer : RenderType.getBlockLayers()) { + if (!usedBlockRenderLayers.contains(layer)) + continue; + SuperByteBuffer superByteBuffer = bufferCache.get(layer); + superByteBuffer.renderInto(ms, buffer.getBuffer(layer)); + } } private void redraw(Minecraft minecraft) { @@ -111,51 +85,51 @@ public class SchematicRenderer { final BlockRendererDispatcher blockRendererDispatcher = minecraft.getBlockRendererDispatcher(); List blockstates = new LinkedList<>(); + Map buffers = new HashMap<>(); + MatrixStack ms = new MatrixStack(); BlockPos.func_229383_a_(blockAccess.getBounds()) .forEach(localPos -> { + ms.push(); + MatrixStacker.of(ms) + .translate(localPos); BlockPos pos = localPos.add(anchor); BlockState state = blockAccess.getBlockState(pos); - + for (RenderType blockRenderLayer : RenderType.getBlockLayers()) { if (!RenderTypeLookup.canRenderInLayer(state, blockRenderLayer)) continue; ForgeHooksClient.setRenderLayer(blockRenderLayer); - - final BufferBuilder bufferBuilder = bufferCache.get(blockRenderLayer); + if (!buffers.containsKey(blockRenderLayer)) + buffers.put(blockRenderLayer, new BufferBuilder(DefaultVertexFormats.BLOCK.getIntegerSize())); + + BufferBuilder bufferBuilder = buffers.get(blockRenderLayer); if (startedBufferBuilders.add(blockRenderLayer)) bufferBuilder.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK); - if (blockRendererDispatcher.renderModel(state, pos, blockAccess, new MatrixStack(), bufferBuilder, - true, minecraft.world.rand, EmptyModelData.INSTANCE)) { + if (blockRendererDispatcher.renderModel(state, pos, blockAccess, ms, bufferBuilder, true, + minecraft.world.rand, EmptyModelData.INSTANCE)) { usedBlockRenderLayers.add(blockRenderLayer); } blockstates.add(state); } - + ForgeHooksClient.setRenderLayer(null); + ms.pop(); }); // finishDrawing for (RenderType layer : RenderType.getBlockLayers()) { - if (!startedBufferBuilders.contains(layer)) { + if (!startedBufferBuilders.contains(layer)) continue; - } - bufferCache.get(layer) - .finishDrawing(); + BufferBuilder buf = buffers.get(layer); + buf.finishDrawing(); + bufferCache.put(layer, new SuperByteBuffer(buf)); } } -// private static void drawBuffer(final BufferBuilder bufferBuilder) { -// Pair pair = bufferBuilder.popData(); -// BufferBuilder.DrawState state = pair.getFirst(); -// -// if (state.getCount() > 0) { -// state.getVertexFormat() -// .startDrawing(MemoryUtil.memAddress(pair.getSecond())); -// RenderSystem.drawArrays(state.getMode(), 0, state.getCount()); -// state.getVertexFormat() -// .endDrawing(); -// } -// } + private static int getLayerCount() { + return RenderType.getBlockLayers() + .size(); + } } diff --git a/src/main/java/com/simibubi/create/content/schematics/client/tools/DeployTool.java b/src/main/java/com/simibubi/create/content/schematics/client/tools/DeployTool.java index ba3014aec..7e0732e76 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/tools/DeployTool.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/tools/DeployTool.java @@ -2,7 +2,6 @@ package com.simibubi.create.content.schematics.client.tools; import com.mojang.blaze3d.matrix.MatrixStack; import com.simibubi.create.AllKeys; -import com.simibubi.create.AllSpecialTextures; import com.simibubi.create.content.schematics.client.SchematicTransformation; import com.simibubi.create.foundation.utility.MatrixStacker; import com.simibubi.create.foundation.utility.outliner.AABBOutline; @@ -37,8 +36,8 @@ public class DeployTool extends PlacementToolBase { } @Override - public void renderTool(MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { - super.renderTool(ms, buffer, light, overlay); + public void renderTool(MatrixStack ms, IRenderTypeBuffer buffer) { + super.renderTool(ms, buffer); if (selectedPos == null) return; diff --git a/src/main/java/com/simibubi/create/content/schematics/client/tools/FlipTool.java b/src/main/java/com/simibubi/create/content/schematics/client/tools/FlipTool.java index 8219d6d58..2e490812b 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/tools/FlipTool.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/tools/FlipTool.java @@ -48,10 +48,10 @@ public class FlipTool extends PlacementToolBase { } @Override - public void renderOnSchematic(MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { + public void renderOnSchematic(MatrixStack ms, IRenderTypeBuffer buffer) { if (!schematicSelected || !selectedFace.getAxis() .isHorizontal()) { - super.renderOnSchematic(ms, buffer, light, overlay); + super.renderOnSchematic(ms, buffer); return; } @@ -77,7 +77,7 @@ public class FlipTool extends PlacementToolBase { .withFaceTextures(tex, tex); outline.render(ms, buffer); - super.renderOnSchematic(ms, buffer, light, overlay); + super.renderOnSchematic(ms, buffer); } } diff --git a/src/main/java/com/simibubi/create/content/schematics/client/tools/ISchematicTool.java b/src/main/java/com/simibubi/create/content/schematics/client/tools/ISchematicTool.java index 182b86d93..0723befea 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/tools/ISchematicTool.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/tools/ISchematicTool.java @@ -12,8 +12,8 @@ public interface ISchematicTool { public boolean handleRightClick(); public boolean handleMouseWheel(double delta); - public void renderTool(MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay); - public void renderOverlay(MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay); - public void renderOnSchematic(MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay); + public void renderTool(MatrixStack ms, IRenderTypeBuffer buffer); + public void renderOverlay(MatrixStack ms, IRenderTypeBuffer buffer); + public void renderOnSchematic(MatrixStack ms, IRenderTypeBuffer buffer); } diff --git a/src/main/java/com/simibubi/create/content/schematics/client/tools/PlacementToolBase.java b/src/main/java/com/simibubi/create/content/schematics/client/tools/PlacementToolBase.java index a068d0a2f..1d98fe44a 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/tools/PlacementToolBase.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/tools/PlacementToolBase.java @@ -10,30 +10,30 @@ public abstract class PlacementToolBase extends SchematicToolBase { public void init() { super.init(); } - + @Override public void updateSelection() { super.updateSelection(); } - + @Override - public void renderTool(MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { - super.renderTool(ms, buffer, light, overlay); + public void renderTool(MatrixStack ms, IRenderTypeBuffer buffer) { + super.renderTool(ms, buffer); } @Override - public void renderOverlay(MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { - super.renderOverlay(ms, buffer, light, overlay); + public void renderOverlay(MatrixStack ms, IRenderTypeBuffer buffer) { + super.renderOverlay(ms, buffer); } - + @Override public boolean handleMouseWheel(double delta) { return false; } - + @Override public boolean handleRightClick() { return false; } - + } diff --git a/src/main/java/com/simibubi/create/content/schematics/client/tools/RotateTool.java b/src/main/java/com/simibubi/create/content/schematics/client/tools/RotateTool.java index 884449af0..3aad8a4a1 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/tools/RotateTool.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/tools/RotateTool.java @@ -20,7 +20,7 @@ public class RotateTool extends PlacementToolBase { } @Override - public void renderOnSchematic(MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { + public void renderOnSchematic(MatrixStack ms, IRenderTypeBuffer buffer) { AxisAlignedBB bounds = schematicHandler.getBounds(); double height = bounds.getYSize() + Math.max(20, bounds.getYSize()); Vec3d center = bounds.getCenter() @@ -37,7 +37,7 @@ public class RotateTool extends PlacementToolBase { line.set(start, end) .render(ms, buffer); - super.renderOnSchematic(ms, buffer, light, overlay); + super.renderOnSchematic(ms, buffer); } } diff --git a/src/main/java/com/simibubi/create/content/schematics/client/tools/SchematicToolBase.java b/src/main/java/com/simibubi/create/content/schematics/client/tools/SchematicToolBase.java index dd6faf060..dc05ad1aa 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/tools/SchematicToolBase.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/tools/SchematicToolBase.java @@ -120,13 +120,13 @@ public abstract class SchematicToolBase implements ISchematicTool { } @Override - public void renderTool(MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {} + public void renderTool(MatrixStack ms, IRenderTypeBuffer buffer) {} @Override - public void renderOverlay(MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) {} + public void renderOverlay(MatrixStack ms, IRenderTypeBuffer buffer) {} @Override - public void renderOnSchematic(MatrixStack ms, IRenderTypeBuffer buffer, int light, int overlay) { + public void renderOnSchematic(MatrixStack ms, IRenderTypeBuffer buffer) { if (!schematicHandler.isDeployed()) return; diff --git a/src/main/java/com/simibubi/create/content/schematics/item/SchematicItem.java b/src/main/java/com/simibubi/create/content/schematics/item/SchematicItem.java index 1b80357e7..a70ef90f2 100644 --- a/src/main/java/com/simibubi/create/content/schematics/item/SchematicItem.java +++ b/src/main/java/com/simibubi/create/content/schematics/item/SchematicItem.java @@ -9,7 +9,7 @@ import java.util.List; import org.apache.commons.io.IOUtils; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.content.schematics.client.SchematicEditScreen; import com.simibubi.create.foundation.gui.ScreenOpener; import com.simibubi.create.foundation.utility.Lang; @@ -48,7 +48,7 @@ public class SchematicItem extends Item { } public static ItemStack create(String schematic, String owner) { - ItemStack blueprint = AllItems.BLUEPRINT.asStack(); + ItemStack blueprint = AllItemsNew.SCHEMATIC.asStack(); CompoundNBT tag = new CompoundNBT(); tag.putBoolean("Deployed", false); diff --git a/src/main/java/com/simibubi/create/foundation/advancement/AllAdvancements.java b/src/main/java/com/simibubi/create/foundation/advancement/AllAdvancements.java index 5fab34469..1961e23ec 100644 --- a/src/main/java/com/simibubi/create/foundation/advancement/AllAdvancements.java +++ b/src/main/java/com/simibubi/create/foundation/advancement/AllAdvancements.java @@ -4,6 +4,7 @@ import java.io.IOException; import java.nio.file.Path; import java.util.Set; import java.util.function.Consumer; +import java.util.function.Supplier; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -12,7 +13,7 @@ import com.google.common.collect.Sets; import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.simibubi.create.AllBlocks; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.Create; import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem; import com.simibubi.create.content.curiosities.zapper.blockzapper.BlockzapperItem.ComponentTier; @@ -28,6 +29,7 @@ import net.minecraft.block.Blocks; import net.minecraft.data.DataGenerator; import net.minecraft.data.DirectoryCache; import net.minecraft.data.IDataProvider; +import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.item.Items; import net.minecraft.util.IItemProvider; @@ -43,7 +45,7 @@ public class AllAdvancements implements IDataProvider { String id = Create.ID; Advancement root = Advancement.Builder.builder() - .withDisplay(AllItems.BRASS_HAND.asStack(), new TranslationTextComponent(LANG + "root"), + .withDisplay(AllItemsNew.BRASS_HAND.asStack(), new TranslationTextComponent(LANG + "root"), new TranslationTextComponent(LANG + "root.desc"), new ResourceLocation(Create.ID, "textures/block/palettes/gabbro/bricks.png"), FrameType.TASK, false, false, false) @@ -51,8 +53,8 @@ public class AllAdvancements implements IDataProvider { .register(t, id + ":root"); Advancement andesite_alloy = - advancement("andesite_alloy", AllItems.ANDESITE_ALLOY.get(), TaskType.NORMAL).withParent(root) - .withCriterion("0", itemGathered(AllItems.ANDESITE_ALLOY.get())) + advancement("andesite_alloy", AllItemsNew.ANDESITE_ALLOY.get(), TaskType.NORMAL).withParent(root) + .withCriterion("0", itemGathered(AllItemsNew.ANDESITE_ALLOY.get())) .register(t, id + ":andesite_alloy"); kineticsBranch(t, andesite_alloy); @@ -88,12 +90,12 @@ public class AllAdvancements implements IDataProvider { .register(t, id + ":press"); Advancement rose_quartz = - itemAdvancement("polished_rose_quartz", AllItems.POLISHED_ROSE_QUARTZ, TaskType.NORMAL) + itemAdvancement("polished_rose_quartz", AllItemsNew.POLISHED_ROSE_QUARTZ, TaskType.NORMAL) .withParent(andesite_casing) .register(t, id + ":polished_rose_quartz"); Advancement electron_tube = - itemAdvancement("electron_tube", AllItems.ELECTRON_TUBE, TaskType.NORMAL).withParent(rose_quartz) + itemAdvancement("electron_tube", AllItemsNew.ELECTRON_TUBE, TaskType.NORMAL).withParent(rose_quartz) .register(t, id + ":electron_tube"); Advancement saw = kinecticAdvancement("saw", AllBlocks.SAW.get(), TaskType.NORMAL).withParent(press) @@ -116,7 +118,7 @@ public class AllAdvancements implements IDataProvider { .withParent(basin) .register(t, id + ":compact"); - Advancement brass = itemAdvancement("brass", AllItems.BRASS_INGOT, TaskType.NORMAL).withParent(mixer) + Advancement brass = itemAdvancement("brass", AllItemsNew.BRASS_INGOT, TaskType.NORMAL).withParent(mixer) .register(t, id + ":brass"); brassAge(t, brass); @@ -130,14 +132,14 @@ public class AllAdvancements implements IDataProvider { .withCriterion("0", AllTriggers.ROTATION.instance()) .register(t, id + ":its_alive"); - Advancement belt = advancement("belt", AllItems.BELT_CONNECTOR.get(), TaskType.NORMAL).withParent(its_alive) + Advancement belt = advancement("belt", AllItemsNew.BELT_CONNECTOR.get(), TaskType.NORMAL).withParent(its_alive) .withCriterion("0", AllTriggers.CONNECT_BELT.instance()) .register(t, id + ":belt"); - Advancement wrench = itemAdvancement("wrench", AllItems.WRENCH, TaskType.NORMAL).withParent(its_alive) + Advancement wrench = itemAdvancement("wrench", AllItemsNew.WRENCH, TaskType.NORMAL).withParent(its_alive) .register(t, id + ":wrench"); - Advancement goggles = itemAdvancement("goggles", AllItems.GOGGLES, TaskType.NORMAL).withParent(its_alive) + Advancement goggles = itemAdvancement("goggles", AllItemsNew.GOGGLES, TaskType.NORMAL).withParent(its_alive) .register(t, id + ":goggles"); Advancement speed_gauge = @@ -198,27 +200,27 @@ public class AllAdvancements implements IDataProvider { .register(t, id + ":crushing_wheel"); Advancement chromatic_compound = - itemAdvancement("chromatic_compound", AllItems.CHROMATIC_COMPOUND, TaskType.NORMAL) + itemAdvancement("chromatic_compound", AllItemsNew.CHROMATIC_COMPOUND, TaskType.NORMAL) .withParent(crushing_wheel) .register(t, id + ":chromatic_compound"); Advancement shadow_steel = - itemAdvancement("shadow_steel", AllItems.SHADOW_STEEL, TaskType.GOAL).withParent(chromatic_compound) + itemAdvancement("shadow_steel", AllItemsNew.SHADOW_STEEL, TaskType.GOAL).withParent(chromatic_compound) .register(t, id + ":shadow_steel"); - Advancement refined_radiance = - itemAdvancement("refined_radiance", AllItems.REFINED_RADIANCE, TaskType.GOAL).withParent(chromatic_compound) - .register(t, id + ":refined_radiance"); + Advancement refined_radiance = itemAdvancement("refined_radiance", AllItemsNew.REFINED_RADIANCE, TaskType.GOAL) + .withParent(chromatic_compound) + .register(t, id + ":refined_radiance"); Advancement deforester = - itemAdvancement("deforester", AllItems.DEFORESTER, TaskType.NORMAL).withParent(refined_radiance) + itemAdvancement("deforester", AllItemsNew.DEFORESTER, TaskType.NORMAL).withParent(refined_radiance) .register(t, id + ":deforester"); Advancement zapper = - itemAdvancement("zapper", AllItems.PLACEMENT_HANDGUN, TaskType.NORMAL).withParent(refined_radiance) + itemAdvancement("zapper", AllItemsNew.BLOCKZAPPER, TaskType.NORMAL).withParent(refined_radiance) .register(t, id + ":zapper"); - ItemStack gunWithPurpurStuff = AllItems.PLACEMENT_HANDGUN.asStack(); + ItemStack gunWithPurpurStuff = AllItemsNew.BLOCKZAPPER.asStack(); for (Components c : Components.values()) BlockzapperItem.setTier(c, ComponentTier.Chromatic, gunWithPurpurStuff); Advancement upgraded_zapper = advancement("upgraded_zapper", gunWithPurpurStuff, TaskType.CHALLENGE) @@ -227,11 +229,11 @@ public class AllAdvancements implements IDataProvider { .register(t, id + ":upgraded_zapper"); Advancement symmetry_wand = - itemAdvancement("symmetry_wand", AllItems.SYMMETRY_WAND, TaskType.NORMAL).withParent(refined_radiance) + itemAdvancement("symmetry_wand", AllItemsNew.WAND_OF_SYMMETRY, TaskType.NORMAL).withParent(refined_radiance) .register(t, id + ":symmetry_wand"); Advancement shadow_end = deadEnd().withParent(shadow_steel) - .withCriterion("0", itemGathered(AllItems.SHADOW_STEEL.get())) + .withCriterion("0", itemGathered(AllItemsNew.SHADOW_STEEL.get())) .register(t, id + ":shadow_end"); } @@ -340,7 +342,7 @@ public class AllAdvancements implements IDataProvider { type.hide); } - public Builder itemAdvancement(String name, AllItems item, TaskType type) { + public Builder itemAdvancement(String name, Supplier item, TaskType type) { return advancement(name, item.get(), type).withCriterion("0", itemGathered(item.get())); } diff --git a/src/main/java/com/simibubi/create/foundation/data/AllItemsTagProvider.java b/src/main/java/com/simibubi/create/foundation/data/AllItemsTagProvider.java deleted file mode 100644 index ad6fc3dac..000000000 --- a/src/main/java/com/simibubi/create/foundation/data/AllItemsTagProvider.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.simibubi.create.foundation.data; - -import java.util.HashMap; -import java.util.Map; - -import com.simibubi.create.AllItems; - -import net.minecraft.data.DataGenerator; -import net.minecraft.data.ItemTagsProvider; -import net.minecraft.item.Item; -import net.minecraft.tags.ItemTags; -import net.minecraft.tags.Tag; -import net.minecraft.util.ResourceLocation; - -public class AllItemsTagProvider extends ItemTagsProvider { - - static Map createdTags; - - public AllItemsTagProvider(DataGenerator generatorIn) { - super(generatorIn); - } - - @Override - protected void registerTags() { - createdTags = new HashMap<>(); - - //now do the same for AllItems - for (AllItems entry : - AllItems.values()){ - entry.getTaggable().getTagSet(ITaggable.ITEM).forEach(resLoc -> { - if (resLoc.getNamespace().equals("forge") && resLoc.getPath().contains("/")) - builder(new ResourceLocation(resLoc.getNamespace(), resLoc.getPath().split("/")[0])).add(new Tag<>(resLoc)); - builder(resLoc).add(entry.get().asItem()); - }); - } - - } - - private Tag.Builder builder(ResourceLocation resLoc) { - return this.getBuilder(createdTags.computeIfAbsent(resLoc, ItemTags.Wrapper::new)); - - } - - @Override - public String getName() { - return "Create Item Tags"; - } -} diff --git a/src/main/java/com/simibubi/create/foundation/data/AssetLookup.java b/src/main/java/com/simibubi/create/foundation/data/AssetLookup.java index 4e5c5e2f0..33a940420 100644 --- a/src/main/java/com/simibubi/create/foundation/data/AssetLookup.java +++ b/src/main/java/com/simibubi/create/foundation/data/AssetLookup.java @@ -96,4 +96,12 @@ public class AssetLookup { return "block/oxidized/" + name + "_" + level; } + public static NonNullBiConsumer, RegistrateItemModelProvider> existingItemModel() { + return (c, p) -> p.getExistingFile(p.modLoc("item/" + c.getName())); + } + + public static NonNullBiConsumer, RegistrateItemModelProvider> itemModelWithPartials() { + return (c, p) -> p.withExistingParent("item/" + c.getName(), p.modLoc("item/" + c.getName() + "/item")); + } + } diff --git a/src/main/java/com/simibubi/create/foundation/data/BuilderTransformers.java b/src/main/java/com/simibubi/create/foundation/data/BuilderTransformers.java index 7916a6a37..33bc15785 100644 --- a/src/main/java/com/simibubi/create/foundation/data/BuilderTransformers.java +++ b/src/main/java/com/simibubi/create/foundation/data/BuilderTransformers.java @@ -38,7 +38,7 @@ public class BuilderTransformers { public static NonNullUnaryOperator> casing( CTSpriteShiftEntry ct) { - return b -> b.transform(connectedTextures(new StandardCTBehaviour(ct))) + return b -> b.onRegister(connectedTextures(new StandardCTBehaviour(ct))) .initialProperties(SharedProperties::stone) .blockstate((c, p) -> p.simpleBlock(c.get())) .simpleItem(); diff --git a/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java b/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java index c88894741..c318b77cc 100644 --- a/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java +++ b/src/main/java/com/simibubi/create/foundation/data/CreateRegistrate.java @@ -12,12 +12,14 @@ import com.simibubi.create.content.AllSections; import com.simibubi.create.foundation.block.IBlockVertexColor; import com.simibubi.create.foundation.block.connected.CTModel; import com.simibubi.create.foundation.block.connected.ConnectedTextureBehaviour; +import com.simibubi.create.foundation.block.render.CustomRenderedItemModel; import com.tterrag.registrate.AbstractRegistrate; import com.tterrag.registrate.builders.BlockBuilder; import com.tterrag.registrate.builders.Builder; import com.tterrag.registrate.builders.ItemBuilder; import com.tterrag.registrate.util.NonNullLazyValue; import com.tterrag.registrate.util.entry.RegistryEntry; +import com.tterrag.registrate.util.nullness.NonNullConsumer; import com.tterrag.registrate.util.nullness.NonNullFunction; import com.tterrag.registrate.util.nullness.NonNullSupplier; import com.tterrag.registrate.util.nullness.NonNullUnaryOperator; @@ -26,7 +28,8 @@ import net.minecraft.block.Block; import net.minecraft.block.Block.Properties; import net.minecraft.client.renderer.color.IBlockColor; import net.minecraft.client.renderer.color.IItemColor; -import net.minecraft.item.BlockItem; +import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.item.Item; import net.minecraft.util.IItemProvider; import net.minecraftforge.api.distmarker.Dist; import net.minecraftforge.api.distmarker.OnlyIn; @@ -109,25 +112,32 @@ public class CreateRegistrate extends AbstractRegistrate { .simpleItem(); } - public static NonNullUnaryOperator> connectedTextures( - ConnectedTextureBehaviour behavior) { - return b -> b.onRegister(entry -> onClient(() -> () -> registerModel(entry, behavior))); + public static NonNullConsumer connectedTextures(ConnectedTextureBehaviour behavior) { + return entry -> onClient(() -> () -> registerCTBehviour(entry, behavior)); } - public static NonNullUnaryOperator> blockColors( - Supplier> colorFunc) { - return b -> b.onRegister(entry -> onClient(() -> () -> registerBlockColor(entry, colorFunc))); + public static NonNullConsumer blockColors(Supplier> colorFunc) { + return entry -> onClient(() -> () -> registerBlockColor(entry, colorFunc)); } - public static NonNullUnaryOperator> blockVertexColors( - IBlockVertexColor colorFunc) { - return b -> b.onRegister(entry -> onClient(() -> () -> registerBlockVertexColor(entry, colorFunc))); + public static NonNullConsumer blockVertexColors(IBlockVertexColor colorFunc) { + return entry -> onClient(() -> () -> registerBlockVertexColor(entry, colorFunc)); } - public static NonNullFunction, P> itemColors( - Supplier> colorFunc) { - return b -> b.onRegister(entry -> onClient(() -> () -> registerItemColor(entry, colorFunc))) - .build(); + public static NonNullConsumer itemModel( + Supplier> func) { + return entry -> onClient(() -> () -> registerItemModel(entry, func)); + } + + public static NonNullConsumer itemColors(Supplier> colorFunc) { + return entry -> onClient(() -> () -> registerItemColor(entry, colorFunc)); + } + + public static NonNullUnaryOperator> customRenderedItem( + Supplier> func) { + return b -> b.properties(p -> p.setISTER(() -> func.get() + .apply(null)::createRenderer)) + .onRegister(entry -> onClient(() -> () -> registerCustomRenderedItem(entry, func))); } protected static void onClient(Supplier toRun) { @@ -135,11 +145,25 @@ public class CreateRegistrate extends AbstractRegistrate { } @OnlyIn(Dist.CLIENT) - private static void registerModel(Block entry, ConnectedTextureBehaviour behavior) { + private static void registerCTBehviour(Block entry, ConnectedTextureBehaviour behavior) { CreateClient.getCustomBlockModels() .register(entry.delegate, model -> new CTModel(model, behavior)); } + @OnlyIn(Dist.CLIENT) + private static void registerItemModel(Item entry, + Supplier> func) { + CreateClient.getCustomItemModels() + .register(entry.delegate, func.get()); + } + + @OnlyIn(Dist.CLIENT) + private static void registerCustomRenderedItem(Item entry, + Supplier> func) { + CreateClient.getCustomRenderedItems() + .register(entry.delegate, func.get()); + } + @OnlyIn(Dist.CLIENT) private static void registerBlockColor(Block entry, Supplier> colorFunc) { CreateClient.getColorHandler() diff --git a/src/main/java/com/simibubi/create/foundation/data/ITaggable.java b/src/main/java/com/simibubi/create/foundation/data/ITaggable.java deleted file mode 100644 index c9d99631b..000000000 --- a/src/main/java/com/simibubi/create/foundation/data/ITaggable.java +++ /dev/null @@ -1,92 +0,0 @@ -package com.simibubi.create.foundation.data; - -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; -import java.util.stream.Collectors; - -import com.google.common.collect.HashBasedTable; -import com.google.common.collect.Table; - -import net.minecraft.block.Block; -import net.minecraft.item.Item; -import net.minecraft.tags.BlockTags; -import net.minecraft.tags.ItemTags; -import net.minecraft.tags.Tag; -import net.minecraft.tags.TagCollection; -import net.minecraft.util.ResourceLocation; - -public interface ITaggable> { - - interface TagType { - - TagCollection getCollection(); - } - - class Impl implements ITaggable { - - private static final Table, ResourceLocation, Tag> TAG_CACHE = HashBasedTable.create(); - - private Map, Set> tags = new HashMap<>(); - - @Override - public Set getTagSet(TagType type) { - return tags.computeIfAbsent(type, $ -> new HashSet<>()); - } - - @SuppressWarnings("unchecked") - @Override - public Set> getDataTags(TagType type) { - return getTagSet(type).stream().map(rl -> (Tag) TAG_CACHE.row(type).computeIfAbsent(rl, type.getCollection()::getOrCreate)).collect(Collectors.toSet()); - } - } - - static ITaggable create() { - return new Impl(); - } - - static TagType BLOCK = BlockTags::getCollection; - static TagType ITEM = ItemTags::getCollection; - - default T withTags(ResourceLocation... tagsIn) { - return this.withTags(BLOCK, tagsIn).withTags(ITEM, tagsIn); - } - - @SuppressWarnings("unchecked") - default T withTags(TagType type, ResourceLocation... tagsIn) { - Collections.addAll(getTagSet(type), tagsIn); - return (T) this; - } - - default T withTagsInNamespace(String namespace, String... tagsIn) { - return withTags(Arrays.stream(tagsIn).map(s -> new ResourceLocation(namespace, s)).toArray(ResourceLocation[]::new)); - } - - default T withTagsInNamespace(TagType type, String namespace, String... tagsIn) { - return withTags(type, Arrays.stream(tagsIn).map(s -> new ResourceLocation(namespace, s)).toArray(ResourceLocation[]::new)); - } - - default T withCreateTags(String... tagsIn) { - return withTagsInNamespace("create", tagsIn); - } - - default T withForgeTags(String... tagsIn) { - return withTagsInNamespace("forge", tagsIn); - } - - default T withVanillaTags(String... tagsIn) { - return withTagsInNamespace("minecraft", tagsIn); - } - - default T withVanillaTags(TagType type, String... tagsIn) { - return withTagsInNamespace(type, "minecraft", tagsIn); - } - - //take a look at AllBlocks.TaggedBlock for more info - Set getTagSet(TagType type); - - Set> getDataTags(TagType type); -} diff --git a/src/main/java/com/simibubi/create/foundation/data/WindowGen.java b/src/main/java/com/simibubi/create/foundation/data/WindowGen.java index d9e1dc0ad..c7fb69e24 100644 --- a/src/main/java/com/simibubi/create/foundation/data/WindowGen.java +++ b/src/main/java/com/simibubi/create/foundation/data/WindowGen.java @@ -15,13 +15,12 @@ import com.simibubi.create.foundation.block.connected.CTSpriteShiftEntry; import com.simibubi.create.foundation.block.connected.ConnectedTextureBehaviour; import com.simibubi.create.foundation.block.connected.GlassPaneCTBehaviour; import com.simibubi.create.foundation.block.connected.HorizontalCTBehaviour; -import com.tterrag.registrate.builders.BlockBuilder; import com.tterrag.registrate.providers.DataGenContext; import com.tterrag.registrate.providers.RegistrateBlockstateProvider; import com.tterrag.registrate.util.entry.BlockEntry; import com.tterrag.registrate.util.nullness.NonNullBiConsumer; +import com.tterrag.registrate.util.nullness.NonNullConsumer; import com.tterrag.registrate.util.nullness.NonNullFunction; -import com.tterrag.registrate.util.nullness.NonNullUnaryOperator; import net.minecraft.block.Block; import net.minecraft.block.Block.Properties; @@ -60,7 +59,7 @@ public class WindowGen { Supplier> renderType, NonNullFunction endTexture, NonNullFunction sideTexture) { return REGISTRATE.block(name, WindowBlock::new) - .transform(connectedTextures(new HorizontalCTBehaviour(ct))) + .onRegister(connectedTextures(new HorizontalCTBehaviour(ct))) .addLayer(renderType) .initialProperties(() -> Blocks.GLASS) .blockstate((c, p) -> p.simpleBlock(c.get(), p.models() @@ -71,7 +70,7 @@ public class WindowGen { public static BlockEntry framedGlass(String name, ConnectedTextureBehaviour behaviour) { return REGISTRATE.block(name, ConnectedGlassBlock::new) - .transform(connectedTextures(behaviour)) + .onRegister(connectedTextures(behaviour)) .addLayer(() -> RenderType::getTranslucent) .initialProperties(() -> Blocks.GLASS) .blockstate((c, p) -> BlockStateGen.cubeAll(c, p, "palettes/", "framed_glass")) @@ -115,19 +114,17 @@ public class WindowGen { ResourceLocation topTexture, Supplier> renderType) { NonNullBiConsumer, RegistrateBlockstateProvider> stateProvider = (c, p) -> p.paneBlock(c.get(), sideTexture, topTexture); - NonNullUnaryOperator> connectedTextures = b -> b; - return glassPane(name, sideTexture, topTexture, GlassPaneBlock::new, renderType, connectedTextures, - stateProvider); + return glassPane(name, sideTexture, topTexture, GlassPaneBlock::new, renderType, $ -> { + }, stateProvider); } private static BlockEntry connectedGlassPane(String name, CTSpriteShiftEntry ctshift, ResourceLocation sideTexture, ResourceLocation itemSideTexture, ResourceLocation topTexture, Supplier> renderType) { - NonNullUnaryOperator> connectedTextures = - connectedTextures(new GlassPaneCTBehaviour(ctshift)); + NonNullConsumer connectedTextures = connectedTextures(new GlassPaneCTBehaviour(ctshift)); String CGPparents = "block/connected_glass_pane/"; String prefix = name + "_pane_"; - + Function post = getPaneModelProvider(CGPparents, prefix, "post", sideTexture, topTexture), side = getPaneModelProvider(CGPparents, prefix, "side", sideTexture, topTexture), @@ -153,12 +150,12 @@ public class WindowGen { private static BlockEntry glassPane(String name, ResourceLocation sideTexture, ResourceLocation topTexture, NonNullFunction factory, Supplier> renderType, - NonNullUnaryOperator> connectedTextures, + NonNullConsumer connectedTextures, NonNullBiConsumer, RegistrateBlockstateProvider> stateProvider) { name += "_pane"; return REGISTRATE.block(name, factory) - .transform(connectedTextures) + .onRegister(connectedTextures) .addLayer(renderType) .initialProperties(() -> Blocks.GLASS_PANE) .blockstate(stateProvider) diff --git a/src/main/java/com/simibubi/create/foundation/item/CreateItemGroupBase.java b/src/main/java/com/simibubi/create/foundation/item/CreateItemGroupBase.java index b3262b7eb..db27580e5 100644 --- a/src/main/java/com/simibubi/create/foundation/item/CreateItemGroupBase.java +++ b/src/main/java/com/simibubi/create/foundation/item/CreateItemGroupBase.java @@ -4,7 +4,6 @@ import java.util.Collection; import java.util.EnumSet; import java.util.stream.Collectors; -import com.simibubi.create.AllItems; import com.simibubi.create.Create; import com.simibubi.create.content.AllSections; import com.tterrag.registrate.util.entry.RegistryEntry; @@ -13,6 +12,7 @@ import net.minecraft.block.Block; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.ItemRenderer; import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.client.world.ClientWorld; import net.minecraft.item.Item; import net.minecraft.item.ItemGroup; import net.minecraft.item.ItemStack; @@ -39,39 +39,44 @@ public abstract class CreateItemGroupBase extends ItemGroup { public void addBlocks(NonNullList items) { for (RegistryEntry entry : getBlocks()) { Block def = entry.get(); - if (def == null) - continue; Item item = def.asItem(); if (item != Items.AIR) def.fillItemGroup(this, items); } } + + @OnlyIn(Dist.CLIENT) + public void addItems(NonNullList items, boolean specialItems) { + Minecraft mc = Minecraft.getInstance(); + ItemRenderer itemRenderer = mc.getItemRenderer(); + ClientWorld world = mc.world; + + for (RegistryEntry entry : getItems()) { + Item item = entry.get(); + IBakedModel model = itemRenderer.getItemModelWithOverrides(new ItemStack(item), world, null); + if (model.isGui3d() != specialItems) + continue; + item.fillItemGroup(this, items); + } + } protected Collection> getBlocks() { return getSections().stream() - .flatMap(s -> Create.registrate().getAll(s, Block.class).stream()) - .collect(Collectors.toList()); + .flatMap(s -> Create.registrate() + .getAll(s, Block.class) + .stream()) + .collect(Collectors.toList()); } - + + protected Collection> getItems() { + return getSections().stream() + .flatMap(s -> Create.registrate() + .getAll(s, Item.class) + .stream()) + .collect(Collectors.toList()); + } + protected EnumSet getSections() { return EnumSet.allOf(AllSections.class); } - - @OnlyIn(Dist.CLIENT) - public void addItems(NonNullList items, boolean specialItems) { - ItemRenderer itemRenderer = Minecraft.getInstance() - .getItemRenderer(); - - for (AllItems item : AllItems.values()) { - if (item.get() == null) - continue; - IBakedModel model = - itemRenderer.getItemModelWithOverrides(item.asStack(), Minecraft.getInstance().world, null); - if (model.isGui3d() != specialItems) - continue; - - item.get() - .fillItemGroup(this, items); - } - } } diff --git a/src/main/java/com/simibubi/create/foundation/item/CustomItemModels.java b/src/main/java/com/simibubi/create/foundation/item/CustomItemModels.java new file mode 100644 index 000000000..089d613ec --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/item/CustomItemModels.java @@ -0,0 +1,48 @@ +package com.simibubi.create.foundation.item; + +import java.util.ArrayList; +import java.util.IdentityHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Supplier; + +import org.apache.commons.lang3.tuple.Pair; + +import com.tterrag.registrate.util.nullness.NonNullBiConsumer; +import com.tterrag.registrate.util.nullness.NonNullFunction; + +import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.item.Item; + +public class CustomItemModels { + + private List, NonNullFunction>> registered; + private Map> customModels; + + public CustomItemModels() { + registered = new ArrayList<>(); + customModels = new IdentityHashMap<>(); + } + + public void register(Supplier entry, + NonNullFunction behaviour) { + registered.add(Pair.of(entry, behaviour)); + } + + public void foreach(NonNullBiConsumer> consumer) { + loadEntriesIfMissing(); + customModels.forEach(consumer); + } + + private void loadEntriesIfMissing() { + if (customModels.isEmpty()) + loadEntries(); + } + + private void loadEntries() { + customModels.clear(); + registered.forEach(p -> customModels.put(p.getKey() + .get(), p.getValue())); + } + +} diff --git a/src/main/java/com/simibubi/create/foundation/item/CustomRenderedItems.java b/src/main/java/com/simibubi/create/foundation/item/CustomRenderedItems.java new file mode 100644 index 000000000..f7f61cc41 --- /dev/null +++ b/src/main/java/com/simibubi/create/foundation/item/CustomRenderedItems.java @@ -0,0 +1,49 @@ +package com.simibubi.create.foundation.item; + +import java.util.ArrayList; +import java.util.IdentityHashMap; +import java.util.List; +import java.util.Map; +import java.util.function.Supplier; + +import org.apache.commons.lang3.tuple.Pair; + +import com.simibubi.create.foundation.block.render.CustomRenderedItemModel; +import com.tterrag.registrate.util.nullness.NonNullBiConsumer; +import com.tterrag.registrate.util.nullness.NonNullFunction; + +import net.minecraft.client.renderer.model.IBakedModel; +import net.minecraft.item.Item; + +public class CustomRenderedItems { + + private List, NonNullFunction>> registered; + private Map> customModels; + + public CustomRenderedItems() { + registered = new ArrayList<>(); + customModels = new IdentityHashMap<>(); + } + + public void register(Supplier entry, + NonNullFunction behaviour) { + registered.add(Pair.of(entry, behaviour)); + } + + public void foreach(NonNullBiConsumer> consumer) { + loadEntriesIfMissing(); + customModels.forEach(consumer); + } + + private void loadEntriesIfMissing() { + if (customModels.isEmpty()) + loadEntries(); + } + + private void loadEntries() { + customModels.clear(); + registered.forEach(p -> customModels.put(p.getKey() + .get(), p.getValue())); + } + +} diff --git a/src/main/java/com/simibubi/create/foundation/item/IHaveCustomItemModel.java b/src/main/java/com/simibubi/create/foundation/item/IHaveCustomItemModel.java deleted file mode 100644 index 8a08b5295..000000000 --- a/src/main/java/com/simibubi/create/foundation/item/IHaveCustomItemModel.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.simibubi.create.foundation.item; - -import javax.annotation.Nullable; - -import com.simibubi.create.foundation.block.render.CustomRenderedItemModel; - -import net.minecraft.client.renderer.model.IBakedModel; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; - -public interface IHaveCustomItemModel { - - @OnlyIn(value = Dist.CLIENT) - public CustomRenderedItemModel createModel(@Nullable IBakedModel original); - -} diff --git a/src/main/java/com/simibubi/create/foundation/item/IItemWithColorHandler.java b/src/main/java/com/simibubi/create/foundation/item/IItemWithColorHandler.java deleted file mode 100644 index f247737ff..000000000 --- a/src/main/java/com/simibubi/create/foundation/item/IItemWithColorHandler.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.simibubi.create.foundation.item; - -import net.minecraft.client.renderer.color.IItemColor; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; - -public interface IItemWithColorHandler { - - @OnlyIn(value = Dist.CLIENT) - public IItemColor getColorHandler(); - -} diff --git a/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java b/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java index 2aada3123..e057677ab 100644 --- a/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java +++ b/src/main/java/com/simibubi/create/foundation/item/ItemDescription.java @@ -21,7 +21,7 @@ import java.util.Arrays; import java.util.List; import java.util.Map; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.base.IRotate.SpeedLevel; import com.simibubi.create.content.contraptions.base.IRotate.StressImpact; @@ -97,10 +97,12 @@ public class ItemDescription { ResourceLocation id = ((Block) block).getRegistryName(); Map> impacts = config.stressValues.getImpacts(); Map> capacities = config.stressValues.getCapacities(); - boolean hasStressImpact = impacts.containsKey(id) && impacts.get(id).get() > 0 && StressImpact.isEnabled(); + boolean hasStressImpact = impacts.containsKey(id) && impacts.get(id) + .get() > 0 && StressImpact.isEnabled(); boolean hasStressCapacity = capacities.containsKey(id) && StressImpact.isEnabled(); boolean hasGlasses = - AllItems.GOGGLES.typeOf(Minecraft.getInstance().player.getItemStackFromSlot(EquipmentSlotType.HEAD)); + AllItemsNew.GOGGLES.get() == Minecraft.getInstance().player.getItemStackFromSlot(EquipmentSlotType.HEAD) + .getItem(); String rpmUnit = Lang.translate("generic.unit.rpm"); if (hasSpeedRequirement) { @@ -115,29 +117,32 @@ public class ItemDescription { add(linesOnShift, GRAY + Lang.translate("tooltip.speedRequirement")); add(linesOnShift, level); } - + String stressUnit = Lang.translate("generic.unit.stress"); if (hasStressImpact && !(!isEngine && ((IRotate) block).hideStressImpact())) { List stressLevels = Lang.translatedOptions("tooltip.stressImpact", "low", "medium", "high"); - double impact = impacts.get(id).get(); + double impact = impacts.get(id) + .get(); StressImpact impactId = impact >= config.highStressImpact.get() ? StressImpact.HIGH - : (impact >= config.mediumStressImpact.get() ? StressImpact.MEDIUM : StressImpact.LOW); + : (impact >= config.mediumStressImpact.get() ? StressImpact.MEDIUM : StressImpact.LOW); int index = impactId.ordinal(); String level = impactId.getAbsoluteColor() + makeProgressBar(3, index) + stressLevels.get(index); if (hasGlasses) - level += " (" + impacts.get(id).get() + stressUnit + ")"; + level += " (" + impacts.get(id) + .get() + stressUnit + ")"; add(linesOnShift, GRAY + Lang.translate("tooltip.stressImpact")); add(linesOnShift, level); } - + if (hasStressCapacity) { List stressCapacityLevels = Lang.translatedOptions("tooltip.capacityProvided", "low", "medium", "high"); - double capacity = capacities.get(id).get(); + double capacity = capacities.get(id) + .get(); StressImpact impactId = capacity >= config.highCapacity.get() ? StressImpact.LOW - : (capacity >= config.mediumCapacity.get() ? StressImpact.MEDIUM : StressImpact.HIGH); + : (capacity >= config.mediumCapacity.get() ? StressImpact.MEDIUM : StressImpact.HIGH); int index = StressImpact.values().length - 2 - impactId.ordinal(); String level = impactId.getAbsoluteColor() + makeProgressBar(3, index) + stressCapacityLevels.get(index); @@ -188,8 +193,10 @@ public class ItemDescription { boolean hasControls = !linesOnCtrl.isEmpty(); if (hasDescription || hasControls) { - String[] holdKey = Lang.translate("tooltip.holdKey", "$").split("\\$"); - String[] holdKeyOrKey = Lang.translate("tooltip.holdKeyOrKey", "$", "$").split("\\$"); + String[] holdKey = Lang.translate("tooltip.holdKey", "$") + .split("\\$"); + String[] holdKeyOrKey = Lang.translate("tooltip.holdKeyOrKey", "$", "$") + .split("\\$"); String keyShift = Lang.translate("tooltip.keyShift"); String keyCtrl = Lang.translate("tooltip.keyCtrl"); for (List list : Arrays.asList(lines, linesOnShift, linesOnCtrl)) { @@ -288,7 +295,8 @@ public class ItemDescription { } else if (block instanceof EncasedFanBlock) - value = AllConfigs.SERVER.kinetics.generatingFanSpeed.get().toString(); + value = AllConfigs.SERVER.kinetics.generatingFanSpeed.get() + .toString(); else if (block instanceof FurnaceEngineBlock) { int baseSpeed = AllConfigs.SERVER.kinetics.furnaceEngineSpeed.get(); diff --git a/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java b/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java index d010625df..c371e0578 100644 --- a/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java +++ b/src/main/java/com/simibubi/create/foundation/item/TooltipHelper.java @@ -8,7 +8,7 @@ import java.util.List; import java.util.Map; import com.mojang.bridge.game.Language; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.content.AllSections; import com.simibubi.create.content.contraptions.base.IRotate; import com.simibubi.create.content.contraptions.components.flywheel.engine.EngineBlock; @@ -37,7 +37,7 @@ public class TooltipHelper { public static String holdShift(Palette color, boolean highlighted) { TextFormatting colorFormat = highlighted ? color.hColor : color.color; return DARK_GRAY - + Lang.translate("tooltip.holdKey", colorFormat + Lang.translate("tooltip.keyShift") + DARK_GRAY); + + Lang.translate("tooltip.holdKey", colorFormat + Lang.translate("tooltip.keyShift") + DARK_GRAY); } public static List cutString(String s, TextFormatting defaultColor, TextFormatting highlightColor) { @@ -45,7 +45,7 @@ public class TooltipHelper { } public static List cutString(String s, TextFormatting defaultColor, TextFormatting highlightColor, - int indent) { + int indent) { String lineStart = defaultColor.toString(); for (int i = 0; i < indent; i++) lineStart += " "; @@ -83,7 +83,9 @@ public class TooltipHelper { } private static void checkLocale() { - Language currentLanguage = Minecraft.getInstance().getLanguageManager().getCurrentLanguage(); + Language currentLanguage = Minecraft.getInstance() + .getLanguageManager() + .getCurrentLanguage(); if (cachedLanguage != currentLanguage) { cachedTooltips.clear(); cachedLanguage = currentLanguage; @@ -94,8 +96,8 @@ public class TooltipHelper { checkLocale(); ClientPlayerEntity player = Minecraft.getInstance().player; - boolean hasGlasses = - player != null && AllItems.GOGGLES.typeOf(player.getItemStackFromSlot(EquipmentSlotType.HEAD)); + boolean hasGlasses = player != null + && AllItemsNew.typeOf(AllItemsNew.GOGGLES, player.getItemStackFromSlot(EquipmentSlotType.HEAD)); if (hasGlasses != gogglesMode) { gogglesMode = hasGlasses; @@ -131,7 +133,8 @@ public class TooltipHelper { private static ItemDescription buildToolTip(String translationKey, ItemStack stack) { AllSections module = AllSections.of(stack); - if (I18n.format(translationKey).equals("WIP")) + if (I18n.format(translationKey) + .equals("WIP")) return new WipScription(module.getTooltipPalette()); ItemDescription tooltip = new ItemDescription(module.getTooltipPalette()); @@ -183,7 +186,8 @@ public class TooltipHelper { if (stack.getItem() instanceof SandPaperItem) return "tool.create.sand_paper.tooltip"; - return stack.getItem().getTranslationKey(stack) + ".tooltip"; + return stack.getItem() + .getTranslationKey(stack) + ".tooltip"; } } diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueHandler.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueHandler.java index 6e684f351..fc7477e7d 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueHandler.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueHandler.java @@ -1,6 +1,6 @@ package com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.AllKeys; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; import com.simibubi.create.foundation.tileEntity.TileEntityBehaviour; @@ -36,7 +36,7 @@ public class ScrollValueHandler { return false; if (!mc.player.isAllowEdit()) return false; - if (scrolling.needsWrench && !AllItems.WRENCH.typeOf(mc.player.getHeldItemMainhand())) + if (scrolling.needsWrench && !AllItemsNew.typeOf(AllItemsNew.WRENCH, mc.player.getHeldItemMainhand())) return false; if (scrolling.slotPositioning instanceof Sided) ((Sided) scrolling.slotPositioning).fromSide(result.getFace()); diff --git a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueRenderer.java b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueRenderer.java index 45bf64d2c..598c84621 100644 --- a/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueRenderer.java +++ b/src/main/java/com/simibubi/create/foundation/tileEntity/behaviour/scrollvalue/ScrollValueRenderer.java @@ -1,6 +1,6 @@ package com.simibubi.create.foundation.tileEntity.behaviour.scrollvalue; -import com.simibubi.create.AllItems; +import com.simibubi.create.AllItemsNew; import com.simibubi.create.AllKeys; import com.simibubi.create.CreateClient; import com.simibubi.create.foundation.tileEntity.SmartTileEntity; @@ -35,7 +35,8 @@ public class ScrollValueRenderer { ScrollValueBehaviour behaviour = TileEntityBehaviour.get(world, pos, ScrollValueBehaviour.TYPE); if (behaviour == null) return; - if (behaviour.needsWrench && !AllItems.WRENCH.typeOf(Minecraft.getInstance().player.getHeldItemMainhand())) + if (behaviour.needsWrench + && !AllItemsNew.typeOf(AllItemsNew.WRENCH, Minecraft.getInstance().player.getHeldItemMainhand())) return; boolean highlight = behaviour.testHit(target.getHitVec()); diff --git a/src/main/java/com/simibubi/create/foundation/utility/SuperByteBuffer.java b/src/main/java/com/simibubi/create/foundation/utility/SuperByteBuffer.java index a96c3a04c..c888ea1d2 100644 --- a/src/main/java/com/simibubi/create/foundation/utility/SuperByteBuffer.java +++ b/src/main/java/com/simibubi/create/foundation/utility/SuperByteBuffer.java @@ -17,8 +17,6 @@ import net.minecraft.client.renderer.Vector4f; import net.minecraft.client.renderer.texture.TextureAtlasSprite; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.util.Direction; -import net.minecraft.util.Direction.Axis; -import net.minecraft.util.Direction.AxisDirection; import net.minecraft.util.math.BlockPos; import net.minecraft.world.LightType; import net.minecraft.world.World; @@ -143,10 +141,27 @@ public class SuperByteBuffer { if (original.limit() == 0) return; if (!(buffer instanceof BufferBuilder)) { - // TODO 1.15 add "slow" path that writes all the data instead of using bulk put - throw new IllegalArgumentException("Unsupported buffer type!"); - } - ((BufferBuilder) buffer).putBulkData(build(input)); + Matrix4f t = input.peek() + .getModel() + .copy(); + Matrix4f localTransforms = transforms.peek() + .getModel(); + t.multiply(localTransforms); + + ByteBuffer m = mutable; + for (int v = 0; v < vertexCount(m); v++) { + Vector4f pos = new Vector4f(getX(original, v), getY(original, v), getZ(original, v), 1F); + pos.transform(t); + buffer.vertex(pos.getX(), pos.getY(), pos.getZ()) + .color(getR(m, v), getG(m, v), getB(m, v), getA(m, v)) + .texture(getU(m, v), getV(m, v)) + .light(getLight(m, v)) + .normal(getNX(m, v), getNY(m, v), getNZ(m, v)) + .endVertex(); + } + transforms = new MatrixStack(); + } else + ((BufferBuilder) buffer).putBulkData(build(input)); } public SuperByteBuffer translate(double x, double y, double z) { @@ -158,11 +173,6 @@ public class SuperByteBuffer { return this; } - @Deprecated - public SuperByteBuffer rotate(Axis axis, float radians) { - return rotate(Direction.getFacingFromAxis(AxisDirection.POSITIVE, axis), radians); - } - public SuperByteBuffer rotate(Direction axis, float radians) { if (radians == 0) return this; @@ -171,11 +181,6 @@ public class SuperByteBuffer { return this; } - @Deprecated - public SuperByteBuffer rotateCentered(Axis axis, float radians) { - return rotateCentered(Direction.getFacingFromAxis(AxisDirection.POSITIVE, axis), radians); - } - public SuperByteBuffer rotateCentered(Direction axis, float radians) { return translate(.5f, .5f, .5f).rotate(axis, radians) .translate(-.5f, -.5f, -.5f); @@ -273,6 +278,22 @@ public class SuperByteBuffer { return buffer.getFloat(getBufferPosition(index) + 20); } + protected int getLight(ByteBuffer buffer, int index) { + return buffer.getInt(getBufferPosition(index) + 24); + } + + protected byte getNX(ByteBuffer buffer, int index) { + return buffer.get(getBufferPosition(index) + 28); + } + + protected byte getNY(ByteBuffer buffer, int index) { + return buffer.get(getBufferPosition(index) + 29); + } + + protected byte getNZ(ByteBuffer buffer, int index) { + return buffer.get(getBufferPosition(index) + 30); + } + protected void putPos(ByteBuffer buffer, int index, float x, float y, float z) { int pos = getBufferPosition(index); buffer.putFloat(pos, x); diff --git a/src/main/java/com/simibubi/create/foundation/utility/TessellatorHelper.java b/src/main/java/com/simibubi/create/foundation/utility/TessellatorHelper.java deleted file mode 100644 index f0ab64546..000000000 --- a/src/main/java/com/simibubi/create/foundation/utility/TessellatorHelper.java +++ /dev/null @@ -1,261 +0,0 @@ -package com.simibubi.create.foundation.utility; - -import org.lwjgl.opengl.GL11; - -import com.mojang.blaze3d.matrix.MatrixStack; -import com.mojang.blaze3d.platform.GlStateManager.DestFactor; -import com.mojang.blaze3d.platform.GlStateManager.SourceFactor; -import com.mojang.blaze3d.systems.RenderSystem; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.ActiveRenderInfo; -import net.minecraft.client.renderer.BufferBuilder; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.texture.AtlasTexture; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.client.renderer.vertex.VertexFormat; -import net.minecraft.util.math.BlockPos; -import net.minecraft.util.math.Vec3d; - -@Deprecated -public class TessellatorHelper { - - public static final float fontScale = 1 / 512f; - - public static void prepareForDrawing() { - Minecraft mc = Minecraft.getInstance(); - RenderSystem.pushMatrix(); - RenderSystem.pushLightingAttributes(); - RenderSystem.enableBlend(); - RenderSystem.color4f(1, 1, 1, 1); - ActiveRenderInfo renderInfo = mc.gameRenderer.getActiveRenderInfo(); - Vec3d view = renderInfo.getProjectedView(); - RenderSystem.translated(-view.x, -view.y, -view.z); - } - - public static void prepareFastRender() { - Minecraft.getInstance().textureManager.bindTexture(AtlasTexture.LOCATION_BLOCKS_TEXTURE); - net.minecraft.client.renderer.RenderHelper.disableStandardItemLighting(); - RenderSystem.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - RenderSystem.enableBlend(); - RenderSystem.disableCull(); - - if (net.minecraft.client.Minecraft.isAmbientOcclusionEnabled()) - RenderSystem.shadeModel(GL11.GL_SMOOTH); - else - RenderSystem.shadeModel(GL11.GL_FLAT); - - RenderSystem.color3f(1, 1, 1); - } - - @Deprecated - public static void fightZFighting(int id) { - long randomBits = (long) id * 493286711L; - randomBits = randomBits * randomBits * 4392167121L + randomBits * 98761L; - float xNudge = (((float) (randomBits >> 16 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; - float yNudge = (((float) (randomBits >> 20 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; - float zNudge = (((float) (randomBits >> 24 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; - RenderSystem.translatef(xNudge, yNudge, zNudge); - } - - // TODO 1.15 move this one somewhere else or rename class - public static void fightZFighting(int id, MatrixStack ms) { - long randomBits = (long) id * 493286711L; - randomBits = randomBits * randomBits * 4392167121L + randomBits * 98761L; - float xNudge = (((float) (randomBits >> 16 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; - float yNudge = (((float) (randomBits >> 20 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; - float zNudge = (((float) (randomBits >> 24 & 7L) + 0.5F) / 8.0F - 0.5F) * 0.004F; - ms.translate(xNudge, yNudge, zNudge); - } - - public static void begin() { - begin(DefaultVertexFormats.POSITION_TEX); - } - - public static void begin(VertexFormat format) { - Tessellator.getInstance().getBuffer().begin(GL11.GL_QUADS, format); - } - - public static void draw() { - Tessellator.getInstance().draw(); - } - - public static void cleanUpAfterDrawing() { - RenderSystem.popAttributes(); - RenderSystem.popMatrix(); - RenderSystem.disableBlend(); - } - - public static void drawString(String str, float x, float y, float z, boolean scalesUp, boolean hasDepth) { - Minecraft mc = Minecraft.getInstance(); - ActiveRenderInfo view = mc.gameRenderer.getActiveRenderInfo(); - float pitch = view.getPitch(); - float yaw = view.getYaw(); - boolean isThirdPersonFrontal = mc.gameSettings.thirdPersonView == 2; - - RenderSystem.pushMatrix(); - RenderSystem.pushLightingAttributes(); - RenderSystem.translatef(x, y, z); - RenderSystem.normal3f(0.0F, 1.0F, 0.0F); - RenderSystem.rotatef(-yaw, 0.0F, 1.0F, 0.0F); - RenderSystem.rotatef((float) (isThirdPersonFrontal ? -1 : 1) * pitch, 1.0F, 0.0F, 0.0F); - RenderSystem.scalef(-0.025F, -0.025F, 0.025F); - RenderSystem.disableLighting(); - if (!hasDepth) { - RenderSystem.depthMask(false); - RenderSystem.disableDepthTest(); - } - - RenderSystem.enableBlend(); - RenderSystem.blendFuncSeparate(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA, SourceFactor.ONE, DestFactor.ZERO); - int i = mc.fontRenderer.getStringWidth(str) / 2; - RenderSystem.disableTexture(); - Tessellator tessellator = Tessellator.getInstance(); - BufferBuilder bufferbuilder = tessellator.getBuffer(); - bufferbuilder.begin(7, DefaultVertexFormats.POSITION_COLOR); - bufferbuilder.vertex((double) (-i - 3), (double) (-3), 0.0D).color(1F, 1F, 1F, .5F).endVertex(); - bufferbuilder.vertex((double) (-i - 3), (double) (10), 0.0D).color(1F, 1F, 1F, .5F).endVertex(); - bufferbuilder.vertex((double) (i + 3), (double) (10), 0.0D).color(1F, 1F, 1F, .5F).endVertex(); - bufferbuilder.vertex((double) (i + 3), (double) (-3), 0.0D).color(1F, 1F, 1F, .5F).endVertex(); - - if (scalesUp) { - double distance = mc.player.getEyePosition(mc.getRenderPartialTicks()).squareDistanceTo(x, y, z); - double scale = distance * fontScale; - RenderSystem.scaled(2 + scale, 2 + scale, 2 + scale); - } - tessellator.draw(); - RenderSystem.enableTexture(); - if (hasDepth) { - RenderSystem.translatef(0, 0, -0.125f); - } - - mc.fontRenderer.drawString(str, -mc.fontRenderer.getStringWidth(str) / 2, 0, 0); - RenderSystem.enableDepthTest(); - - RenderSystem.color4f(1.0F, 1.0F, 1.0F, 1.0F); - RenderSystem.depthMask(true); - RenderSystem.blendFuncSeparate(SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA, SourceFactor.SRC_ALPHA, DestFactor.ONE_MINUS_SRC_ALPHA); - RenderSystem.popMatrix(); - RenderSystem.popAttributes(); - } - - public static void cube(BufferBuilder bufferBuilder, BlockPos pos, BlockPos size, double scale, - boolean scaleVertical, boolean doubleFaces) { - TessellatorHelper.walls(bufferBuilder, pos, size, scale, scaleVertical, doubleFaces); - int w = size.getX(); - int h = size.getY(); - int l = size.getZ(); - - if (doubleFaces) { - TessellatorHelper.doubleFace(bufferBuilder, pos, new BlockPos(w, 0, l), scale, true, scaleVertical, false); - TessellatorHelper.doubleFace(bufferBuilder, pos.east(w).up(h), new BlockPos(-w, 0, l), scale, true, - scaleVertical, false); - } else { - TessellatorHelper.face(bufferBuilder, pos, new BlockPos(w, 0, l), scale, true, scaleVertical, false, false); - TessellatorHelper.face(bufferBuilder, pos.east(w).up(h), new BlockPos(-w, 0, l), scale, true, scaleVertical, - false, false); - } - } - - public static void walls(BufferBuilder bufferBuilder, BlockPos pos, BlockPos size, double scale, - boolean scaleVertical, boolean doubleFaces) { - int w = size.getX(); - int h = size.getY(); - int l = size.getZ(); - - if (doubleFaces) { - TessellatorHelper.doubleFace(bufferBuilder, pos, new BlockPos(w, h, 0), scale, true, scaleVertical, false); - TessellatorHelper.doubleFace(bufferBuilder, pos.east(w).south(l), new BlockPos(0, h, -l), scale, true, - scaleVertical, false); - TessellatorHelper.doubleFace(bufferBuilder, pos.east(w).south(l), new BlockPos(-w, h, 0), scale, true, - scaleVertical, false); - TessellatorHelper.doubleFace(bufferBuilder, pos, new BlockPos(0, h, l), scale, true, scaleVertical, false); - } else { - TessellatorHelper.face(bufferBuilder, pos, new BlockPos(w, h, 0), scale, true, scaleVertical, false, false); - TessellatorHelper.face(bufferBuilder, pos.east(w).south(l), new BlockPos(0, h, -l), scale, true, - scaleVertical, false, false); - TessellatorHelper.face(bufferBuilder, pos.east(w).south(l), new BlockPos(-w, h, 0), scale, true, - scaleVertical, false, false); - TessellatorHelper.face(bufferBuilder, pos, new BlockPos(0, h, l), scale, true, scaleVertical, false, false); - } - } - - public static void doubleFace(BufferBuilder bufferBuilder, BlockPos pos, BlockPos size, double shift, - boolean stretch, boolean shiftVertical, boolean mirrorTexture) { - TessellatorHelper.face(bufferBuilder, pos, size, shift, stretch, shiftVertical, false, mirrorTexture); - TessellatorHelper.face(bufferBuilder, pos.add(size.getX(), 0, (size.getY() == 0) ? 0 : size.getZ()), - new BlockPos(-size.getX(), size.getY(), (size.getY() == 0) ? size.getZ() : -size.getZ()), -shift, - stretch, shiftVertical, true, mirrorTexture); - } - - public static void face(BufferBuilder bufferBuilder, BlockPos pos, BlockPos size, double shift, boolean stretch, - boolean shiftVertical, boolean shiftBackwards, boolean mirrorTexture) { - int w = size.getX(); - int h = size.getY(); - int l = size.getZ(); - if (shiftBackwards) - shift = -shift; - - if (w == 0) { // YZ plane -> H has to be positive - - double xs = (l < 0) ? shift : -shift; - if (shiftBackwards) - xs = -xs; - double ys1 = shiftVertical ? shift : 0; - double zs1 = l < 0 ? -shift : shift; - if (!stretch && (l > 0 ^ mirrorTexture)) - zs1 = -zs1; - double ys2 = stretch ? -ys1 : ys1; - double zs2 = stretch ? -zs1 : zs1; - double u1 = (mirrorTexture) ? l : 0; - double u2 = (mirrorTexture) ? 0 : l; - - TessellatorHelper.posTexShift(bufferBuilder, new Vec3d(xs, ys2, zs1), pos.south(l), u2, h); - TessellatorHelper.posTexShift(bufferBuilder, new Vec3d(xs, ys1, zs1), pos.south(l).up(h), u2, 0); - TessellatorHelper.posTexShift(bufferBuilder, new Vec3d(xs, ys1, zs2), pos.up(h), u1, 0); - TessellatorHelper.posTexShift(bufferBuilder, new Vec3d(xs, ys2, zs2), pos, u1, h); - - } else if (h == 0) { // XZ plane -> L has to be positive - - double ys = w < 0 ? shift : -shift; - if (shiftBackwards) - ys = -ys; - double xs1 = w < 0 ? -shift : shift; - double zs1 = shift; - double xs2 = stretch ? -xs1 : xs1; - double zs2 = stretch ? -zs1 : zs1; - double u1 = (mirrorTexture) ? w : 0; - double u2 = (mirrorTexture) ? 0 : w; - - TessellatorHelper.posTexShift(bufferBuilder, new Vec3d(xs2, ys, zs1), pos.south(l), u1, l); - TessellatorHelper.posTexShift(bufferBuilder, new Vec3d(xs2, ys, zs2), pos, u1, 0); - TessellatorHelper.posTexShift(bufferBuilder, new Vec3d(xs1, ys, zs2), pos.east(w), u2, 0); - TessellatorHelper.posTexShift(bufferBuilder, new Vec3d(xs1, ys, zs1), pos.east(w).south(l), u2, l); - - } else if (l == 0) { // XY plane -> H has to be positive - - double zs = w < 0 ? shift : -shift; - if (shiftBackwards) - zs = -zs; - double ys1 = shiftVertical ? shift : 0; - double xs1 = w < 0 ? -shift : shift; - if (!stretch && (w > 0 ^ mirrorTexture)) - xs1 = -xs1; - double ys2 = stretch ? -ys1 : ys1; - double xs2 = stretch ? -xs1 : xs1; - double u1 = (mirrorTexture) ? w : 0; - double u2 = (mirrorTexture) ? 0 : w; - - TessellatorHelper.posTexShift(bufferBuilder, new Vec3d(xs2, ys2, zs), pos, u1, h); - TessellatorHelper.posTexShift(bufferBuilder, new Vec3d(xs2, ys1, zs), pos.up(h), u1, 0); - TessellatorHelper.posTexShift(bufferBuilder, new Vec3d(xs1, ys1, zs), pos.east(w).up(h), u2, 0); - TessellatorHelper.posTexShift(bufferBuilder, new Vec3d(xs1, ys2, zs), pos.east(w), u2, h); - - } - } - - private static void posTexShift(BufferBuilder bufferBuilder, Vec3d shift, BlockPos pos, double u, double v) { - bufferBuilder.vertex(shift.x + pos.getX(), shift.y + pos.getY(), shift.z + pos.getZ()).texture((float) u, (float) v).endVertex(); - } - -} diff --git a/src/main/resources/assets/create/models/block/deployer/hand_holding.json b/src/main/resources/assets/create/models/block/deployer/hand_holding.json index 4c4e1e52a..9a585fb63 100644 --- a/src/main/resources/assets/create/models/block/deployer/hand_holding.json +++ b/src/main/resources/assets/create/models/block/deployer/hand_holding.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench", - "parent": "create:item/placement_handgun", + "parent": "block/block", "ambientocclusion": false, "textures": { "18": "create:block/deployer", diff --git a/src/main/resources/assets/create/models/block/deployer/hand_pointing.json b/src/main/resources/assets/create/models/block/deployer/hand_pointing.json index fd965b910..09d55a11b 100644 --- a/src/main/resources/assets/create/models/block/deployer/hand_pointing.json +++ b/src/main/resources/assets/create/models/block/deployer/hand_pointing.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench", - "parent": "create:item/placement_handgun", + "parent": "block/block", "ambientocclusion": false, "textures": { "18": "create:block/deployer", diff --git a/src/main/resources/assets/create/models/block/deployer/hand_punching.json b/src/main/resources/assets/create/models/block/deployer/hand_punching.json index f27e2bb9f..e60304921 100644 --- a/src/main/resources/assets/create/models/block/deployer/hand_punching.json +++ b/src/main/resources/assets/create/models/block/deployer/hand_punching.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench", - "parent": "create:item/placement_handgun", + "parent": "block/block", "ambientocclusion": false, "textures": { "18": "create:block/deployer", diff --git a/src/main/resources/assets/create/models/block/deployer/horizontal.json b/src/main/resources/assets/create/models/block/deployer/horizontal.json index 897a082ba..7b8184d80 100644 --- a/src/main/resources/assets/create/models/block/deployer/horizontal.json +++ b/src/main/resources/assets/create/models/block/deployer/horizontal.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench", - "parent": "create:item/placement_handgun", + "parent": "block/block", "ambientocclusion": false, "textures": { "6": "create:block/piston_bottom", diff --git a/src/main/resources/assets/create/models/block/deployer/pole.json b/src/main/resources/assets/create/models/block/deployer/pole.json index 215bb0a53..1da1b7ffc 100644 --- a/src/main/resources/assets/create/models/block/deployer/pole.json +++ b/src/main/resources/assets/create/models/block/deployer/pole.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench", - "parent": "create:item/placement_handgun", + "parent": "block/block", "ambientocclusion": false, "textures": { "mechanical_press_pole": "create:block/mechanical_press_pole" diff --git a/src/main/resources/assets/create/models/block/deployer/vertical.json b/src/main/resources/assets/create/models/block/deployer/vertical.json index 7098d91fe..e65b29b4f 100644 --- a/src/main/resources/assets/create/models/block/deployer/vertical.json +++ b/src/main/resources/assets/create/models/block/deployer/vertical.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench", - "parent": "create:item/placement_handgun", + "parent": "block/block", "ambientocclusion": false, "textures": { "6": "create:block/piston_bottom", diff --git a/src/main/resources/assets/create/models/item/vertical_gearbox.json b/src/main/resources/assets/create/models/block/gearbox/item_vertical.json similarity index 100% rename from src/main/resources/assets/create/models/item/vertical_gearbox.json rename to src/main/resources/assets/create/models/block/gearbox/item_vertical.json diff --git a/src/main/resources/assets/create/models/item/property_filter.json b/src/main/resources/assets/create/models/item/attribute_filter.json similarity index 100% rename from src/main/resources/assets/create/models/item/property_filter.json rename to src/main/resources/assets/create/models/item/attribute_filter.json diff --git a/src/main/resources/assets/create/models/item/crushed_zinc.json b/src/main/resources/assets/create/models/item/crushed_zinc.json deleted file mode 100644 index e1812eee5..000000000 --- a/src/main/resources/assets/create/models/item/crushed_zinc.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "create:item/crushed_zinc" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/deforester/blade.json b/src/main/resources/assets/create/models/item/deforester/blade.json index 0278e48a6..cc065b487 100644 --- a/src/main/resources/assets/create/models/item/deforester/blade.json +++ b/src/main/resources/assets/create/models/item/deforester/blade.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench", - "parent": "create:item/deforester", + "parent": "create:item/deforester/item", "textures": { "3": "block/white_concrete_powder", "4": "block/white_stained_glass" diff --git a/src/main/resources/assets/create/models/item/deforester/deforester.bbmodel b/src/main/resources/assets/create/models/item/deforester/deforester.bbmodel deleted file mode 100644 index 17e14a521..000000000 --- a/src/main/resources/assets/create/models/item/deforester/deforester.bbmodel +++ /dev/null @@ -1 +0,0 @@ -{"meta":{"format_version":"3.0","model_format":"java_block","box_uv":false},"name":"deforester","parent":"create:item/placement_handgun","ambientocclusion":true,"resolution":{"width":16,"height":16},"elements":[{"name":"handle","from":[7.5,1,7.5],"to":[8.5,12,8.5],"autouv":0,"color":4,"origin":[8,8,8],"faces":{"north":{"uv":[0,0,1,11],"texture":0},"east":{"uv":[0,0,1,11],"texture":0},"south":{"uv":[0,0,1,11],"texture":0},"west":{"uv":[0,0,1,11],"texture":0},"up":{"uv":[0,0,1,1],"texture":0},"down":{"uv":[0,0,1,1],"texture":0}},"uuid":"dfe08692-71dd-1b40-081c-6f903a71e64b"},{"name":"Cog","from":[7.5,9,6],"to":[8.5,10,10],"autouv":0,"color":0,"rotation":[0,-45,0],"origin":[8,8.5,8],"faces":{"north":{"uv":[4,6,5,7],"texture":3},"east":{"uv":[4,6,8,7],"texture":3},"south":{"uv":[4,6,5,7],"texture":3},"west":{"uv":[4,6,8,7],"texture":3},"up":{"uv":[4,6,5,10],"texture":3},"down":{"uv":[4,6,5,10],"texture":3}},"uuid":"d08449b1-27ab-44fd-7172-38fe20e03561"},{"name":"Cog","from":[7.499999999999998,9,5.9999999999999964],"to":[8.499999999999998,10,9.999999999999996],"autouv":0,"color":0,"origin":[8,8.5,8],"faces":{"north":{"uv":[5,6,6,7],"rotation":180,"texture":3},"east":{"uv":[5,6,9,7],"rotation":180,"texture":3},"south":{"uv":[5,6,6,7],"rotation":180,"texture":3},"west":{"uv":[5,6,9,7],"rotation":180,"texture":3},"up":{"uv":[5,6,6,10],"rotation":180,"texture":3},"down":{"uv":[5,6,6,10],"rotation":180,"texture":3}},"uuid":"a12551ad-a6a5-8301-76bd-bdbde45c7a25"},{"name":"Cog","from":[7.5000000000000036,9,5.9999999999999964],"to":[8.500000000000004,10,9.999999999999996],"autouv":0,"color":4,"rotation":[0,45,0],"origin":[8,8.5,8],"faces":{"north":{"uv":[5,6,6,7],"rotation":180,"texture":3},"east":{"uv":[5,6,9,7],"rotation":180,"texture":3},"south":{"uv":[5,6,6,7],"rotation":180,"texture":3},"west":{"uv":[5,6,9,7],"rotation":180,"texture":3},"up":{"uv":[5,6,6,10],"rotation":180,"texture":3},"down":{"uv":[5,6,6,10],"rotation":180,"texture":3}},"uuid":"4c1750d6-386d-a15d-f415-8e409277af44"},{"name":"Cog","from":[6,9,7.5],"to":[10,10,8.5],"autouv":0,"color":4,"origin":[8,8.5,8],"faces":{"north":{"uv":[4,6,5,10],"rotation":90,"texture":3},"east":{"uv":[4,6,5,7],"rotation":90,"texture":3},"south":{"uv":[4,6,5,10],"rotation":90,"texture":3},"west":{"uv":[4,6,5,7],"rotation":90,"texture":3},"up":{"uv":[4,6,5,10],"rotation":90,"texture":3},"down":{"uv":[4,6,5,10],"rotation":90,"texture":3}},"uuid":"22abe18c-bc59-6394-467e-011a243b43ed"},{"name":"handle","from":[7,0,7],"to":[9,1,9],"autouv":0,"color":4,"rotation":[0,-45,0],"origin":[8,8,8],"faces":{"north":{"uv":[0,0,2,1],"texture":5},"east":{"uv":[3,0,5,1],"texture":5},"south":{"uv":[2,0,4,1],"texture":5},"west":{"uv":[5,0,7,1],"texture":5},"up":{"uv":[5,9,7,11],"texture":5},"down":{"uv":[5,9,7,11],"texture":5}},"uuid":"c8c082dc-2577-15e3-6c9c-bdab707033fe"},{"name":"blade2","from":[10.5,9.700000000000003,7.75],"to":[11.5,15.700000000000003,8.25],"autouv":0,"color":1,"origin":[8,6.75,8],"faces":{"north":{"uv":[0,0,1,6],"texture":1},"east":{"uv":[0,0,1,6],"texture":1},"south":{"uv":[0,0,1,6],"texture":1},"west":{"uv":[0,0,1,6],"texture":1},"up":{"uv":[0,0,1,1],"texture":1},"down":{"uv":[0,0,1,1],"texture":1}},"uuid":"569ec4a3-caf3-17fa-f4a7-4ed4c086197a"},{"name":"body_top","from":[4.5,13.5,7.25],"to":[9.5,15,8.75],"autouv":0,"color":4,"origin":[8,8,8],"faces":{"north":{"uv":[1,9,6,10.5],"texture":5},"east":{"uv":[1,7,2.5,8.5],"texture":5},"south":{"uv":[1,8,6,9.5],"texture":5},"west":{"uv":[1,6,2.5,7.5],"texture":5},"up":{"uv":[1,8,6,9.5],"texture":5},"down":{"uv":[2,7,7,8.5],"texture":5}},"uuid":"6bfd5abe-205b-042d-c12c-f88b1eaf1650"},{"name":"connector","from":[9.5,10.5,7],"to":[10.5,15.5,9],"autouv":0,"color":4,"origin":[8.5,7,8],"faces":{"north":{"uv":[2,0,3,5],"texture":0},"east":{"uv":[2,0,4,5],"texture":0},"south":{"uv":[2,0,3,5],"texture":0},"west":{"uv":[2,0,4,5],"texture":0},"up":{"uv":[2,0,3,2],"texture":0},"down":{"uv":[2,0,3,2],"texture":0}},"uuid":"32640f79-576c-642f-fc00-b02996847dd8"},{"name":"light_inner","from":[6,12,7.75],"to":[9.5,14,8.25],"autouv":0,"color":1,"origin":[10,16.5,7.5],"faces":{"north":{"uv":[0,0,3.5,2],"texture":1},"east":{"uv":[0,0,0.5,2],"texture":1},"south":{"uv":[0,0,3.5,2],"texture":1},"west":{"uv":[0,0,0.5,2],"texture":1},"up":{"uv":[0,0,3.5,0.5],"texture":1},"down":{"uv":[0,0,3.5,0.5],"texture":1}},"uuid":"1399b287-4f31-05c0-dc79-146e02b235f8"},{"name":"body_bottom","from":[5.5,11,7.25],"to":[9.5,12.5,8.75],"autouv":0,"color":4,"origin":[8,8,8],"faces":{"north":{"uv":[4,3,8,4.5],"texture":5},"east":{"uv":[0,0,1.5,1.5],"texture":5},"south":{"uv":[4,3,8,4.5],"texture":5},"west":{"uv":[5,3,6.5,4.5],"texture":5},"up":{"uv":[5,3,10,3.5],"texture":5},"down":{"uv":[5,4,9,5.5],"texture":5}},"uuid":"3bc99a9d-a09d-e9c9-323c-6b7cf6de252e"},{"name":"handle","from":[7,8,7],"to":[9,9,9],"autouv":0,"color":4,"rotation":[0,-45,0],"origin":[8,8,8],"faces":{"north":{"uv":[0,0,2,1],"texture":5},"east":{"uv":[0,0,2,1],"texture":5},"south":{"uv":[0,0,2,1],"texture":5},"west":{"uv":[0,0,2,1],"texture":5},"up":{"uv":[3,9,5,11],"texture":5},"down":{"uv":[5,9,7,11],"texture":5}},"uuid":"4c041d57-1d40-da10-6736-96562584ed36"},{"name":"light_outer","from":[5.75,12,7.5],"to":[9.5,14,8.5],"autouv":0,"color":1,"origin":[10,16.5,7.5],"faces":{"north":{"uv":[7,0,10.75,2],"texture":2},"east":{"uv":[7,0,8,2],"texture":2},"south":{"uv":[7,0,10.75,2],"texture":2},"west":{"uv":[7,0,8,2],"texture":2},"up":{"uv":[0,0,3.75,1],"texture":null},"down":{"uv":[0,0,3.75,1],"texture":null}},"uuid":"26fe22e4-4702-0f29-e856-1c8c9c892830"},{"name":"blade3","from":[10.25,9.450000000000003,7.5],"to":[11.75,15.950000000000003,8.5],"autouv":0,"color":1,"origin":[8,6.75,8],"faces":{"north":{"uv":[0,6,1.5,12.5],"rotation":180,"texture":2},"east":{"uv":[0,6,1,12.5],"texture":2},"south":{"uv":[0,7,1.5,13.5],"texture":2},"west":{"uv":[1,6,2,12.5],"texture":2},"up":{"uv":[0,9,1.5,10],"texture":2},"down":{"uv":[0,7,1.5,8],"texture":2}},"uuid":"c405d099-03c8-ab7b-8675-92cf77c007cb"}],"outliner":[{"name":"head","uuid":"411f5c3c-c9e4-580f-8163-f2e34cc48e1d","export":true,"isOpen":true,"visibility":true,"autouv":0,"origin":[8,8,8],"children":["569ec4a3-caf3-17fa-f4a7-4ed4c086197a","c405d099-03c8-ab7b-8675-92cf77c007cb","32640f79-576c-642f-fc00-b02996847dd8"]},"6bfd5abe-205b-042d-c12c-f88b1eaf1650","1399b287-4f31-05c0-dc79-146e02b235f8","26fe22e4-4702-0f29-e856-1c8c9c892830","3bc99a9d-a09d-e9c9-323c-6b7cf6de252e","dfe08692-71dd-1b40-081c-6f903a71e64b","c8c082dc-2577-15e3-6c9c-bdab707033fe","4c041d57-1d40-da10-6736-96562584ed36",{"name":"accelerator","uuid":"f4df80af-3ad5-eaec-1a6c-c6853f92d5da","export":true,"isOpen":true,"visibility":true,"autouv":0,"origin":[8,8,8],"children":["d08449b1-27ab-44fd-7172-38fe20e03561","a12551ad-a6a5-8301-76bd-bdbde45c7a25","4c1750d6-386d-a15d-f415-8e409277af44","22abe18c-bc59-6394-467e-011a243b43ed"]}],"textures":[{"path":"C:\\Users\\simon\\Desktop\\Forge\\Create\\src\\main\\resources\\assets\\create\\textures\\block\\andesite_alloy_mesh.png","name":"andesite_alloy_mesh.png","folder":"block","namespace":"create","id":"2","particle":true,"mode":"link","saved":true,"uuid":"371924ea-729d-4bad-bc3d-284683b16141"},{"path":"D:\\simon\\Minecraft\\Minecraft Assets\\minecraft\\textures\\block\\white_concrete_powder.png","name":"white_concrete_powder.png","folder":"block","namespace":"minecraft","id":"3","particle":false,"mode":"link","saved":true,"uuid":"993fb6c6-3742-dd39-5816-80ae1df51b4d"},{"path":"D:\\simon\\Minecraft\\Minecraft Assets\\minecraft\\textures\\block\\white_stained_glass.png","name":"white_stained_glass.png","folder":"block","namespace":"minecraft","id":"4","particle":false,"mode":"link","saved":true,"uuid":"70db9f44-c287-b19c-a9f1-875c31817cef"},{"path":"D:\\simon\\Minecraft\\Minecraft Assets\\minecraft\\textures\\block\\stripped_spruce_log.png","name":"stripped_spruce_log.png","folder":"block","namespace":"minecraft","id":"5","particle":false,"mode":"link","saved":true,"uuid":"9af96ded-05a4-137d-d49d-202e926d44e4"},{"path":"D:\\simon\\Minecraft\\Minecraft Assets\\minecraft\\textures\\block\\spruce_log.png","name":"spruce_log.png","folder":"block","namespace":"minecraft","id":"6","particle":false,"mode":"link","saved":true,"uuid":"7637d73d-d7b8-9da7-ecbe-dbd3c0fcf1f5"},{"path":"C:\\Users\\simon\\Desktop\\Forge\\Create\\src\\main\\resources\\assets\\create\\textures\\block\\blaze_brass_mesh.png","name":"blaze_brass_mesh.png","folder":"block","namespace":"create","id":"7","particle":false,"mode":"link","saved":true,"uuid":"2419a306-75da-461b-a364-b47b03c32122"}]} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/deforester/gear.json b/src/main/resources/assets/create/models/item/deforester/gear.json index b91196df3..80fe2b1b7 100644 --- a/src/main/resources/assets/create/models/item/deforester/gear.json +++ b/src/main/resources/assets/create/models/item/deforester/gear.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench", - "parent": "create:item/deforester", + "parent": "create:item/deforester/item", "textures": { "5": "block/stripped_spruce_log" }, diff --git a/src/main/resources/assets/create/models/item/deforester.json b/src/main/resources/assets/create/models/item/deforester/item.json similarity index 100% rename from src/main/resources/assets/create/models/item/deforester.json rename to src/main/resources/assets/create/models/item/deforester/item.json diff --git a/src/main/resources/assets/create/models/item/deforester/light.json b/src/main/resources/assets/create/models/item/deforester/light.json index dcbc3f639..5ead22114 100644 --- a/src/main/resources/assets/create/models/item/deforester/light.json +++ b/src/main/resources/assets/create/models/item/deforester/light.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench", - "parent": "create:item/deforester", + "parent": "create:item/deforester/item", "textures": { "3": "block/white_concrete_powder", "4": "block/white_stained_glass" diff --git a/src/main/resources/assets/create/models/item/empty_blueprint.json b/src/main/resources/assets/create/models/item/empty_blueprint.json deleted file mode 100644 index fc08c7945..000000000 --- a/src/main/resources/assets/create/models/item/empty_blueprint.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "create:item/blueprint_empty" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/furnace_minecart_contraption.json b/src/main/resources/assets/create/models/item/furnace_minecart_contraption.json deleted file mode 100644 index 73fb1ceca..000000000 --- a/src/main/resources/assets/create/models/item/furnace_minecart_contraption.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "create:item/minecart_contraption" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/blockzapper/accelerator.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/accelerator.json similarity index 97% rename from src/main/resources/assets/create/models/item/blockzapper/accelerator.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/accelerator.json index 4f830cfed..d59cf2f83 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/accelerator.json +++ b/src/main/resources/assets/create/models/item/handheld_blockzapper/accelerator.json @@ -1,6 +1,6 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "cog": "minecraft:block/stripped_spruce_log" }, diff --git a/src/main/resources/assets/create/models/item/blockzapper/amplifier_core.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/amplifier_core.json similarity index 95% rename from src/main/resources/assets/create/models/item/blockzapper/amplifier_core.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/amplifier_core.json index 51b3a7152..c62efc205 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/amplifier_core.json +++ b/src/main/resources/assets/create/models/item/handheld_blockzapper/amplifier_core.json @@ -1,6 +1,6 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "2": "block/white_concrete_powder", "3": "block/white_stained_glass" diff --git a/src/main/resources/assets/create/models/item/blockzapper/body.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/body.json similarity index 98% rename from src/main/resources/assets/create/models/item/blockzapper/body.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/body.json index b0db3229c..4406694d0 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/body.json +++ b/src/main/resources/assets/create/models/item/handheld_blockzapper/body.json @@ -1,7 +1,7 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", "ambientocclusion": true, - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "0": "create:block/andesite_alloy_mesh" }, diff --git a/src/main/resources/assets/create/models/item/blockzapper/chorus_accelerator.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_accelerator.json similarity index 97% rename from src/main/resources/assets/create/models/item/blockzapper/chorus_accelerator.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_accelerator.json index 49b4bcc7f..3e4cc4536 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/chorus_accelerator.json +++ b/src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_accelerator.json @@ -1,6 +1,6 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "cog": "minecraft:block/mycelium_top" }, diff --git a/src/main/resources/assets/create/models/item/blockzapper/chorus_amplifier.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_amplifier.json similarity index 96% rename from src/main/resources/assets/create/models/item/blockzapper/chorus_amplifier.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_amplifier.json index d2536deee..b5db078ce 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/chorus_amplifier.json +++ b/src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_amplifier.json @@ -1,6 +1,6 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "0": "create:block/chorus_chrome_mesh" }, diff --git a/src/main/resources/assets/create/models/item/blockzapper/chorus_body.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_body.json similarity index 98% rename from src/main/resources/assets/create/models/item/blockzapper/chorus_body.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_body.json index dd946f695..80fad6460 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/chorus_body.json +++ b/src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_body.json @@ -1,7 +1,7 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", "ambientocclusion": true, - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "0": "create:block/chorus_chrome_mesh" }, diff --git a/src/main/resources/assets/create/models/item/blockzapper/chorus_retriever.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_retriever.json similarity index 94% rename from src/main/resources/assets/create/models/item/blockzapper/chorus_retriever.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_retriever.json index 828943343..06c0b7103 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/chorus_retriever.json +++ b/src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_retriever.json @@ -1,6 +1,6 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "0": "create:block/chorus_chrome_mesh", "cyan_concrete_powder": "block/cyan_concrete_powder" diff --git a/src/main/resources/assets/create/models/item/blockzapper/chorus_scope.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_scope.json similarity index 96% rename from src/main/resources/assets/create/models/item/blockzapper/chorus_scope.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_scope.json index a6ee3dd41..98066445e 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/chorus_scope.json +++ b/src/main/resources/assets/create/models/item/handheld_blockzapper/chorus_scope.json @@ -1,7 +1,7 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", "ambientocclusion": true, - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "mesh": "create:block/chorus_chrome_mesh", "smooth_stone_slab_side": "block/smooth_stone_slab_side" diff --git a/src/main/resources/assets/create/models/item/blockzapper/core.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/core.json similarity index 95% rename from src/main/resources/assets/create/models/item/blockzapper/core.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/core.json index 0894aea72..efa825196 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/core.json +++ b/src/main/resources/assets/create/models/item/handheld_blockzapper/core.json @@ -1,6 +1,6 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "2": "block/white_concrete_powder", "3": "block/white_stained_glass" diff --git a/src/main/resources/assets/create/models/item/blockzapper/gold_accelerator.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/gold_accelerator.json similarity index 97% rename from src/main/resources/assets/create/models/item/blockzapper/gold_accelerator.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/gold_accelerator.json index 173324752..89554d609 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/gold_accelerator.json +++ b/src/main/resources/assets/create/models/item/handheld_blockzapper/gold_accelerator.json @@ -1,6 +1,6 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "cog": "create:block/brass_block" }, diff --git a/src/main/resources/assets/create/models/item/blockzapper/gold_amplifier.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/gold_amplifier.json similarity index 96% rename from src/main/resources/assets/create/models/item/blockzapper/gold_amplifier.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/gold_amplifier.json index fd3285253..24502b1aa 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/gold_amplifier.json +++ b/src/main/resources/assets/create/models/item/handheld_blockzapper/gold_amplifier.json @@ -1,6 +1,6 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "0": "create:block/blaze_brass_mesh" }, diff --git a/src/main/resources/assets/create/models/item/blockzapper/gold_body.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/gold_body.json similarity index 98% rename from src/main/resources/assets/create/models/item/blockzapper/gold_body.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/gold_body.json index b72e2b6e3..a7c42c500 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/gold_body.json +++ b/src/main/resources/assets/create/models/item/handheld_blockzapper/gold_body.json @@ -1,7 +1,7 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", "ambientocclusion": true, - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "0": "create:block/blaze_brass_mesh" }, diff --git a/src/main/resources/assets/create/models/item/blockzapper/gold_retriever.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/gold_retriever.json similarity index 94% rename from src/main/resources/assets/create/models/item/blockzapper/gold_retriever.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/gold_retriever.json index ed9089678..8fc432c20 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/gold_retriever.json +++ b/src/main/resources/assets/create/models/item/handheld_blockzapper/gold_retriever.json @@ -1,6 +1,6 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "0": "create:block/blaze_brass_mesh", "cyan_concrete_powder": "block/cyan_concrete_powder" diff --git a/src/main/resources/assets/create/models/item/blockzapper/gold_scope.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/gold_scope.json similarity index 96% rename from src/main/resources/assets/create/models/item/blockzapper/gold_scope.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/gold_scope.json index 685ecbd33..637a05f97 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/gold_scope.json +++ b/src/main/resources/assets/create/models/item/handheld_blockzapper/gold_scope.json @@ -1,7 +1,7 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", "ambientocclusion": true, - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "mesh": "create:block/blaze_brass_mesh", "smooth_stone_slab_side": "block/smooth_stone_slab_side" diff --git a/src/main/resources/assets/create/models/item/placement_handgun.json b/src/main/resources/assets/create/models/item/handheld_blockzapper/item.json similarity index 100% rename from src/main/resources/assets/create/models/item/placement_handgun.json rename to src/main/resources/assets/create/models/item/handheld_blockzapper/item.json diff --git a/src/main/resources/assets/create/models/item/blockzapper/terrain_accelerator.json b/src/main/resources/assets/create/models/item/handheld_worldshaper/accelerator.json similarity index 98% rename from src/main/resources/assets/create/models/item/blockzapper/terrain_accelerator.json rename to src/main/resources/assets/create/models/item/handheld_worldshaper/accelerator.json index 3966b94bb..8038eb2fb 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/terrain_accelerator.json +++ b/src/main/resources/assets/create/models/item/handheld_worldshaper/accelerator.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench", - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "cog": "block/prismarine_bricks", "particle": "block/obsidian" diff --git a/src/main/resources/assets/create/models/item/blockzapper/terrain_core.json b/src/main/resources/assets/create/models/item/handheld_worldshaper/core.json similarity index 98% rename from src/main/resources/assets/create/models/item/blockzapper/terrain_core.json rename to src/main/resources/assets/create/models/item/handheld_worldshaper/core.json index b3eb2ca78..607686e1f 100644 --- a/src/main/resources/assets/create/models/item/blockzapper/terrain_core.json +++ b/src/main/resources/assets/create/models/item/handheld_worldshaper/core.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench", - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "2": "block/white_concrete_powder", "3": "block/white_stained_glass", diff --git a/src/main/resources/assets/create/models/item/terrain_zapper.json b/src/main/resources/assets/create/models/item/handheld_worldshaper/item.json similarity index 99% rename from src/main/resources/assets/create/models/item/terrain_zapper.json rename to src/main/resources/assets/create/models/item/handheld_worldshaper/item.json index b79e1d086..d98da7d00 100644 --- a/src/main/resources/assets/create/models/item/terrain_zapper.json +++ b/src/main/resources/assets/create/models/item/handheld_worldshaper/item.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench", - "parent": "create:item/placement_handgun", + "parent": "create:item/handheld_blockzapper/item", "textures": { "0": "create:block/andesite_alloy_mesh", "1": "block/smooth_stone_slab_side", diff --git a/src/main/resources/assets/create/models/item/lapis_plate.json b/src/main/resources/assets/create/models/item/lapis_plate.json deleted file mode 100644 index cc17a7b68..000000000 --- a/src/main/resources/assets/create/models/item/lapis_plate.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "create:item/lapis_plate" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/obsidian_dust.json b/src/main/resources/assets/create/models/item/obsidian_dust.json deleted file mode 100644 index e23484e72..000000000 --- a/src/main/resources/assets/create/models/item/obsidian_dust.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "create:item/obsidian_dust" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/slot_cover.json b/src/main/resources/assets/create/models/item/slot_cover.json deleted file mode 100644 index 254fd6725..000000000 --- a/src/main/resources/assets/create/models/item/slot_cover.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "parent": "item/generated", - "textures": { - "layer0": "create:item/slot_cover" - } -} \ No newline at end of file diff --git a/src/main/resources/assets/create/models/item/symmetry_wand/bits.json b/src/main/resources/assets/create/models/item/wand_of_symmetry/bits.json similarity index 98% rename from src/main/resources/assets/create/models/item/symmetry_wand/bits.json rename to src/main/resources/assets/create/models/item/wand_of_symmetry/bits.json index cff5cc677..bf6751f71 100644 --- a/src/main/resources/assets/create/models/item/symmetry_wand/bits.json +++ b/src/main/resources/assets/create/models/item/wand_of_symmetry/bits.json @@ -1,7 +1,7 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", "ambientocclusion": false, - "parent": "create:item/symmetry_wand", + "parent": "create:item/wand_of_symmetry/item", "textures": { "0": "block/obsidian", "1": "block/light_blue_concrete_powder", diff --git a/src/main/resources/assets/create/models/item/symmetry_wand/core.json b/src/main/resources/assets/create/models/item/wand_of_symmetry/core.json similarity index 97% rename from src/main/resources/assets/create/models/item/symmetry_wand/core.json rename to src/main/resources/assets/create/models/item/wand_of_symmetry/core.json index 7d14a3b7c..99840bb2c 100644 --- a/src/main/resources/assets/create/models/item/symmetry_wand/core.json +++ b/src/main/resources/assets/create/models/item/wand_of_symmetry/core.json @@ -1,7 +1,7 @@ { "__comment": "Model generated using MrCrayfish's Model Creator (http://mrcrayfish.com/modelcreator/)", "ambientocclusion": false, - "parent": "create:item/symmetry_wand", + "parent": "create:item/wand_of_symmetry/item", "textures": { "0": "block/obsidian", "1": "block/light_blue_concrete_powder", diff --git a/src/main/resources/assets/create/models/item/symmetry_wand.json b/src/main/resources/assets/create/models/item/wand_of_symmetry/item.json similarity index 100% rename from src/main/resources/assets/create/models/item/symmetry_wand.json rename to src/main/resources/assets/create/models/item/wand_of_symmetry/item.json diff --git a/src/main/resources/assets/create/models/item/wrench/gear.json b/src/main/resources/assets/create/models/item/wrench/gear.json index 355909cfb..3142c72d7 100644 --- a/src/main/resources/assets/create/models/item/wrench/gear.json +++ b/src/main/resources/assets/create/models/item/wrench/gear.json @@ -1,6 +1,6 @@ { "credit": "Made with Blockbench", - "parent": "create:item/wrench", + "parent": "create:item/wrench/item", "textures": { "0": "block/stripped_spruce_log" }, diff --git a/src/main/resources/assets/create/models/item/wrench.json b/src/main/resources/assets/create/models/item/wrench/item.json similarity index 100% rename from src/main/resources/assets/create/models/item/wrench.json rename to src/main/resources/assets/create/models/item/wrench/item.json diff --git a/src/main/resources/assets/create/textures/item/belt.png b/src/main/resources/assets/create/textures/item/belt_connector.png similarity index 100% rename from src/main/resources/assets/create/textures/item/belt.png rename to src/main/resources/assets/create/textures/item/belt_connector.png diff --git a/src/main/resources/assets/create/textures/item/slot_cover.png b/src/main/resources/assets/create/textures/item/crafter_slot_cover.png similarity index 100% rename from src/main/resources/assets/create/textures/item/slot_cover.png rename to src/main/resources/assets/create/textures/item/crafter_slot_cover.png diff --git a/src/main/resources/assets/create/textures/item/crushed_copper.png b/src/main/resources/assets/create/textures/item/crushed_copper_ore.png similarity index 100% rename from src/main/resources/assets/create/textures/item/crushed_copper.png rename to src/main/resources/assets/create/textures/item/crushed_copper_ore.png diff --git a/src/main/resources/assets/create/textures/item/crushed_gold.png b/src/main/resources/assets/create/textures/item/crushed_gold_ore.png similarity index 100% rename from src/main/resources/assets/create/textures/item/crushed_gold.png rename to src/main/resources/assets/create/textures/item/crushed_gold_ore.png diff --git a/src/main/resources/assets/create/textures/item/crushed_iron.png b/src/main/resources/assets/create/textures/item/crushed_iron_ore.png similarity index 100% rename from src/main/resources/assets/create/textures/item/crushed_iron.png rename to src/main/resources/assets/create/textures/item/crushed_iron_ore.png diff --git a/src/main/resources/assets/create/textures/item/crushed_zinc.png b/src/main/resources/assets/create/textures/item/crushed_zinc_ore.png similarity index 100% rename from src/main/resources/assets/create/textures/item/crushed_zinc.png rename to src/main/resources/assets/create/textures/item/crushed_zinc_ore.png diff --git a/src/main/resources/assets/create/textures/item/blueprint_empty.png b/src/main/resources/assets/create/textures/item/empty_schematic.png similarity index 100% rename from src/main/resources/assets/create/textures/item/blueprint_empty.png rename to src/main/resources/assets/create/textures/item/empty_schematic.png diff --git a/src/main/resources/assets/create/textures/item/furnace_minecart_contraption.png b/src/main/resources/assets/create/textures/item/furnace_minecart_contraption.png new file mode 100644 index 0000000000000000000000000000000000000000..747ff905828c8c717ea6a11cc53cd87cca7087d8 GIT binary patch literal 582 zcmV-M0=fN(P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0ozGLK~y+Tt&`C! zWKkT)zhg!_T5X%Tb|SnO8ZA+lRuN`O%FEU^t&~SE@=hrY5B?U9Qc4rU8Z}}cFk~{k zNUWJVvsPnfMB)2$?`^J;C*L~voO}9xKfmv}oom4xa@Tx((3Xgv-n?2{q|GML$nlWP zfupVKhY6N16ICyAl-T9Htki~7`W|ZP3hjM^*bdDXBry`uJUB8X9cip|l*0bOF6;Ul z1zUkRxLdphNlZsrURpr!&k-D*syI)kWe{?fNJA<6jKlC^0Ym`Z9}{W$#|FD56(WluL(C|_`)#>Gt8_&C|$<>ipC z>gn#3LPAG-y0E?$LTmds!@Rm0z*abnY&Iho%E|}zFMc_Fb(8U1ifnS6&Fw!ZwpbT}l{Qv*} literal 0 HcmV?d00001 diff --git a/src/main/resources/assets/create/textures/item/gold_sheet.png b/src/main/resources/assets/create/textures/item/golden_sheet.png similarity index 100% rename from src/main/resources/assets/create/textures/item/gold_sheet.png rename to src/main/resources/assets/create/textures/item/golden_sheet.png diff --git a/src/main/resources/assets/create/textures/item/lapis_plate.png b/src/main/resources/assets/create/textures/item/lapis_sheet.png similarity index 100% rename from src/main/resources/assets/create/textures/item/lapis_plate.png rename to src/main/resources/assets/create/textures/item/lapis_sheet.png diff --git a/src/main/resources/assets/create/textures/item/obsidian_dust.png b/src/main/resources/assets/create/textures/item/powdered_obsidian.png similarity index 100% rename from src/main/resources/assets/create/textures/item/obsidian_dust.png rename to src/main/resources/assets/create/textures/item/powdered_obsidian.png diff --git a/src/main/resources/assets/create/textures/item/blueprint_filled.png b/src/main/resources/assets/create/textures/item/schematic.png similarity index 100% rename from src/main/resources/assets/create/textures/item/blueprint_filled.png rename to src/main/resources/assets/create/textures/item/schematic.png diff --git a/src/main/resources/assets/create/textures/item/blueprint_and_quill.png b/src/main/resources/assets/create/textures/item/schematic_and_quill.png similarity index 100% rename from src/main/resources/assets/create/textures/item/blueprint_and_quill.png rename to src/main/resources/assets/create/textures/item/schematic_and_quill.png diff --git a/src/main/resources/assets/create/textures/item/unused/TEMPLATE_crushed.png b/src/main/resources/assets/create/textures/item/unused/TEMPLATE_crushed.png deleted file mode 100644 index f7966c32646b3c7412d23faf4728608ff7472458..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 395 zcmV;60d)R}P)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGizW@LZzX3P}QzQTY0U$|4K~y+TWBmXB zKLaIz2}+X}Bv2sY!fThe{eSuN%>R;tC?FTYhsnV(3I~K?ieQ@W-`f5E z+==D?L3|J!W*7{kL?g(#ii(O1_wV0lu(5Mv`1bWZ!@0Ak!E#2%rVQ`jyrKYe@~tQn*cWa#y4SHN--5)us0pS}dE0RgZ9Fq>gE zf;53#as1>JxUHI6I$%SVt=P;^T%5vCS{My>I@|>y(_xxHnn0SPB7DIbK(>P9Ku!mV zfeeSa0&D0#LT=By}Z;C1rt3( zJ+r@loG*ZeN_e_BhFJLTooMLA94OG%UeP45r#bbAUF+0a6)h%JEY*%hEftK?2fZ#T z-;lTz(IUdQU6?;X_(b35v$rQM&kvU_eDJ*f_q{*&XWyM_zxH@D_sn;lkL)$y3x<{k z%B--{cqbiJu3qbUHu=>~q4$~$BJ6@r4A;9CGhMQBY%zPEJUy&z%N_r`1u{Vlf42Fi zN-bkp^?vi$b^b-$E*E=fH?TQ&sP*nuH?D^Ex5_)E8Q2@_=jZQSeBJZY zInD~+Ih;yI-rnKrP*}8|!R6@$8J3an3)5C_-N&%c`QJ(xJBG@J%_cd&LwJGV O$l&Sf=d#Wzp$P!;BBQbZ diff --git a/src/main/resources/assets/create/textures/item/unused/motion_scarf.png b/src/main/resources/assets/create/textures/item/unused/motion_scarf.png deleted file mode 100644 index d596e91519c9bcd5731c6bcac9e072502c656107..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 603 zcmV-h0;K(kP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0q{vgK~y+TV;}|m z|NkG#LI6f64F(&+jzC$Mp!ZSt|3k+&z}0UIKMJN9VVVL~*??(uU~AzIwsvmX42Gcg z1h5zgT)wq~5o8Dpl#c=m!yEs<|N4R9-M9A)1r`Nhv3n05Gpwsz0A?c_gkk_pqrHeL z1D`S%!>5nmz*tCxo8cGG9Uw!L6l9^Q85sOmS|hx0ka6$-Y_D{Ne}DfoynXS3;qAK* z3{0#{42(cuGqRur71$8FN)Lt^_EQ;|pkiRaE6dKn%*DhYEFr)kB`?gt%E83I!j4b^ z(uk}XB*qAfnnd5C|Ftm{3_N0N3}0UTV)*;*AH$cgpBZ?#dBO4^P~6lArvLu=%W&@Z zDX<~%FaQPEt9$Q&EFrKVAi(^JiDAlwrC|1*7q=MFL*l{g$Io6eoZEW}%!V7FEUL(` zYSVUxFh5TqPYA3LS(Dl`C5D-67J}I-5^7)?1i%IqMKt}dNY4X19i$Oth_j6)SkvAk z$H59=hJkFqb?+Wn3Gr!002ovPDHLkV1kV#{-yu` diff --git a/src/main/resources/assets/create/textures/item/unused/time_scarf.png b/src/main/resources/assets/create/textures/item/unused/time_scarf.png deleted file mode 100644 index 1841a8745cf655a226cc872683f7ac41bb505fb2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 630 zcmV-+0*U>JP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D0t-n*K~y+TV;}{5 z|Nb4yLI6f64F=JZH$YjK;P$pD|3UP@b(_I@Qs(RgQ4EYQO-pkFz%(*AxvT0w!@o}q z4F5hbT;;7|=%`6#xVYm0+)|JsOi(ro2rn-Ge{xUT|K2%w7~cH#WO(yGl0oNV34eGE4qK44hTn$6&v)ejB}Mp)E@ z<`@3|aqkX;xVSjO%a<>~HhF3yqD?$#9>cnIOTg^kfB!OkzjX?12;2oy(R8IwqA3JvfOdkbm4ho6^v!A_w!LSQx00_Vh5R+D7xO(vnTr)`HiwAcQnq(E= zE|5@A0n;D=_Ci8U!~fLyEQU8felX<4dw?ZChJb8(@c03k4>JrVc5C}$uovJ4fTFJ; zrxI+)lod-+G=Tuv*|VC#Y!HA4A}A%!NpS}Yf&vm|$hlj0F*LopejlC+;mIE40%YtM z5&D16rHB8`JYD{aX)2t<8 diff --git a/src/main/resources/assets/create/textures/item/flour.png b/src/main/resources/assets/create/textures/item/wheat_flour.png similarity index 100% rename from src/main/resources/assets/create/textures/item/flour.png rename to src/main/resources/assets/create/textures/item/wheat_flour.png