Skip to content

Commit

Permalink
Merge pull request #8 from ReviversMC/1.18-dev
Browse files Browse the repository at this point in the history
Update to 2.1.0
  • Loading branch information
thefirethirteen authored Feb 18, 2022
2 parents 9e26451 + 156f36c commit 770e184
Show file tree
Hide file tree
Showing 16 changed files with 55 additions and 39 deletions.
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 6 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,24 +1,20 @@
plugins {
id 'fabric-loom' version '0.10-SNAPSHOT'
id 'fabric-loom' version '0.11-SNAPSHOT'
id 'maven-publish'
}

sourceCompatibility = JavaVersion.VERSION_16
targetCompatibility = JavaVersion.VERSION_16
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17

archivesBaseName = project.archives_base_name
version = project.mod_version
group = project.maven_group

minecraft {
}

dependencies {

minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
}

processResources {
Expand Down
12 changes: 6 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# Done to increase the memory available to gradle.
org.gradle.jvmargs=-Xmx4G
org.gradle.jvmargs=-Xmx2G

minecraft_version=1.18.1
yarn_mappings=1.18.1+build.22:v2
loader_version=0.13.1
minecraft_version=1.18
yarn_mappings=1.18+build.1
loader_version=0.13.2

#Fabric api
fabric_version=0.46.4+1.18
fabric_version=0.44.0+1.18

# Mod Properties
mod_version=2.0.0-1.18
mod_version=2.1.0+1.18
maven_group=net.kyrptonaught
archives_base_name=glassdoor

2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
pluginManagement {
repositories {
jcenter()
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
mavenCentral()
gradlePluginPortal()
}
}
6 changes: 3 additions & 3 deletions src/main/java/net/kyrptonaught/glassdoor/DataGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static void genItemModels() {
}
}

public static void genRecipies() {
public static void genRecipes() {
for (String wood : woods) {
File file = new File("C:\\Users\\anthony\\Desktop\\Minecraft Mod Dev\\GlassDoor-1.16\\src\\main\\resources\\data\\glassdoor\\recipes\\trapdoor\\" + wood + "_glasstrapdoor.json");
try (FileOutputStream out = new FileOutputStream(file, false)) {
Expand All @@ -69,7 +69,7 @@ public static void genRecipies() {
}
}

public static void genRecipiesReverse() {
public static void genRecipesReverse() {
for (String wood : woods) {
File file = new File("C:\\Users\\anthony\\Desktop\\Minecraft Mod Dev\\GlassDoor-1.16\\src\\main\\resources\\data\\glassdoor\\recipes\\reverse\\trapdoor\\" + wood + "_glasstrapdoor.json");
try (FileOutputStream out = new FileOutputStream(file, false)) {
Expand All @@ -92,7 +92,7 @@ public static void genRecipiesReverse() {
}
}
}
public static void genloot() {
public static void genLoot() {
for (String wood : woods) {
File file = new File("C:\\Users\\anthony\\Desktop\\Minecraft Mod Dev\\GlassDoor-1.16\\src\\main\\resources\\data\\glassdoor\\loot_tables\\blocks\\" + wood + "_glasstrapdoor.json");
try (FileOutputStream out = new FileOutputStream(file, false)) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/kyrptonaught/glassdoor/GlassDoorMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static BlockState copyState(BlockState copyState) {
else if (copyState.getBlock().equals(Blocks.IRON_DOOR)) newState = iron_glassdoor.getDefaultState();
return newState.with(DoorBlock.FACING, copyState.get(DoorBlock.FACING)).with(DoorBlock.HINGE, copyState.get(DoorBlock.HINGE)).with(DoorBlock.OPEN, copyState.get(DoorBlock.OPEN));
}
public static BlockState copytrapdoorState(BlockState copyState) {
public static BlockState copyTrapdoorState(BlockState copyState) {
if (!(copyState.getBlock() instanceof TrapdoorBlock)) return copyState;

BlockState newState = oak_glasstrapdoor.getDefaultState();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public abstract class MixinTrapDoorBlock {
ItemStack heldStack = player.getInventory().getMainHandStack();
if (!(state.getBlock() instanceof BlockGlassTrapDoor) && heldStack.getItem() == Items.GLASS_PANE) {

BlockState glassDoorState = GlassDoorMod.copytrapdoorState(state);
BlockState glassDoorState = GlassDoorMod.copyTrapdoorState(state);
world.setBlockState(pos, glassDoorState);

if (!player.isCreative()) heldStack.decrement(1);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"glassdoor:iron_glassdoor": "metalsubparts",
"glassdoor:iron_glasstrapdoor": "metalsubparts"
}
6 changes: 2 additions & 4 deletions src/main/resources/data/minecraft/tags/blocks/doors.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{
"replace": false,
"values": [
"glassdoor:iron_glassdoor",
"#minecraft:wooden_doors",
"minecraft:iron_door"
"glassdoor:iron_glassdoor"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"replace": false,
"values": [
"glassdoor:iron_glassdoor",
"glassdoor:iron_glasstrapdoor"
]
}
6 changes: 6 additions & 0 deletions src/main/resources/data/minecraft/tags/blocks/trapdoors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"glassdoor:iron_glasstrapdoor"
]
}
10 changes: 2 additions & 8 deletions src/main/resources/data/minecraft/tags/blocks/wooden_doors.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@
"glassdoor:birch_glassdoor",
"glassdoor:jungle_glassdoor",
"glassdoor:acacia_glassdoor",
"glassdoor:dark_oak_glassdoor",
"minecraft:oak_door",
"minecraft:spruce_door",
"minecraft:birch_door",
"minecraft:jungle_door",
"minecraft:acacia_door",
"minecraft:dark_oak_door"
"glassdoor:dark_oak_glassdoor"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"replace": false,
"values": [
"glassdoor:oak_glasstrapdoor",
"glassdoor:spruce_glasstrapdoor",
"glassdoor:birch_glasstrapdoor",
"glassdoor:jungle_glasstrapdoor",
"glassdoor:acacia_glasstrapdoor",
"glassdoor:dark_oak_glasstrapdoor"
]
}
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "glassdoor",
"version": "2.0.0-1.18",
"version": "2.1.0+1.18",
"name": "Glass Doors",
"description": "More Prettier Doors",
"authors": [
Expand Down Expand Up @@ -29,7 +29,7 @@
]
},
"depends": {
"fabricloader": ">=0.4.0",
"fabricloader": ">=0.12.12",
"fabric": "*"
}
}
2 changes: 1 addition & 1 deletion src/main/resources/net.kyrptonaught.glassdoor.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"required": true,
"package": "net.kyrptonaught.glassdoor.mixin",
"compatibilityLevel": "JAVA_8",
"compatibilityLevel": "JAVA_17",
"mixins": [
"MixinDoorBlock",
"MixinTrapDoorBlock"
Expand Down

0 comments on commit 770e184

Please sign in to comment.