Skip to content

Commit

Permalink
Remove Artiface as dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyButtillo committed Jul 21, 2019
1 parent 6b6fd7a commit 33d07a6
Show file tree
Hide file tree
Showing 112 changed files with 1,591 additions and 49 deletions.
Empty file modified .gitattributes
100644 → 100755
Empty file.
28 changes: 27 additions & 1 deletion .gitignore
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,31 @@ gradle-app.setting

### Gradle Patch ###
**/build/

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
# End of https://www.gitignore.io/api/java,gradle,windows,intellij,forgegradle
28 changes: 28 additions & 0 deletions ...yrptonaught/glassdoor/ArtificeHelper.java → ArtificeHelper.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@
import com.swordglowsblue.artifice.api.Artifice;
import com.swordglowsblue.artifice.api.ArtificeResourcePack;
import com.swordglowsblue.artifice.api.resource.TemplateResource;
import net.fabricmc.loader.api.FabricLoader;
import net.minecraft.block.Block;
import net.minecraft.block.Blocks;
import net.minecraft.server.command.CommandSource;
import net.minecraft.util.Identifier;
import net.minecraft.util.registry.Registry;

import java.io.*;
import java.nio.file.Files;
import java.util.stream.Collectors;

class ArtificeHelper {
Expand All @@ -27,6 +29,19 @@ static void generateRecipies() {
for (String wood : woodtype)
pack.add(new Identifier(GlassDoorMod.MOD_ID, "loot_tables/blocks/" + wood + "_glassdoor.json"), new TemplateResource(templateFile).expand("woodtype", wood));
});
File Path = new File(FabricLoader.getInstance().getGameDirectory() +"/dump");
try {
Files.createDirectories(Path.toPath());
} catch (IOException e) {
e.printStackTrace();
}
Artifice.DATA.iterator().forEachRemaining(pack -> {
try {
pack.dumpResources(Path.getPath());
} catch (IOException e) {
e.printStackTrace();
}
});
}

private static void registerRecipe(ArtificeResourcePack.ServerResourcePackBuilder pack, String name, Block output, Block input) {
Expand Down Expand Up @@ -70,6 +85,19 @@ static void generateAssets() {
});
}
});
File Path = new File(FabricLoader.getInstance().getGameDirectory() +"/dump");
try {
Files.createDirectories(Path.toPath());
} catch (IOException e) {
e.printStackTrace();
}
Artifice.ASSETS.iterator().forEachRemaining(pack -> {
try {
pack.dumpResources(Path.getPath());
} catch (IOException e) {
e.printStackTrace();
}
});
}

private static String readTemplateFile(String templateFile) {
Expand Down
Empty file modified LICENSE
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
4 changes: 0 additions & 4 deletions build.gradle
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ dependencies {
mappings "net.fabricmc:yarn:${project.yarn_mappings}"
modCompile "net.fabricmc:fabric-loader:${project.loader_version}"
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modCompile "io.github.prospector.modmenu:ModMenu:1.+"

modImplementation "com.github.swordglowsblue:artifice:${project.artifice_version}"
include "com.github.swordglowsblue:artifice:${project.artifice_version}"
}

processResources {
Expand Down
10 changes: 4 additions & 6 deletions gradle.properties
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@ org.gradle.jvmargs=-Xmx1G
# Fabric Properties
# check these on https://fabricmc.net/use
minecraft_version=1.14.3
yarn_mappings=1.14.3+build.12
loader_version=0.4.8+build.155

yarn_mappings=1.14.3+build.13
loader_version=0.4.8+build.157

# Mod Properties
mod_version=1.2.1
mod_version=1.3.0
maven_group = net.fabricmc
archives_base_name=glassdoor

# Dependencies
# currently not on the main fabric site, check on the maven: https://maven.fabricmc.net/net/fabricmc/fabric
fabric_version=0.3.0+build.191
artifice_version=0.3.3
fabric_version=0.3.0+build.198
Empty file modified gradle/wrapper/gradle-wrapper.jar
100644 → 100755
Empty file.
Empty file modified gradle/wrapper/gradle-wrapper.properties
100644 → 100755
Empty file.
Empty file modified gradlew
100644 → 100755
Empty file.
Empty file modified gradlew.bat
100644 → 100755
Empty file.
Empty file modified images/2019-07-08_01.19.59.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/2019-07-08_01.33.03.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/2019-07-08_01.34.01.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/2019-07-08_01.34.06.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/2019-07-08_01.34.13.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/2019-07-08_01.34.18.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/2019-07-08_01.34.23.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/2019-07-08_01.34.28.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/2019-07-09_16.47.29.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/2019-07-09_16.47.56.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified settings.gradle
100644 → 100755
Empty file.
3 changes: 1 addition & 2 deletions src/main/java/net/kyrptonaught/glassdoor/BlockGlassDoor.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import net.minecraft.world.World;



public class BlockGlassDoor extends DoorBlock {

BlockGlassDoor(Settings block$Settings_1, String name) {
Expand All @@ -27,7 +26,7 @@ public class BlockGlassDoor extends DoorBlock {
@Override
public boolean activate(BlockState blockState_1, World world_1, BlockPos blockPos_1, PlayerEntity playerEntity_1, Hand hand_1, BlockHitResult blockHitResult_1) {
super.activate(blockState_1, world_1, blockPos_1, playerEntity_1, hand_1, blockHitResult_1);
BlockTags.WOODEN_DOORS.values().forEach(block -> System.out.println(block.toString()));
BlockTags.WOODEN_DOORS.values().forEach(block -> System.out.println(block.toString()));
return true;
}
}
4 changes: 2 additions & 2 deletions src/main/java/net/kyrptonaught/glassdoor/GlassDoorMod.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ public class GlassDoorMod implements ModInitializer, ClientModInitializer {
@Override
public void onInitialize() {
ModBlocks.register();
ArtificeHelper.generateRecipies();
// ArtificeHelper.generateRecipies();
}

@Override
public void onInitializeClient() {
ArtificeHelper.generateAssets();
//ArtificeHelper.generateAssets();
}
}
1 change: 0 additions & 1 deletion src/main/java/net/kyrptonaught/glassdoor/ModBlocks.java
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package net.kyrptonaught.glassdoor;

import net.minecraft.block.*;
import net.minecraft.tag.BlockTags;

public class ModBlocks {
public static BlockGlassDoor oak_glassdoor;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/net/kyrptonaught/glassdoor/mixin/MixinDoorBlock.java
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public MixinDoorBlock(Settings block$Settings_1) {
super(block$Settings_1);

}

@Inject(method = "activate", at = @At("HEAD"), cancellable = true)
public void glassdoor$activate(BlockState blockState_1, World world_1, BlockPos blockPos_1, PlayerEntity playerEntity_1, Hand hand_1, BlockHitResult blockHitResult_1, CallbackInfoReturnable<Boolean> callbackInfoReturnable) {
ItemStack hand = playerEntity_1.inventory.getMainHandStack();
Expand Down
124 changes: 124 additions & 0 deletions src/main/resources/assets/glassdoor/blockstates/acacia_glassdoor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
{
"variants": {
"facing=east,half=lower,hinge=left,open=false": {
"model": "glassdoor:block/acacia_door_bottom"
},
"facing=south,half=lower,hinge=left,open=false": {
"model": "glassdoor:block/acacia_door_bottom",
"y": 90
},
"facing=west,half=lower,hinge=left,open=false": {
"model": "glassdoor:block/acacia_door_bottom",
"y": 180
},
"facing=north,half=lower,hinge=left,open=false": {
"model": "glassdoor:block/acacia_door_bottom",
"y": 270
},
"facing=east,half=lower,hinge=right,open=false": {
"model": "glassdoor:block/acacia_door_bottom_hinge"
},
"facing=south,half=lower,hinge=right,open=false": {
"model": "glassdoor:block/acacia_door_bottom_hinge",
"y": 90
},
"facing=west,half=lower,hinge=right,open=false": {
"model": "glassdoor:block/acacia_door_bottom_hinge",
"y": 180
},
"facing=north,half=lower,hinge=right,open=false": {
"model": "glassdoor:block/acacia_door_bottom_hinge",
"y": 270
},
"facing=east,half=lower,hinge=left,open=true": {
"model": "glassdoor:block/acacia_door_bottom_hinge",
"y": 90
},
"facing=south,half=lower,hinge=left,open=true": {
"model": "glassdoor:block/acacia_door_bottom_hinge",
"y": 180
},
"facing=west,half=lower,hinge=left,open=true": {
"model": "glassdoor:block/acacia_door_bottom_hinge",
"y": 270
},
"facing=north,half=lower,hinge=left,open=true": {
"model": "glassdoor:block/acacia_door_bottom_hinge"
},
"facing=east,half=lower,hinge=right,open=true": {
"model": "glassdoor:block/acacia_door_bottom",
"y": 270
},
"facing=south,half=lower,hinge=right,open=true": {
"model": "glassdoor:block/acacia_door_bottom"
},
"facing=west,half=lower,hinge=right,open=true": {
"model": "glassdoor:block/acacia_door_bottom",
"y": 90
},
"facing=north,half=lower,hinge=right,open=true": {
"model": "glassdoor:block/acacia_door_bottom",
"y": 180
},
"facing=east,half=upper,hinge=left,open=false": {
"model": "glassdoor:block/acacia_door_top"
},
"facing=south,half=upper,hinge=left,open=false": {
"model": "glassdoor:block/acacia_door_top",
"y": 90
},
"facing=west,half=upper,hinge=left,open=false": {
"model": "glassdoor:block/acacia_door_top",
"y": 180
},
"facing=north,half=upper,hinge=left,open=false": {
"model": "glassdoor:block/acacia_door_top",
"y": 270
},
"facing=east,half=upper,hinge=right,open=false": {
"model": "glassdoor:block/acacia_door_top_hinge"
},
"facing=south,half=upper,hinge=right,open=false": {
"model": "glassdoor:block/acacia_door_top_hinge",
"y": 90
},
"facing=west,half=upper,hinge=right,open=false": {
"model": "glassdoor:block/acacia_door_top_hinge",
"y": 180
},
"facing=north,half=upper,hinge=right,open=false": {
"model": "glassdoor:block/acacia_door_top_hinge",
"y": 270
},
"facing=east,half=upper,hinge=left,open=true": {
"model": "glassdoor:block/acacia_door_top_hinge",
"y": 90
},
"facing=south,half=upper,hinge=left,open=true": {
"model": "glassdoor:block/acacia_door_top_hinge",
"y": 180
},
"facing=west,half=upper,hinge=left,open=true": {
"model": "glassdoor:block/acacia_door_top_hinge",
"y": 270
},
"facing=north,half=upper,hinge=left,open=true": {
"model": "glassdoor:block/acacia_door_top_hinge"
},
"facing=east,half=upper,hinge=right,open=true": {
"model": "glassdoor:block/acacia_door_top",
"y": 270
},
"facing=south,half=upper,hinge=right,open=true": {
"model": "glassdoor:block/acacia_door_top"
},
"facing=west,half=upper,hinge=right,open=true": {
"model": "glassdoor:block/acacia_door_top",
"y": 90
},
"facing=north,half=upper,hinge=right,open=true": {
"model": "glassdoor:block/acacia_door_top",
"y": 180
}
}
}
Loading

0 comments on commit 33d07a6

Please sign in to comment.