-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f73841
commit 3769c8d
Showing
7 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
src/main/java/com/teammetallurgy/atum/entity/villager/AtumVillagerData.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package com.teammetallurgy.atum.entity.villager; | ||
|
||
import net.minecraft.entity.merchant.villager.VillagerData; | ||
import net.minecraft.entity.merchant.villager.VillagerProfession; | ||
import net.minecraft.entity.villager.VillagerType; | ||
|
||
import javax.annotation.Nonnull; | ||
import javax.annotation.Nullable; | ||
|
||
public class AtumVillagerData extends VillagerData { //Same as vanilla VillagerData, but makes sure VillagerType is not used | ||
|
||
public AtumVillagerData(VillagerProfession profession, int level) { | ||
super(null, profession, level); | ||
} | ||
|
||
@Override | ||
@Nonnull | ||
public VillagerData withProfession(@Nonnull VillagerProfession profession) { | ||
return new AtumVillagerData(profession, this.getLevel()); | ||
} | ||
|
||
@Override | ||
@Nonnull | ||
public VillagerData withType(@Nullable VillagerType type) { | ||
return new AtumVillagerData(this.getProfession(), this.getLevel()); | ||
} | ||
|
||
@Override | ||
@Nonnull | ||
public VillagerData withLevel(int level) { | ||
return new AtumVillagerData(this.getProfession(), level); | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
src/main/java/com/teammetallurgy/atum/entity/villager/AtumVillagerEntity.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package com.teammetallurgy.atum.entity.villager; | ||
|
||
import net.minecraft.entity.EntityType; | ||
import net.minecraft.entity.merchant.villager.VillagerData; | ||
import net.minecraft.entity.merchant.villager.VillagerEntity; | ||
import net.minecraft.entity.merchant.villager.VillagerProfession; | ||
import net.minecraft.entity.villager.VillagerType; | ||
import net.minecraft.world.World; | ||
|
||
import javax.annotation.Nonnull; | ||
|
||
public class AtumVillagerEntity extends VillagerEntity { | ||
|
||
public AtumVillagerEntity(EntityType<? extends VillagerEntity> type, World world) { | ||
super(type, world, VillagerType.DESERT); //Type not used, by Atum villagers | ||
} | ||
|
||
@Override | ||
@Nonnull | ||
public VillagerData getVillagerData() { | ||
return super.getVillagerData(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-146 Bytes
(93%)
src/main/resources/data/atum/structures/village/generic/houses/animal_pen_1.nbt
Binary file not shown.
Binary file modified
BIN
+1.88 KB
(100%)
src/main/resources/data/atum/structures/village/generic/houses/farm_1.nbt
Binary file not shown.
Binary file modified
BIN
+1.63 KB
(100%)
src/main/resources/data/atum/structures/village/generic/houses/farm_2.nbt
Binary file not shown.
Binary file modified
BIN
+1.64 KB
(100%)
src/main/resources/data/atum/structures/village/generic/houses/farm_3.nbt
Binary file not shown.