Skip to content

Commit

Permalink
Code styling changes
Browse files Browse the repository at this point in the history
Multiple model tweaks
  • Loading branch information
aqariio committed Nov 29, 2023
1 parent 22ce506 commit ac39ede
Show file tree
Hide file tree
Showing 155 changed files with 9,571 additions and 9,601 deletions.
25 changes: 5 additions & 20 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,17 @@ root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
insert_final_newline = false
indent_style = space
indent_size = 4
tab_width = 4
trim_trailing_whitespace = true

[*.gradle]
indent_style = tab

[*.java]
indent_style = tab

[*.json]
indent_style = space
indent_size = 2

[quilt.mod.json]
indent_style = tab
tab_width = 2

[*.toml]
indent_style = tab
tab_width = 2

[*.properties]
indent_style = space
indent_size = 2

[.editorconfig]
indent_style = space
indent_size = 4
[*.properties]
indent_size = 2
116 changes: 58 additions & 58 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id 'maven-publish'
id 'org.quiltmc.loom' version '1.+'
id 'maven-publish'
id 'org.quiltmc.loom' version '1.+'
}

archivesBaseName = project.archives_base_name
Expand All @@ -11,87 +11,87 @@ repositories {
}

dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "org.quiltmc:quilt-mappings:${project.minecraft_version}+build.${project.quilt_mappings}:intermediary-v2"
// Replace the above line with the block below if you want to use Mojang mappings as your primary mappings, falling back on QM for parameters and Javadocs
/*
mappings loom.layered {
mappings "org.quiltmc:quilt-mappings:${quilt_mappings}:intermediary-v2"
officialMojangMappings()
}
*/
modImplementation "org.quiltmc:quilt-loader:${project.loader_version}"

// QSL is not a complete API; You will need Quilted Fabric API to fill in the gaps.
// Quilted Fabric API will automatically pull in the correct QSL version.
modImplementation "org.quiltmc.quilted-fabric-api:quilted-fabric-api:${project.quilted_fabric_api_version}-${project.minecraft_version}"
// modImplementation libs.bundles.quilted.fabric.api // If you wish to use Fabric API's deprecated modules, you can replace the above line with this one
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "org.quiltmc:quilt-mappings:${project.minecraft_version}+build.${project.quilt_mappings}:intermediary-v2"
// Replace the above line with the block below if you want to use Mojang mappings as your primary mappings, falling back on QM for parameters and Javadocs
/*
mappings loom.layered {
mappings "org.quiltmc:quilt-mappings:${quilt_mappings}:intermediary-v2"
officialMojangMappings()
}
*/
modImplementation "org.quiltmc:quilt-loader:${project.loader_version}"

// QSL is not a complete API; You will need Quilted Fabric API to fill in the gaps.
// Quilted Fabric API will automatically pull in the correct QSL version.
modImplementation "org.quiltmc.quilted-fabric-api:quilted-fabric-api:${project.quilted_fabric_api_version}-${project.minecraft_version}"
// modImplementation libs.bundles.quilted.fabric.api // If you wish to use Fabric API's deprecated modules, you can replace the above line with this one
}

processResources {
inputs.property 'version', version
inputs.property 'version', version

filesMatching('quilt.mod.json') {
expand "version": version
}
filesMatching('quilt.mod.json') {
expand "version": version
}
}

def dataOutput = 'src/main/generated'

loom {
runs {
datagen {
server()
runs {
datagen {
server()

name "Data Generation"
vmArg "-Dfabric-api.datagen"
vmArg "-Dfabric-api.datagen.output-dir=${file(dataOutput)}"
name "Data Generation"
vmArg "-Dfabric-api.datagen"
vmArg "-Dfabric-api.datagen.output-dir=${file(dataOutput)}"

runDir "build/datagen"
}
}
runDir "build/datagen"
}
}
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = 'UTF-8'
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
it.options.encoding = 'UTF-8'
// Minecraft 1.18 (1.18-pre2) upwards uses Java 17.
it.options.release = 17
}

java {
// Still required by IDEs such as Eclipse and Visual Studio Code
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
// Still required by IDEs such as Eclipse and Visual Studio Code
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task if it is present.
// If you remove this line, sources will not be generated.
withSourcesJar()

// If this mod is going to be a library, then it should also generate Javadocs in order to aid with development.
// Uncomment this line to generate them.
// withJavadocJar()
// If this mod is going to be a library, then it should also generate Javadocs in order to aid with development.
// Uncomment this line to generate them.
// withJavadocJar()
}

// If you plan to use a different file for the license, don't forget to change the file name here!
jar {
from('LICENSE') {
rename { "${it}_${archivesBaseName}" }
}
from('LICENSE') {
rename { "${it}_${archivesBaseName}" }
}
}

// Configure the maven publication
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
publications {
mavenJava(MavenPublication) {
from components.java
}
}

// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
repositories {
// Add repositories to publish to here.
// Notice: This block does NOT have the same function as the block in the top level.
// The repositories here will be used for publishing your artifact, not for
// retrieving dependencies.
}
}
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ loader_version=0.22.0
qsl_version = 3.0.0-beta.29

# Quilted Fabric API
quilted_fabric_api_version = 4.0.0-beta.30+0.76.0
quilted_fabric_api_version = 4.0.0-beta.30+0.76.0
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.19.2 2023-11-27T16:44:13.0558366 minecraft:block Loot Table
// 1.19.2 2023-11-27T16:44:13.0558366 minecraft:block Loot Table
f53cf402d14150e83082bb8ef9d5189a424e9535 data\furnishings\loot_tables\blocks\cracked_polished_calcite_bricks.json
11a46e111d0c31e3db4d21e1c0337c62e6b96b4f data\furnishings\loot_tables\blocks\polished_tuff.json
56a7cad2828c2e690a58c804f39ce2bd6f2ae776 data\furnishings\loot_tables\blocks\light_blue_candelabra.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.19.2 2023-11-27T16:44:13.0457304 Recipes
// 1.19.2 2023-11-27T16:44:13.0457304 Recipes
9fc4202e7767a967c332066974029df8a854fe43 data\furnishings\recipes\mossy_cobblestone_brick_wall.json
148f17a5672fcc3edcad1449f2cc4f9236092964 data\furnishings\advancements\recipes\decorations\pink_candelabra.json
55aedfe2b677f44626fec2c2fdf53e4003c91d41 data\furnishings\recipes\cyan_cushion.json
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.19.2 2023-11-27T16:44:13.0515196 Models
// 1.19.2 2023-11-27T16:44:13.0515196 Models
185b5b3cef19d3d41ec8ce274c5c08f389e15613 assets\furnishings\models\block\pink_candelabra_floor_2.json
adc3234d5ec8624d589d6d8c3311def0758b1b00 assets\furnishings\models\block\white_candelabra_floor_4_lit.json
d60c649b584b14e5c10bf3cb805e3e13a80ce8cc assets\furnishings\models\block\yellow_candelabra_floor_4.json
Expand Down
70 changes: 35 additions & 35 deletions src/main/java/aqario/furnishings/client/FurnishingsClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,54 +15,54 @@
import org.quiltmc.qsl.block.extensions.api.client.BlockRenderLayerMap;

public class FurnishingsClient implements ClientModInitializer {
private static final Dilation ARMOR_DILATION = new Dilation(1.0F);
private static final Dilation HAT_DILATION = new Dilation(0.5F);
private static final Dilation ARMOR_DILATION = new Dilation(1.0F);
private static final Dilation HAT_DILATION = new Dilation(0.5F);

@Override
public void onInitializeClient(ModContainer mod) {
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.RED_PAPER_LANTERN);
BlockRenderLayerMap.put(RenderLayer.getTranslucent(), FurnishingsBlocks.FRAMED_GLASS);
BlockRenderLayerMap.put(RenderLayer.getTranslucent(), FurnishingsBlocks.FRAMED_GLASS_PANE);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.GLASS_PANEL);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.GLASS_PANEL);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.BRAZIER);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.SOUL_BRAZIER);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.IRON_GRATE);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.IRON_GRATE);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.IRON_SCAFFOLDING);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.SCONCE);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.SOUL_SCONCE);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.LEVER_SCONCE);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.LEVER_SOUL_SCONCE);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.MOSS);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.WHITE_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.ORANGE_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.MAGENTA_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.LIGHT_BLUE_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.YELLOW_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.LIME_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.PINK_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.GRAY_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.LIGHT_GRAY_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.CYAN_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.PURPLE_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.BLUE_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.BROWN_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.GREEN_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.RED_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.BLACK_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.SCONCE);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.SOUL_SCONCE);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.LEVER_SCONCE);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.LEVER_SOUL_SCONCE);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.MOSS);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.WHITE_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.ORANGE_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.MAGENTA_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.LIGHT_BLUE_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.YELLOW_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.LIME_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.PINK_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.GRAY_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.LIGHT_GRAY_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.CYAN_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.PURPLE_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.BLUE_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.BROWN_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.GREEN_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.RED_CANDELABRA);
BlockRenderLayerMap.put(RenderLayer.getCutout(), FurnishingsBlocks.BLACK_CANDELABRA);

EntityRendererRegistry.register(FurnishingsEntityType.SEAT, EmptyRenderer::new);
EntityRendererRegistry.register(FurnishingsEntityType.SEAT, EmptyRenderer::new);

EntityRendererRegistry.register(FurnishingsEntityType.SCARECROW, ScarecrowEntityRenderer::new);
EntityModelLayerRegistry.registerModelLayer(FurnishingsEntityModelLayers.SCARECROW, ScarecrowEntityModel::getTexturedModelData);
EntityRendererRegistry.register(FurnishingsEntityType.SCARECROW, ScarecrowEntityRenderer::new);
EntityModelLayerRegistry.registerModelLayer(FurnishingsEntityModelLayers.SCARECROW, ScarecrowEntityModel::getTexturedModelData);

EntityRendererRegistry.register(FurnishingsEntityType.STATUE, StatueEntityRenderer::new);
EntityModelLayerRegistry.registerModelLayer(FurnishingsEntityModelLayers.STATUE, StatueEntityModel::getTexturedModelData);
EntityRendererRegistry.register(FurnishingsEntityType.STATUE, StatueEntityRenderer::new);
EntityModelLayerRegistry.registerModelLayer(FurnishingsEntityModelLayers.STATUE, StatueEntityModel::getTexturedModelData);

EntityModelLayerRegistry.registerModelLayer(FurnishingsEntityModelLayers.SCARECROW_INNER_ARMOR, () -> ScarecrowArmorEntityModel.getTexturedModelData(HAT_DILATION));
EntityModelLayerRegistry.registerModelLayer(FurnishingsEntityModelLayers.SCARECROW_OUTER_ARMOR, () -> ScarecrowArmorEntityModel.getTexturedModelData(ARMOR_DILATION));
EntityModelLayerRegistry.registerModelLayer(FurnishingsEntityModelLayers.SCARECROW_INNER_ARMOR, () -> ScarecrowArmorEntityModel.getTexturedModelData(HAT_DILATION));
EntityModelLayerRegistry.registerModelLayer(FurnishingsEntityModelLayers.SCARECROW_OUTER_ARMOR, () -> ScarecrowArmorEntityModel.getTexturedModelData(ARMOR_DILATION));

EntityModelLayerRegistry.registerModelLayer(FurnishingsEntityModelLayers.STATUE_INNER_ARMOR, () -> StatueArmorEntityModel.getTexturedModelData(HAT_DILATION));
EntityModelLayerRegistry.registerModelLayer(FurnishingsEntityModelLayers.STATUE_OUTER_ARMOR, () -> StatueArmorEntityModel.getTexturedModelData(ARMOR_DILATION));
EntityModelLayerRegistry.registerModelLayer(FurnishingsEntityModelLayers.STATUE_INNER_ARMOR, () -> StatueArmorEntityModel.getTexturedModelData(HAT_DILATION));
EntityModelLayerRegistry.registerModelLayer(FurnishingsEntityModelLayers.STATUE_OUTER_ARMOR, () -> StatueArmorEntityModel.getTexturedModelData(ARMOR_DILATION));
}
}
Loading

0 comments on commit ac39ede

Please sign in to comment.