├── jitpack.yml ├── LICENSE.md ├── gradle ├── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties └── libs.versions.toml ├── src └── main │ ├── resources │ ├── assets │ │ ├── astronomical │ │ │ ├── models │ │ │ │ ├── item │ │ │ │ │ ├── nano_cosmos.json │ │ │ │ │ ├── nano_planet.json │ │ │ │ │ ├── nano_ring.json │ │ │ │ │ ├── nano_star.json │ │ │ │ │ ├── astral_display.json │ │ │ │ │ ├── the_eye_of_the_universe.json │ │ │ │ │ ├── marshmallow.json │ │ │ │ │ ├── starmallow.json │ │ │ │ │ ├── astral_bundle.json │ │ │ │ │ ├── astral_lantern.json │ │ │ │ │ ├── astral_container.json │ │ │ │ │ ├── astral_fragment.json │ │ │ │ │ ├── astral_bundle_ring.json │ │ │ │ │ ├── astral_bundle_star.json │ │ │ │ │ ├── astral_bundle_cosmos.json │ │ │ │ │ ├── astral_bundle_planet.json │ │ │ │ │ ├── starmallow_stick_burnt.json │ │ │ │ │ ├── marshmallow_stick_burnt.json │ │ │ │ │ ├── marshmallow_stick_cooked.json │ │ │ │ │ ├── starmallow_stick_cooked.json │ │ │ │ │ ├── starmallow_stick_perfect.json │ │ │ │ │ ├── marshmallow_stick_perfect.json │ │ │ │ │ ├── starmallow_stick_slightly_cooked.json │ │ │ │ │ ├── marshmallow_stick_slightly_cooked.json │ │ │ │ │ ├── handheld_marshmallow_stick.json │ │ │ │ │ ├── starmallow_stick.json │ │ │ │ │ ├── marshmallow_stick.json │ │ │ │ │ ├── marshmallow_can.json │ │ │ │ │ └── starmallow_can.json │ │ │ │ └── block │ │ │ │ │ ├── astral_display_vertical_off.json │ │ │ │ │ ├── astral_display_vertical_on.json │ │ │ │ │ ├── marshmallow_can_0.json │ │ │ │ │ ├── starmallow_can_0.json │ │ │ │ │ ├── starmallow_can_1.json │ │ │ │ │ ├── starmallow_can_2.json │ │ │ │ │ ├── starmallow_can_3.json │ │ │ │ │ ├── starmallow_can_4.json │ │ │ │ │ ├── starmallow_can_5.json │ │ │ │ │ ├── starmallow_can_6.json │ │ │ │ │ ├── starmallow_can_7.json │ │ │ │ │ ├── starmallow_can_8.json │ │ │ │ │ ├── marshmallow_can_1.json │ │ │ │ │ ├── marshmallow_can_2.json │ │ │ │ │ ├── marshmallow_can_3.json │ │ │ │ │ ├── marshmallow_can_4.json │ │ │ │ │ ├── marshmallow_can_5.json │ │ │ │ │ ├── marshmallow_can_6.json │ │ │ │ │ ├── marshmallow_can_7.json │ │ │ │ │ ├── marshmallow_can_8.json │ │ │ │ │ ├── astral_display_horizontal_on.json │ │ │ │ │ ├── astral_display_horizontal_off.json │ │ │ │ │ └── astral_lantern.json │ │ │ ├── particles │ │ │ │ ├── fallen_star.json │ │ │ │ ├── star_impact_flare.json │ │ │ │ └── star_impact_explosion.json │ │ │ ├── icon.png │ │ │ ├── sounds │ │ │ │ ├── star_craft.ogg │ │ │ │ ├── star_ambient.ogg │ │ │ │ ├── star_break_1.ogg │ │ │ │ ├── star_break_2.ogg │ │ │ │ ├── star_collect.ogg │ │ │ │ ├── star_fall_1.ogg │ │ │ │ ├── star_fall_2.ogg │ │ │ │ ├── star_fall_3.ogg │ │ │ │ ├── star_impact_1.ogg │ │ │ │ ├── star_impact_2.ogg │ │ │ │ ├── marshmallow_can_take.ogg │ │ │ │ └── marshmallow_can_store.ogg │ │ │ ├── textures │ │ │ │ ├── vfx │ │ │ │ │ ├── temp.png │ │ │ │ │ ├── shimmer.png │ │ │ │ │ ├── supernova.png │ │ │ │ │ ├── interactable.png │ │ │ │ │ └── supernova_dust.png │ │ │ │ ├── gui │ │ │ │ │ ├── marshmallow.png │ │ │ │ │ ├── astral_display.png │ │ │ │ │ ├── astral_widgets.png │ │ │ │ │ └── color_change.png │ │ │ │ ├── item │ │ │ │ │ ├── starmallow.png │ │ │ │ │ ├── astral_bundle.png │ │ │ │ │ ├── marshmallow.png │ │ │ │ │ ├── astral_fragment.png │ │ │ │ │ ├── astral_lantern.png │ │ │ │ │ ├── astral_bundle_ring.png │ │ │ │ │ ├── astral_bundle_star.png │ │ │ │ │ ├── astral_container.png │ │ │ │ │ ├── marshmallow_stick.png │ │ │ │ │ ├── starmallow_stick.png │ │ │ │ │ ├── astral_bundle_cosmos.png │ │ │ │ │ ├── astral_bundle_planet.png │ │ │ │ │ ├── marshmallow_stick_burnt.png │ │ │ │ │ ├── starmallow_stick_burnt.png │ │ │ │ │ ├── starmallow_stick_cooked.png │ │ │ │ │ ├── marshmallow_stick_cooked.png │ │ │ │ │ ├── marshmallow_stick_perfect.png │ │ │ │ │ ├── starmallow_stick_perfect.png │ │ │ │ │ ├── marshmallow_stick_slightly_cooked.png │ │ │ │ │ └── starmallow_stick_slightly_cooked.png │ │ │ │ ├── astral_object │ │ │ │ │ ├── white.png │ │ │ │ │ ├── ring │ │ │ │ │ │ ├── dust.png │ │ │ │ │ │ ├── halo.png │ │ │ │ │ │ ├── asteroids.png │ │ │ │ │ │ ├── organic.png │ │ │ │ │ │ └── particles.png │ │ │ │ │ ├── cosmos │ │ │ │ │ │ ├── void.png │ │ │ │ │ │ └── stars.png │ │ │ │ │ ├── eotu_planet.png │ │ │ │ │ ├── eotu_storm.png │ │ │ │ │ ├── eotu_symbol.png │ │ │ │ │ ├── planet │ │ │ │ │ │ ├── acid.png │ │ │ │ │ │ ├── haze.png │ │ │ │ │ │ ├── home.png │ │ │ │ │ │ ├── ice.png │ │ │ │ │ │ ├── rock.png │ │ │ │ │ │ ├── clouds.png │ │ │ │ │ │ ├── craters.png │ │ │ │ │ │ ├── stripes.png │ │ │ │ │ │ ├── swirl.png │ │ │ │ │ │ └── atmosphere.png │ │ │ │ │ ├── star │ │ │ │ │ │ ├── star_1.png │ │ │ │ │ │ ├── star_2.png │ │ │ │ │ │ └── star_3.png │ │ │ │ │ ├── eotu_cloud_3d.png │ │ │ │ │ ├── eotu_planet_storm.png │ │ │ │ │ └── outer_wilds_spoiler.png │ │ │ │ ├── block │ │ │ │ │ ├── astral_lantern.png │ │ │ │ │ ├── starmallow_can.png │ │ │ │ │ ├── marshmallow_can.png │ │ │ │ │ ├── astral_display_bottom.png │ │ │ │ │ ├── astral_display_top_off.png │ │ │ │ │ ├── astral_display_top_on.png │ │ │ │ │ ├── astral_display_side_arrow.png │ │ │ │ │ ├── astral_display_side_receptor.png │ │ │ │ │ └── astral_display_bottom_receptor.png │ │ │ │ ├── mob_effect │ │ │ │ │ ├── starfall.png │ │ │ │ │ └── stargazing.png │ │ │ │ └── particle │ │ │ │ │ ├── fallen_star.png │ │ │ │ │ ├── star_impact_flare.png │ │ │ │ │ └── star_impact_explosion.png │ │ │ ├── blockstates │ │ │ │ ├── astral_lantern.json │ │ │ │ ├── starmallow_can.json │ │ │ │ ├── marshmallow_can.json │ │ │ │ └── astral_display.json │ │ │ ├── shaders │ │ │ │ └── core │ │ │ │ │ ├── transparent_no_cull_texture.fsh │ │ │ │ │ └── transparent_no_cull_texture.json │ │ │ ├── sounds.json │ │ │ └── lang │ │ │ │ ├── zh_cn.json │ │ │ │ └── en_us.json │ │ └── minecraft │ │ │ └── core │ │ │ └── particle.fsh │ ├── data │ │ ├── minecraft │ │ │ └── tags │ │ │ │ └── blocks │ │ │ │ └── mineable │ │ │ │ └── pickaxe.json │ │ ├── enchancement │ │ │ └── tags │ │ │ │ └── items │ │ │ │ └── retains_durability.json │ │ └── astronomical │ │ │ ├── tags │ │ │ └── blocks │ │ │ │ └── heat_sources.json │ │ │ ├── recipes │ │ │ ├── marshmallow_can.json │ │ │ ├── starmallow_can.json │ │ │ ├── starmallow_stick.json │ │ │ ├── marshmallow_stick.json │ │ │ ├── marshmallow.json │ │ │ ├── starmallow.json │ │ │ ├── astral_lantern.json │ │ │ ├── astral_container.json │ │ │ └── astral_display.json │ │ │ └── loot_tables │ │ │ └── blocks │ │ │ ├── astral_display.json │ │ │ ├── astral_lantern.json │ │ │ └── astral_container.json │ ├── astronomical.accesswidener │ ├── astronomical.mixins.json │ └── quilt.mod.json │ └── java │ └── doctor4t │ └── astronomical │ ├── common │ ├── util │ │ ├── Vec2d.java │ │ ├── PlayerAttackHeld.java │ │ ├── DoubleHolder.java │ │ ├── ScaledDouble.java │ │ └── BlockCastFinder.java │ ├── item │ │ ├── SizeFragmentItem.java │ │ ├── PlanetBaseFragmentItem.java │ │ ├── RingTextureFragmentItem.java │ │ ├── TemperatureFragmentItem.java │ │ ├── PlanetTextureFragmentItem.java │ │ ├── AstralFragmentItem.java │ │ ├── NanoAstralObjectItem.java │ │ ├── MarshmallowCanBlockItem.java │ │ ├── NanoStarItem.java │ │ ├── TheEyeOfTheUniverseItem.java │ │ ├── NanoCosmosItem.java │ │ ├── NanoRingItem.java │ │ ├── AstralBundleItem.java │ │ └── NanoPlanetItem.java │ ├── block │ │ ├── entity │ │ │ ├── AstralLanternBlockEntity.java │ │ │ └── MarshmallowCanBlockEntity.java │ │ └── AstralLanternBlock.java │ ├── structure │ │ ├── CelestialObject.java │ │ ├── Star.java │ │ ├── Starfall.java │ │ └── InteractableStar.java │ ├── effects │ │ └── StargazingStatusEffect.java │ ├── init │ │ ├── AstraCelestialObjects.java │ │ ├── ModStatusEffects.java │ │ ├── ModEntities.java │ │ ├── ModSoundEvents.java │ │ ├── ModParticles.java │ │ ├── ModBlockEntities.java │ │ └── ModBlocks.java │ └── screen │ │ ├── RingColorScreenHandler.java │ │ ├── PlanetColorScreenHandler.java │ │ └── AstralDisplayScreenHandler.java │ ├── AstronomicalConfig.java │ ├── client │ ├── render │ │ ├── world │ │ │ └── VertexData.java │ │ └── entity │ │ │ └── block │ │ │ └── AstralLanternBlockEntityRenderer.java │ ├── AstraClientUtil.java │ ├── sound │ │ └── FallenStarSoundInstance.java │ └── particle │ │ ├── ExplosionParticleType.java │ │ └── AstralFragmentParticleEmitter.java │ ├── mixin │ ├── DisableCrosshairWhenUsingSpyglassInGameHudMixin.java │ ├── VertexConsumerMixin.java │ ├── ItemStackMixin.java │ ├── StatusEffectUtilMixin.java │ ├── PlayFallenStarSoundInstanceClientPlayNetworkHandlerMixin.java │ ├── WorldVFXBuilderAccessor.java │ ├── AstralDisplayRendererEnforcerMixin.java │ ├── NoHandSwingWithMarshmallowStickLivingEntityMixin.java │ ├── PlayerEntityRendererMixin.java │ ├── ResetMarshmallowAttackPlayerEntityMixin.java │ ├── WorldRendererMixin.java │ ├── MinecraftClientMixin.java │ ├── AstralFragmentTinkleItemEntityMixin.java │ ├── InGameHudMixin.java │ ├── AstralObjectItemRendererMixin.java │ ├── HeldItemRendererMixin.java │ └── SpyglassItemMixin.java │ └── cca │ ├── entity │ └── HoldingComponent.java │ ├── AstraCardinalComponents.java │ └── world │ └── AstraStarfallComponent.java ├── settings.gradle ├── .gitignore ├── gradle.properties ├── .editorconfig ├── .gitattributes └── gradlew.bat /jitpack.yml: -------------------------------------------------------------------------------- 1 | jdk: 2 | - openjdk17 3 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | All Right Reserved - doctor4t 2 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/nano_cosmos.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/astral_container" 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/nano_planet.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/astral_container" 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/nano_ring.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/astral_container" 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/nano_star.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/astral_container" 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/particles/fallen_star.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": [ 3 | "astronomical:fallen_star" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/astral_display.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:block/astral_display_vertical_off" 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/the_eye_of_the_universe.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/astral_container" 3 | } 4 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/icon.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/particles/star_impact_flare.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": [ 3 | "astronomical:star_impact_flare" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/util/Vec2d.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.util; 2 | 3 | public record Vec2d(double x, double y) { 4 | } 5 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/particles/star_impact_explosion.json: -------------------------------------------------------------------------------- 1 | { 2 | "textures": [ 3 | "astronomical:star_impact_explosion" 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/sounds/star_craft.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/sounds/star_craft.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/vfx/temp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/vfx/temp.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/sounds/star_ambient.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/sounds/star_ambient.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/sounds/star_break_1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/sounds/star_break_1.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/sounds/star_break_2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/sounds/star_break_2.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/sounds/star_collect.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/sounds/star_collect.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/sounds/star_fall_1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/sounds/star_fall_1.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/sounds/star_fall_2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/sounds/star_fall_2.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/sounds/star_fall_3.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/sounds/star_fall_3.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/sounds/star_impact_1.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/sounds/star_impact_1.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/sounds/star_impact_2.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/sounds/star_impact_2.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/vfx/shimmer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/vfx/shimmer.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/vfx/supernova.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/vfx/supernova.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/blockstates/astral_lantern.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "": { 4 | "model": "astronomical:block/astral_lantern" 5 | } 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/gui/marshmallow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/gui/marshmallow.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/starmallow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/starmallow.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/sounds/marshmallow_can_take.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/sounds/marshmallow_can_take.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/gui/astral_display.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/gui/astral_display.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/gui/astral_widgets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/gui/astral_widgets.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/gui/color_change.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/gui/color_change.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/astral_bundle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/astral_bundle.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/marshmallow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/marshmallow.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/vfx/interactable.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/vfx/interactable.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/vfx/supernova_dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/vfx/supernova_dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/marshmallow.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "astronomical:item/marshmallow" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/starmallow.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "astronomical:item/starmallow" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/sounds/marshmallow_can_store.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/sounds/marshmallow_can_store.ogg -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/white.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/block/astral_lantern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/block/astral_lantern.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/block/starmallow_can.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/block/starmallow_can.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/astral_fragment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/astral_fragment.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/astral_lantern.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/astral_lantern.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/mob_effect/starfall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/mob_effect/starfall.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/particle/fallen_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/particle/fallen_star.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/astral_bundle.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "astronomical:item/astral_bundle" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/astral_lantern.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "astronomical:item/astral_lantern" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/ring/dust.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/ring/dust.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/ring/halo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/ring/halo.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/block/marshmallow_can.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/block/marshmallow_can.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/astral_bundle_ring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/astral_bundle_ring.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/astral_bundle_star.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/astral_bundle_star.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/astral_container.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/astral_container.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/marshmallow_stick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/marshmallow_stick.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/starmallow_stick.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/starmallow_stick.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/mob_effect/stargazing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/mob_effect/stargazing.png -------------------------------------------------------------------------------- /src/main/resources/data/minecraft/tags/blocks/mineable/pickaxe.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "astronomical:astral_display", 5 | "astronomical:astral_lantern" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/astral_container.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "astronomical:item/astral_container" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/astral_fragment.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "astronomical:item/astral_fragment" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/cosmos/void.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/cosmos/void.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/eotu_planet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/eotu_planet.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/eotu_storm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/eotu_storm.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/eotu_symbol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/eotu_symbol.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/planet/acid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/planet/acid.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/planet/haze.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/planet/haze.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/planet/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/planet/home.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/planet/ice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/planet/ice.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/planet/rock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/planet/rock.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/star/star_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/star/star_1.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/star/star_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/star/star_2.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/star/star_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/star/star_3.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/astral_bundle_cosmos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/astral_bundle_cosmos.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/astral_bundle_planet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/astral_bundle_planet.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/astral_bundle_ring.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "astronomical:item/astral_bundle_ring" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/astral_bundle_star.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "astronomical:item/astral_bundle_star" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/cosmos/stars.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/cosmos/stars.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/eotu_cloud_3d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/eotu_cloud_3d.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/planet/clouds.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/planet/clouds.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/planet/craters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/planet/craters.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/planet/stripes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/planet/stripes.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/planet/swirl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/planet/swirl.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/ring/asteroids.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/ring/asteroids.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/ring/organic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/ring/organic.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/ring/particles.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/ring/particles.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/block/astral_display_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/block/astral_display_bottom.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/block/astral_display_top_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/block/astral_display_top_off.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/block/astral_display_top_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/block/astral_display_top_on.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/marshmallow_stick_burnt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/marshmallow_stick_burnt.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/starmallow_stick_burnt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/starmallow_stick_burnt.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/starmallow_stick_cooked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/starmallow_stick_cooked.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/particle/star_impact_flare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/particle/star_impact_flare.png -------------------------------------------------------------------------------- /src/main/resources/data/enchancement/tags/items/retains_durability.json: -------------------------------------------------------------------------------- 1 | { 2 | "replace": false, 3 | "values": [ 4 | "astronomical:marshmallow_stick", 5 | "astronomical:starmallow_stick" 6 | ] 7 | } 8 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/astral_bundle_cosmos.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "astronomical:item/astral_bundle_cosmos" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/astral_bundle_planet.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:item/generated", 3 | "textures": { 4 | "layer0": "astronomical:item/astral_bundle_planet" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/marshmallow_stick_cooked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/marshmallow_stick_cooked.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/marshmallow_stick_perfect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/marshmallow_stick_perfect.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/starmallow_stick_perfect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/starmallow_stick_perfect.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/particle/star_impact_explosion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/particle/star_impact_explosion.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/eotu_planet_storm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/eotu_planet_storm.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/outer_wilds_spoiler.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/outer_wilds_spoiler.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/astral_object/planet/atmosphere.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/astral_object/planet/atmosphere.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/block/astral_display_side_arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/block/astral_display_side_arrow.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/block/astral_display_side_receptor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/block/astral_display_side_receptor.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/block/astral_display_bottom_receptor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/block/astral_display_bottom_receptor.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/marshmallow_stick_slightly_cooked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/marshmallow_stick_slightly_cooked.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/textures/item/starmallow_stick_slightly_cooked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ladysnake/Astronomical/HEAD/src/main/resources/assets/astronomical/textures/item/starmallow_stick_slightly_cooked.png -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/starmallow_stick_burnt.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/handheld_marshmallow_stick", 3 | "textures": { 4 | "layer0": "astronomical:item/starmallow_stick_burnt" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/marshmallow_stick_burnt.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/handheld_marshmallow_stick", 3 | "textures": { 4 | "layer0": "astronomical:item/marshmallow_stick_burnt" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/marshmallow_stick_cooked.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/handheld_marshmallow_stick", 3 | "textures": { 4 | "layer0": "astronomical:item/marshmallow_stick_cooked" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/starmallow_stick_cooked.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/handheld_marshmallow_stick", 3 | "textures": { 4 | "layer0": "astronomical:item/starmallow_stick_cooked" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/starmallow_stick_perfect.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/handheld_marshmallow_stick", 3 | "textures": { 4 | "layer0": "astronomical:item/starmallow_stick_perfect" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/marshmallow_stick_perfect.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/handheld_marshmallow_stick", 3 | "textures": { 4 | "layer0": "astronomical:item/marshmallow_stick_perfect" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/starmallow_stick_slightly_cooked.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/handheld_marshmallow_stick", 3 | "textures": { 4 | "layer0": "astronomical:item/starmallow_stick_slightly_cooked" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/marshmallow_stick_slightly_cooked.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/handheld_marshmallow_stick", 3 | "textures": { 4 | "layer0": "astronomical:item/marshmallow_stick_slightly_cooked" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/item/SizeFragmentItem.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.item; 2 | 3 | public class SizeFragmentItem extends AstralFragmentItem { 4 | public SizeFragmentItem(Settings settings) { 5 | super(settings); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/item/PlanetBaseFragmentItem.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.item; 2 | 3 | public class PlanetBaseFragmentItem extends AstralFragmentItem { 4 | public PlanetBaseFragmentItem(Settings settings) { 5 | super(settings); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/AstronomicalConfig.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical; 2 | 3 | import eu.midnightdust.lib.config.MidnightConfig; 4 | 5 | public class AstronomicalConfig extends MidnightConfig { 6 | @Entry 7 | public static boolean finishedOuterWilds = false; 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/item/RingTextureFragmentItem.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.item; 2 | 3 | public class RingTextureFragmentItem extends AstralFragmentItem { 4 | public RingTextureFragmentItem(Settings settings) { 5 | super(settings); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/item/TemperatureFragmentItem.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.item; 2 | 3 | public class TemperatureFragmentItem extends AstralFragmentItem { 4 | public TemperatureFragmentItem(Settings settings) { 5 | super(settings); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/item/PlanetTextureFragmentItem.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.item; 2 | 3 | public class PlanetTextureFragmentItem extends AstralFragmentItem { 4 | public PlanetTextureFragmentItem(Settings settings) { 5 | super(settings); 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/item/AstralFragmentItem.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.item; 2 | 3 | import net.minecraft.item.Item; 4 | 5 | public class AstralFragmentItem extends Item { 6 | public AstralFragmentItem(Settings settings) { 7 | super(settings); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip 4 | networkTimeout=10000 5 | validateDistributionUrl=true 6 | zipStoreBase=GRADLE_USER_HOME 7 | zipStorePath=wrapper/dists 8 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/item/NanoAstralObjectItem.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.item; 2 | 3 | import net.minecraft.item.Item; 4 | 5 | public class NanoAstralObjectItem extends Item { 6 | public NanoAstralObjectItem(Settings settings) { 7 | super(settings); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/resources/data/astronomical/tags/blocks/heat_sources.json: -------------------------------------------------------------------------------- 1 | { 2 | "values": [ 3 | "#minecraft:fire", 4 | "#minecraft:campfires", 5 | "minecraft:lava", 6 | "minecraft:lava_cauldron", 7 | "minecraft:furnace", 8 | "minecraft:smoker", 9 | "minecraft:blast_furnace" 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/client/render/world/VertexData.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.client.render.world; 2 | 3 | import net.minecraft.util.math.Vec2f; 4 | import org.joml.Vector3f; 5 | 6 | import java.awt.*; 7 | 8 | public record VertexData(Vector3f[] vertices, Color[] color, Vec2f[] uv) { 9 | } 10 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/util/PlayerAttackHeld.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.util; 2 | 3 | public interface PlayerAttackHeld { 4 | default boolean astronomical$isHoldingAttack() { 5 | return false; 6 | } 7 | 8 | default void astronomical$setHoldingAttack(boolean attackHeld) { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | pluginManagement { 2 | repositories { 3 | maven { 4 | name = 'Quilt' 5 | url = 'https://maven.quiltmc.org/repository/release' 6 | } 7 | // Currently needed for Intermediary and other temporary dependencies 8 | maven { 9 | name = 'Fabric' 10 | url = 'https://maven.fabricmc.net/' 11 | } 12 | gradlePluginPortal() 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/client/AstraClientUtil.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.client; 2 | 3 | import net.minecraft.client.MinecraftClient; 4 | 5 | public class AstraClientUtil { 6 | public static long extractSeed() { 7 | return MinecraftClient.getInstance().getServer() == null ? 0L : MinecraftClient.getInstance().getServer().getSaveProperties().getGeneratorOptions().getSeed(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/resources/data/astronomical/recipes/marshmallow_can.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "ingredients": [ 5 | { 6 | "item": "minecraft:bucket" 7 | }, 8 | { 9 | "item": "astronomical:marshmallow" 10 | } 11 | ], 12 | "result": { 13 | "item": "astronomical:marshmallow_can" 14 | }, 15 | "show_notification": true 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/data/astronomical/recipes/starmallow_can.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "ingredients": [ 5 | { 6 | "item": "minecraft:bucket" 7 | }, 8 | { 9 | "item": "astronomical:starmallow" 10 | } 11 | ], 12 | "result": { 13 | "item": "astronomical:starmallow_can" 14 | }, 15 | "show_notification": true 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/data/astronomical/recipes/starmallow_stick.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "ingredients": [ 5 | { 6 | "item": "minecraft:stick" 7 | }, 8 | { 9 | "item": "astronomical:starmallow" 10 | } 11 | ], 12 | "result": { 13 | "item": "astronomical:starmallow_stick" 14 | }, 15 | "show_notification": true 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/data/astronomical/recipes/marshmallow_stick.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "ingredients": [ 5 | { 6 | "item": "minecraft:stick" 7 | }, 8 | { 9 | "item": "astronomical:marshmallow" 10 | } 11 | ], 12 | "result": { 13 | "item": "astronomical:marshmallow_stick" 14 | }, 15 | "show_notification": true 16 | } 17 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/astral_display_vertical_off.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:block/cube_bottom_top", 3 | "textures": { 4 | "bottom": "astronomical:block/astral_display_bottom", 5 | "side": "astronomical:block/astral_display_side_receptor", 6 | "top": "astronomical:block/astral_display_top_off", 7 | "particle": "astronomical:block/astral_display_top_off" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/astral_display_vertical_on.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "minecraft:block/cube_bottom_top", 3 | "textures": { 4 | "bottom": "astronomical:block/astral_display_bottom", 5 | "side": "astronomical:block/astral_display_side_receptor", 6 | "top": "astronomical:block/astral_display_top_on", 7 | "particle": "astronomical:block/astral_display_top_off" 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Gradle 2 | .gradle/ 3 | build/ 4 | out/ 5 | classes/ 6 | 7 | # Quilt Loom 8 | remappedSrc/ 9 | run/ 10 | 11 | # Eclipse 12 | *.launch 13 | 14 | # IntelliJ Idea 15 | .idea/ 16 | *.iml 17 | *.ipr 18 | *.iws 19 | 20 | # Fleet 21 | .fleet/ 22 | 23 | # Visual Studio Code 24 | .settings/ 25 | .vscode/ 26 | bin/ 27 | .classpath 28 | .project 29 | 30 | # Eclipse JDT LS 31 | workspace/ 32 | 33 | # macOS 34 | *.DS_Store 35 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | # Gradle Properties 2 | org.gradle.jvmargs = -Xmx1G 3 | org.gradle.parallel = true 4 | 5 | # Mod Properties 6 | version = 1.0.0 7 | maven_group = doctor4t 8 | archives_base_name = astronomical 9 | 10 | #Mod Depencencies 11 | mod_menu_version = 7.2.2 12 | cca_version = 5.2.2 13 | carpet_core_version = 1.20-1.4.112+v230608 14 | lodestone_version = 09c53ab139 15 | satin_version = 1.14.0 16 | midnightlib_version = 1.4.1-quilt 17 | -------------------------------------------------------------------------------- /src/main/resources/data/astronomical/recipes/marshmallow.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "ingredients": [ 5 | { 6 | "item": "minecraft:egg" 7 | }, 8 | { 9 | "item": "minecraft:sugar" 10 | }, 11 | { 12 | "item": "minecraft:sweet_berries" 13 | } 14 | ], 15 | "result": { 16 | "count": 4, 17 | "item": "astronomical:marshmallow" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/data/astronomical/recipes/starmallow.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shapeless", 3 | "category": "misc", 4 | "ingredients": [ 5 | { 6 | "item": "minecraft:egg" 7 | }, 8 | { 9 | "item": "minecraft:sugar" 10 | }, 11 | { 12 | "item": "astronomical:astral_fragment" 13 | } 14 | ], 15 | "result": { 16 | "count": 4, 17 | "item": "astronomical:starmallow" 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/resources/data/astronomical/loot_tables/blocks/astral_display.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "astronomical:astral_display" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/data/astronomical/loot_tables/blocks/astral_lantern.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "astronomical:astral_lantern" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/data/astronomical/loot_tables/blocks/astral_container.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:block", 3 | "pools": [ 4 | { 5 | "bonus_rolls": 0.0, 6 | "conditions": [ 7 | { 8 | "condition": "minecraft:survives_explosion" 9 | } 10 | ], 11 | "entries": [ 12 | { 13 | "type": "minecraft:item", 14 | "name": "astronomical:astral_container" 15 | } 16 | ], 17 | "rolls": 1.0 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /src/main/resources/data/astronomical/recipes/astral_lantern.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "misc", 4 | "key": { 5 | "A": { 6 | "item": "astronomical:astral_fragment" 7 | }, 8 | "C": { 9 | "item": "minecraft:copper_ingot" 10 | } 11 | }, 12 | "pattern": [ 13 | " C ", 14 | "CAC", 15 | " C " 16 | ], 17 | "result": { 18 | "count": 1, 19 | "item": "astronomical:astral_lantern" 20 | }, 21 | "show_notification": true 22 | } 23 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/block/entity/AstralLanternBlockEntity.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.block.entity; 2 | 3 | import doctor4t.astronomical.common.init.ModBlockEntities; 4 | import net.minecraft.block.BlockState; 5 | import net.minecraft.block.entity.BlockEntity; 6 | import net.minecraft.util.math.BlockPos; 7 | 8 | public class AstralLanternBlockEntity extends BlockEntity { 9 | public AstralLanternBlockEntity(BlockPos pos, BlockState state) { 10 | super(ModBlockEntities.ASTRAL_LANTERN, pos, state); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/main/resources/data/astronomical/recipes/astral_container.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "misc", 4 | "key": { 5 | "A": { 6 | "item": "astronomical:astral_fragment" 7 | }, 8 | "C": { 9 | "item": "minecraft:copper_ingot" 10 | }, 11 | "G": { 12 | "item": "minecraft:glass" 13 | } 14 | }, 15 | "pattern": [ 16 | " A ", 17 | "CGC", 18 | " C " 19 | ], 20 | "result": { 21 | "count": 1, 22 | "item": "astronomical:astral_container" 23 | }, 24 | "show_notification": true 25 | } 26 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | end_of_line = lf 6 | insert_final_newline = true 7 | tab_width = 4 8 | trim_trailing_whitespace = true 9 | 10 | [*.gradle] 11 | indent_style = tab 12 | 13 | [*.java] 14 | indent_style = tab 15 | 16 | [*.json] 17 | indent_style = space 18 | indent_size = 2 19 | 20 | [quilt.mod.json] 21 | indent_style = tab 22 | tab_width = 2 23 | 24 | [*.toml] 25 | indent_style = tab 26 | tab_width = 2 27 | 28 | [*.properties] 29 | indent_style = space 30 | indent_size = 2 31 | 32 | [.editorconfig] 33 | indent_style = space 34 | indent_size = 4 35 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/structure/CelestialObject.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.structure; 2 | 3 | import net.minecraft.nbt.NbtCompound; 4 | import net.minecraft.util.Identifier; 5 | import net.minecraft.util.math.Vec3d; 6 | 7 | public interface CelestialObject { 8 | boolean canInteract(); 9 | 10 | Identifier getId(); 11 | 12 | Vec3d getDirectionVector(); 13 | 14 | float getSize(); 15 | 16 | float getAlpha(); 17 | 18 | int getColor(); 19 | 20 | int getRandomOffset(); 21 | 22 | void readNbt(NbtCompound nbt); 23 | 24 | void writeNbt(NbtCompound nbt); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/shaders/core/transparent_no_cull_texture.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform sampler2D Sampler0; 6 | 7 | uniform vec4 ColorModulator; 8 | uniform float FogStart; 9 | uniform float FogEnd; 10 | uniform vec4 FogColor; 11 | 12 | in float vertexDistance; 13 | in vec4 vertexColor; 14 | in vec4 lightMapColor; 15 | in vec4 overlayColor; 16 | in vec2 texCoord0; 17 | in vec4 normal; 18 | 19 | out vec4 fragColor; 20 | 21 | void main() { 22 | vec4 color = texture(Sampler0, texCoord0) * vertexColor; 23 | fragColor = color * ColorModulator; 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/item/MarshmallowCanBlockItem.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.item; 2 | 3 | import net.minecraft.block.Block; 4 | import net.minecraft.item.BlockItem; 5 | import net.minecraft.item.ItemStack; 6 | 7 | public class MarshmallowCanBlockItem extends BlockItem { 8 | public MarshmallowCanBlockItem(Block block, Settings settings) { 9 | super(block, settings); 10 | } 11 | 12 | @Override 13 | public ItemStack getDefaultStack() { 14 | ItemStack ret = new ItemStack(this.getBlock()); 15 | ret.getOrCreateNbt().putInt("marshmallowCount", 1); 16 | return ret; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/resources/data/astronomical/recipes/astral_display.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "minecraft:crafting_shaped", 3 | "category": "misc", 4 | "key": { 5 | "A": { 6 | "item": "astronomical:astral_fragment" 7 | }, 8 | "C": { 9 | "item": "minecraft:copper_ingot" 10 | }, 11 | "R": { 12 | "item": "minecraft:redstone" 13 | }, 14 | "P": { 15 | "tag": "minecraft:planks" 16 | } 17 | }, 18 | "pattern": [ 19 | "CAC", 20 | "APA", 21 | "CRC" 22 | ], 23 | "result": { 24 | "count": 1, 25 | "item": "astronomical:astral_display" 26 | }, 27 | "show_notification": true 28 | } 29 | -------------------------------------------------------------------------------- /src/main/resources/assets/minecraft/core/particle.fsh: -------------------------------------------------------------------------------- 1 | #version 150 2 | 3 | #moj_import 4 | 5 | uniform sampler2D Sampler0; 6 | 7 | uniform vec4 ColorModulator; 8 | uniform float FogStart; 9 | uniform float FogEnd; 10 | uniform vec4 FogColor; 11 | 12 | in float vertexDistance; 13 | in vec2 texCoord0; 14 | in vec4 vertexColor; 15 | 16 | out vec4 fragColor; 17 | 18 | void main() { 19 | vec4 color = texture(Sampler0, texCoord0) * vertexColor * ColorModulator; 20 | // Mojang stole my fucking smooth fading. I opened my mod an no more fading. Can't have shit in Minecraft. 21 | if (color.a < 0.000001) { 22 | discard; 23 | } 24 | fragColor = linear_fog(color, vertexDistance, FogStart, FogEnd, FogColor); 25 | } 26 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/handheld_marshmallow_stick.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "item/generated", 3 | "display": { 4 | "thirdperson_righthand": { 5 | "rotation": [ 0, 90, 25 ], 6 | "translation": [ 0, 4.0, 0.8 ], 7 | "scale": [ 0.85, 0.85, 0.85 ] 8 | }, 9 | "thirdperson_lefthand": { 10 | "rotation": [ 0, -90, -25 ], 11 | "translation": [ 0, 4.0, 0.8 ], 12 | "scale": [ 0.85, 0.85, 0.85 ] 13 | }, 14 | "firstperson_righthand": { 15 | "rotation": [ 0, 90, 25 ], 16 | "translation": [ 0, 3.2, 2.0 ], 17 | "scale": [ 0.68, 0.68, 0.68 ] 18 | }, 19 | "firstperson_lefthand": { 20 | "rotation": [ 0, -90, -25 ], 21 | "translation": [ 0, 3.2, 2.0 ], 22 | "scale": [ 0.68, 0.68, 0.68 ] 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/util/DoubleHolder.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.util; 2 | 3 | import java.util.function.Consumer; 4 | 5 | public class DoubleHolder { 6 | private Consumer onChange; 7 | private double value; 8 | 9 | public DoubleHolder(double value) { 10 | this.value = value; 11 | } 12 | 13 | public DoubleHolder(double value, Consumer onChange) { 14 | this.value = value; 15 | this.onChange = onChange; 16 | } 17 | 18 | public double get() { 19 | return this.value; 20 | } 21 | 22 | public void set(double value) { 23 | this.value = value; 24 | this.onChange.accept(value); 25 | } 26 | 27 | public void silentSet(double value) { 28 | this.value = value; 29 | } 30 | 31 | public void setOnChange(Consumer onChange) { 32 | this.onChange = onChange; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/DisableCrosshairWhenUsingSpyglassInGameHudMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import net.minecraft.client.MinecraftClient; 4 | import net.minecraft.client.gui.GuiGraphics; 5 | import net.minecraft.client.gui.hud.InGameHud; 6 | import org.spongepowered.asm.mixin.Mixin; 7 | import org.spongepowered.asm.mixin.injection.At; 8 | import org.spongepowered.asm.mixin.injection.Inject; 9 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 10 | 11 | @Mixin(InGameHud.class) 12 | public class DisableCrosshairWhenUsingSpyglassInGameHudMixin { 13 | @Inject(method = "renderCrosshair", at = @At("HEAD"), cancellable = true) 14 | private void renderCrosshair(GuiGraphics graphics, CallbackInfo ci) { 15 | if (MinecraftClient.getInstance().player.isUsingSpyglass()) { 16 | ci.cancel(); 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/util/ScaledDouble.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.util; 2 | 3 | public class ScaledDouble { 4 | private final double min; 5 | private final double max; 6 | private double value; 7 | private double scaledValue; 8 | 9 | public ScaledDouble(double value, double min, double max) { 10 | this.value = value; 11 | this.min = min; 12 | this.max = max; 13 | } 14 | 15 | public double getValue() { 16 | return this.value; 17 | } 18 | 19 | public void setValue(double value) { 20 | this.value = value; 21 | this.scaledValue = value * (this.max - this.min) + this.min; 22 | } 23 | 24 | public double getScaledValue() { 25 | return this.scaledValue; 26 | } 27 | 28 | public void setScaledValue(double scaledValue) { 29 | this.scaledValue = scaledValue; 30 | this.value = (scaledValue - this.min) / (this.max - this.min); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/VertexConsumerMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import com.mojang.blaze3d.vertex.VertexConsumer; 4 | import org.spongepowered.asm.mixin.Mixin; 5 | 6 | @Mixin(VertexConsumer.class) 7 | public interface VertexConsumerMixin { 8 | // @Shadow 9 | // VertexConsumer vertex(double x, double y, double z); 10 | // 11 | // /** 12 | // * @author 13 | // * @reason 14 | // */ 15 | // @Overwrite 16 | // default VertexConsumer vertex(Matrix4f matrix, float x, float y, float z) { 17 | // float f = x; 18 | // float g = y; 19 | // float h = z; 20 | // x = matrix.m00() * f + matrix.m01() * g + matrix.m02() * h + matrix.m03(); 21 | // y = matrix.m10() * f + matrix.m11() * g + matrix.m12() * h + matrix.m13(); 22 | // z = matrix.m20() * f + matrix.m21() * g + matrix.m22() * h + matrix.m23(); 23 | // 24 | // return this.vertex(x, y, z); 25 | // } 26 | } 27 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/shaders/core/transparent_no_cull_texture.json: -------------------------------------------------------------------------------- 1 | { 2 | "blend": { 3 | "func": "add", 4 | "srcrgb": "srcalpha", 5 | "dstrgb": "1-srcalpha" 6 | }, 7 | "vertex": "lodestone:generic", 8 | "fragment": "astronomical:transparent_no_cull_texture", 9 | "attributes": [ 10 | "Position", 11 | "Color", 12 | "UV0", 13 | "UV2" 14 | ], 15 | "samplers": [ 16 | { "name": "Sampler0" } 17 | ], 18 | "uniforms": [ 19 | { "name": "ModelViewMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 20 | { "name": "ProjMat", "type": "matrix4x4", "count": 16, "values": [ 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0 ] }, 21 | { "name": "ColorModulator", "type": "float", "count": 4, "values": [ 1.0, 1.0, 1.0, 1.0 ] } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/blockstates/starmallow_can.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "level=0": { 4 | "model": "astronomical:block/starmallow_can_0" 5 | }, 6 | "level=1": { 7 | "model": "astronomical:block/starmallow_can_1" 8 | }, 9 | "level=2": { 10 | "model": "astronomical:block/starmallow_can_2" 11 | }, 12 | "level=3": { 13 | "model": "astronomical:block/starmallow_can_3" 14 | }, 15 | "level=4": { 16 | "model": "astronomical:block/starmallow_can_4" 17 | }, 18 | "level=5": { 19 | "model": "astronomical:block/starmallow_can_5" 20 | }, 21 | "level=6": { 22 | "model": "astronomical:block/starmallow_can_6" 23 | }, 24 | "level=7": { 25 | "model": "astronomical:block/starmallow_can_7" 26 | }, 27 | "level=8": { 28 | "model": "astronomical:block/starmallow_can_8" 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/resources/astronomical.accesswidener: -------------------------------------------------------------------------------- 1 | accessWidener v2 named 2 | 3 | accessible field net/minecraft/client/render/RenderPhase POSITION_COLOR_TEXTURE_LIGHTMAP_SHADER Lnet/minecraft/client/render/RenderPhase$Shader; 4 | accessible field net/minecraft/client/render/RenderPhase NO_TRANSPARENCY Lnet/minecraft/client/render/RenderPhase$Transparency; 5 | accessible field net/minecraft/client/render/RenderPhase TRANSLUCENT_TRANSPARENCY Lnet/minecraft/client/render/RenderPhase$Transparency; 6 | accessible class net/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask 7 | accessible method net/minecraft/client/gui/widget/SliderWidget setValue (D)V 8 | accessible field net/minecraft/client/render/WorldRenderer entityRenderDispatcher Lnet/minecraft/client/render/entity/EntityRenderDispatcher; 9 | accessible class net/minecraft/client/render/chunk/ChunkBuilder$BuiltChunk$RebuildTask$RenderedChunkData 10 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/blockstates/marshmallow_can.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "level=0": { 4 | "model": "astronomical:block/marshmallow_can_0" 5 | }, 6 | "level=1": { 7 | "model": "astronomical:block/marshmallow_can_1" 8 | }, 9 | "level=2": { 10 | "model": "astronomical:block/marshmallow_can_2" 11 | }, 12 | "level=3": { 13 | "model": "astronomical:block/marshmallow_can_3" 14 | }, 15 | "level=4": { 16 | "model": "astronomical:block/marshmallow_can_4" 17 | }, 18 | "level=5": { 19 | "model": "astronomical:block/marshmallow_can_5" 20 | }, 21 | "level=6": { 22 | "model": "astronomical:block/marshmallow_can_6" 23 | }, 24 | "level=7": { 25 | "model": "astronomical:block/marshmallow_can_7" 26 | }, 27 | "level=8": { 28 | "model": "astronomical:block/marshmallow_can_8" 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/starmallow_stick.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/handheld_marshmallow_stick", 3 | "textures": { 4 | "layer0": "astronomical:item/starmallow_stick" 5 | }, 6 | "overrides": [ 7 | { 8 | "predicate": { 9 | "astronomical:marshmallow": 0.2 10 | }, 11 | "model": "astronomical:item/starmallow_stick_slightly_cooked" 12 | }, 13 | { 14 | "predicate": { 15 | "astronomical:marshmallow": 0.4 16 | }, 17 | "model": "astronomical:item/starmallow_stick_cooked" 18 | }, 19 | { 20 | "predicate": { 21 | "astronomical:marshmallow": 0.6 22 | }, 23 | "model": "astronomical:item/starmallow_stick_perfect" 24 | }, 25 | { 26 | "predicate": { 27 | "astronomical:marshmallow": 0.8 28 | }, 29 | "model": "astronomical:item/starmallow_stick_burnt" 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/marshmallow_stick.json: -------------------------------------------------------------------------------- 1 | { 2 | "parent": "astronomical:item/handheld_marshmallow_stick", 3 | "textures": { 4 | "layer0": "astronomical:item/marshmallow_stick" 5 | }, 6 | "overrides": [ 7 | { 8 | "predicate": { 9 | "astronomical:marshmallow": 0.2 10 | }, 11 | "model": "astronomical:item/marshmallow_stick_slightly_cooked" 12 | }, 13 | { 14 | "predicate": { 15 | "astronomical:marshmallow": 0.4 16 | }, 17 | "model": "astronomical:item/marshmallow_stick_cooked" 18 | }, 19 | { 20 | "predicate": { 21 | "astronomical:marshmallow": 0.6 22 | }, 23 | "model": "astronomical:item/marshmallow_stick_perfect" 24 | }, 25 | { 26 | "predicate": { 27 | "astronomical:marshmallow": 0.8 28 | }, 29 | "model": "astronomical:item/marshmallow_stick_burnt" 30 | } 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /src/main/resources/astronomical.mixins.json: -------------------------------------------------------------------------------- 1 | { 2 | "required": true, 3 | "minVersion": "0.8", 4 | "package": "doctor4t.astronomical.mixin", 5 | "compatibilityLevel": "JAVA_17", 6 | "mixins": [ 7 | "ItemStackMixin", 8 | "ResetMarshmallowAttackPlayerEntityMixin", 9 | "SpyglassItemMixin", 10 | "StatusEffectUtilMixin", 11 | "WorldVFXBuilderAccessor" 12 | ], 13 | "client": [ 14 | "AstralDisplayRendererEnforcerMixin", 15 | "AstralFragmentTinkleItemEntityMixin", 16 | "AstralObjectItemRendererMixin", 17 | "DisableCrosshairWhenUsingSpyglassInGameHudMixin", 18 | "HeldItemRendererMixin", 19 | "InGameHudMixin", 20 | "NoHandSwingWithMarshmallowStickLivingEntityMixin", 21 | "MinecraftClientMixin", 22 | "PlayerEntityRendererMixin", 23 | "PlayFallenStarSoundInstanceClientPlayNetworkHandlerMixin", 24 | "VertexConsumerMixin", 25 | "WorldRendererMixin" 26 | ], 27 | "injectors": { 28 | "defaultRequire": 1 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.java text eol=lf diff=java 2 | *.gradle text eol=lf diff=java 3 | *.kt text eol=lf diff=kotlin 4 | *.kts text eol=lf diff=kotlin 5 | gradlew text eol=lf 6 | *.bat text eol=crlf 7 | 8 | *.md text eol=lf diff=markdown 9 | 10 | .editorconfig text eol=lf 11 | 12 | *.json text eol=lf 13 | *.json5 text eol=lf 14 | *.properties text eol=lf 15 | *.toml text eol=lf 16 | *.xml text eol=lf diff=html 17 | 18 | # Modding specific 19 | *.accesswidener text eol=lf 20 | 21 | # These files are binary and should be left untouched 22 | # (binary is a macro for -text -diff) 23 | *.class binary 24 | *.dll binary 25 | *.ear binary 26 | *.jar binary 27 | *.jks binary 28 | *.png binary 29 | *.so binary 30 | *.war binary 31 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/effects/StargazingStatusEffect.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.effects; 2 | 3 | import net.minecraft.entity.LivingEntity; 4 | import net.minecraft.entity.effect.StatusEffect; 5 | import net.minecraft.entity.effect.StatusEffectType; 6 | import org.jetbrains.annotations.NotNull; 7 | import org.quiltmc.qsl.entity.effect.api.StatusEffectRemovalReason; 8 | 9 | public class StargazingStatusEffect extends StatusEffect { 10 | public StargazingStatusEffect(StatusEffectType type, int color) { 11 | super(type, color); 12 | } 13 | 14 | @Override 15 | public boolean canApplyUpdateEffect(int duration, int amplifier) { 16 | return true; 17 | } 18 | 19 | @Override 20 | public void applyUpdateEffect(@NotNull LivingEntity entity, int amplifier) { 21 | if (!entity.getWorld().isClient() && entity.getWorld().isDay()) { 22 | entity.removeStatusEffect(this, StatusEffectRemovalReason.EXPIRED); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/init/AstraCelestialObjects.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.init; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.structure.CelestialObject; 5 | import doctor4t.astronomical.common.structure.InteractableStar; 6 | import doctor4t.astronomical.common.structure.Star; 7 | import net.minecraft.util.Identifier; 8 | 9 | import java.util.LinkedHashMap; 10 | import java.util.Map; 11 | import java.util.function.Supplier; 12 | 13 | public interface AstraCelestialObjects { 14 | Map> OBJECTS = new LinkedHashMap<>(); 15 | 16 | Supplier STAR = createStar("star", Star::new); 17 | Supplier SUPERNOVEABLE = createStar("supernoveable", InteractableStar::new); 18 | 19 | private static Supplier createStar(String name, Supplier star) { 20 | OBJECTS.put(Astronomical.id(name), star); 21 | return star; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/ItemStackMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import doctor4t.astronomical.common.init.ModItems; 4 | import doctor4t.astronomical.common.item.MarshmallowStickItem; 5 | import net.minecraft.item.Item; 6 | import net.minecraft.item.ItemStack; 7 | import net.minecraft.sound.SoundEvent; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.Shadow; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 13 | 14 | @Mixin(ItemStack.class) 15 | public abstract class ItemStackMixin { 16 | @Shadow 17 | public abstract Item getItem(); 18 | 19 | @Inject(method = "getEatSound", at = @At("HEAD"), cancellable = true) 20 | private void astronomical$burnt(CallbackInfoReturnable cir) { 21 | if (this.getItem() == ModItems.MARSHMALLOW_STICK) { 22 | cir.setReturnValue(((MarshmallowStickItem) ModItems.MARSHMALLOW_STICK).getEatSound((ItemStack) (Object) this)); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/StatusEffectUtilMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import doctor4t.astronomical.common.init.ModStatusEffects; 4 | import net.minecraft.entity.effect.StatusEffectInstance; 5 | import net.minecraft.entity.effect.StatusEffectUtil; 6 | import net.minecraft.text.Text; 7 | import org.jetbrains.annotations.NotNull; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.injection.At; 10 | import org.spongepowered.asm.mixin.injection.Inject; 11 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 12 | 13 | @Mixin(StatusEffectUtil.class) 14 | public class StatusEffectUtilMixin { 15 | @Inject(method = "durationToString", at = @At("HEAD"), cancellable = true) 16 | private static void astronomical$untilMorning(@NotNull StatusEffectInstance effect, float multiplier, CallbackInfoReturnable cir) { 17 | if (effect.getEffectType() == ModStatusEffects.STARGAZING || effect.getEffectType() == ModStatusEffects.STARFALL) { 18 | cir.setReturnValue(Text.translatable("effect.astronomical.stargazing.time")); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /gradle/libs.versions.toml: -------------------------------------------------------------------------------- 1 | [versions] 2 | # The latest versions are available at https://lambdaurora.dev/tools/import_quilt.html 3 | minecraft = "1.20.1" 4 | quilt_mappings = "1.20.1+build.23" 5 | quilt_loader = "0.23.0" 6 | 7 | quilted_fabric_api = "7.4.0+0.90.0-1.20.1" 8 | 9 | [libraries] 10 | minecraft = { module = "com.mojang:minecraft", version.ref = "minecraft" } 11 | quilt_mappings = { module = "org.quiltmc:quilt-mappings", version.ref = "quilt_mappings" } 12 | quilt_loader = { module = "org.quiltmc:quilt-loader", version.ref = "quilt_loader" } 13 | 14 | quilted_fabric_api = { module = "org.quiltmc.quilted-fabric-api:quilted-fabric-api", version.ref = "quilted_fabric_api" } 15 | quilted_fabric_api_deprecated = { module = "org.quiltmc.quilted-fabric-api:quilted-fabric-api-deprecated", version.ref = "quilted_fabric_api" } 16 | 17 | # If you have multiple similar dependencies, you can declare a dependency bundle and reference it on the build script with "libs.bundles.example". 18 | [bundles] 19 | quilted_fabric_api = ["quilted_fabric_api", "quilted_fabric_api_deprecated"] 20 | 21 | [plugins] 22 | quilt_loom = { id = "org.quiltmc.loom", version = "1.4.1" } 23 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/cca/entity/HoldingComponent.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.cca.entity; 2 | 3 | import dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent; 4 | import doctor4t.astronomical.cca.AstraCardinalComponents; 5 | import net.minecraft.entity.player.PlayerEntity; 6 | import net.minecraft.nbt.NbtCompound; 7 | import org.jetbrains.annotations.NotNull; 8 | 9 | public class HoldingComponent implements AutoSyncedComponent { 10 | private final PlayerEntity player; 11 | private boolean holding = false; 12 | 13 | public HoldingComponent(PlayerEntity player) { 14 | this.player = player; 15 | } 16 | 17 | public void sync() { 18 | AstraCardinalComponents.HOLDING.sync(this.player); 19 | } 20 | 21 | public boolean isHolding() { 22 | return this.holding; 23 | } 24 | 25 | public void setHolding(boolean holding) { 26 | this.holding = holding; 27 | this.sync(); 28 | } 29 | 30 | @Override 31 | public void readFromNbt(@NotNull NbtCompound tag) { 32 | this.holding = tag.getBoolean("holding"); 33 | } 34 | 35 | @Override 36 | public void writeToNbt(@NotNull NbtCompound tag) { 37 | tag.putBoolean("holding", this.holding); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/screen/RingColorScreenHandler.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.screen; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.block.entity.AstralDisplayBlockEntity; 5 | import net.minecraft.entity.player.PlayerEntity; 6 | import net.minecraft.entity.player.PlayerInventory; 7 | import net.minecraft.item.ItemStack; 8 | import net.minecraft.screen.ScreenHandler; 9 | import org.jetbrains.annotations.NotNull; 10 | 11 | public class RingColorScreenHandler extends ScreenHandler { 12 | public AstralDisplayBlockEntity entity; 13 | 14 | public RingColorScreenHandler(int syncId, @NotNull PlayerInventory playerInventory) { 15 | super(Astronomical.RING_COLOR_SCREEN_HANDLER, syncId); 16 | } 17 | 18 | public AstralDisplayBlockEntity entity() { 19 | return this.entity; 20 | } 21 | 22 | @Override 23 | public void close(PlayerEntity player) { 24 | super.close(player); 25 | } 26 | 27 | @Override 28 | public boolean canUse(PlayerEntity player) { 29 | return true; 30 | } 31 | 32 | @Override 33 | public ItemStack quickTransfer(PlayerEntity player, int index) { 34 | return player.getInventory().getStack(index); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/screen/PlanetColorScreenHandler.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.screen; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.block.entity.AstralDisplayBlockEntity; 5 | import net.minecraft.entity.player.PlayerEntity; 6 | import net.minecraft.entity.player.PlayerInventory; 7 | import net.minecraft.item.ItemStack; 8 | import net.minecraft.screen.ScreenHandler; 9 | import org.jetbrains.annotations.NotNull; 10 | 11 | public class PlanetColorScreenHandler extends ScreenHandler { 12 | public AstralDisplayBlockEntity entity; 13 | 14 | public PlanetColorScreenHandler(int syncId, @NotNull PlayerInventory playerInventory) { 15 | super(Astronomical.PLANET_COLOR_SCREEN_HANDLER, syncId); 16 | } 17 | 18 | public AstralDisplayBlockEntity entity() { 19 | return this.entity; 20 | } 21 | 22 | @Override 23 | public void close(PlayerEntity player) { 24 | super.close(player); 25 | } 26 | 27 | @Override 28 | public boolean canUse(PlayerEntity player) { 29 | return true; 30 | } 31 | 32 | @Override 33 | public ItemStack quickTransfer(PlayerEntity player, int index) { 34 | return player.getInventory().getStack(index); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/item/NanoStarItem.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.item; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import net.minecraft.client.item.TooltipContext; 5 | import net.minecraft.item.ItemStack; 6 | import net.minecraft.text.Style; 7 | import net.minecraft.text.Text; 8 | import net.minecraft.world.World; 9 | import org.jetbrains.annotations.NotNull; 10 | import org.jetbrains.annotations.Nullable; 11 | 12 | import java.util.List; 13 | 14 | public class NanoStarItem extends NanoAstralObjectItem { 15 | public NanoStarItem(Settings settings) { 16 | super(settings); 17 | } 18 | 19 | @Override 20 | public void appendTooltip(@NotNull ItemStack stack, @Nullable World world, @NotNull List tooltip, TooltipContext context) { 21 | var temperature = stack.getOrCreateSubNbt(Astronomical.MOD_ID).getInt("temperature"); 22 | var size = stack.getOrCreateSubNbt(Astronomical.MOD_ID).getInt("size"); 23 | tooltip.add(Text.literal("Temperature: " + temperature + " K").setStyle(Style.EMPTY.withColor(Astronomical.getStarColorForTemperature(temperature)))); 24 | tooltip.add(Text.literal("Size: " + size).setStyle(Style.EMPTY)); 25 | super.appendTooltip(stack, world, tooltip, context); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/PlayFallenStarSoundInstanceClientPlayNetworkHandlerMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import doctor4t.astronomical.client.sound.FallenStarSoundInstance; 4 | import doctor4t.astronomical.common.entity.FallenStarEntity; 5 | import net.minecraft.client.MinecraftClient; 6 | import net.minecraft.client.network.ClientPlayNetworkHandler; 7 | import net.minecraft.entity.Entity; 8 | import org.spongepowered.asm.mixin.Final; 9 | import org.spongepowered.asm.mixin.Mixin; 10 | import org.spongepowered.asm.mixin.Shadow; 11 | import org.spongepowered.asm.mixin.injection.At; 12 | import org.spongepowered.asm.mixin.injection.Inject; 13 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 14 | 15 | @Mixin(ClientPlayNetworkHandler.class) 16 | public class PlayFallenStarSoundInstanceClientPlayNetworkHandlerMixin { 17 | @Shadow 18 | @Final 19 | private MinecraftClient client; 20 | 21 | @Inject(method = "playEntitySpawnSound", at = @At("TAIL")) 22 | private void playEntitySpawnSound(Entity entity, CallbackInfo ci) { 23 | if (entity instanceof FallenStarEntity fallenStarEntity) { 24 | this.client.getSoundManager().playNextTick(new FallenStarSoundInstance(fallenStarEntity)); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/WorldVFXBuilderAccessor.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import org.spongepowered.asm.mixin.Mixin; 4 | import org.spongepowered.asm.mixin.gen.Accessor; 5 | import team.lodestar.lodestone.systems.rendering.VFXBuilders; 6 | 7 | @Mixin(value = VFXBuilders.WorldVFXBuilder.class, remap = false) 8 | public interface WorldVFXBuilderAccessor { 9 | @Accessor("supplier") 10 | VFXBuilders.WorldVFXBuilder.WorldVertexPlacementSupplier astronomical$getSupplier(); 11 | 12 | @Accessor("r") 13 | float astronomical$getR(); 14 | 15 | @Accessor("g") 16 | float astronomical$getG(); 17 | 18 | @Accessor("b") 19 | float astronomical$getB(); 20 | 21 | @Accessor("a") 22 | float astronomical$getA(); 23 | 24 | @Accessor("xOffset") 25 | float astronomical$getXOffset(); 26 | 27 | @Accessor("yOffset") 28 | float astronomical$getYOffset(); 29 | 30 | @Accessor("zOffset") 31 | float astronomical$getZOffset(); 32 | 33 | @Accessor("light") 34 | int astronomical$getLight(); 35 | 36 | @Accessor("u0") 37 | float astronomical$getU0(); 38 | 39 | @Accessor("v0") 40 | float astronomical$getV0(); 41 | 42 | @Accessor("u1") 43 | float astronomical$getU1(); 44 | 45 | @Accessor("v1") 46 | float astronomical$getV1(); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/init/ModStatusEffects.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.init; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.effects.StargazingStatusEffect; 5 | import net.minecraft.entity.effect.StatusEffect; 6 | import net.minecraft.entity.effect.StatusEffectType; 7 | import net.minecraft.registry.Registries; 8 | import net.minecraft.registry.Registry; 9 | import net.minecraft.util.Identifier; 10 | 11 | import java.util.LinkedHashMap; 12 | import java.util.Map; 13 | 14 | public interface ModStatusEffects { 15 | Map STATUS_EFFECTS = new LinkedHashMap<>(); 16 | 17 | StatusEffect STARGAZING = createStatusEffect("stargazing", new StargazingStatusEffect(StatusEffectType.BENEFICIAL, 0x6300E5)); 18 | StatusEffect STARFALL = createStatusEffect("starfall", new StargazingStatusEffect(StatusEffectType.BENEFICIAL, 0x6300E5)); 19 | 20 | 21 | private static T createStatusEffect(String name, T statusEffect) { 22 | STATUS_EFFECTS.put(statusEffect, Astronomical.id(name)); 23 | return statusEffect; 24 | } 25 | 26 | static void initialize() { 27 | STATUS_EFFECTS.keySet().forEach(item -> Registry.register(Registries.STATUS_EFFECT, STATUS_EFFECTS.get(item), item)); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/marshmallow_can_0.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/marshmallow_can", 6 | "particle": "astronomical:block/marshmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "can_inner", 25 | "from": [12, 0.01, 4], 26 | "to": [4, 10.01, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 30 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 31 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 32 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 33 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 34 | } 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/starmallow_can_0.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/starmallow_can", 6 | "particle": "astronomical:block/starmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "can_inner", 25 | "from": [12, 0.01, 4], 26 | "to": [4, 10.01, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 30 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 31 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 32 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 33 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 34 | } 35 | } 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/AstralDisplayRendererEnforcerMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import doctor4t.astronomical.common.block.entity.AstralDisplayBlockEntity; 4 | import net.minecraft.block.entity.BlockEntity; 5 | import net.minecraft.client.MinecraftClient; 6 | import net.minecraft.client.render.chunk.ChunkBuilder; 7 | import org.spongepowered.asm.mixin.Mixin; 8 | import org.spongepowered.asm.mixin.injection.At; 9 | import org.spongepowered.asm.mixin.injection.Inject; 10 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 11 | 12 | @Mixin(targets = "net.minecraft.client.render.chunk.ChunkBuilder$BuiltChunk$RebuildTask") 13 | public class AstralDisplayRendererEnforcerMixin { 14 | @Inject(method = "addBlockEntity", at = @At("HEAD"), cancellable = true) 15 | private void astronomical$forceAstralDisplayRendering(ChunkBuilder.BuiltChunk.RebuildTask.RenderedChunkData renderedChunkData, E blockEntity, CallbackInfo ci) { 16 | if (blockEntity instanceof AstralDisplayBlockEntity) { 17 | var blockEntityRenderer = MinecraftClient.getInstance().getBlockEntityRenderDispatcher().get(blockEntity); 18 | if (blockEntityRenderer != null) { 19 | renderedChunkData.blockEntities.add(blockEntity); 20 | } 21 | ci.cancel(); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/block/AstralLanternBlock.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.block; 2 | 3 | import doctor4t.astronomical.common.block.entity.AstralLanternBlockEntity; 4 | import net.minecraft.block.*; 5 | import net.minecraft.block.entity.BlockEntity; 6 | import net.minecraft.util.math.BlockPos; 7 | import net.minecraft.util.shape.VoxelShape; 8 | import net.minecraft.util.shape.VoxelShapes; 9 | import net.minecraft.world.BlockView; 10 | import org.jetbrains.annotations.Nullable; 11 | 12 | public class AstralLanternBlock extends BlockWithEntity { 13 | protected static final VoxelShape SHAPE = VoxelShapes.union( 14 | Block.createCuboidShape(3.0, 0.0, 3.0, 13.0, 16.0, 13.0) 15 | ); 16 | 17 | public AstralLanternBlock(Settings settings) { 18 | super(settings); 19 | this.setDefaultState(this.stateManager.getDefaultState()); 20 | } 21 | 22 | @Override 23 | public BlockRenderType getRenderType(BlockState state) { 24 | return BlockRenderType.MODEL; 25 | } 26 | 27 | @Nullable 28 | @Override 29 | public BlockEntity createBlockEntity(BlockPos pos, BlockState state) { 30 | return new AstralLanternBlockEntity(pos, state); 31 | } 32 | 33 | @Override 34 | public VoxelShape getOutlineShape(BlockState state, BlockView world, BlockPos pos, ShapeContext context) { 35 | return SHAPE; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/NoHandSwingWithMarshmallowStickLivingEntityMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import doctor4t.astronomical.common.item.MarshmallowStickItem; 4 | import net.minecraft.client.MinecraftClient; 5 | import net.minecraft.entity.LivingEntity; 6 | import net.minecraft.item.ItemStack; 7 | import net.minecraft.util.Hand; 8 | import org.spongepowered.asm.mixin.Mixin; 9 | import org.spongepowered.asm.mixin.Shadow; 10 | import org.spongepowered.asm.mixin.injection.At; 11 | import org.spongepowered.asm.mixin.injection.Inject; 12 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 13 | 14 | @Mixin(LivingEntity.class) 15 | public abstract class NoHandSwingWithMarshmallowStickLivingEntityMixin { 16 | @Shadow 17 | public abstract ItemStack getStackInHand(Hand hand); 18 | 19 | @Inject(method = "swingHand(Lnet/minecraft/util/Hand;Z)V", at = @At("HEAD"), cancellable = true) 20 | private void astronomical$swingHand(Hand hand, boolean fromServerPlayer, CallbackInfo ci) { 21 | var stack = this.getStackInHand(hand); 22 | if (stack.getItem() instanceof MarshmallowStickItem) { 23 | if (!(((LivingEntity) Object.class.cast(this)).getUuid().equals(MinecraftClient.getInstance().player.getUuid()) && MinecraftClient.getInstance().options.getPerspective().isFirstPerson())) { 24 | ci.cancel(); 25 | } 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/init/ModEntities.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.init; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.entity.FallenStarEntity; 5 | import net.minecraft.entity.Entity; 6 | import net.minecraft.entity.EntityDimensions; 7 | import net.minecraft.entity.EntityType; 8 | import net.minecraft.entity.SpawnGroup; 9 | import net.minecraft.registry.Registries; 10 | import net.minecraft.registry.Registry; 11 | import net.minecraft.util.Identifier; 12 | import org.quiltmc.qsl.entity.api.QuiltEntityTypeBuilder; 13 | 14 | import java.util.LinkedHashMap; 15 | import java.util.Map; 16 | 17 | public interface ModEntities { 18 | 19 | Map, Identifier> ENTITIES = new LinkedHashMap<>(); 20 | EntityType FALLEN_STAR = createEntity("fallen_star", QuiltEntityTypeBuilder.create(SpawnGroup.MISC, FallenStarEntity::new).setDimensions(EntityDimensions.fixed(0.5f, 0.5f)).maxChunkTrackingRange(16).build()); 21 | 22 | private static > T createEntity(String name, T entity) { 23 | ENTITIES.put(entity, Astronomical.id(name)); 24 | return entity; 25 | } 26 | 27 | static void initialize() { 28 | ENTITIES.keySet().forEach(entityType -> Registry.register(Registries.ENTITY_TYPE, ENTITIES.get(entityType), entityType)); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/PlayerEntityRendererMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import doctor4t.astronomical.cca.AstraCardinalComponents; 4 | import doctor4t.astronomical.common.item.MarshmallowStickItem; 5 | import net.minecraft.client.network.AbstractClientPlayerEntity; 6 | import net.minecraft.client.render.entity.PlayerEntityRenderer; 7 | import net.minecraft.client.render.entity.model.BipedEntityModel; 8 | import net.minecraft.util.Hand; 9 | import org.jetbrains.annotations.NotNull; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.injection.At; 12 | import org.spongepowered.asm.mixin.injection.Inject; 13 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; 14 | 15 | @Mixin(PlayerEntityRenderer.class) 16 | public class PlayerEntityRendererMixin { 17 | @Inject(method = "getArmPose", at = @At("HEAD"), cancellable = true) 18 | private static void getArmPose(@NotNull AbstractClientPlayerEntity abstractClientPlayerEntity, Hand hand, CallbackInfoReturnable cir) { 19 | var stackInHand = abstractClientPlayerEntity.getStackInHand(hand); 20 | var component = AstraCardinalComponents.HOLDING.get(abstractClientPlayerEntity); 21 | if (stackInHand.getItem() instanceof MarshmallowStickItem && component.isHolding()) { 22 | cir.setReturnValue(BipedEntityModel.ArmPose.BLOCK); 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/client/sound/FallenStarSoundInstance.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.client.sound; 2 | 3 | import doctor4t.astronomical.common.entity.FallenStarEntity; 4 | import doctor4t.astronomical.common.init.ModSoundEvents; 5 | import net.minecraft.client.sound.MovingSoundInstance; 6 | import net.minecraft.client.sound.SoundInstance; 7 | import net.minecraft.sound.SoundCategory; 8 | 9 | public class FallenStarSoundInstance extends MovingSoundInstance { 10 | protected final FallenStarEntity fallenStar; 11 | 12 | public FallenStarSoundInstance(FallenStarEntity entity) { 13 | super(ModSoundEvents.STAR_AMBIENT, SoundCategory.AMBIENT, SoundInstance.createRandom()); 14 | this.fallenStar = entity; 15 | this.x = (float) entity.getX(); 16 | this.y = (float) entity.getY(); 17 | this.z = (float) entity.getZ(); 18 | this.repeat = true; 19 | this.repeatDelay = 0; 20 | this.volume = 2.5F; 21 | } 22 | 23 | @Override 24 | public void tick() { 25 | if (!this.fallenStar.isRemoved()) { 26 | this.x = (float) this.fallenStar.getX(); 27 | this.y = (float) this.fallenStar.getY(); 28 | this.z = (float) this.fallenStar.getZ(); 29 | 30 | this.pitch = 1.0F; 31 | this.volume = 2.5F; 32 | } else { 33 | this.setDone(); 34 | } 35 | } 36 | 37 | @Override 38 | public boolean shouldAlwaysPlay() { 39 | return true; 40 | } 41 | 42 | @Override 43 | public boolean canPlay() { 44 | return !this.fallenStar.isSilent(); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/init/ModSoundEvents.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.init; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import net.minecraft.registry.Registries; 5 | import net.minecraft.registry.Registry; 6 | import net.minecraft.sound.SoundEvent; 7 | import net.minecraft.util.Identifier; 8 | 9 | import java.util.LinkedHashMap; 10 | import java.util.Map; 11 | 12 | public interface ModSoundEvents { 13 | 14 | Map SOUND_EVENTS = new LinkedHashMap<>(); 15 | SoundEvent STAR_BREAK = createSoundEvent("entity.star.break"); 16 | SoundEvent STAR_COLLECT = createSoundEvent("entity.star.collect"); 17 | SoundEvent STAR_CRAFT = createSoundEvent("entity.star.craft"); 18 | SoundEvent STAR_FALL = createSoundEvent("entity.star.fall"); 19 | SoundEvent STAR_IMPACT = createSoundEvent("entity.star.impact"); 20 | SoundEvent STAR_AMBIENT = createSoundEvent("entity.star.ambient"); 21 | SoundEvent MARSHMALLOW_CAN_STORE = createSoundEvent("block.marshmallow_can.store"); 22 | SoundEvent MARSHMALLOW_CAN_TAKE = createSoundEvent("block.marshmallow_can.take"); 23 | 24 | static void initialize() { 25 | SOUND_EVENTS.keySet().forEach(soundEvent -> Registry.register(Registries.SOUND_EVENT, SOUND_EVENTS.get(soundEvent), soundEvent)); 26 | } 27 | 28 | private static SoundEvent createSoundEvent(String path) { 29 | SoundEvent soundEvent = SoundEvent.createVariableRangeEvent(Astronomical.id(path)); 30 | SOUND_EVENTS.put(soundEvent, Astronomical.id(path)); 31 | return soundEvent; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/starmallow_can_1.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/starmallow_can", 6 | "particle": "astronomical:block/starmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "starmallow_layer", 25 | "from": [4, 1, 4], 26 | "to": [12, 1, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/starmallow_can_2.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/starmallow_can", 6 | "particle": "astronomical:block/starmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "starmallow_layer", 25 | "from": [4, 2, 4], 26 | "to": [12, 2, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/starmallow_can_3.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/starmallow_can", 6 | "particle": "astronomical:block/starmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "starmallow_layer", 25 | "from": [4, 3, 4], 26 | "to": [12, 3, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/starmallow_can_4.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/starmallow_can", 6 | "particle": "astronomical:block/starmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "starmallow_layer", 25 | "from": [4, 4, 4], 26 | "to": [12, 4, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/starmallow_can_5.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/starmallow_can", 6 | "particle": "astronomical:block/starmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "starmallow_layer", 25 | "from": [4, 5, 4], 26 | "to": [12, 5, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/starmallow_can_6.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/starmallow_can", 6 | "particle": "astronomical:block/starmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "starmallow_layer", 25 | "from": [4, 6, 4], 26 | "to": [12, 6, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/starmallow_can_7.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/starmallow_can", 6 | "particle": "astronomical:block/starmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "starmallow_layer", 25 | "from": [4, 7, 4], 26 | "to": [12, 7, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/starmallow_can_8.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/starmallow_can", 6 | "particle": "astronomical:block/starmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "starmallow_layer", 25 | "from": [4, 8, 4], 26 | "to": [12, 8, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/marshmallow_can_1.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/marshmallow_can", 6 | "particle": "astronomical:block/marshmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "marshmallow_layer", 25 | "from": [4, 1, 4], 26 | "to": [12, 1, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/marshmallow_can_2.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/marshmallow_can", 6 | "particle": "astronomical:block/marshmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "marshmallow_layer", 25 | "from": [4, 2, 4], 26 | "to": [12, 2, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/marshmallow_can_3.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/marshmallow_can", 6 | "particle": "astronomical:block/marshmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "marshmallow_layer", 25 | "from": [4, 3, 4], 26 | "to": [12, 3, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/marshmallow_can_4.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/marshmallow_can", 6 | "particle": "astronomical:block/marshmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "marshmallow_layer", 25 | "from": [4, 4, 4], 26 | "to": [12, 4, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/marshmallow_can_5.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/marshmallow_can", 6 | "particle": "astronomical:block/marshmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "marshmallow_layer", 25 | "from": [4, 5, 4], 26 | "to": [12, 5, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/marshmallow_can_6.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/marshmallow_can", 6 | "particle": "astronomical:block/marshmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "marshmallow_layer", 25 | "from": [4, 6, 4], 26 | "to": [12, 6, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/marshmallow_can_7.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/marshmallow_can", 6 | "particle": "astronomical:block/marshmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "marshmallow_layer", 25 | "from": [4, 7, 4], 26 | "to": [12, 7, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/marshmallow_can_8.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/marshmallow_can", 6 | "particle": "astronomical:block/marshmallow_can" 7 | }, 8 | "elements": [ 9 | { 10 | "name": "can_outer", 11 | "from": [4, 0, 4], 12 | "to": [12, 10, 12], 13 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 14 | "faces": { 15 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 19 | "up": {"uv": [8, 0, 12, 8], "texture": "#4"}, 20 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 21 | } 22 | }, 23 | { 24 | "name": "marshmallow_layer", 25 | "from": [4, 8, 4], 26 | "to": [12, 8, 12], 27 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 28 | "faces": { 29 | "up": {"uv": [12, 8, 16, 16], "texture": "#4"} 30 | } 31 | }, 32 | { 33 | "name": "can_inner", 34 | "from": [12, 0, 4], 35 | "to": [4, 10, 12], 36 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 37 | "faces": { 38 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 39 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 40 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 41 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 42 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 43 | } 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/client/particle/ExplosionParticleType.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.client.particle; 2 | 3 | import com.mojang.serialization.Codec; 4 | import net.fabricmc.fabric.impl.client.particle.FabricSpriteProviderImpl; 5 | import net.minecraft.client.particle.Particle; 6 | import net.minecraft.client.particle.ParticleFactory; 7 | import net.minecraft.client.particle.SpriteProvider; 8 | import net.minecraft.client.world.ClientWorld; 9 | import net.minecraft.particle.ParticleType; 10 | import team.lodestar.lodestone.systems.rendering.particle.world.FrameSetParticle; 11 | import team.lodestar.lodestone.systems.rendering.particle.world.WorldParticleEffect; 12 | 13 | public class ExplosionParticleType extends ParticleType { 14 | public ExplosionParticleType() { 15 | super(false, WorldParticleEffect.DESERIALIZER); 16 | } 17 | 18 | @Override 19 | public boolean shouldAlwaysSpawn() { 20 | return true; 21 | } 22 | 23 | @Override 24 | public Codec getCodec() { 25 | return WorldParticleEffect.codecFor(this); 26 | } 27 | 28 | public static class Factory implements ParticleFactory { 29 | private final SpriteProvider sprite; 30 | 31 | public Factory(SpriteProvider sprite) { 32 | this.sprite = sprite; 33 | } 34 | 35 | @Override 36 | public Particle createParticle(WorldParticleEffect data, ClientWorld world, double x, double y, double z, double mx, double my, double mz) { 37 | return new FrameSetParticle(world, data, (FabricSpriteProviderImpl) this.sprite, x, y, z, mx, my, mz); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/ResetMarshmallowAttackPlayerEntityMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import doctor4t.astronomical.cca.AstraCardinalComponents; 4 | import doctor4t.astronomical.common.item.MarshmallowStickItem; 5 | import doctor4t.astronomical.common.util.PlayerAttackHeld; 6 | import net.minecraft.entity.EntityType; 7 | import net.minecraft.entity.LivingEntity; 8 | import net.minecraft.entity.player.PlayerEntity; 9 | import net.minecraft.world.World; 10 | import org.spongepowered.asm.mixin.Mixin; 11 | import org.spongepowered.asm.mixin.injection.At; 12 | import org.spongepowered.asm.mixin.injection.Inject; 13 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 14 | 15 | @Mixin(PlayerEntity.class) 16 | public abstract class ResetMarshmallowAttackPlayerEntityMixin extends LivingEntity implements PlayerAttackHeld { 17 | protected ResetMarshmallowAttackPlayerEntityMixin(EntityType entityType, World world) { 18 | super(entityType, world); 19 | } 20 | 21 | @Override 22 | public boolean astronomical$isHoldingAttack() { 23 | return AstraCardinalComponents.HOLDING.get(this).isHolding(); 24 | } 25 | 26 | @Override 27 | public void astronomical$setHoldingAttack(boolean attackHeld) { 28 | AstraCardinalComponents.HOLDING.get(this).setHolding(attackHeld); 29 | } 30 | 31 | @Inject(method = "resetLastAttackedTicks", at = @At("HEAD"), cancellable = true) 32 | private void astronomical$resetMarshmallowAttack(CallbackInfo ci) { 33 | if (this.getMainHandStack().getItem() instanceof MarshmallowStickItem) { 34 | ci.cancel(); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/sounds.json: -------------------------------------------------------------------------------- 1 | { 2 | "entity.star.break": { 3 | "sounds": [ 4 | "astronomical:star_break_1", 5 | "astronomical:star_break_2" 6 | ], 7 | "subtitle": "subtitles.astronomical.entity.star.break" 8 | }, 9 | "entity.star.collect": { 10 | "sounds": [ 11 | "astronomical:star_collect" 12 | ], 13 | "subtitle": "subtitles.astronomical.entity.star.collect" 14 | }, 15 | "entity.star.craft": { 16 | "sounds": [ 17 | "astronomical:star_craft" 18 | ], 19 | "subtitle": "subtitles.astronomical.entity.star.craft" 20 | }, 21 | "entity.star.fall": { 22 | "sounds": [ 23 | "astronomical:star_fall_1", 24 | "astronomical:star_fall_2", 25 | "astronomical:star_fall_3" 26 | ], 27 | "subtitle": "subtitles.astronomical.entity.star.fall" 28 | }, 29 | "entity.star.impact": { 30 | "sounds": [ 31 | "astronomical:star_impact_1", 32 | "astronomical:star_impact_2" 33 | ], 34 | "subtitle": "subtitles.astronomical.entity.star.impact" 35 | }, 36 | "entity.star.ambient": { 37 | "sounds": [ 38 | "astronomical:star_ambient" 39 | ], 40 | "subtitle": "subtitles.astronomical.entity.star.ambient" 41 | }, 42 | "block.marshmallow_can.store": { 43 | "sounds": [ 44 | "astronomical:marshmallow_can_store" 45 | ], 46 | "subtitle": "subtitles.astronomical.block.marshmallow_can.store" 47 | }, 48 | "block.marshmallow_can.take": { 49 | "sounds": [ 50 | "astronomical:marshmallow_can_take" 51 | ], 52 | "subtitle": "subtitles.astronomical.block.marshmallow_can.take" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/blockstates/astral_display.json: -------------------------------------------------------------------------------- 1 | { 2 | "variants": { 3 | "facing=up,powered=false": { 4 | "model": "astronomical:block/astral_display_vertical_off" 5 | }, 6 | "facing=down,powered=false": { 7 | "model": "astronomical:block/astral_display_vertical_off", 8 | "x": 180 9 | }, 10 | "facing=east,powered=false": { 11 | "model": "astronomical:block/astral_display_horizontal_off", 12 | "y": 90 13 | }, 14 | "facing=north,powered=false": { 15 | "model": "astronomical:block/astral_display_horizontal_off" 16 | }, 17 | "facing=south,powered=false": { 18 | "model": "astronomical:block/astral_display_horizontal_off", 19 | "y": 180 20 | }, 21 | "facing=west,powered=false": { 22 | "model": "astronomical:block/astral_display_horizontal_off", 23 | "y": 270 24 | }, 25 | "facing=up,powered=true": { 26 | "model": "astronomical:block/astral_display_vertical_on" 27 | }, 28 | "facing=down,powered=true": { 29 | "model": "astronomical:block/astral_display_vertical_on", 30 | "x": 180 31 | }, 32 | "facing=east,powered=true": { 33 | "model": "astronomical:block/astral_display_horizontal_on", 34 | "y": 90 35 | }, 36 | "facing=north,powered=true": { 37 | "model": "astronomical:block/astral_display_horizontal_on" 38 | }, 39 | "facing=south,powered=true": { 40 | "model": "astronomical:block/astral_display_horizontal_on", 41 | "y": 180 42 | }, 43 | "facing=west,powered=true": { 44 | "model": "astronomical:block/astral_display_horizontal_on", 45 | "y": 270 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/WorldRendererMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import doctor4t.astronomical.client.render.world.AstraSkyRenderer; 4 | import net.minecraft.client.MinecraftClient; 5 | import net.minecraft.client.render.*; 6 | import net.minecraft.client.util.math.MatrixStack; 7 | import net.minecraft.client.world.ClientWorld; 8 | import net.minecraft.world.World; 9 | import org.jetbrains.annotations.Nullable; 10 | import org.joml.Matrix4f; 11 | import org.spongepowered.asm.mixin.Final; 12 | import org.spongepowered.asm.mixin.Mixin; 13 | import org.spongepowered.asm.mixin.Shadow; 14 | import org.spongepowered.asm.mixin.injection.At; 15 | import org.spongepowered.asm.mixin.injection.Inject; 16 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 17 | 18 | @Mixin(WorldRenderer.class) 19 | public class WorldRendererMixin { 20 | @Shadow 21 | @Nullable 22 | private ClientWorld world; 23 | 24 | @Shadow 25 | @Final 26 | private MinecraftClient client; 27 | 28 | @Shadow 29 | @Final 30 | private BufferBuilderStorage bufferBuilders; 31 | 32 | @Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/util/profiler/Profiler;swap(Ljava/lang/String;)V", shift = At.Shift.AFTER, ordinal = 6), method = "render") 33 | private void astra$renderSky(MatrixStack matrices, float tickDelta, long limitTime, boolean renderBlockOutline, Camera camera, GameRenderer gameRenderer, LightmapTextureManager lightmapTextureManager, Matrix4f projectionMatrix, CallbackInfo ci) { 34 | if (this.world.getRegistryKey().equals(World.OVERWORLD)) { 35 | AstraSkyRenderer.renderSky(matrices, this.bufferBuilders.getEntityVertexConsumers(), projectionMatrix, tickDelta, this.world, this.client); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/resources/quilt.mod.json: -------------------------------------------------------------------------------- 1 | { 2 | "schema_version": 1, 3 | "quilt_loader": { 4 | "group": "doctor4t", 5 | "id": "astronomical", 6 | "version": "${version}", 7 | "metadata": { 8 | "name": "Astronomical", 9 | "description": "Stargazing, stars, planets and marshmallows in the palm of your hand.", 10 | "contributors": { 11 | "doctor4t": "Main Author", 12 | "Arathain": "Programmer", 13 | "AmyMialee": "Programmer", 14 | "Luxintrus": "Texture Artist", 15 | "Diansu": "Texture Artist", 16 | "Merp": "Audio Artist" 17 | }, 18 | "icon": "assets/astronomical/icon.png" 19 | }, 20 | "intermediate_mappings": "net.fabricmc:intermediary", 21 | "entrypoints": { 22 | "init": "doctor4t.astronomical.common.Astronomical", 23 | "client_init": "doctor4t.astronomical.client.AstronomicalClient", 24 | "cardinal-components-entity": "doctor4t.astronomical.cca.AstraCardinalComponents", 25 | "cardinal-components-world": "doctor4t.astronomical.cca.AstraCardinalComponents" 26 | }, 27 | "depends": [ 28 | { 29 | "id": "quilt_loader", 30 | "versions": ">=0.17.0-" 31 | }, 32 | { 33 | "id": "quilted_fabric_api", 34 | "versions": ">=4.0.0-" 35 | }, 36 | { 37 | "id": "minecraft", 38 | "versions": ">=1.19.2" 39 | }, 40 | { 41 | "id": "lodestone", 42 | "versions": "*" 43 | } 44 | ] 45 | }, 46 | "mixin": "astronomical.mixins.json", 47 | "access_widener": "astronomical.accesswidener", 48 | "cardinal-components": [ 49 | "astronomical:sky", 50 | "astronomical:starfall", 51 | "astronomical:holding" 52 | ], 53 | "quilt_loom": { 54 | "injected_interfaces": { 55 | "net/minecraft/class_1657": ["doctor4t/astronomical/common/util/PlayerAttackHeld"] 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/lang/zh_cn.json: -------------------------------------------------------------------------------- 1 | { 2 | "itemGroup.astronomical.astronomical": "星宇", 3 | "item.astronomical.astral_fragment": "星宇碎片", 4 | "item.astronomical.astral_container": "星宇容器", 5 | "item.astronomical.nano_planet": "纳米行星", 6 | "item.astronomical.nano_star": "纳米星辰", 7 | "item.astronomical.nano_cosmos": "纳米宇宙", 8 | "item.astronomical.nano_ring": "纳米星环", 9 | "item.astronomical.the_eye_of_the_universe": "宇宙之眼", 10 | "item.astronomical.astral_bundle_planet": "纳米行星收纳袋", 11 | "item.astronomical.astral_bundle_star": "纳米星辰收纳袋", 12 | "item.astronomical.astral_bundle_cosmos": "纳米宇宙收纳袋", 13 | "item.astronomical.astral_bundle_ring": "纳米星环收纳袋", 14 | "item.astronomical.marshmallow": "棉花糖", 15 | "item.astronomical.marshmallows": "棉花糖", 16 | "item.astronomical.starmallow": "星宇棉花糖", 17 | "item.astronomical.starmallows": "星宇棉花糖", 18 | "item.astronomical.marshmallow_stick": "串起来的棉花糖", 19 | "item.astronomical.starmallow_stick": "串起来的星宇棉花糖", 20 | "tooltip.astronomical.cook_level.raw": "生的", 21 | "tooltip.astronomical.cook_level.slightly_cooked": "稍微过火", 22 | "tooltip.astronomical.cook_level.cooked": "经过烤制", 23 | "tooltip.astronomical.cook_level.perfect": "完美烤制", 24 | "tooltip.astronomical.cook_level.burnt": "糊啦!", 25 | "block.astronomical.marshmallow_can": "棉花糖罐头", 26 | "block.astronomical.starmallow_can": "星宇棉花糖罐头", 27 | "block.astronomical.astral_display": "星宇展示器", 28 | "block.astronomical.astral_lantern": "星宇灯笼", 29 | "effect.astronomical.stargazing": "仰望星空", 30 | "effect.astronomical.starfall": "星陨", 31 | "effect.astronomical.stargazing.time": "日出东方", 32 | "container.astral_display": "星宇展示器", 33 | "action.increase_star_size": "尺寸 ", 34 | "astronomical.midnightconfig.finishedOuterWilds": "你玩过/通关过《星际拓荒》吗?" 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/init/ModParticles.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.init; 2 | 3 | import doctor4t.astronomical.client.particle.ExplosionParticleType; 4 | import doctor4t.astronomical.common.Astronomical; 5 | import net.fabricmc.fabric.api.client.particle.v1.ParticleFactoryRegistry; 6 | import net.minecraft.particle.ParticleType; 7 | import net.minecraft.registry.Registries; 8 | import net.minecraft.registry.Registry; 9 | import net.minecraft.util.Identifier; 10 | 11 | import java.util.function.BiConsumer; 12 | 13 | public interface ModParticles { 14 | ExplosionParticleType STAR_IMPACT_EXPLOSION = new ExplosionParticleType(); 15 | ExplosionParticleType STAR_IMPACT_FLARE = new ExplosionParticleType(); 16 | ExplosionParticleType FALLEN_STAR = new ExplosionParticleType(); 17 | 18 | static void initialize() { 19 | initParticles(bind(Registries.PARTICLE_TYPE)); 20 | } 21 | 22 | static void registerFactories() { 23 | ParticleFactoryRegistry.getInstance().register(STAR_IMPACT_EXPLOSION, ExplosionParticleType.Factory::new); 24 | ParticleFactoryRegistry.getInstance().register(STAR_IMPACT_FLARE, ExplosionParticleType.Factory::new); 25 | ParticleFactoryRegistry.getInstance().register(FALLEN_STAR, ExplosionParticleType.Factory::new); 26 | } 27 | 28 | private static void initParticles(BiConsumer, Identifier> registry) { 29 | registry.accept(STAR_IMPACT_EXPLOSION, new Identifier(Astronomical.MOD_ID, "star_impact_explosion")); 30 | registry.accept(STAR_IMPACT_FLARE, new Identifier(Astronomical.MOD_ID, "star_impact_flare")); 31 | registry.accept(FALLEN_STAR, new Identifier(Astronomical.MOD_ID, "fallen_star")); 32 | } 33 | 34 | private static BiConsumer bind(Registry registry) { 35 | return (t, id) -> Registry.register(registry, id, t); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/astral_display_horizontal_on.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Made with Blockbench", 3 | "textures": { 4 | "1": "astronomical:block/astral_display_bottom_receptor", 5 | "2": "astronomical:block/astral_display_side_arrow", 6 | "3": "astronomical:block/astral_display_side_receptor", 7 | "4": "astronomical:block/astral_display_top_on", 8 | "particle": "astronomical:block/astral_display_top_off" 9 | }, 10 | "elements": [ 11 | { 12 | "from": [0, 0, 0], 13 | "to": [16, 16, 16], 14 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, 15 | "faces": { 16 | "north": {"uv": [0, 0, 16, 16], "texture": "#4", "cullface": "north"}, 17 | "east": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#3", "cullface": "east"}, 18 | "south": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "south"}, 19 | "west": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#3", "cullface": "west"}, 20 | "up": {"uv": [0, 0, 16, 16], "texture": "#2", "cullface": "up"}, 21 | "down": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#2", "cullface": "down"} 22 | } 23 | } 24 | ], 25 | "display": { 26 | "thirdperson_righthand": { 27 | "rotation": [75, 45, 0], 28 | "translation": [0, 2.5, 0], 29 | "scale": [0.375, 0.375, 0.375] 30 | }, 31 | "thirdperson_lefthand": { 32 | "rotation": [75, 45, 0], 33 | "translation": [0, 2.5, 0], 34 | "scale": [0.375, 0.375, 0.375] 35 | }, 36 | "firstperson_righthand": { 37 | "rotation": [0, 45, 0], 38 | "scale": [0.4, 0.4, 0.4] 39 | }, 40 | "firstperson_lefthand": { 41 | "rotation": [0, 225, 0], 42 | "scale": [0.4, 0.4, 0.4] 43 | }, 44 | "ground": { 45 | "translation": [0, 3, 0], 46 | "scale": [0.25, 0.25, 0.25] 47 | }, 48 | "gui": { 49 | "rotation": [30, 225, 0], 50 | "scale": [0.625, 0.625, 0.625] 51 | }, 52 | "fixed": { 53 | "scale": [0.5, 0.5, 0.5] 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/astral_display_horizontal_off.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Made with Blockbench", 3 | "textures": { 4 | "1": "astronomical:block/astral_display_bottom_receptor", 5 | "2": "astronomical:block/astral_display_side_arrow", 6 | "3": "astronomical:block/astral_display_side_receptor", 7 | "4": "astronomical:block/astral_display_top_off", 8 | "particle": "astronomical:block/astral_display_top_off" 9 | }, 10 | "elements": [ 11 | { 12 | "from": [0, 0, 0], 13 | "to": [16, 16, 16], 14 | "rotation": {"angle": 0, "axis": "y", "origin": [8, 8, 8]}, 15 | "faces": { 16 | "north": {"uv": [0, 0, 16, 16], "texture": "#4", "cullface": "north"}, 17 | "east": {"uv": [0, 0, 16, 16], "rotation": 90, "texture": "#3", "cullface": "east"}, 18 | "south": {"uv": [0, 0, 16, 16], "texture": "#1", "cullface": "south"}, 19 | "west": {"uv": [0, 0, 16, 16], "rotation": 270, "texture": "#3", "cullface": "west"}, 20 | "up": {"uv": [0, 0, 16, 16], "texture": "#2", "cullface": "up"}, 21 | "down": {"uv": [0, 0, 16, 16], "rotation": 180, "texture": "#2", "cullface": "down"} 22 | } 23 | } 24 | ], 25 | "display": { 26 | "thirdperson_righthand": { 27 | "rotation": [75, 45, 0], 28 | "translation": [0, 2.5, 0], 29 | "scale": [0.375, 0.375, 0.375] 30 | }, 31 | "thirdperson_lefthand": { 32 | "rotation": [75, 45, 0], 33 | "translation": [0, 2.5, 0], 34 | "scale": [0.375, 0.375, 0.375] 35 | }, 36 | "firstperson_righthand": { 37 | "rotation": [0, 45, 0], 38 | "scale": [0.4, 0.4, 0.4] 39 | }, 40 | "firstperson_lefthand": { 41 | "rotation": [0, 225, 0], 42 | "scale": [0.4, 0.4, 0.4] 43 | }, 44 | "ground": { 45 | "translation": [0, 3, 0], 46 | "scale": [0.25, 0.25, 0.25] 47 | }, 48 | "gui": { 49 | "rotation": [30, 225, 0], 50 | "scale": [0.625, 0.625, 0.625] 51 | }, 52 | "fixed": { 53 | "scale": [0.5, 0.5, 0.5] 54 | } 55 | } 56 | } -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/init/ModBlockEntities.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.init; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.block.entity.AstralDisplayBlockEntity; 5 | import doctor4t.astronomical.common.block.entity.AstralLanternBlockEntity; 6 | import doctor4t.astronomical.common.block.entity.MarshmallowCanBlockEntity; 7 | import net.minecraft.block.entity.BlockEntity; 8 | import net.minecraft.block.entity.BlockEntityType; 9 | import net.minecraft.registry.Registries; 10 | import net.minecraft.registry.Registry; 11 | import net.minecraft.util.Identifier; 12 | import org.quiltmc.qsl.block.entity.api.QuiltBlockEntityTypeBuilder; 13 | 14 | import java.util.LinkedHashMap; 15 | import java.util.Map; 16 | 17 | public interface ModBlockEntities { 18 | Map, Identifier> BLOCK_ENTITIES = new LinkedHashMap<>(); 19 | 20 | private static > T createBlockEntity(String name, T entity) { 21 | BLOCK_ENTITIES.put(entity, Astronomical.id(name)); 22 | return entity; 23 | } 24 | 25 | static void initialize() { 26 | BLOCK_ENTITIES.keySet().forEach(entityType -> Registry.register(Registries.BLOCK_ENTITY_TYPE, BLOCK_ENTITIES.get(entityType), entityType)); 27 | } BlockEntityType ASTRAL_DISPLAY = createBlockEntity("astral_display", QuiltBlockEntityTypeBuilder.create(AstralDisplayBlockEntity::new, ModBlocks.ASTRAL_DISPLAY).build()); 28 | BlockEntityType MARSHMALLOW_CAN = createBlockEntity("marshmallow_can", QuiltBlockEntityTypeBuilder.create(MarshmallowCanBlockEntity::new, ModBlocks.MARSHMALLOW_CAN).build()); 29 | BlockEntityType ASTRAL_LANTERN = createBlockEntity("astral_lantern", QuiltBlockEntityTypeBuilder.create(AstralLanternBlockEntity::new, ModBlocks.ASTRAL_LANTERN).build()); 30 | 31 | 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/MinecraftClientMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import com.llamalad7.mixinextras.injector.wrapoperation.Operation; 4 | import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; 5 | import doctor4t.astronomical.common.Astronomical; 6 | import doctor4t.astronomical.common.item.MarshmallowStickItem; 7 | import net.minecraft.client.MinecraftClient; 8 | import net.minecraft.client.network.ClientPlayerEntity; 9 | import net.minecraft.client.option.GameOptions; 10 | import org.jetbrains.annotations.Nullable; 11 | import org.quiltmc.qsl.networking.api.PacketByteBufs; 12 | import org.quiltmc.qsl.networking.api.client.ClientPlayNetworking; 13 | import org.spongepowered.asm.mixin.Final; 14 | import org.spongepowered.asm.mixin.Mixin; 15 | import org.spongepowered.asm.mixin.Shadow; 16 | import org.spongepowered.asm.mixin.Unique; 17 | import org.spongepowered.asm.mixin.injection.At; 18 | 19 | @Mixin(MinecraftClient.class) 20 | public class MinecraftClientMixin { 21 | @Shadow 22 | @Final 23 | public GameOptions options; 24 | @Shadow 25 | @Nullable 26 | public ClientPlayerEntity player; 27 | 28 | @Unique 29 | private boolean astronomical$holding = false; 30 | 31 | @WrapOperation(method = "handleInputEvents", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/MinecraftClient;handleBlockBreaking(Z)V")) 32 | private void astronomical$holding(MinecraftClient instance, boolean bl, Operation original) { 33 | var holding = this.options.attackKey.isPressed(); 34 | if (holding != this.astronomical$holding) { 35 | this.astronomical$holding = holding; 36 | var buf = PacketByteBufs.create(); 37 | buf.writeBoolean(holding); 38 | ClientPlayNetworking.send(Astronomical.HOLDING_PACKET, buf); 39 | } 40 | if (this.player == null || !(this.player.getMainHandStack().getItem() instanceof MarshmallowStickItem)) { 41 | original.call(instance, bl); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/item/TheEyeOfTheUniverseItem.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.item; 2 | 3 | import doctor4t.astronomical.AstronomicalConfig; 4 | import doctor4t.astronomical.common.Astronomical; 5 | import doctor4t.astronomical.common.init.ModItems; 6 | import net.minecraft.client.item.TooltipContext; 7 | import net.minecraft.entity.Entity; 8 | import net.minecraft.item.ItemStack; 9 | import net.minecraft.text.Text; 10 | import net.minecraft.world.World; 11 | import org.jetbrains.annotations.Nullable; 12 | 13 | import java.util.List; 14 | 15 | import static net.minecraft.text.Style.EMPTY; 16 | 17 | public class TheEyeOfTheUniverseItem extends NanoAstralObjectItem { 18 | public TheEyeOfTheUniverseItem(Settings settings) { 19 | super(settings); 20 | } 21 | 22 | @Override 23 | public ItemStack getDefaultStack() { 24 | ItemStack itemStack = new ItemStack(ModItems.THE_EYE_OF_THE_UNIVERSE); 25 | itemStack.getOrCreateSubNbt(Astronomical.MOD_ID).putInt("size", 1); 26 | return itemStack; 27 | } 28 | 29 | @Override 30 | public void inventoryTick(ItemStack stack, World world, Entity entity, int slot, boolean selected) { 31 | if (!stack.getOrCreateSubNbt(Astronomical.MOD_ID).contains("size")) { 32 | stack.getOrCreateSubNbt(Astronomical.MOD_ID).putInt("size", 1); 33 | } 34 | super.inventoryTick(stack, world, entity, slot, selected); 35 | } 36 | 37 | @Override 38 | public String getTranslationKey() { 39 | if (AstronomicalConfig.finishedOuterWilds) { 40 | return super.getTranslationKey(); 41 | } else return "[Outer Wilds Spoiler]"; 42 | } 43 | 44 | @Override 45 | public void appendTooltip(ItemStack stack, @Nullable World world, List tooltip, TooltipContext context) { 46 | int size = stack.getOrCreateSubNbt(Astronomical.MOD_ID).getInt("size"); 47 | 48 | tooltip.add(Text.literal("Size: " + size).setStyle(EMPTY)); 49 | 50 | super.appendTooltip(stack, world, tooltip, context); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/marshmallow_can.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/marshmallow_can" 6 | }, 7 | "elements": [ 8 | { 9 | "name": "can_outer", 10 | "from": [4, 0, 4], 11 | "to": [12, 10, 12], 12 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 13 | "faces": { 14 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 15 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "up": {"uv": [12, 0, 16, 8], "texture": "#4"}, 19 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 20 | } 21 | }, 22 | { 23 | "name": "can_inner", 24 | "from": [12, 0, 4], 25 | "to": [4, 10, 12], 26 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 27 | "faces": { 28 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 29 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 30 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 31 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 32 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 33 | } 34 | } 35 | ], 36 | "display": { 37 | "thirdperson_righthand": { 38 | "rotation": [75, 45, 0], 39 | "translation": [0, 2.5, 0], 40 | "scale": [0.375, 0.375, 0.375] 41 | }, 42 | "thirdperson_lefthand": { 43 | "rotation": [75, 45, 0], 44 | "translation": [0, 2.5, 0], 45 | "scale": [0.375, 0.375, 0.375] 46 | }, 47 | "firstperson_righthand": { 48 | "rotation": [0, 45, 0], 49 | "scale": [0.4, 0.4, 0.4] 50 | }, 51 | "firstperson_lefthand": { 52 | "rotation": [0, 225, 0], 53 | "scale": [0.4, 0.4, 0.4] 54 | }, 55 | "ground": { 56 | "translation": [0, 3, 0], 57 | "scale": [0.25, 0.25, 0.25] 58 | }, 59 | "gui": { 60 | "rotation": [30, 225, 0], 61 | "scale": [0.625, 0.625, 0.625] 62 | }, 63 | "fixed": { 64 | "scale": [0.5, 0.5, 0.5] 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/item/starmallow_can.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Model by Luxintrus", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "4": "astronomical:block/starmallow_can" 6 | }, 7 | "elements": [ 8 | { 9 | "name": "can_outer", 10 | "from": [4, 0, 4], 11 | "to": [12, 10, 12], 12 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 13 | "faces": { 14 | "north": {"uv": [0, 6, 4, 16], "texture": "#4"}, 15 | "east": {"uv": [0, 6, 4, 16], "texture": "#4"}, 16 | "south": {"uv": [0, 6, 4, 16], "texture": "#4"}, 17 | "west": {"uv": [0, 6, 4, 16], "texture": "#4"}, 18 | "up": {"uv": [12, 0, 16, 8], "texture": "#4"}, 19 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 20 | } 21 | }, 22 | { 23 | "name": "can_inner", 24 | "from": [12, 0, 4], 25 | "to": [4, 10, 12], 26 | "rotation": {"angle": 0, "axis": "z", "origin": [8, 5, 8]}, 27 | "faces": { 28 | "north": {"uv": [4, 6, 8, 16], "texture": "#4"}, 29 | "east": {"uv": [4, 6, 8, 16], "texture": "#4"}, 30 | "south": {"uv": [4, 6, 8, 16], "texture": "#4"}, 31 | "west": {"uv": [4, 6, 8, 16], "texture": "#4"}, 32 | "down": {"uv": [8, 8, 12, 16], "texture": "#4"} 33 | } 34 | } 35 | ], 36 | "display": { 37 | "thirdperson_righthand": { 38 | "rotation": [75, 45, 0], 39 | "translation": [0, 2.5, 0], 40 | "scale": [0.375, 0.375, 0.375] 41 | }, 42 | "thirdperson_lefthand": { 43 | "rotation": [75, 45, 0], 44 | "translation": [0, 2.5, 0], 45 | "scale": [0.375, 0.375, 0.375] 46 | }, 47 | "firstperson_righthand": { 48 | "rotation": [0, 45, 0], 49 | "scale": [0.4, 0.4, 0.4] 50 | }, 51 | "firstperson_lefthand": { 52 | "rotation": [0, 225, 0], 53 | "scale": [0.4, 0.4, 0.4] 54 | }, 55 | "ground": { 56 | "translation": [0, 3, 0], 57 | "scale": [0.25, 0.25, 0.25] 58 | }, 59 | "gui": { 60 | "rotation": [30, 225, 0], 61 | "scale": [0.625, 0.625, 0.625] 62 | }, 63 | "fixed": { 64 | "scale": [0.5, 0.5, 0.5] 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/cca/AstraCardinalComponents.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.cca; 2 | 3 | import dev.onyxstudios.cca.api.v3.component.ComponentKey; 4 | import dev.onyxstudios.cca.api.v3.component.ComponentRegistry; 5 | import dev.onyxstudios.cca.api.v3.entity.EntityComponentFactoryRegistry; 6 | import dev.onyxstudios.cca.api.v3.entity.EntityComponentInitializer; 7 | import dev.onyxstudios.cca.api.v3.entity.RespawnCopyStrategy; 8 | import dev.onyxstudios.cca.api.v3.world.WorldComponentFactoryRegistry; 9 | import dev.onyxstudios.cca.api.v3.world.WorldComponentInitializer; 10 | import doctor4t.astronomical.cca.entity.HoldingComponent; 11 | import doctor4t.astronomical.cca.world.AstraSkyComponent; 12 | import doctor4t.astronomical.cca.world.AstraStarfallComponent; 13 | import doctor4t.astronomical.common.Astronomical; 14 | import net.minecraft.entity.player.PlayerEntity; 15 | import org.jetbrains.annotations.NotNull; 16 | 17 | public class AstraCardinalComponents implements EntityComponentInitializer, WorldComponentInitializer { 18 | //WORLD 19 | public static final ComponentKey SKY = ComponentRegistry.getOrCreate(Astronomical.id("sky"), AstraSkyComponent.class); 20 | public static final ComponentKey FALL = ComponentRegistry.getOrCreate(Astronomical.id("starfall"), AstraStarfallComponent.class); 21 | 22 | //SELF 23 | public static final ComponentKey HOLDING = ComponentRegistry.getOrCreate(Astronomical.HOLDING_PACKET, HoldingComponent.class); 24 | 25 | @Override 26 | public void registerEntityComponentFactories(@NotNull EntityComponentFactoryRegistry registry) { 27 | registry.beginRegistration(PlayerEntity.class, HOLDING).respawnStrategy(RespawnCopyStrategy.NEVER_COPY).end(HoldingComponent::new); 28 | } 29 | 30 | @Override 31 | public void registerWorldComponentFactories(@NotNull WorldComponentFactoryRegistry registry) { 32 | registry.register(AstraCardinalComponents.SKY, AstraSkyComponent::new); 33 | registry.register(AstraCardinalComponents.FALL, AstraStarfallComponent::new); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/lang/en_us.json: -------------------------------------------------------------------------------- 1 | { 2 | "itemGroup.astronomical.astronomical": "Astronomical", 3 | "item.astronomical.astral_fragment": "Astral Fragment", 4 | "item.astronomical.astral_container": "Astral Container", 5 | "item.astronomical.nano_planet": "Nano-Planet", 6 | "item.astronomical.nano_star": "Nano-Star", 7 | "item.astronomical.nano_cosmos": "Nano-Cosmos", 8 | "item.astronomical.nano_ring": "Nano-Ring", 9 | "item.astronomical.the_eye_of_the_universe": "The Eye of the Universe", 10 | "item.astronomical.astral_bundle_planet": "Nano-Planet Bundle", 11 | "item.astronomical.astral_bundle_star": "Nano-Star Bundle", 12 | "item.astronomical.astral_bundle_cosmos": "Nano-Cosmos Bundle", 13 | "item.astronomical.astral_bundle_ring": "Nano-Ring Bundle", 14 | "item.astronomical.marshmallow": "Marshmallow", 15 | "item.astronomical.marshmallows": "Marshmallows", 16 | "item.astronomical.starmallow": "Starmallow", 17 | "item.astronomical.starmallows": "Starmallows", 18 | "item.astronomical.marshmallow_stick": "Marshmallow on a Stick", 19 | "item.astronomical.starmallow_stick": "Starmallow on a Stick", 20 | "tooltip.astronomical.cook_level.raw": "Uncooked", 21 | "tooltip.astronomical.cook_level.slightly_cooked": "Slightly Roasted", 22 | "tooltip.astronomical.cook_level.cooked": "Roasted", 23 | "tooltip.astronomical.cook_level.perfect": "Perfectly Roasted", 24 | "tooltip.astronomical.cook_level.burnt": "Burnt", 25 | "block.astronomical.marshmallow_can": "Marshmallow Can", 26 | "block.astronomical.starmallow_can": "Starmallow Can", 27 | "block.astronomical.astral_display": "Astral Display", 28 | "block.astronomical.astral_lantern": "Astral Lantern", 29 | "effect.astronomical.stargazing": "Stargazing", 30 | "effect.astronomical.starfall": "Starfall", 31 | "effect.astronomical.stargazing.time": "Until Sunrise", 32 | "container.astral_display": "Astral Display", 33 | "action.increase_star_size": "Size increased to", 34 | "astronomical.midnightconfig.finishedOuterWilds": "Have you played and finished Outer Wilds?" 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/item/NanoCosmosItem.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.item; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import net.minecraft.client.item.TooltipContext; 5 | import net.minecraft.item.ItemStack; 6 | import net.minecraft.text.Text; 7 | import net.minecraft.util.Identifier; 8 | import net.minecraft.world.World; 9 | import org.jetbrains.annotations.Nullable; 10 | 11 | import java.util.List; 12 | import java.util.Random; 13 | 14 | import static net.minecraft.text.Style.EMPTY; 15 | 16 | public class NanoCosmosItem extends NanoAstralObjectItem { 17 | public NanoCosmosItem(Settings settings) { 18 | super(settings); 19 | } 20 | 21 | @Override 22 | public void appendTooltip(ItemStack stack, @Nullable World world, List tooltip, TooltipContext context) { 23 | String texture = stack.getOrCreateSubNbt(Astronomical.MOD_ID).getString("texture"); 24 | int size = stack.getOrCreateSubNbt(Astronomical.MOD_ID).getInt("size"); 25 | 26 | tooltip.add(Text.literal("Texture: " + texture)); 27 | tooltip.add(Text.literal("Size: " + size).setStyle(EMPTY)); 28 | 29 | super.appendTooltip(stack, world, tooltip, context); 30 | } 31 | 32 | public enum CosmosTexture { 33 | VOID(Astronomical.id("textures/astral_object/cosmos/void.png")), 34 | STARS(Astronomical.id("textures/astral_object/cosmos/stars.png")), 35 | LIGHT(Astronomical.id("textures/astral_object/white.png")); 36 | 37 | 38 | private static final List VALUES = List.of(values()); 39 | public static final int SIZE = VALUES.size(); 40 | private static final Random RANDOM = new Random(); 41 | public final Identifier texture; 42 | 43 | CosmosTexture(Identifier texture) { 44 | this.texture = texture; 45 | } 46 | 47 | public static CosmosTexture byName(String name) { 48 | for (CosmosTexture ringTexture : values()) { 49 | if (ringTexture.name().equals(name)) { 50 | return ringTexture; 51 | } 52 | } 53 | return VOID; 54 | } 55 | 56 | public static CosmosTexture getRandom() { 57 | return VALUES.get(RANDOM.nextInt(SIZE)); 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/util/BlockCastFinder.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.util; 2 | 3 | import net.minecraft.util.math.BlockPos; 4 | import net.minecraft.util.math.Vec3d; 5 | import org.jetbrains.annotations.NotNull; 6 | 7 | import java.util.ArrayList; 8 | import java.util.HashSet; 9 | import java.util.List; 10 | import java.util.Set; 11 | 12 | public interface BlockCastFinder { 13 | static @NotNull List castRayForGridPoints(Vec3d startPosition, @NotNull Vec3d direction, double radius, double maxDistance) { 14 | Set intersectedPoints = new HashSet<>(); 15 | var currentPosition = startPosition; 16 | var normalizedDirection = direction.normalize(); 17 | for (double d = 0; d <= maxDistance; d += 0.2) { 18 | currentPosition = startPosition.add(normalizedDirection.multiply(d)); 19 | addGridPointsWithinRadius(currentPosition, radius, intersectedPoints); 20 | } 21 | return new ArrayList<>(intersectedPoints); 22 | } 23 | 24 | static void addGridPointsWithinRadius(@NotNull Vec3d position, double radius, Set intersectedPoints) { 25 | var minX = (int) Math.floor(position.x - radius); 26 | var maxX = (int) Math.ceil(position.x + radius); 27 | var minY = (int) Math.floor(position.y - radius); 28 | var maxY = (int) Math.ceil(position.y + radius); 29 | var minZ = (int) Math.floor(position.z - radius); 30 | var maxZ = (int) Math.ceil(position.z + radius); 31 | for (var x = minX; x <= maxX; x++) { 32 | for (var y = minY; y <= maxY; y++) { 33 | for (var z = minZ; z <= maxZ; z++) { 34 | var gridPoint = new BlockPos(x, y, z); 35 | if (isWithinRadius(position, gridPoint, radius)) { 36 | intersectedPoints.add(gridPoint); 37 | } 38 | } 39 | } 40 | } 41 | } 42 | 43 | static boolean isWithinRadius(@NotNull Vec3d position, @NotNull BlockPos gridPoint, double radius) { 44 | var dx = position.x - (gridPoint.getX() + 0.5); 45 | var dy = position.y - (gridPoint.getY() + 0.5); 46 | var dz = position.z - (gridPoint.getZ() + 0.5); 47 | var distance = Math.sqrt(dx * dx + dy * dy + dz * dz); 48 | return distance <= radius; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/cca/world/AstraStarfallComponent.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.cca.world; 2 | 3 | import dev.onyxstudios.cca.api.v3.component.sync.AutoSyncedComponent; 4 | import dev.onyxstudios.cca.api.v3.component.tick.ClientTickingComponent; 5 | import dev.onyxstudios.cca.api.v3.component.tick.ServerTickingComponent; 6 | import doctor4t.astronomical.cca.AstraCardinalComponents; 7 | import doctor4t.astronomical.common.structure.Starfall; 8 | import net.minecraft.nbt.NbtCompound; 9 | import net.minecraft.nbt.NbtList; 10 | import net.minecraft.util.math.Vec3d; 11 | import net.minecraft.world.World; 12 | 13 | import java.util.LinkedList; 14 | import java.util.List; 15 | 16 | public class AstraStarfallComponent implements AutoSyncedComponent, ServerTickingComponent, ClientTickingComponent { 17 | private final List starfalls = new LinkedList<>(); 18 | private final World obj; 19 | 20 | public AstraStarfallComponent(World object) { 21 | this.obj = object; 22 | } 23 | 24 | @Override 25 | public void readFromNbt(NbtCompound tag) { 26 | NbtList nbtList = tag.getList("falls", 10); 27 | starfalls.clear(); 28 | nbtList.forEach(dNbt -> { 29 | NbtCompound n = (NbtCompound) dNbt; 30 | Starfall s = new Starfall(n); 31 | starfalls.add(s); 32 | }); 33 | } 34 | 35 | public List getStarfalls() { 36 | return starfalls; 37 | } 38 | 39 | public void addFall(int ticksUntilLanded, Vec3d rot, Vec3d target) { 40 | starfalls.add(new Starfall(ticksUntilLanded, rot, target)); 41 | AstraCardinalComponents.FALL.sync(obj); 42 | } 43 | 44 | @Override 45 | public void writeToNbt(NbtCompound tag) { 46 | NbtList list = new NbtList(); 47 | 48 | starfalls.forEach(s -> { 49 | NbtCompound dNbt = new NbtCompound(); 50 | s.writeNbt(dNbt); 51 | list.add(dNbt); 52 | }); 53 | tag.put("falls", list); 54 | } 55 | 56 | @Override 57 | public void serverTick() { 58 | starfalls.forEach(s -> s.tick(obj)); 59 | starfalls.removeIf(s -> s.progress > (s.ticksUntilLanded * Starfall.ANIMATION_EXTENSION)); 60 | AstraCardinalComponents.FALL.sync(obj); 61 | } 62 | 63 | @Override 64 | public void clientTick() { 65 | starfalls.forEach(s -> s.tick(obj)); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/client/particle/AstralFragmentParticleEmitter.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.client.particle; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.init.ModItems; 5 | import net.minecraft.client.MinecraftClient; 6 | import net.minecraft.item.ItemStack; 7 | import net.minecraft.util.random.RandomGenerator; 8 | import net.minecraft.world.World; 9 | import team.lodestar.lodestone.setup.LodestoneScreenParticles; 10 | import team.lodestar.lodestone.systems.rendering.particle.Easing; 11 | import team.lodestar.lodestone.systems.rendering.particle.ScreenParticleBuilder; 12 | import team.lodestar.lodestone.systems.rendering.particle.data.ColorParticleData; 13 | import team.lodestar.lodestone.systems.rendering.particle.data.GenericParticleData; 14 | import team.lodestar.lodestone.systems.rendering.particle.data.SpinParticleData; 15 | import team.lodestar.lodestone.systems.rendering.particle.screen.LodestoneScreenParticleTextureSheet; 16 | import team.lodestar.lodestone.systems.rendering.particle.screen.base.ScreenParticle; 17 | 18 | import java.util.ArrayList; 19 | import java.util.HashMap; 20 | 21 | public class AstralFragmentParticleEmitter { 22 | public static void particleTick(HashMap> target, World world, float tickDelta, ItemStack stack, float x, float y) { 23 | if (stack == ModItems.CREATIVE_TAB_ASTRAL_FRAGMENT) { 24 | //todo fix the weird offset 25 | return; 26 | } 27 | RandomGenerator random = RandomGenerator.createLegacy(); 28 | if (random.nextInt(5) == 0) { 29 | ScreenParticleBuilder.create(LodestoneScreenParticles.TWINKLE, target) 30 | .setScaleData(GenericParticleData.create(.1f + random.nextFloat() * .3f).build()) 31 | .setColorData(ColorParticleData.create(Astronomical.STAR_PURPLE, Astronomical.STAR_PURPLE).build()) 32 | .setTransparencyData(GenericParticleData.create(0, 1f, 0).setEasing(Easing.QUAD_OUT, Easing.SINE_OUT).build()) 33 | .setLifetime(20) 34 | .setSpinData(SpinParticleData.create((float) (random.nextGaussian() / 20f)).setSpinOffset(random.nextFloat() * 360f).build()) 35 | .setRandomOffset(7) 36 | .spawn(x, y); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/block/entity/MarshmallowCanBlockEntity.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.block.entity; 2 | 3 | import doctor4t.astronomical.common.block.MarshmallowCanBlock; 4 | import doctor4t.astronomical.common.init.ModBlockEntities; 5 | import net.minecraft.block.BlockState; 6 | import net.minecraft.block.entity.BlockEntity; 7 | import net.minecraft.nbt.NbtCompound; 8 | import net.minecraft.util.math.BlockPos; 9 | 10 | public class MarshmallowCanBlockEntity extends BlockEntity { 11 | public int marshmallowCount; 12 | 13 | public MarshmallowCanBlockEntity(BlockPos pos, BlockState state) { 14 | super(ModBlockEntities.MARSHMALLOW_CAN, pos, state); 15 | } 16 | 17 | @Override 18 | public void readNbt(NbtCompound nbt) { 19 | super.readNbt(nbt); 20 | if (nbt.contains("marshmallowCount")) { 21 | this.marshmallowCount = nbt.getInt("marshmallowCount"); 22 | } 23 | } 24 | 25 | @Override 26 | public void writeNbt(NbtCompound nbt) { 27 | super.writeNbt(nbt); 28 | nbt.putInt("marshmallowCount", this.getMarshmallowCount()); 29 | } 30 | 31 | public int getMarshmallowCount() { 32 | return marshmallowCount; 33 | } 34 | 35 | public void setMarshmallowCount(int marshmallowCount) { 36 | this.marshmallowCount = marshmallowCount; 37 | } 38 | 39 | public int incrementMarshmallowCount(int count) { 40 | if (this.marshmallowCount + count <= 64) { 41 | this.marshmallowCount += count; 42 | this.updateBlockState(); 43 | return count; 44 | } else { 45 | int ret = 64 - marshmallowCount; 46 | this.marshmallowCount = 64; 47 | this.updateBlockState(); 48 | return ret; 49 | } 50 | } 51 | 52 | public boolean incrementMarshmallowCount() { 53 | if (this.marshmallowCount < 64) { 54 | this.marshmallowCount += 1; 55 | this.updateBlockState(); 56 | return true; 57 | } 58 | return false; 59 | } 60 | 61 | public boolean decrementMarshmallowCount() { 62 | if (this.marshmallowCount > 0) { 63 | this.marshmallowCount -= 1; 64 | this.updateBlockState(); 65 | return true; 66 | } 67 | return false; 68 | } 69 | 70 | public void updateBlockState() { 71 | this.world.setBlockState(this.pos, this.world.getBlockState(this.pos).with(MarshmallowCanBlock.LEVEL, (int) Math.ceil((double) this.marshmallowCount / 8))); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/init/ModBlocks.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.init; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.block.AstralDisplayBlock; 5 | import doctor4t.astronomical.common.block.AstralLanternBlock; 6 | import doctor4t.astronomical.common.block.MarshmallowCanBlock; 7 | import doctor4t.astronomical.common.item.MarshmallowCanBlockItem; 8 | import net.minecraft.block.Block; 9 | import net.minecraft.block.Blocks; 10 | import net.minecraft.block.MapColor; 11 | import net.minecraft.block.piston.PistonBehavior; 12 | import net.minecraft.item.BlockItem; 13 | import net.minecraft.registry.Registries; 14 | import net.minecraft.registry.Registry; 15 | import net.minecraft.sound.BlockSoundGroup; 16 | import net.minecraft.util.Identifier; 17 | import org.quiltmc.qsl.block.extensions.api.QuiltBlockSettings; 18 | import org.quiltmc.qsl.item.setting.api.QuiltItemSettings; 19 | 20 | import java.util.LinkedHashMap; 21 | import java.util.Map; 22 | 23 | import static doctor4t.astronomical.common.init.ModItems.ITEMS; 24 | 25 | public interface ModBlocks { 26 | Map BLOCKS = new LinkedHashMap<>(); 27 | 28 | Block ASTRAL_DISPLAY = createBlock("astral_display", new AstralDisplayBlock(QuiltBlockSettings.copy(Blocks.OBSERVER).sounds(BlockSoundGroup.COPPER)), true); 29 | Block MARSHMALLOW_CAN = createBlock("marshmallow_can", new MarshmallowCanBlock(QuiltBlockSettings.create().mapColor(MapColor.METAL).breakInstantly().sounds(BlockSoundGroup.LANTERN).nonOpaque().pistonBehavior(PistonBehavior.DESTROY)), true); 30 | Block STARMALLOW_CAN = createBlock("starmallow_can", new MarshmallowCanBlock(QuiltBlockSettings.copy(MARSHMALLOW_CAN)), true); 31 | Block ASTRAL_LANTERN = createBlock("astral_lantern", new AstralLanternBlock(QuiltBlockSettings.copy(Blocks.LANTERN)), true); 32 | 33 | static void initialize() { 34 | BLOCKS.keySet().forEach(block -> Registry.register(Registries.BLOCK, BLOCKS.get(block), block)); 35 | } 36 | 37 | private static T createBlock(String name, T block, boolean createItem) { 38 | BLOCKS.put(block, Astronomical.id(name)); 39 | if (createItem) { 40 | var settings = new QuiltItemSettings(); 41 | if (block instanceof MarshmallowCanBlock) { 42 | settings.maxCount(1); 43 | ITEMS.put(new MarshmallowCanBlockItem(block, settings), BLOCKS.get(block)); 44 | } else { 45 | ITEMS.put(new BlockItem(block, settings), BLOCKS.get(block)); 46 | } 47 | } 48 | return block; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/structure/Star.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.structure; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.util.Vec2d; 5 | import net.minecraft.nbt.NbtCompound; 6 | import net.minecraft.util.Identifier; 7 | import net.minecraft.util.math.Vec3d; 8 | 9 | public class Star implements CelestialObject { 10 | public static final Identifier TEMPTEX = Astronomical.id("textures/vfx/temp.png"); 11 | private static final Identifier ID = Astronomical.id("star"); 12 | protected Vec3d directionalVector; 13 | private float size, alpha; 14 | private int color; 15 | private int randomOffset; 16 | 17 | public Star() { 18 | } 19 | 20 | public Star(Vec3d vec, float size, float alpha, int color, int randomOffset) { 21 | this.directionalVector = vec; 22 | this.size = size; 23 | this.alpha = alpha; 24 | this.color = color; 25 | this.randomOffset = randomOffset; 26 | } 27 | 28 | public static Vec3d decompressDirectionalVector(double pitch, double yaw) { 29 | return new Vec3d( 30 | Math.sin(yaw) * Math.cos(pitch), 31 | Math.sin(pitch), 32 | Math.cos(pitch) * Math.cos(yaw)); 33 | } 34 | 35 | @Override 36 | public boolean canInteract() { 37 | return false; 38 | } 39 | 40 | @Override 41 | public Identifier getId() { 42 | return ID; 43 | } 44 | 45 | @Override 46 | public Vec3d getDirectionVector() { 47 | return this.directionalVector; 48 | } 49 | 50 | @Override 51 | public float getSize() { 52 | return this.size; 53 | } 54 | 55 | @Override 56 | public float getAlpha() { 57 | return this.alpha; 58 | } 59 | 60 | @Override 61 | public int getColor() { 62 | return this.color; 63 | } 64 | 65 | @Override 66 | public int getRandomOffset() { 67 | return this.randomOffset; 68 | } 69 | 70 | @Override 71 | public void readNbt(NbtCompound nbt) { 72 | size = nbt.getFloat("s"); 73 | alpha = nbt.getFloat("a"); 74 | color = nbt.getInt("c"); 75 | randomOffset = nbt.getInt("o"); 76 | this.directionalVector = new Vec3d(nbt.getDouble("x"), nbt.getDouble("y"), nbt.getDouble("z")); 77 | } 78 | 79 | @Override 80 | public void writeNbt(NbtCompound nbt) { 81 | nbt.putFloat("s", size); 82 | nbt.putFloat("a", alpha); 83 | nbt.putFloat("c", color); 84 | nbt.putFloat("o", randomOffset); 85 | nbt.putDouble("x", directionalVector.x); 86 | nbt.putDouble("y", directionalVector.y); 87 | nbt.putDouble("z", directionalVector.z); 88 | } 89 | 90 | private Vec2d compressDirectionalVector() { 91 | return new Vec2d(Math.asin(directionalVector.y), Math.atan2(directionalVector.z, directionalVector.x)); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/structure/Starfall.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.structure; 2 | 3 | import doctor4t.astronomical.common.entity.FallenStarEntity; 4 | import doctor4t.astronomical.common.init.ModEntities; 5 | import doctor4t.astronomical.common.init.ModSoundEvents; 6 | import doctor4t.astronomical.common.util.Vec2d; 7 | import net.minecraft.nbt.NbtCompound; 8 | import net.minecraft.server.world.ServerWorld; 9 | import net.minecraft.sound.SoundCategory; 10 | import net.minecraft.util.math.Vec3d; 11 | import net.minecraft.world.World; 12 | 13 | public class Starfall { 14 | public static final float ANIMATION_EXTENSION = 1.5f; 15 | public final Vec3d startDirection, endPos; 16 | public int progress = 0; 17 | public int ticksUntilLanded; 18 | public boolean playedExplosion; 19 | 20 | public Starfall(NbtCompound n) { 21 | this.startDirection = new Vec3d(n.getDouble("x"), n.getDouble("y"), n.getDouble("z")); 22 | this.endPos = new Vec3d(n.getDouble("tgtX"), n.getDouble("tgtY"), n.getDouble("tgtZ")); 23 | this.progress = n.getInt("prog"); 24 | this.ticksUntilLanded = n.getInt("ticksUntilLanded"); 25 | this.playedExplosion = n.getBoolean("playedExplosion"); 26 | } 27 | 28 | public Starfall(int ticksUntilLanded, Vec3d startDirection, Vec3d end) { 29 | this.ticksUntilLanded = ticksUntilLanded; 30 | this.startDirection = startDirection; 31 | this.endPos = end; 32 | this.playedExplosion = false; 33 | } 34 | 35 | private static Vec2d compressDirectionalVector(Vec3d directionalVector) { 36 | return new Vec2d(Math.asin(-directionalVector.y), Math.atan2(directionalVector.x, directionalVector.z)); 37 | } 38 | 39 | public void writeNbt(NbtCompound nbt) { 40 | nbt.putInt("prog", progress); 41 | nbt.putInt("ticksUntilLanded", ticksUntilLanded); 42 | nbt.putDouble("tgtX", endPos.x); 43 | nbt.putDouble("tgtY", endPos.y); 44 | nbt.putDouble("tgtZ", endPos.z); 45 | nbt.putDouble("x", startDirection.x); 46 | nbt.putDouble("y", startDirection.y); 47 | nbt.putDouble("z", startDirection.z); 48 | nbt.putBoolean("playedExplosion", playedExplosion); 49 | } 50 | 51 | public void tick(World world) { 52 | progress++; 53 | if (progress == ticksUntilLanded && world instanceof ServerWorld serverWorld) { 54 | serverWorld.playSound(null, endPos.getX(), endPos.getY(), endPos.getZ(), ModSoundEvents.STAR_IMPACT, SoundCategory.AMBIENT, 20f, (float) (1f + world.random.nextGaussian() * .1f)); 55 | 56 | FallenStarEntity star = new FallenStarEntity(ModEntities.FALLEN_STAR, serverWorld); 57 | star.setPosition(endPos); 58 | world.spawnEntity(star); 59 | } 60 | } 61 | 62 | public boolean hasPlayedExplosion() { 63 | return playedExplosion; 64 | } 65 | 66 | public void setPlayedExplosion(boolean playedExplosion) { 67 | this.playedExplosion = playedExplosion; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/screen/AstralDisplayScreenHandler.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.screen; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.block.entity.AstralDisplayBlockEntity; 5 | import net.minecraft.entity.player.PlayerEntity; 6 | import net.minecraft.entity.player.PlayerInventory; 7 | import net.minecraft.inventory.Inventory; 8 | import net.minecraft.inventory.SimpleInventory; 9 | import net.minecraft.item.ItemStack; 10 | import net.minecraft.screen.ScreenHandler; 11 | import net.minecraft.screen.slot.Slot; 12 | import org.jetbrains.annotations.NotNull; 13 | 14 | public class AstralDisplayScreenHandler extends ScreenHandler { 15 | public Inventory inventory; 16 | public AstralDisplayBlockEntity entity; 17 | 18 | public AstralDisplayScreenHandler(int syncId, PlayerInventory playerInventory) { 19 | this(syncId, playerInventory, new SimpleInventory(5)); 20 | } 21 | 22 | public AstralDisplayScreenHandler(int syncId, @NotNull PlayerInventory playerInventory, Inventory inventory) { 23 | super(Astronomical.ASTRAL_DISPLAY_SCREEN_HANDLER, syncId); 24 | this.inventory = inventory; 25 | this.inventory.onOpen(playerInventory.player); 26 | if (this.inventory instanceof AstralDisplayBlockEntity blockEntity) { 27 | this.entity = blockEntity; 28 | } 29 | for (var i = 0; i < 5; i++) { 30 | this.addSlot(new Slot(inventory, i, 44 + i * 18, 11) { 31 | public boolean canInsert(ItemStack stack) { 32 | return AstralDisplayBlockEntity.isAstral(stack); 33 | } 34 | }); 35 | } 36 | for (var i = 0; i < 3; i++) { 37 | for (var j = 0; j < 9; j++) { 38 | this.addSlot(new Slot(playerInventory, j + i * 9 + 9, 8 + j * 18, 93 + i * 18)); 39 | } 40 | } 41 | for (var i = 0; i < 9; i++) { 42 | this.addSlot(new Slot(playerInventory, i, 8 + i * 18, 151)); 43 | } 44 | } 45 | 46 | public AstralDisplayBlockEntity entity() { 47 | return this.entity; 48 | } 49 | 50 | @Override 51 | public boolean canUse(PlayerEntity player) { 52 | return this.inventory.canPlayerUse(player); 53 | } 54 | 55 | @Override 56 | public void close(PlayerEntity player) { 57 | super.close(player); 58 | this.inventory.onClose(player); 59 | } 60 | 61 | @Override 62 | public ItemStack quickTransfer(PlayerEntity player, int index) { 63 | ItemStack itemStack = ItemStack.EMPTY; 64 | Slot slot = this.slots.get(index); 65 | if (slot.hasStack()) { 66 | ItemStack itemStack2 = slot.getStack(); 67 | itemStack = itemStack2.copy(); 68 | if (index < 5 ? !this.insertItem(itemStack2, 5, 41, true) : !this.insertItem(itemStack2, 0, 5, false)) { 69 | return ItemStack.EMPTY; 70 | } 71 | if (itemStack2.isEmpty()) { 72 | slot.setStack(ItemStack.EMPTY); 73 | } else { 74 | slot.markDirty(); 75 | } 76 | } 77 | this.entity.onInventoryChanged(this.inventory); 78 | return itemStack; 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/AstralFragmentTinkleItemEntityMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.init.ModItems; 5 | import net.minecraft.client.MinecraftClient; 6 | import net.minecraft.entity.Entity; 7 | import net.minecraft.entity.EntityType; 8 | import net.minecraft.entity.ItemEntity; 9 | import net.minecraft.item.ItemStack; 10 | import net.minecraft.util.math.MathHelper; 11 | import net.minecraft.util.random.RandomGenerator; 12 | import net.minecraft.world.World; 13 | import org.spongepowered.asm.mixin.Final; 14 | import org.spongepowered.asm.mixin.Mixin; 15 | import org.spongepowered.asm.mixin.Shadow; 16 | import org.spongepowered.asm.mixin.injection.At; 17 | import org.spongepowered.asm.mixin.injection.Inject; 18 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 19 | import team.lodestar.lodestone.setup.LodestoneParticles; 20 | import team.lodestar.lodestone.systems.rendering.particle.Easing; 21 | import team.lodestar.lodestone.systems.rendering.particle.WorldParticleBuilder; 22 | import team.lodestar.lodestone.systems.rendering.particle.data.ColorParticleData; 23 | import team.lodestar.lodestone.systems.rendering.particle.data.GenericParticleData; 24 | import team.lodestar.lodestone.systems.rendering.particle.data.SpinParticleData; 25 | 26 | @Mixin(ItemEntity.class) 27 | public abstract class AstralFragmentTinkleItemEntityMixin extends Entity { 28 | @Shadow 29 | @Final 30 | public float uniqueOffset; 31 | 32 | public AstralFragmentTinkleItemEntityMixin(EntityType type, World world) { 33 | super(type, world); 34 | } 35 | 36 | @Shadow 37 | public abstract int getItemAge(); 38 | 39 | @Shadow 40 | public abstract ItemStack getStack(); 41 | 42 | @Inject(method = "tick", at = @At("TAIL")) 43 | public void tick(CallbackInfo ci) { 44 | if (this.getStack().isOf(ModItems.ASTRAL_FRAGMENT)) { 45 | RandomGenerator random = RandomGenerator.createLegacy(); 46 | 47 | if (random.nextInt(5) == 0) { 48 | float l = MathHelper.sin(((float) this.getItemAge() + MinecraftClient.getInstance().getTickDelta()) / 10.0F + this.uniqueOffset) * 0.1F + 0.1F; 49 | 50 | WorldParticleBuilder.create(LodestoneParticles.TWINKLE_PARTICLE) 51 | .setScaleData(GenericParticleData.create(.05f + random.nextFloat() * .1f).build()) 52 | .setColorData(ColorParticleData.create(Astronomical.STAR_PURPLE, Astronomical.STAR_PURPLE).build()) 53 | .setTransparencyData(GenericParticleData.create(0, 1f, 0).setEasing(Easing.QUAD_OUT, Easing.SINE_OUT).build()) 54 | .enableNoClip() 55 | .setLifetime(20) 56 | .setSpinData(SpinParticleData.create((float) (random.nextGaussian() / 20f)).setSpinOffset(random.nextFloat() * 360f).build()) 57 | .setRandomOffset(.2F) 58 | .spawn(getWorld(), this.getX() + (l + 0.25F * .1f), this.getY() + .4f, this.getZ()); 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/resources/assets/astronomical/models/block/astral_lantern.json: -------------------------------------------------------------------------------- 1 | { 2 | "credit": "Made with Blockbench", 3 | "texture_size": [32, 16], 4 | "textures": { 5 | "0": "astronomical:block/astral_lantern", 6 | "particle": "astronomical:block/astral_lantern" 7 | }, 8 | "elements": [ 9 | { 10 | "from": [0, 0, 8], 11 | "to": [16, 16, 8], 12 | "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, 13 | "faces": { 14 | "north": {"uv": [0, 0, 8, 16], "texture": "#0"}, 15 | "south": {"uv": [0, 0, 8, 16], "texture": "#0"} 16 | } 17 | }, 18 | { 19 | "from": [8, 0, 0], 20 | "to": [8, 16, 16], 21 | "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, 22 | "faces": { 23 | "east": {"uv": [0, 0, 8, 16], "texture": "#0"}, 24 | "west": {"uv": [0, 0, 8, 16], "texture": "#0"} 25 | } 26 | }, 27 | { 28 | "from": [0, 8, 0], 29 | "to": [16, 8, 16], 30 | "rotation": {"angle": 45, "axis": "y", "origin": [8, 8, 8]}, 31 | "faces": { 32 | "up": {"uv": [0, 0, 8, 16], "texture": "#0"}, 33 | "down": {"uv": [0, 0, 8, 16], "texture": "#0"} 34 | } 35 | }, 36 | { 37 | "from": [8, 7, 3], 38 | "to": [10, 9, 3], 39 | "rotation": {"angle": 45, "axis": "x", "origin": [8, 8, 8]}, 40 | "faces": { 41 | "north": {"uv": [8, 0, 9, 2], "texture": "#0"} 42 | } 43 | }, 44 | { 45 | "from": [3, 7, 6], 46 | "to": [3, 9, 8], 47 | "rotation": {"angle": -45, "axis": "z", "origin": [8, 8, 8]}, 48 | "faces": { 49 | "west": {"uv": [8, 0, 9, 2], "texture": "#0"} 50 | } 51 | }, 52 | { 53 | "from": [6, 7, 13], 54 | "to": [8, 9, 13], 55 | "rotation": {"angle": -45, "axis": "x", "origin": [8, 8, 8]}, 56 | "faces": { 57 | "south": {"uv": [8, 0, 9, 2], "texture": "#0"} 58 | } 59 | }, 60 | { 61 | "from": [8, 7, 13], 62 | "to": [10, 9, 13], 63 | "rotation": {"angle": 45, "axis": "x", "origin": [8, 8, 8]}, 64 | "faces": { 65 | "south": {"uv": [8, 0, 9, 2], "texture": "#0"} 66 | } 67 | }, 68 | { 69 | "from": [13, 7, 6], 70 | "to": [13, 9, 8], 71 | "rotation": {"angle": -45, "axis": "z", "origin": [8, 8, 8]}, 72 | "faces": { 73 | "east": {"uv": [8, 0, 9, 2], "texture": "#0"} 74 | } 75 | }, 76 | { 77 | "from": [6, 3, 7], 78 | "to": [8, 3, 9], 79 | "rotation": {"angle": 45, "axis": "x", "origin": [8, 8, 8]}, 80 | "faces": { 81 | "down": {"uv": [8, 0, 9, 2], "rotation": 180, "texture": "#0"} 82 | } 83 | }, 84 | { 85 | "from": [3, 7, 8], 86 | "to": [3, 9, 10], 87 | "rotation": {"angle": 45, "axis": "z", "origin": [8, 8, 8]}, 88 | "faces": { 89 | "west": {"uv": [8, 0, 9, 2], "texture": "#0"} 90 | } 91 | }, 92 | { 93 | "from": [7, 13, 8], 94 | "to": [9, 13, 10], 95 | "rotation": {"angle": -45, "axis": "z", "origin": [8, 8, 8]}, 96 | "faces": { 97 | "up": {"uv": [8, 0, 9, 2], "rotation": 270, "texture": "#0"} 98 | } 99 | } 100 | ] 101 | } -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/item/NanoRingItem.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.item; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.screen.RingColorScreenHandler; 5 | import net.minecraft.client.item.TooltipContext; 6 | import net.minecraft.entity.player.PlayerEntity; 7 | import net.minecraft.item.ItemStack; 8 | import net.minecraft.screen.SimpleNamedScreenHandlerFactory; 9 | import net.minecraft.text.Text; 10 | import net.minecraft.util.Hand; 11 | import net.minecraft.util.Identifier; 12 | import net.minecraft.util.TypedActionResult; 13 | import net.minecraft.world.World; 14 | import org.jetbrains.annotations.Nullable; 15 | 16 | import java.awt.*; 17 | import java.util.List; 18 | import java.util.Random; 19 | 20 | import static net.minecraft.text.Style.EMPTY; 21 | 22 | public class NanoRingItem extends NanoAstralObjectItem { 23 | public NanoRingItem(Settings settings) { 24 | super(settings); 25 | } 26 | 27 | 28 | @Override 29 | public void appendTooltip(ItemStack stack, @Nullable World world, List tooltip, TooltipContext context) { 30 | Color color = new Color(stack.getOrCreateSubNbt(Astronomical.MOD_ID).getInt("color")); 31 | String texture = stack.getOrCreateSubNbt(Astronomical.MOD_ID).getString("texture"); 32 | int size = stack.getOrCreateSubNbt(Astronomical.MOD_ID).getInt("size"); 33 | 34 | tooltip.add(Text.literal("Texture: " + texture)); 35 | tooltip.add(Text.literal("Color: ").append(Text.literal(String.format("#%02X%02X%02X", color.getRed(), color.getGreen(), color.getBlue())).setStyle(EMPTY.withColor(color.getRGB())))); 36 | tooltip.add(Text.literal("Size: " + size).setStyle(EMPTY)); 37 | 38 | super.appendTooltip(stack, world, tooltip, context); 39 | } 40 | 41 | @Override 42 | public TypedActionResult use(World world, PlayerEntity user, Hand hand) { 43 | user.openHandledScreen(new SimpleNamedScreenHandlerFactory((syncId, playerInventory, playerx) -> new RingColorScreenHandler(syncId, playerInventory), Text.literal(""))); 44 | 45 | return super.use(world, user, hand); 46 | } 47 | 48 | public enum RingTexture { 49 | PARTICLES(Astronomical.id("textures/astral_object/ring/particles.png")), 50 | ASTEROIDS(Astronomical.id("textures/astral_object/ring/asteroids.png")), 51 | ORGANIC(Astronomical.id("textures/astral_object/ring/organic.png")), 52 | HALO(Astronomical.id("textures/astral_object/ring/halo.png")), 53 | DUST(Astronomical.id("textures/astral_object/ring/dust.png")); 54 | 55 | 56 | private static final List VALUES = List.of(values()); 57 | public static final int SIZE = VALUES.size(); 58 | private static final Random RANDOM = new Random(); 59 | public final Identifier texture; 60 | 61 | RingTexture(Identifier texture) { 62 | this.texture = texture; 63 | } 64 | 65 | public static RingTexture byName(String name) { 66 | for (RingTexture ringTexture : values()) { 67 | if (ringTexture.name().equals(name)) { 68 | return ringTexture; 69 | } 70 | } 71 | return PARTICLES; 72 | } 73 | 74 | public static RingTexture getRandom() { 75 | return VALUES.get(RANDOM.nextInt(SIZE)); 76 | } 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/item/AstralBundleItem.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.item; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.init.ModItems; 5 | import net.minecraft.entity.player.PlayerEntity; 6 | import net.minecraft.item.Item; 7 | import net.minecraft.item.ItemStack; 8 | import net.minecraft.sound.SoundEvents; 9 | import net.minecraft.util.Hand; 10 | import net.minecraft.util.TypedActionResult; 11 | import net.minecraft.world.World; 12 | 13 | import java.awt.*; 14 | 15 | public class AstralBundleItem extends Item { 16 | public Type type; 17 | 18 | public AstralBundleItem(Settings settings, Type type) { 19 | super(settings); 20 | this.type = type; 21 | } 22 | 23 | @Override 24 | public TypedActionResult use(World world, PlayerEntity user, Hand hand) { 25 | 26 | ItemStack retItemStack = ItemStack.EMPTY; 27 | 28 | switch (type) { 29 | case PLANET -> { 30 | retItemStack = new ItemStack(ModItems.NANO_PLANET); 31 | retItemStack.getOrCreateSubNbt(Astronomical.MOD_ID).putInt("color1", new Color(user.getRandom().nextFloat(), user.getRandom().nextFloat(), user.getRandom().nextFloat()).getRGB()); 32 | retItemStack.getOrCreateSubNbt(Astronomical.MOD_ID).putInt("color2", new Color(user.getRandom().nextFloat(), user.getRandom().nextFloat(), user.getRandom().nextFloat()).getRGB()); 33 | retItemStack.getOrCreateSubNbt(Astronomical.MOD_ID).putInt("size", 1 + user.getRandom().nextInt(10)); 34 | String texture = NanoPlanetItem.PlanetTexture.getRandom().name(); 35 | retItemStack.getOrCreateSubNbt(Astronomical.MOD_ID).putString("texture", texture); 36 | } 37 | case STAR -> { 38 | retItemStack = new ItemStack(ModItems.NANO_STAR); 39 | int temp = Astronomical.getRandomStarTemperature(user.getRandom()); 40 | retItemStack.getOrCreateSubNbt(Astronomical.MOD_ID).putInt("temperature", temp); 41 | retItemStack.getOrCreateSubNbt(Astronomical.MOD_ID).putInt("size", 1 + user.getRandom().nextInt(10)); 42 | } 43 | case COSMOS -> { 44 | retItemStack = new ItemStack(ModItems.NANO_COSMOS); 45 | retItemStack.getOrCreateSubNbt(Astronomical.MOD_ID).putInt("size", 1 + user.getRandom().nextInt(100)); 46 | String texture = NanoCosmosItem.CosmosTexture.getRandom().name(); 47 | retItemStack.getOrCreateSubNbt(Astronomical.MOD_ID).putString("texture", texture); 48 | } 49 | case RING -> { 50 | retItemStack = new ItemStack(ModItems.NANO_RING); 51 | retItemStack.getOrCreateSubNbt(Astronomical.MOD_ID).putInt("size", 1 + user.getRandom().nextInt(20)); 52 | retItemStack.getOrCreateSubNbt(Astronomical.MOD_ID).putInt("color", new Color(user.getRandom().nextFloat(), user.getRandom().nextFloat(), user.getRandom().nextFloat()).getRGB()); 53 | String texture = NanoRingItem.RingTexture.getRandom().name(); 54 | retItemStack.getOrCreateSubNbt(Astronomical.MOD_ID).putString("texture", texture); 55 | } 56 | } 57 | 58 | user.playSound(SoundEvents.ITEM_BUNDLE_DROP_CONTENTS, 1.0f, 1.0f); 59 | user.giveItemStack(retItemStack); 60 | return TypedActionResult.success(user.getStackInHand(hand)); 61 | } 62 | 63 | public enum Type { 64 | PLANET, STAR, COSMOS, RING 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /gradlew.bat: -------------------------------------------------------------------------------- 1 | @rem 2 | @rem Copyright 2015 the original author or authors. 3 | @rem 4 | @rem Licensed under the Apache License, Version 2.0 (the "License"); 5 | @rem you may not use this file except in compliance with the License. 6 | @rem You may obtain a copy of the License at 7 | @rem 8 | @rem https://www.apache.org/licenses/LICENSE-2.0 9 | @rem 10 | @rem Unless required by applicable law or agreed to in writing, software 11 | @rem distributed under the License is distributed on an "AS IS" BASIS, 12 | @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | @rem See the License for the specific language governing permissions and 14 | @rem limitations under the License. 15 | @rem 16 | 17 | @if "%DEBUG%"=="" @echo off 18 | @rem ########################################################################## 19 | @rem 20 | @rem Gradle startup script for Windows 21 | @rem 22 | @rem ########################################################################## 23 | 24 | @rem Set local scope for the variables with windows NT shell 25 | if "%OS%"=="Windows_NT" setlocal 26 | 27 | set DIRNAME=%~dp0 28 | if "%DIRNAME%"=="" set DIRNAME=. 29 | @rem This is normally unused 30 | set APP_BASE_NAME=%~n0 31 | set APP_HOME=%DIRNAME% 32 | 33 | @rem Resolve any "." and ".." in APP_HOME to make it shorter. 34 | for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi 35 | 36 | @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. 37 | set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" 38 | 39 | @rem Find java.exe 40 | if defined JAVA_HOME goto findJavaFromJavaHome 41 | 42 | set JAVA_EXE=java.exe 43 | %JAVA_EXE% -version >NUL 2>&1 44 | if %ERRORLEVEL% equ 0 goto execute 45 | 46 | echo. 47 | echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 48 | echo. 49 | echo Please set the JAVA_HOME variable in your environment to match the 50 | echo location of your Java installation. 51 | 52 | goto fail 53 | 54 | :findJavaFromJavaHome 55 | set JAVA_HOME=%JAVA_HOME:"=% 56 | set JAVA_EXE=%JAVA_HOME%/bin/java.exe 57 | 58 | if exist "%JAVA_EXE%" goto execute 59 | 60 | echo. 61 | echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 62 | echo. 63 | echo Please set the JAVA_HOME variable in your environment to match the 64 | echo location of your Java installation. 65 | 66 | goto fail 67 | 68 | :execute 69 | @rem Setup the command line 70 | 71 | set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar 72 | 73 | 74 | @rem Execute Gradle 75 | "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %* 76 | 77 | :end 78 | @rem End local scope for the variables with windows NT shell 79 | if %ERRORLEVEL% equ 0 goto mainEnd 80 | 81 | :fail 82 | rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of 83 | rem the _cmd.exe /c_ return code! 84 | set EXIT_CODE=%ERRORLEVEL% 85 | if %EXIT_CODE% equ 0 set EXIT_CODE=1 86 | if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE% 87 | exit /b %EXIT_CODE% 88 | 89 | :mainEnd 90 | if "%OS%"=="Windows_NT" endlocal 91 | 92 | :omega 93 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/InGameHudMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import com.mojang.blaze3d.systems.RenderSystem; 4 | import doctor4t.astronomical.common.Astronomical; 5 | import doctor4t.astronomical.common.item.MarshmallowStickItem; 6 | import net.minecraft.client.MinecraftClient; 7 | import net.minecraft.client.gui.GuiGraphics; 8 | import net.minecraft.client.gui.hud.InGameHud; 9 | import net.minecraft.client.render.GameRenderer; 10 | import net.minecraft.util.Identifier; 11 | import net.minecraft.world.GameMode; 12 | import org.spongepowered.asm.mixin.Final; 13 | import org.spongepowered.asm.mixin.Mixin; 14 | import org.spongepowered.asm.mixin.Shadow; 15 | import org.spongepowered.asm.mixin.Unique; 16 | import org.spongepowered.asm.mixin.injection.At; 17 | import org.spongepowered.asm.mixin.injection.Inject; 18 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 19 | 20 | @Mixin(InGameHud.class) 21 | public abstract class InGameHudMixin { 22 | @Unique 23 | private static final Identifier MARSHMALLOW_TEXTURE = Astronomical.id("textures/gui/marshmallow.png"); 24 | @Shadow 25 | @Final 26 | private MinecraftClient client; 27 | @Shadow 28 | private int scaledWidth; 29 | @Shadow 30 | private int scaledHeight; 31 | 32 | @Unique 33 | private static MarshmallowStickItem.CookState getStateAtI(int i) { 34 | var states = MarshmallowStickItem.CookState.values(); 35 | var state = states[states.length - 1]; 36 | for (var cookState : states) { 37 | if (cookState.next().cookTime / 10 >= i) { 38 | return cookState; 39 | } 40 | } 41 | return state; 42 | } 43 | 44 | @Inject(method = "render", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/gui/hud/InGameHud;renderHotbar(FLnet/minecraft/client/gui/GuiGraphics;)V", shift = At.Shift.AFTER)) 45 | private void astronomical$renderCrosshair(GuiGraphics graphics, float tickDelta, CallbackInfo ci) { 46 | var gameOptions = this.client.options; 47 | if (!gameOptions.getPerspective().isFirstPerson() || this.client.interactionManager == null || this.client.interactionManager.getCurrentGameMode() == GameMode.SPECTATOR) { 48 | return; 49 | } 50 | var player = this.client.player; 51 | if (player == null || !(player.getMainHandStack().getItem() instanceof MarshmallowStickItem)) { 52 | return; 53 | } 54 | if (player.astronomical$isHoldingAttack() && player.isCreative()) { 55 | var width = MarshmallowStickItem.CookState.values()[MarshmallowStickItem.CookState.values().length - 1].cookTime / 10 + 6; 56 | var x = this.scaledWidth / 2 - width / 2; 57 | var y = this.scaledHeight / 2 + 9; 58 | var progress = player.getMainHandStack().getOrCreateNbt().getInt("RoastTicks") / 10 + 1; 59 | RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F); 60 | RenderSystem.setShader(GameRenderer::getPositionTexShader); 61 | RenderSystem.enableBlend(); 62 | RenderSystem.defaultBlendFunc(); 63 | for (var i = 0; i < width; i++) { 64 | var progressed = i <= progress; 65 | var state = getStateAtI(i); 66 | var rgb = new float[]{state.color >> 16 & 255, state.color >> 8 & 255, state.color & 255, state.color >> 24 & 255}; 67 | RenderSystem.setShaderColor(rgb[0] / 255, rgb[1] / 255, rgb[2] / 255, 1.0f); 68 | var u = i < 4 ? i : i > width - 5 ? 7 + i - width + 4 : 5; 69 | graphics.drawTexture(MARSHMALLOW_TEXTURE, x + i, y, u, progressed ? 5 : 0, 2, 5, 16, 16); 70 | } 71 | RenderSystem.disableBlend(); 72 | } 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/client/render/entity/block/AstralLanternBlockEntityRenderer.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.client.render.entity.block; 2 | 3 | import doctor4t.astronomical.client.AstronomicalClient; 4 | import doctor4t.astronomical.common.Astronomical; 5 | import doctor4t.astronomical.common.block.entity.AstralLanternBlockEntity; 6 | import doctor4t.astronomical.common.init.ModParticles; 7 | import net.minecraft.client.render.VertexConsumerProvider; 8 | import net.minecraft.client.render.block.entity.BlockEntityRenderer; 9 | import net.minecraft.client.render.block.entity.BlockEntityRendererFactory; 10 | import net.minecraft.client.util.math.MatrixStack; 11 | import net.minecraft.util.math.Vec3d; 12 | import net.minecraft.world.World; 13 | import team.lodestar.lodestone.systems.rendering.particle.WorldParticleBuilder; 14 | import team.lodestar.lodestone.systems.rendering.particle.data.ColorParticleData; 15 | import team.lodestar.lodestone.systems.rendering.particle.data.GenericParticleData; 16 | import team.lodestar.lodestone.systems.rendering.particle.data.SpinParticleData; 17 | 18 | public class AstralLanternBlockEntityRenderer implements BlockEntityRenderer { 19 | public AstralLanternBlockEntityRenderer(BlockEntityRendererFactory.Context context) { 20 | } 21 | 22 | @Override 23 | public void render(T entity, float tickDelta, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay) { 24 | if (AstronomicalClient.renderStarsThisTick) { 25 | Vec3d blockPosMiddle = Vec3d.ofCenter(entity.getPos()); 26 | float scale = .3f; 27 | World world = entity.getWorld(); 28 | 29 | if (world != null) { 30 | WorldParticleBuilder.create(ModParticles.FALLEN_STAR) 31 | .setScaleData(GenericParticleData.create((.8f + world.random.nextFloat() / 3f) * scale).build()) 32 | .setColorData(ColorParticleData.create(Astronomical.STAR_PURPLE, Astronomical.STAR_PURPLE).build()) 33 | .setTransparencyData(GenericParticleData.create(0, 0.3f, 0).build()) 34 | .enableNoClip() 35 | .setLifetime(20) 36 | .setSpinData(SpinParticleData.create((float) (world.random.nextGaussian() / 100f)).setSpinOffset(world.random.nextFloat() * 360f).build()) 37 | .spawn(world, blockPosMiddle.getX(), blockPosMiddle.getY(), blockPosMiddle.getZ()); 38 | 39 | WorldParticleBuilder.create(ModParticles.STAR_IMPACT_FLARE) 40 | .setScaleData(GenericParticleData.create((6f + world.random.nextFloat() * 5f) * scale).build()) 41 | .setColorData(ColorParticleData.create(Astronomical.STAR_PURPLE, Astronomical.STAR_PURPLE).build()) 42 | .setTransparencyData(GenericParticleData.create(0, 0.2f, 0).build()) 43 | .enableNoClip() 44 | .setLifetime(20) 45 | .setSpinData(SpinParticleData.create((float) (world.random.nextGaussian() / 100f)).setSpinOffset(world.random.nextFloat() * 360f).build()) 46 | .spawn(world, blockPosMiddle.getX(), blockPosMiddle.getY(), blockPosMiddle.getZ()); 47 | 48 | WorldParticleBuilder.create(ModParticles.FALLEN_STAR) 49 | .setScaleData(GenericParticleData.create((.2f + world.random.nextFloat() / 10f) * scale).build()) 50 | .setColorData(ColorParticleData.create(Astronomical.STAR_PURPLE, Astronomical.STAR_PURPLE).build()) 51 | .setTransparencyData(GenericParticleData.create(0, .5f, 0).build()) 52 | .enableNoClip() 53 | .setLifetime(20 + world.random.nextInt(20)) 54 | .setSpinData(SpinParticleData.create((float) (world.random.nextGaussian() / 50f)).setSpinOffset(world.random.nextFloat() * 360f).build()) 55 | .setRandomOffset((world.random.nextFloat() * Math.signum(world.random.nextGaussian()) * 10f) * scale) 56 | .spawn(world, blockPosMiddle.getX(), blockPosMiddle.getY(), blockPosMiddle.getZ()); 57 | } 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/item/NanoPlanetItem.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.item; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.screen.PlanetColorScreenHandler; 5 | import net.minecraft.client.item.TooltipContext; 6 | import net.minecraft.entity.player.PlayerEntity; 7 | import net.minecraft.item.ItemStack; 8 | import net.minecraft.screen.SimpleNamedScreenHandlerFactory; 9 | import net.minecraft.text.Text; 10 | import net.minecraft.util.Hand; 11 | import net.minecraft.util.Identifier; 12 | import net.minecraft.util.TypedActionResult; 13 | import net.minecraft.world.World; 14 | import org.jetbrains.annotations.Nullable; 15 | 16 | import java.awt.*; 17 | import java.util.List; 18 | import java.util.Random; 19 | 20 | import static net.minecraft.text.Style.EMPTY; 21 | 22 | public class NanoPlanetItem extends NanoAstralObjectItem { 23 | public NanoPlanetItem(Settings settings) { 24 | super(settings); 25 | } 26 | 27 | @Override 28 | public void appendTooltip(ItemStack stack, @Nullable World world, List tooltip, TooltipContext context) { 29 | Color color1 = new Color(stack.getOrCreateSubNbt(Astronomical.MOD_ID).getInt("color1")); 30 | Color color2 = new Color(stack.getOrCreateSubNbt(Astronomical.MOD_ID).getInt("color2")); 31 | String texture = stack.getOrCreateSubNbt(Astronomical.MOD_ID).getString("texture"); 32 | int size = stack.getOrCreateSubNbt(Astronomical.MOD_ID).getInt("size"); 33 | 34 | tooltip.add(Text.literal("Texture: " + texture)); 35 | tooltip.add(Text.literal("Colors: ").append(Text.literal(String.format("#%02X%02X%02X", color1.getRed(), color1.getGreen(), color1.getBlue())).setStyle(EMPTY.withColor(color1.getRGB()))).append(Text.literal(" " + String.format("#%02X%02X%02X", color2.getRed(), color2.getGreen(), color2.getBlue())).setStyle(EMPTY.withColor(color2.getRGB())))); 36 | tooltip.add(Text.literal("Size: " + size).setStyle(EMPTY)); 37 | 38 | super.appendTooltip(stack, world, tooltip, context); 39 | } 40 | 41 | @Override 42 | public TypedActionResult use(World world, PlayerEntity user, Hand hand) { 43 | user.openHandledScreen(new SimpleNamedScreenHandlerFactory((syncId, playerInventory, playerx) -> new PlanetColorScreenHandler(syncId, playerInventory), Text.literal(""))); 44 | 45 | return super.use(world, user, hand); 46 | } 47 | 48 | public enum PlanetTexture { 49 | ACID(Astronomical.id("textures/astral_object/planet/acid.png")), 50 | ATMOSPHERE(Astronomical.id("textures/astral_object/planet/atmosphere.png")), 51 | CLOUDS(Astronomical.id("textures/astral_object/planet/clouds.png")), 52 | CRATERS(Astronomical.id("textures/astral_object/planet/craters.png")), 53 | HAZE(Astronomical.id("textures/astral_object/planet/haze.png")), 54 | HOME(Astronomical.id("textures/astral_object/planet/home.png")), 55 | ICE(Astronomical.id("textures/astral_object/planet/ice.png")), 56 | ROCK(Astronomical.id("textures/astral_object/planet/rock.png")), 57 | STRIPES(Astronomical.id("textures/astral_object/planet/stripes.png")), 58 | SWIRL(Astronomical.id("textures/astral_object/planet/swirl.png")); 59 | 60 | 61 | private static final List VALUES = List.of(values()); 62 | public static final int SIZE = VALUES.size(); 63 | private static final Random RANDOM = new Random(); 64 | public final Identifier texture; 65 | 66 | PlanetTexture(Identifier texture) { 67 | this.texture = texture; 68 | } 69 | 70 | public static PlanetTexture byName(String name) { 71 | for (PlanetTexture planetTexture : values()) { 72 | if (planetTexture.name().equals(name)) { 73 | return planetTexture; 74 | } 75 | } 76 | return HOME; 77 | } 78 | 79 | public static PlanetTexture getRandom() { 80 | return VALUES.get(RANDOM.nextInt(SIZE)); 81 | } 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/AstralObjectItemRendererMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import doctor4t.astronomical.client.AstronomicalClient; 4 | import doctor4t.astronomical.client.render.world.AstraWorldVFXBuilder; 5 | import doctor4t.astronomical.common.init.ModItems; 6 | import doctor4t.astronomical.common.item.NanoAstralObjectItem; 7 | import net.minecraft.client.MinecraftClient; 8 | import net.minecraft.client.render.VertexConsumerProvider; 9 | import net.minecraft.client.render.item.ItemRenderer; 10 | import net.minecraft.client.render.model.BakedModel; 11 | import net.minecraft.client.render.model.json.ModelTransformationMode; 12 | import net.minecraft.client.util.math.MatrixStack; 13 | import net.minecraft.item.ItemStack; 14 | import net.minecraft.util.math.Axis; 15 | import org.spongepowered.asm.mixin.Mixin; 16 | import org.spongepowered.asm.mixin.Unique; 17 | import org.spongepowered.asm.mixin.injection.At; 18 | import org.spongepowered.asm.mixin.injection.Inject; 19 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 20 | import team.lodestar.lodestone.systems.rendering.VFXBuilders; 21 | 22 | @Mixin(ItemRenderer.class) 23 | public abstract class AstralObjectItemRendererMixin { 24 | @Unique 25 | VFXBuilders.WorldVFXBuilder builder = new AstraWorldVFXBuilder().setPosColorTexLightmapDefaultFormat(); 26 | 27 | @Inject(method = "renderItem(Lnet/minecraft/item/ItemStack;Lnet/minecraft/client/render/model/json/ModelTransformationMode;ZLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;IILnet/minecraft/client/render/model/BakedModel;)V", at = @At("HEAD")) 28 | public void renderItem( 29 | ItemStack stack, ModelTransformationMode renderMode, boolean leftHanded, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, int overlay, BakedModel model, CallbackInfo ci 30 | ) { 31 | if (stack.getItem() instanceof NanoAstralObjectItem) { 32 | matrices.push(); 33 | 34 | boolean delayRender = false; 35 | 36 | float scale = .25f; 37 | if (renderMode == ModelTransformationMode.GROUND) { 38 | scale = .13f; 39 | matrices.translate(0, .13, .0); 40 | } else if (renderMode == ModelTransformationMode.FIRST_PERSON_RIGHT_HAND) { 41 | matrices.multiply(Axis.X_POSITIVE.rotationDegrees(-45f)); 42 | matrices.multiply(Axis.Y_POSITIVE.rotationDegrees(-90f)); 43 | matrices.translate(.2, .10, -(stack.isOf(ModItems.NANO_RING) ? .06 : .1)); 44 | scale = .17f; 45 | } else if (renderMode == ModelTransformationMode.FIRST_PERSON_LEFT_HAND) { 46 | matrices.multiply(Axis.X_POSITIVE.rotationDegrees(-45f)); 47 | matrices.multiply(Axis.Y_POSITIVE.rotationDegrees(90f)); 48 | matrices.translate(-.2, .10, -(stack.isOf(ModItems.NANO_RING) ? .06 : .1)); 49 | scale = .17f; 50 | } else if (renderMode == ModelTransformationMode.FIXED) { 51 | matrices.multiply(Axis.Y_POSITIVE.rotationDegrees(-180f)); 52 | matrices.translate(0, -.03, -.05); 53 | if (stack.isOf(ModItems.NANO_RING)) 54 | delayRender = true; 55 | scale = .28f; 56 | } else if (renderMode == ModelTransformationMode.THIRD_PERSON_LEFT_HAND || renderMode == ModelTransformationMode.THIRD_PERSON_RIGHT_HAND) { 57 | scale = .14f; 58 | matrices.translate(0, .2, .07); 59 | } 60 | float time = ((float) (MinecraftClient.getInstance().world.getTime() % 2400000L) + MinecraftClient.getInstance().getTickDelta()); 61 | 62 | matrices.scale(1f, 1, 0.01f); 63 | matrices.scale(scale, scale, scale); 64 | 65 | matrices.multiply(Axis.X_POSITIVE.rotationDegrees(stack.isOf(ModItems.NANO_RING) ? 90f : 15f)); 66 | matrices.multiply(Axis.Y_POSITIVE.rotationDegrees(time)); 67 | AstronomicalClient.renderAstralObject(matrices, vertexConsumers, this.builder, stack, 20, time, delayRender); 68 | matrices.pop(); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/common/structure/InteractableStar.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.common.structure; 2 | 3 | import doctor4t.astronomical.common.Astronomical; 4 | import doctor4t.astronomical.common.init.ModStatusEffects; 5 | import net.minecraft.client.MinecraftClient; 6 | import net.minecraft.nbt.NbtCompound; 7 | import net.minecraft.util.Identifier; 8 | import net.minecraft.util.math.MathHelper; 9 | import net.minecraft.util.math.Vec3d; 10 | import net.minecraft.world.World; 11 | import team.lodestar.lodestone.systems.rendering.particle.Easing; 12 | 13 | import java.util.function.Consumer; 14 | 15 | public class InteractableStar extends Star { 16 | public static final Identifier INTERACTABLE_TEX = Astronomical.id("textures/vfx/interactable.png"); 17 | public static final Identifier SUPERNOVA_TEX = Astronomical.id("textures/vfx/supernova.png"); 18 | public static final Identifier SUPERNOVA_DUST_TEX = Astronomical.id("textures/vfx/supernova_dust.png"); 19 | private static final Identifier ID = Astronomical.id("supernoveable"); 20 | public static int FULL_COLLAPSE_TICKS = 100; 21 | public static int HOLD_COLLAPSE_TICKS = FULL_COLLAPSE_TICKS + 10; 22 | public static int EXPLOSION_TICKS = HOLD_COLLAPSE_TICKS + 1000; 23 | public static int START_FADE_OUT_TICKS = HOLD_COLLAPSE_TICKS + 800; 24 | public static int STARFALL_TICKS = HOLD_COLLAPSE_TICKS + 200; 25 | public boolean subjectForTermination = false; 26 | public int supernovaTicks = 0; 27 | public Consumer crossFire; 28 | 29 | public InteractableStar(Vec3d vec, float size, float alpha, int color, int randomOffset) { 30 | super(vec, size, alpha, color, randomOffset); 31 | } 32 | 33 | public InteractableStar() { 34 | 35 | } 36 | 37 | @Override 38 | public void writeNbt(NbtCompound nbt) { 39 | super.writeNbt(nbt); 40 | 41 | nbt.putString("id", getId().toString()); 42 | nbt.putInt("supernovaTicks", supernovaTicks); 43 | nbt.putBoolean("subjectForTermination", subjectForTermination); 44 | } 45 | 46 | @Override 47 | public void readNbt(NbtCompound nbt) { 48 | super.readNbt(nbt); 49 | 50 | subjectForTermination = nbt.getBoolean("subjectForTermination"); 51 | supernovaTicks = nbt.getInt("supernovaTicks"); 52 | } 53 | 54 | @Override 55 | public float getSize() { 56 | float size = super.getSize(); 57 | float ret = size; 58 | 59 | if (subjectForTermination && supernovaTicks >= 0) { 60 | if (supernovaTicks <= FULL_COLLAPSE_TICKS) { 61 | ret = MathHelper.lerp(Easing.EXPO_IN.ease((float) supernovaTicks / FULL_COLLAPSE_TICKS, 0f, 1f, 1f), size, 0.1f); 62 | } else if (supernovaTicks <= HOLD_COLLAPSE_TICKS) { 63 | ret = 0.1f; 64 | } else if (supernovaTicks <= EXPLOSION_TICKS) { 65 | ret = MathHelper.lerp(Easing.EXPO_OUT.ease((float) (supernovaTicks - HOLD_COLLAPSE_TICKS) / (EXPLOSION_TICKS - HOLD_COLLAPSE_TICKS), 0f, 1f, 1f), 0, size * 2f); 66 | } else { 67 | ret = 0f; 68 | } 69 | } 70 | 71 | return ret; 72 | } 73 | 74 | @Override 75 | public float getAlpha() { 76 | float ret = MinecraftClient.getInstance().player.hasStatusEffect(ModStatusEffects.STARGAZING) ? 1f : super.getAlpha(); 77 | 78 | if (subjectForTermination && supernovaTicks >= 0) { 79 | if (supernovaTicks > HOLD_COLLAPSE_TICKS && supernovaTicks <= START_FADE_OUT_TICKS) { 80 | ret = 1f; 81 | } else if (supernovaTicks >= START_FADE_OUT_TICKS && supernovaTicks <= EXPLOSION_TICKS) { 82 | ret = MathHelper.lerp(Easing.SINE_OUT.ease((float) (supernovaTicks - START_FADE_OUT_TICKS) / (EXPLOSION_TICKS - START_FADE_OUT_TICKS), 0f, 1f, 1f), 1f, 0); 83 | } else if (supernovaTicks > EXPLOSION_TICKS) { 84 | ret = 0; 85 | } 86 | } 87 | 88 | return ret; 89 | } 90 | 91 | @Override 92 | public boolean canInteract() { 93 | return true; 94 | } 95 | 96 | @Override 97 | public Identifier getId() { 98 | return ID; 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/HeldItemRendererMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import com.llamalad7.mixinextras.injector.wrapoperation.Operation; 4 | import com.llamalad7.mixinextras.injector.wrapoperation.WrapOperation; 5 | import doctor4t.astronomical.common.item.MarshmallowStickItem; 6 | import net.minecraft.client.MinecraftClient; 7 | import net.minecraft.client.network.AbstractClientPlayerEntity; 8 | import net.minecraft.client.render.VertexConsumerProvider; 9 | import net.minecraft.client.render.item.HeldItemRenderer; 10 | import net.minecraft.client.util.math.MatrixStack; 11 | import net.minecraft.item.ItemStack; 12 | import net.minecraft.util.Hand; 13 | import net.minecraft.util.math.MathHelper; 14 | import org.jetbrains.annotations.NotNull; 15 | import org.spongepowered.asm.mixin.Mixin; 16 | import org.spongepowered.asm.mixin.Unique; 17 | import org.spongepowered.asm.mixin.injection.At; 18 | import org.spongepowered.asm.mixin.injection.Inject; 19 | import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; 20 | 21 | @Mixin(HeldItemRenderer.class) 22 | public abstract class HeldItemRendererMixin { 23 | @Unique 24 | private int roastTicks; 25 | 26 | @Inject(method = "updateHeldItems", at = @At("HEAD")) 27 | private void astronomical$roasting(CallbackInfo ci) { 28 | var player = MinecraftClient.getInstance().player; 29 | if (player == null) return; 30 | var stack = player.getMainHandStack(); 31 | if (!(stack.getItem() instanceof MarshmallowStickItem)) return; 32 | if (player.astronomical$isHoldingAttack()) { 33 | this.roastTicks++; 34 | } else { 35 | this.roastTicks = 0; 36 | } 37 | } 38 | 39 | @WrapOperation(method = "renderItem(FLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider$Immediate;Lnet/minecraft/client/network/ClientPlayerEntity;I)V", at = @At(value = "INVOKE", target = "Lnet/minecraft/client/render/item/HeldItemRenderer;renderFirstPersonItem(Lnet/minecraft/client/network/AbstractClientPlayerEntity;FFLnet/minecraft/util/Hand;FLnet/minecraft/item/ItemStack;FLnet/minecraft/client/util/math/MatrixStack;Lnet/minecraft/client/render/VertexConsumerProvider;I)V")) 40 | private void astronomical$marshmallowProgress(HeldItemRenderer instance, @NotNull AbstractClientPlayerEntity player, float tickDelta, float pitch, Hand hand, float swingProgress, @NotNull ItemStack item, float equipProgress, MatrixStack matrices, VertexConsumerProvider vertexConsumers, int light, @NotNull Operation original) { 41 | var marsh = item.getItem() instanceof MarshmallowStickItem; 42 | var holding = player.astronomical$isHoldingAttack(); 43 | var both = marsh && holding; 44 | original.call(instance, player, tickDelta, pitch, hand, both ? this.astronomical$swingRoasting(tickDelta) : swingProgress, item, marsh ? holding ? this.astronomical$equipRoasting(tickDelta) : 0.0f : equipProgress, matrices, vertexConsumers, light); 45 | } 46 | 47 | @Unique 48 | private float astronomical$swingRoasting(float tickDelta) { 49 | var delta = this.doubleDelta(MathHelper.clamp(this.roastTicks / 6f, 0f, 1f)); 50 | var prevDelta = this.doubleDelta(MathHelper.clamp((this.roastTicks - 1) / 6f, 0f, 1f)); 51 | var current = 1.0f - delta * 0.06f; 52 | var prev = 1.0f - prevDelta * 0.06f; 53 | return 1.0f - (prev + tickDelta * (current - prev)); 54 | } 55 | 56 | @Unique 57 | private float astronomical$equipRoasting(float tickDelta) { 58 | var delta3 = this.doubleDelta(MathHelper.clamp(this.roastTicks / 3f, 0f, 1f)); 59 | var delta6 = this.doubleDelta(MathHelper.clamp(this.roastTicks / 6f, 0f, 1f)); 60 | var prevDelta3 = this.doubleDelta(MathHelper.clamp((this.roastTicks - 1) / 3f, 0f, 1f)); 61 | var prevDelta6 = this.doubleDelta(MathHelper.clamp((this.roastTicks - 1) / 6f, 0f, 1f)); 62 | var current = delta3 * .1f + delta6 * 0.2f; 63 | var prev = prevDelta3 * .1f + prevDelta6 * 0.2f; 64 | return 0.5f - (prev + tickDelta * (current - prev)); 65 | } 66 | 67 | @Unique 68 | private float doubleDelta(float delta) { 69 | return delta * delta * delta * delta; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/doctor4t/astronomical/mixin/SpyglassItemMixin.java: -------------------------------------------------------------------------------- 1 | package doctor4t.astronomical.mixin; 2 | 3 | import doctor4t.astronomical.cca.AstraCardinalComponents; 4 | import doctor4t.astronomical.cca.world.AstraSkyComponent; 5 | import doctor4t.astronomical.common.init.ModSoundEvents; 6 | import doctor4t.astronomical.common.init.ModStatusEffects; 7 | import doctor4t.astronomical.common.structure.CelestialObject; 8 | import doctor4t.astronomical.common.structure.InteractableStar; 9 | import net.minecraft.entity.LivingEntity; 10 | import net.minecraft.item.Item; 11 | import net.minecraft.item.ItemStack; 12 | import net.minecraft.item.SpyglassItem; 13 | import net.minecraft.server.world.ServerWorld; 14 | import net.minecraft.sound.SoundCategory; 15 | import net.minecraft.util.math.Axis; 16 | import net.minecraft.util.math.MathHelper; 17 | import net.minecraft.util.math.Vec3d; 18 | import net.minecraft.world.Heightmap; 19 | import net.minecraft.world.World; 20 | import org.joml.Quaternionf; 21 | import org.spongepowered.asm.mixin.Mixin; 22 | import org.spongepowered.asm.mixin.Unique; 23 | 24 | import static doctor4t.astronomical.common.Astronomical.rotateViaQuat; 25 | 26 | @Mixin(SpyglassItem.class) 27 | public abstract class SpyglassItemMixin extends Item { 28 | public SpyglassItemMixin(Settings settings) { 29 | super(settings); 30 | } 31 | 32 | @Unique 33 | private float astra$getSkyAngle(long time) { 34 | double d = MathHelper.fractionalPart((double) time / 24000.0 - 0.25); 35 | double e = 0.5 - Math.cos(d * Math.PI) / 2.0; 36 | return (float) (d * 2.0 + e) / 3.0F; 37 | } 38 | 39 | @Unique 40 | public float getStarBrightness(World w) { 41 | float f = w.getSkyAngle(1); 42 | float g = 1.0F - (MathHelper.cos(f * (float) (Math.PI * 2)) * 2.0F + 0.25F); 43 | g = MathHelper.clamp(g, 0.0F, 1.0F); 44 | return g * g * 0.5F; 45 | } 46 | 47 | @Override 48 | public void usageTick(World world, LivingEntity user, ItemStack stack, int remainingUseTicks) { 49 | if (getStarBrightness(world) <= 0) { 50 | return; 51 | } 52 | 53 | Quaternionf rotation = Axis.Z_POSITIVE.rotationDegrees(world.getSkyAngle(1) * 360.0F); 54 | //rotation.normalize(); 55 | Vec3d vec = user.getRotationVector(); 56 | AstraSkyComponent c = world.getComponent(AstraCardinalComponents.SKY); 57 | CelestialObject supernovad = null; 58 | for (CelestialObject obj : c.getCelestialObjects().stream().filter(g -> g.canInteract() && !((InteractableStar) g).subjectForTermination).toList()) { 59 | Vec3d rotatedVec = rotateViaQuat(obj.getDirectionVector(), rotation).normalize(); 60 | double h = vec.x * rotatedVec.x + vec.y * rotatedVec.y + vec.z * rotatedVec.z; 61 | if (h > 0.9999) { 62 | if (rotatedVec.dotProduct(new Vec3d(0, 1, 0)) > -0.2) { 63 | if (world instanceof ServerWorld serverWorld) { 64 | ((InteractableStar) obj).crossFire = (k) -> { 65 | int guaranteedStarfalls = 0; 66 | int additionalTries = 2; 67 | if (user.hasStatusEffect(ModStatusEffects.STARFALL)) { 68 | guaranteedStarfalls = 1; 69 | additionalTries += user.getStatusEffect(ModStatusEffects.STARFALL).getAmplifier(); 70 | } 71 | for (int i = 0; i < guaranteedStarfalls + world.random.nextInt(additionalTries); i++) { 72 | Vec3d pos = user.getPos().add(world.random.nextGaussian() * 80, 0, world.random.nextGaussian() * 80); 73 | world.getComponent(AstraCardinalComponents.FALL).addFall(10 + world.random.nextInt(11), rotateViaQuat(obj.getDirectionVector(), Axis.Z_POSITIVE.rotationDegrees(k.getSkyAngle(1) * 360.0F)).normalize(), new Vec3d(pos.x, world.getTopY(Heightmap.Type.MOTION_BLOCKING, MathHelper.floor(pos.x), MathHelper.floor(pos.z)) + 1, pos.z)); 74 | serverWorld.playSound(null, user.getX(), user.getY(), user.getZ(), ModSoundEvents.STAR_FALL, SoundCategory.AMBIENT, 20f, 1f + (float) world.random.nextGaussian() / 5f); 75 | } 76 | }; 77 | supernovad = obj; 78 | break; 79 | } 80 | } 81 | } 82 | } 83 | if (supernovad != null) { 84 | ((InteractableStar) supernovad).subjectForTermination = true; 85 | AstraCardinalComponents.SKY.sync(world); 86 | } 87 | } 88 | } 89 | --------------------------------------------------------------------------------