Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into feature/mother_generation
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/generated/resources/data/vampirism/vampirism/tasks/hunter_minion_equipment.json
#	src/generated/resources/data/vampirism/vampirism/tasks/vampire_minion_binding.json
#	src/main/java/de/teamlapen/vampirism/client/core/ModBlocksRender.java
#	src/main/java/de/teamlapen/vampirism/core/ModBlocks.java
#	src/main/java/de/teamlapen/vampirism/core/ModTiles.java
#	src/main/java/de/teamlapen/vampirism/data/BlockStateGenerator.java
#	src/main/java/de/teamlapen/vampirism/data/ItemModelGenerator.java
#	src/main/java/de/teamlapen/vampirism/data/LootTablesGenerator.java
#	src/main/java/de/teamlapen/vampirism/data/TagGenerator.java
#	src/main/java/de/teamlapen/vampirism/misc/VampirismCreativeTab.java
#	src/main/resources/assets/vampirism/lang/en_us.json
  • Loading branch information
Cheaterpaul committed Nov 8, 2023
2 parents e9a6496 + b1d002c commit 370747a
Show file tree
Hide file tree
Showing 432 changed files with 6,671 additions and 8,207 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/update_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: wei/curl@v1
with:
args: |
-X 'POST' 'https://api.vampirism.dev/api/v0/supporter/set' -H 'x-api-key: ${{ secrets.VAMPIRISM_API }}' -H 'Content-Type: application/json' --upload-file src/main/resources/supporters.json
-X 'POST' 'https://api.vampirism.dev/api/v1/supporter/set' -H 'x-api-key: ${{ secrets.VAMPIRISM_API }}' -H 'Content-Type: application/json' --upload-file src/main/resources/supporters.json
- name: Upload settings
uses: wei/curl@v1
with:
Expand Down
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.

Binary file added dev_resources/models/bat_cage.blend
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,33 @@
* Advanced vampire hunter
*/
public interface IAdvancedHunter extends IHunterMob, IAdjustableLevel, IVillageCaptureEntity {

/**
* The type integer declares multiple things about the hunter. This the different values are stored in the different bits of the integer.
* <br>
* - Bits 0-1 are used for the hunter hat<br>
* - Bits 2-3 are used for the hunter hat<br>
* - bit 4 defines if the hunter has a cloak<br>
* - bits 5-13 are used for the hunter body texture<br>
*/
int getHunterType();

default int getHatType() {
return this.getHunterType() & 0b11;
}

default int getEquipmentType() {
return this.getHunterType() >> 2 & 0b11;
}

default boolean hasCloak() {
return (this.getHunterType() >> 4 & 0b1) == 1;
}

default int getBodyTexture() {
return this.getHunterType() >> 5 & 0b11111111;
}

@Nullable
String getTextureName();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,28 @@
*/
public interface IAdvancedVampire extends IVampireMob, IAdjustableLevel, IVillageCaptureEntity, IEntityLeader {

int getEyeType();
/**
* The type integer declares multiple things about the hunter. This the different values are stored in the different bits of the integer.
* <br>
* - Bits 0-1 are used for the vampire eyes<br>
* - Bits 2-3 are used for the vampire fangs<br>
* - bits 4-12 are used for the vampire body texture<br>
*/
default int getVampireType() {
return 0;
}

default int getEyeType() {
return getVampireType() & 0b111111;
}

default int getFangType() {
return getVampireType() >> 6 & 0b111111;
}

default int getBodyTexture() {
return getVampireType() >> 12 & 0b11111111;
}

@Nullable
String getTextureName();
Expand Down
27 changes: 11 additions & 16 deletions src/api/java/de/teamlapen/vampirism/api/settings/Supporter.java
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
package de.teamlapen.vampirism.api.settings;

import de.teamlapen.vampirism.api.VReference;
import net.minecraft.resources.ResourceLocation;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.Collection;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import java.util.Map;

public record Supporter(@NotNull ResourceLocation faction, @NotNull String name, @NotNull String texture, int typeId, @Nullable String bookId) {
/**
* Supporter information for advanced hunters / vampires
*
* @param faction faction for this supporter
* @param name display name that will be shown in game
* @param texture minecraft username to download the skin
* @param bookId if set it will be used to drop a specific book on loot drops
* @param appearance appearance options for the renderer
*/
public record Supporter(@NotNull ResourceLocation faction, @NotNull String name, @NotNull String texture, @Nullable String bookId, @NotNull Map<String, String> appearance) {

public record Old(@NotNull String name, String texture, int type, int status) {
public Supporter toNew(ResourceLocation faction) {
return new Supporter(faction, name, texture, type, null);
}
}
public record OldList(@NotNull String comment, @NotNull List<Old> vampires, @NotNull List<Old> hunters) {
public Collection<Supporter> toNew() {
return Stream.concat(vampires.stream().map(s -> s.toNew(VReference.VAMPIRE_FACTION.getID())), hunters.stream().map(s -> s.toNew(VReference.HUNTER_FACTION.getID()))).collect(Collectors.toList());
}
}
}
34 changes: 34 additions & 0 deletions src/generated/resources/assets/vampirism/blockstates/bat_cage.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"variants": {
"contains_bat=false,facing=east": {
"model": "vampirism:block/bat_cage/block",
"y": 90
},
"contains_bat=false,facing=north": {
"model": "vampirism:block/bat_cage/block"
},
"contains_bat=false,facing=south": {
"model": "vampirism:block/bat_cage/block",
"y": 180
},
"contains_bat=false,facing=west": {
"model": "vampirism:block/bat_cage/block",
"y": 270
},
"contains_bat=true,facing=east": {
"model": "vampirism:block/bat_cage/block",
"y": 90
},
"contains_bat=true,facing=north": {
"model": "vampirism:block/bat_cage/block"
},
"contains_bat=true,facing=south": {
"model": "vampirism:block/bat_cage/block",
"y": 180
},
"contains_bat=true,facing=west": {
"model": "vampirism:block/bat_cage/block",
"y": 270
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "vampirism:block/bloody_dark_stone_bricks"
}
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "vampirism:block/chiseled_dark_stone_bricks"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"variants": {
"": {
"model": "vampirism:block/cobbled_dark_stone"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"variants": {
"type=bottom": {
"model": "vampirism:block/cobbled_dark_stone_slab"
},
"type=double": {
"model": "vampirism:block/cobbled_dark_stone"
},
"type=top": {
"model": "vampirism:block/cobbled_dark_stone_slab_top"
}
}
}
Loading

0 comments on commit 370747a

Please sign in to comment.