Skip to content

Commit e0cf4cf

Browse files
committed
Updates galore!
A revamp of the entire mod's internals, includes a bunch of small things.
1 parent 42dbc20 commit e0cf4cf

File tree

33 files changed

+65
-311
lines changed

33 files changed

+65
-311
lines changed

build.gradle

Lines changed: 5 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,18 @@
11
plugins {
2-
id 'fabric-loom' version '0.8-SNAPSHOT'
2+
id 'fabric-loom' version '0.10-SNAPSHOT'
33
id 'maven-publish'
44
}
55

66
archivesBaseName = project.archives_base_name
77
version = project.mod_version
88
group = project.maven_group
99

10-
repositories {
11-
maven {
12-
name = "JitPack"
13-
url = "https://jitpack.io"
14-
}
15-
maven {
16-
url = 'https://raw.githubusercontent.com/Devan-Kerman/Devan-Repo/master/'
17-
18-
}
19-
}
10+
repositories {}
2011

2112
dependencies {
2213
// To change the versions see the gradle.properties file
2314
minecraft "com.mojang:minecraft:${project.minecraft_version}"
24-
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
15+
mappings "net.fabricmc:yarn:${project.minecraft_version}+build.${project.yarn_mappings}:v2"
2516
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
2617

2718
// Fabric API. This is technically optional, but you probably want it anyway.
@@ -37,50 +28,11 @@ processResources {
3728
}
3829

3930
tasks.withType(JavaCompile).configureEach {
40-
// ensure that the encoding is set to UTF-8, no matter what the system default is
41-
// this fixes some edge cases with special characters not displaying correctly
42-
// see http://yodaconditions.net/blog/fix-for-java-file-encoding-problems-with-gradle.html
43-
// If Javadoc is generated, this must be specified in that task too.
4431
it.options.encoding = "UTF-8"
45-
46-
// The Minecraft launcher currently installs Java 8 for users, so your mod probably wants to target Java 8 too
47-
// JDK 9 introduced a new way of specifying this that will make sure no newer classes or methods are used.
48-
// We'll use that if it's available, but otherwise we'll use the older option.
49-
def targetVersion = 8
32+
def targetVersion = 16
5033
if (JavaVersion.current().isJava9Compatible()) {
5134
it.options.release = targetVersion
5235
}
5336
}
5437

55-
java {
56-
// Loom will automatically attach sourcesJar to a RemapSourcesJar task and to the "build" task
57-
// if it is present.
58-
// If you remove this line, sources will not be generated.
59-
withSourcesJar()
60-
}
61-
62-
jar {
63-
from("LICENSE") {
64-
rename { "${it}_${project.archivesBaseName}"}
65-
}
66-
}
67-
68-
publishing {
69-
publications {
70-
mavenJava(MavenPublication) {
71-
// add all the jars that should be included when publishing to maven
72-
artifact(remapJar) {
73-
builtBy remapJar
74-
}
75-
artifact(sourcesJar) {
76-
builtBy remapSourcesJar
77-
}
78-
}
79-
}
80-
81-
// Select the repositories you want to publish to
82-
// To publish to maven local, no extra repositories are necessary. Just use the task `publishToMavenLocal`.
83-
repositories {
84-
// See https://docs.gradle.org/current/userguide/publishing_maven.html for information on how to set up publishing.
85-
}
86-
}
38+
jar {from("LICENSE") {rename { "${it}_${project.archivesBaseName}"}}}

gradle.properties

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
org.gradle.jvmargs=-Xmx2G
33

44
# Fabric Properties
5-
minecraft_version=1.17
6-
yarn_mappings=1.17+build.1
7-
loader_version=0.11.3
5+
minecraft_version=1.17.1
6+
yarn_mappings=63
7+
loader_version=0.12.4
88

99
#Fabric api
10-
fabric_version=0.34.9+1.17
10+
fabric_version=0.41.3+1.17
1111

1212
# Mod Properties
13-
mod_version = 1.0.5
13+
mod_version = 1.1.0
1414
maven_group = net.consistencyteam
1515
archives_base_name = obsidian_slab
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package io.github.consistencyplus.obsidianslabs;
2+
3+
import net.fabricmc.api.ModInitializer;
4+
import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings;
5+
import net.fabricmc.fabric.api.object.builder.v1.block.FabricMaterialBuilder;
6+
import net.fabricmc.fabric.api.tool.attribute.v1.FabricToolTags;
7+
import net.minecraft.block.Block;
8+
import net.minecraft.block.MapColor;
9+
import net.minecraft.block.SlabBlock;
10+
import net.minecraft.item.BlockItem;
11+
import net.minecraft.item.Item;
12+
import net.minecraft.item.ItemGroup;
13+
import net.minecraft.util.Identifier;
14+
import net.minecraft.util.registry.Registry;
15+
16+
import static net.minecraft.block.piston.PistonBehavior.BLOCK;
17+
18+
19+
public class ObsidianSlabs implements ModInitializer {
20+
public static final Identifier namespace = new Identifier("obsidian_slab", "obsidian_slab");
21+
22+
public static final Block OBSIDIAN_SLAB = Registry.register(Registry.BLOCK, namespace, new SlabBlock(FabricBlockSettings.of((new FabricMaterialBuilder(MapColor.BLACK)).pistonBehavior(BLOCK).build()).requiresTool().breakByTool(FabricToolTags.PICKAXES, 3).strength(50.0F, 1200.0F)));
23+
public static final Item OBSIDIAN_SLAB_ITEM = Registry.register(Registry.ITEM, namespace, new BlockItem(OBSIDIAN_SLAB, new Item.Settings().group(ItemGroup.REDSTONE)));
24+
25+
@Override
26+
public void onInitialize() {}
27+
}

src/main/java/net/consistencyteam/consistency_plus/Blocks.java

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/main/java/net/consistencyteam/consistency_plus/ConsistencyPlus.java

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/main/java/net/consistencyteam/consistency_plus/Items.java

Lines changed: 0 additions & 19 deletions
This file was deleted.
Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1 @@
1-
{
2-
"variants": {
3-
"type=bottom": {
4-
"model": "obsidian_slab:block/obsidian_slab"
5-
},
6-
"type=double": {
7-
"model": "minecraft:block/obsidian"
8-
},
9-
"type=top": {
10-
"model": "obsidian_slab:block/obsidian_slab_top"
11-
}
12-
}
13-
}
1+
{"variants":{"type=bottom":{"model":"obsidian_slab:block/obsidian_slab"},"type=double":{"model":"minecraft:block/obsidian"},"type=top":{"model":"obsidian_slab:block/obsidian_slab_top"}}}
31.8 KB
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"block.obsidian_slab.obsidian_slab": "Obsidian Slab"}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"block.obsidian_slab.obsidian_slab": "Obsidian Slab"}

0 commit comments

Comments
 (0)