Add.. PAWS
This commit is contained in:
@@ -2,7 +2,7 @@ org.gradle.jvmargs=-Xmx2G
|
|||||||
|
|
||||||
group=com.vixis
|
group=com.vixis
|
||||||
name=vixis
|
name=vixis
|
||||||
version=0.1.0
|
version=0.1.1
|
||||||
|
|
||||||
minecraft_version=1.12.2
|
minecraft_version=1.12.2
|
||||||
forge_version=14.23.5.2860
|
forge_version=14.23.5.2860
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import org.apache.logging.log4j.Logger;
|
|||||||
public class Vixis {
|
public class Vixis {
|
||||||
public static final String MODID = "vixis";
|
public static final String MODID = "vixis";
|
||||||
public static final String NAME = "Vixis";
|
public static final String NAME = "Vixis";
|
||||||
public static final String VERSION = "0.1.0";
|
public static final String VERSION = "0.1.1";
|
||||||
|
|
||||||
public static final Logger LOGGER = LogManager.getLogger(MODID);
|
public static final Logger LOGGER = LogManager.getLogger(MODID);
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,9 @@ import net.minecraft.util.ResourceLocation;
|
|||||||
|
|
||||||
public final class VixisAdvancements {
|
public final class VixisAdvancements {
|
||||||
public static final ResourceLocation KISS_A_FOX = new ResourceLocation(Vixis.MODID, "kiss_a_fox");
|
public static final ResourceLocation KISS_A_FOX = new ResourceLocation(Vixis.MODID, "kiss_a_fox");
|
||||||
|
public static final ResourceLocation VORE_MENTIONED = new ResourceLocation(Vixis.MODID, "vore_mentioned");
|
||||||
|
public static final ResourceLocation PET_THAT_DOG = new ResourceLocation(Vixis.MODID, "pet_that_dog");
|
||||||
|
public static final ResourceLocation PAW_MENTIONED = new ResourceLocation(Vixis.MODID, "paw_mentioned");
|
||||||
|
|
||||||
private VixisAdvancements() {
|
private VixisAdvancements() {
|
||||||
}
|
}
|
||||||
|
|||||||
32
src/main/java/com/vixis/event/ChatKeywordHandler.java
Normal file
32
src/main/java/com/vixis/event/ChatKeywordHandler.java
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
package com.vixis.event;
|
||||||
|
|
||||||
|
import com.vixis.Vixis;
|
||||||
|
import com.vixis.advancement.VixisAdvancements;
|
||||||
|
import net.minecraft.util.ResourceLocation;
|
||||||
|
import net.minecraftforge.event.ServerChatEvent;
|
||||||
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
|
||||||
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
|
@Mod.EventBusSubscriber(modid = Vixis.MODID)
|
||||||
|
public final class ChatKeywordHandler {
|
||||||
|
private static final Pattern VORE_WORD = Pattern.compile("\\bvore\\b", Pattern.CASE_INSENSITIVE);
|
||||||
|
private static final Pattern PAW_WORD = Pattern.compile("\\bpaws?\\b", Pattern.CASE_INSENSITIVE);
|
||||||
|
|
||||||
|
private ChatKeywordHandler() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public static void onChat(ServerChatEvent event) {
|
||||||
|
String message = event.getMessage();
|
||||||
|
grantIfMatch(event, message, VORE_WORD, VixisAdvancements.VORE_MENTIONED);
|
||||||
|
grantIfMatch(event, message, PAW_WORD, VixisAdvancements.PAW_MENTIONED);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void grantIfMatch(ServerChatEvent event, String message, Pattern pattern, ResourceLocation advancement) {
|
||||||
|
if (pattern.matcher(message).find()) {
|
||||||
|
VixisAdvancements.grant(event.getPlayer(), advancement);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
37
src/main/java/com/vixis/event/PetDogHandler.java
Normal file
37
src/main/java/com/vixis/event/PetDogHandler.java
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
package com.vixis.event;
|
||||||
|
|
||||||
|
import com.vixis.Vixis;
|
||||||
|
import com.vixis.advancement.VixisAdvancements;
|
||||||
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.passive.EntityWolf;
|
||||||
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
|
import net.minecraftforge.fml.common.Mod;
|
||||||
|
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||||
|
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||||
|
|
||||||
|
@Mod.EventBusSubscriber(modid = Vixis.MODID)
|
||||||
|
public final class PetDogHandler {
|
||||||
|
private PetDogHandler() {
|
||||||
|
}
|
||||||
|
|
||||||
|
@SubscribeEvent
|
||||||
|
public static void onPlayerTick(TickEvent.PlayerTickEvent event) {
|
||||||
|
if (event.phase != TickEvent.Phase.END || event.player.world.isRemote) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!(event.player instanceof EntityPlayerMP)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
EntityPlayerMP player = (EntityPlayerMP) event.player;
|
||||||
|
for (Entity entity : player.world.loadedEntityList) {
|
||||||
|
if (!(entity instanceof EntityWolf)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (player.getEntityBoundingBox().intersects(entity.getEntityBoundingBox())) {
|
||||||
|
VixisAdvancements.grant(player, VixisAdvancements.PET_THAT_DOG);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,9 @@ import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
|||||||
public final class ModItems {
|
public final class ModItems {
|
||||||
public static Item LOGO;
|
public static Item LOGO;
|
||||||
public static Item KISS_CHEEV;
|
public static Item KISS_CHEEV;
|
||||||
|
public static Item VORE_MENTIONED;
|
||||||
|
public static Item PET_THAT_DOG;
|
||||||
|
public static Item PAW_MENTIONED;
|
||||||
|
|
||||||
private ModItems() {
|
private ModItems() {
|
||||||
}
|
}
|
||||||
@@ -28,6 +31,24 @@ public final class ModItems {
|
|||||||
KISS_CHEEV.setCreativeTab(CreativeTabs.MISC);
|
KISS_CHEEV.setCreativeTab(CreativeTabs.MISC);
|
||||||
KISS_CHEEV.setMaxStackSize(1);
|
KISS_CHEEV.setMaxStackSize(1);
|
||||||
|
|
||||||
event.getRegistry().registerAll(LOGO, KISS_CHEEV);
|
VORE_MENTIONED = new Item();
|
||||||
|
VORE_MENTIONED.setRegistryName(Vixis.MODID, "vore_mentioned");
|
||||||
|
VORE_MENTIONED.setTranslationKey(Vixis.MODID + ".vore_mentioned");
|
||||||
|
VORE_MENTIONED.setCreativeTab(CreativeTabs.MISC);
|
||||||
|
VORE_MENTIONED.setMaxStackSize(1);
|
||||||
|
|
||||||
|
PET_THAT_DOG = new Item();
|
||||||
|
PET_THAT_DOG.setRegistryName(Vixis.MODID, "pet_that_dog");
|
||||||
|
PET_THAT_DOG.setTranslationKey(Vixis.MODID + ".pet_that_dog");
|
||||||
|
PET_THAT_DOG.setCreativeTab(CreativeTabs.MISC);
|
||||||
|
PET_THAT_DOG.setMaxStackSize(1);
|
||||||
|
|
||||||
|
PAW_MENTIONED = new Item();
|
||||||
|
PAW_MENTIONED.setRegistryName(Vixis.MODID, "paw_mentioned");
|
||||||
|
PAW_MENTIONED.setTranslationKey(Vixis.MODID + ".paw_mentioned");
|
||||||
|
PAW_MENTIONED.setCreativeTab(CreativeTabs.MISC);
|
||||||
|
PAW_MENTIONED.setMaxStackSize(1);
|
||||||
|
|
||||||
|
event.getRegistry().registerAll(LOGO, KISS_CHEEV, VORE_MENTIONED, PET_THAT_DOG, PAW_MENTIONED);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ public final class ModItemsClient {
|
|||||||
public static void registerModels(ModelRegistryEvent event) {
|
public static void registerModels(ModelRegistryEvent event) {
|
||||||
register(ModItems.LOGO);
|
register(ModItems.LOGO);
|
||||||
register(ModItems.KISS_CHEEV);
|
register(ModItems.KISS_CHEEV);
|
||||||
|
register(ModItems.VORE_MENTIONED);
|
||||||
|
register(ModItems.PET_THAT_DOG);
|
||||||
|
register(ModItems.PAW_MENTIONED);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void register(Item item) {
|
private static void register(Item item) {
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"parent": "vixis:root",
|
||||||
|
"display": {
|
||||||
|
"icon": {
|
||||||
|
"item": "vixis:paw_mentioned"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"translate": "advancements.vixis.paw_mentioned.title"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"translate": "advancements.vixis.paw_mentioned.description"
|
||||||
|
},
|
||||||
|
"frame": "task",
|
||||||
|
"show_toast": true,
|
||||||
|
"announce_to_chat": true,
|
||||||
|
"hidden": true
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"said_paw": {
|
||||||
|
"trigger": "minecraft:impossible"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"parent": "vixis:root",
|
||||||
|
"display": {
|
||||||
|
"icon": {
|
||||||
|
"item": "vixis:pet_that_dog"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"translate": "advancements.vixis.pet_that_dog.title"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"translate": "advancements.vixis.pet_that_dog.description"
|
||||||
|
},
|
||||||
|
"frame": "task",
|
||||||
|
"show_toast": true,
|
||||||
|
"announce_to_chat": true,
|
||||||
|
"hidden": true
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"petted_dog": {
|
||||||
|
"trigger": "minecraft:impossible"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"parent": "vixis:root",
|
||||||
|
"display": {
|
||||||
|
"icon": {
|
||||||
|
"item": "vixis:vore_mentioned"
|
||||||
|
},
|
||||||
|
"title": {
|
||||||
|
"translate": "advancements.vixis.vore_mentioned.title"
|
||||||
|
},
|
||||||
|
"description": {
|
||||||
|
"translate": "advancements.vixis.vore_mentioned.description"
|
||||||
|
},
|
||||||
|
"frame": "task",
|
||||||
|
"show_toast": true,
|
||||||
|
"announce_to_chat": true,
|
||||||
|
"hidden": true
|
||||||
|
},
|
||||||
|
"criteria": {
|
||||||
|
"said_vore": {
|
||||||
|
"trigger": "minecraft:impossible"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,15 @@
|
|||||||
item.vixis.logo.name=Vixis
|
item.vixis.logo.name=Vixis
|
||||||
item.vixis.kiss_cheev.name=Kiss Cheev
|
item.vixis.kiss_cheev.name=Kiss Cheev
|
||||||
|
item.vixis.vore_mentioned.name=Vore Mentioned
|
||||||
|
item.vixis.pet_that_dog.name=Pet That Dog
|
||||||
|
item.vixis.paw_mentioned.name=Paw Mentioned
|
||||||
advancements.vixis.root.title=Vixi's Mod
|
advancements.vixis.root.title=Vixi's Mod
|
||||||
advancements.vixis.root.description=My Mod!
|
advancements.vixis.root.description=My Mod!
|
||||||
advancements.vixis.kiss_a_fox.title=Kiss a fox!
|
advancements.vixis.kiss_a_fox.title=Kiss a fox!
|
||||||
advancements.vixis.kiss_a_fox.description=Smooch a fox good!
|
advancements.vixis.kiss_a_fox.description=Smooch a fox good!
|
||||||
|
advancements.vixis.vore_mentioned.title=Vore Mentioned
|
||||||
|
advancements.vixis.vore_mentioned.description=You vored~
|
||||||
|
advancements.vixis.pet_that_dog.title=Pet That Dog!
|
||||||
|
advancements.vixis.pet_that_dog.description=Pet a wolf or doggo!
|
||||||
|
advancements.vixis.paw_mentioned.title=Paw "Focus"
|
||||||
|
advancements.vixis.paw_mentioned.description=You said paw~
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "vixis:items/paw_mentioned"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "vixis:items/pet_that_dog"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "vixis:items/vore_mentioned"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
src/main/resources/assets/vixis/textures/items/paw_mentioned.png
Normal file
BIN
src/main/resources/assets/vixis/textures/items/paw_mentioned.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
BIN
src/main/resources/assets/vixis/textures/items/pet_that_dog.png
Normal file
BIN
src/main/resources/assets/vixis/textures/items/pet_that_dog.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
BIN
src/main/resources/assets/vixis/textures/items/pet_that_dog.png~
Normal file
BIN
src/main/resources/assets/vixis/textures/items/pet_that_dog.png~
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
Reference in New Issue
Block a user