Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
Luis C.M committed 2022-10-29 16:48:41 -05:00
commit abd4ab58a3
12 files changed
+96 -32

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
name: Java CI with Gradle
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew SetupCIWorkspace build
- name: Build with Gradle (nomixin)
run: ./gradlew build -Pnomixin
- uses: actions/upload-artifact@v2
with:
name: Package
path: build/libs
+1
View File
@@ -10,3 +10,4 @@ eclipse
bin
.metadata
*.bak
classes
+20 -12
View File
@@ -4,7 +4,14 @@
> CustomNPC+ is a [Minecraft](https://minecraft.net/) mod that allows you to add custom NPCs to your world. It is developed for creative and storytelling players who want to make their Minecraft worlds more in-depth and unique. CustomNPC+ is only a branch version of the **1.7.10** Forge version of the original (down below) and has no plans to add or update any other version. This is not an official version of CustomNPC.
Link to CurseForge: [HERE](https://www.curseforge.com/minecraft/mc-mods/customnpc-plus)
**CurseForge**: [Download](https://www.curseforge.com/minecraft/mc-mods/customnpc-plus)
[![Discord Badge](https://img.shields.io/badge/KAMKEEL_Discord-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/pQqRTvFeJ5)
[![Download CustomNPC+](https://img.shields.io/badge/CustomNPC+-0081CB?style=for-the-badge&logo=material-ui&logoColor=white)](https://www.curseforge.com/minecraft/mc-mods/customnpc-plus)
[![Download CustomNPC+](https://img.shields.io/badge/MorePlayerModels+-0081CB?style=for-the-badge&logo=material-ui&logoColor=white)](https://www.curseforge.com/minecraft/mc-mods/moreplayermodels-plus)
[![Download PluginMod](https://img.shields.io/badge/Plugin_Mod-0081CB?style=for-the-badge&logo=material-ui&logoColor=white)](https://github.com/KAMKEEL/Plugin-Mod)
<a href="https://ko-fi.com/kamkeel"> <img src="https://i.imgur.com/zvdVbeW.png" alt="Support Me" width="180" height="27"> </a>
### ❗ Notice
I am not the original creator of CustomNPC. The original creator is @[Noppes](https://github.com/Noppes). I have been permitted to update the 1.7.10 and post my results on GitHub. The original mod that is updated to the latest versions of Minecraft can be found on these links: [CurseForge](https://www.curseforge.com/minecraft/mc-mods/custom-npcs), [kodevelopment](http://www.kodevelopment.nl/minecraft/customnpcs)
@@ -31,17 +38,16 @@ This mod is an ***update*** to CustomNPC and not an add-on. Do not install Custo
- Custom Part Disabling
- Markov Name Generator
- Flying NPCS
- Dark Mode (Link down below)
#### Scripting:
- Java Doc: [kamkeel.github.io/CustomNPC-Plus](https://kamkeel.github.io/CustomNPC-Plus/)
- Scripted Items
- Player Overlays
- GUI Overlays
- Scripting Fixes / New Functions: [Documentation](https://github.com/PewDizinho/CustomNPCPlus-Script-Documentation)
- Scripting Fixes / New Functions: [Documentation History](https://github.com/PewDizinho/CustomNPCPlus-Script-Documentation)
(We never remove script functionality, only add on existing functions)
--- Please Suggest New Features!
## 🔰 Skin Model Feature:
###### **Majority of these cape designs are taken from the internet with fair-usage.*
##### ❔ Please note all *local* skins in this version of CustomNPC, must match the model selected.
@@ -55,17 +61,19 @@ This mod is an ***update*** to CustomNPC and not an add-on. Do not install Custo
## 🔗 Want to check out my other projects?
[MorePlayerModels+](https://github.com/KAMKEEL/MorePlayerModels-Plus) is a continuation on the 1.7.10 MorePlayerModels version. It is not intended to be as polished as CustomNPC+. It will feature Alex, Steve64x64 skins. Hiding Body Parts. Advanced URL Selector. 3D Skins.
[Plugin Mod](https://github.com/KAMKEEL/Plugin-Mod) is a mod designed to add more aesthetic items for RPG and storytelling. It is compatible with CustomNPC+ and has many items intended to be used and wielded by created NPCs.
[RPG Messenger](https://github.com/KAMKEEL/RPGMessenger) is a bukkit plugin designed to allow operators to create messagable NPCs for RPG Servers. Allows a 'RPG Controller' to reply quickly as NPCs, form groupchats, and messagable parties.
[CustomNPC+ Dark Mode](https://github.com/KAMKEEL/CustomNPC-Plus-Dark-Mode) is a resource pack for CustomNPC+ that alters all GUIs within the mod to a dark variant that is both clean and pleasing to look at.
[![Discord Badge](https://img.shields.io/badge/CustomNPC-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/rgeWsmQaKa)
[![Discord Badge](https://img.shields.io/badge/CustomNPC+-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/pQqRTvFeJ5)
[![Download CustomNPC+](https://img.shields.io/badge/Download⠀CustomNPC⠀Plus!-0081CB?style=for-the-badge&logo=material-ui&logoColor=white)](https://www.curseforge.com/minecraft/mc-mods/customnpc-plus)
[![Download PluginMod](https://img.shields.io/badge/Download⠀Plugin⠀Mod!-0081CB?style=for-the-badge&logo=material-ui&logoColor=white)](https://github.com/KAMKEEL/Plugin-Mod)
<a href="https://ko-fi.com/kamkeel"> <img src="https://i.imgur.com/zvdVbeW.png" alt="Support Me on Kofi" width="180" height="27"> </a>
## Compiling / Building
Using IntelliJ, take the following steps:
1. Run `setupDecompWorkspace` under the `forgegradle` tab.
2. Refresh Gradle.
3. Run `genIntellijRuns` under the `other` tab to set up your Minecraft runs.
or for Eclipse, run `gradlew setupDecompWorkspace eclipse` then import the project.
Mixin code will not work if you do not add `--tweakClass org.spongepowered.asm.launch.MixinTweaker --mixin customnpcs.mixins.json` to your program arguments.
+25 -8
View File
@@ -24,7 +24,7 @@ configurations {
apply plugin: 'forge'
version = "1.6.2-pre2"
version = "1.6.4"
group= "com.kamkeel.customnpc-plus" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = "CustomNPC-Plus"
@@ -87,9 +87,15 @@ jar {
//Add
//--tweakClass org.spongepowered.asm.launch.MixinTweaker --mixin customnpcs.mixins.json
//to your client and server program arguments if working in a dev environment.
def embedMixin = !project.hasProperty("nomixin");
def yourMixinConfig = 'customnpcs.mixins.json'
def refMapForYourConfig = 'customnpcs.refmap.json'
def relativePathToMixinAP = 'tools/mixin-0.8-SNAPSHOT.jar'
if(!embedMixin){
version += "+nomixin"
}
repositories {
maven {
name = "sponge"
@@ -98,13 +104,24 @@ repositories {
}
dependencies {
embed('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
// Mixin includes a lot of dependencies that are too up-to-date
exclude module: 'launchwrapper'
exclude module: 'guava'
exclude module: 'gson'
exclude module: 'commons-io'
exclude module: 'log4j-core'
if(embedMixin){
embed('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
// Mixin includes a lot of dependencies that are too up-to-date
exclude module: 'launchwrapper'
exclude module: 'guava'
exclude module: 'gson'
exclude module: 'commons-io'
exclude module: 'log4j-core'
}
} else {
implementation('org.spongepowered:mixin:0.7.11-SNAPSHOT') {
// Mixin includes a lot of dependencies that are too up-to-date
exclude module: 'launchwrapper'
exclude module: 'guava'
exclude module: 'gson'
exclude module: 'commons-io'
exclude module: 'log4j-core'
}
}
}
+1 -1
View File
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
+4 -1
View File
@@ -34,7 +34,7 @@ import java.util.ArrayList;
import java.util.Set;
import java.util.UUID;
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.6.2-pre2")
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.6.4")
public class CustomNpcs {
@ConfigProp(info = "Disable Chat Bubbles")
@@ -159,6 +159,9 @@ public class CustomNpcs {
@ConfigProp(info="Font size for custom fonts (doesn't work with minecrafts font)")
public static int FontSize = 18;
@ConfigProp(info = "Enables Overlay Mixins for Conflicts relating to Optifine or other Skin Renderers. If crashes occur, please disable.")
public static boolean EntityRendererMixin = true;
public static FMLEventChannel Channel;
public static FMLEventChannel ChannelPlayer;
@@ -330,6 +330,9 @@ public class NoppesUtilPlayer {
Server.sendData(player, EnumPacketClient.GUI_DATA, data.writeNBT());
}
public static void questCompletion(EntityPlayerMP player, int questId) {
if(player == null)
return;
PlayerData playerData = PlayerDataController.instance.getPlayerData(player);
PlayerQuestData questData = playerData.questData;
QuestData data = questData.activeQuests.get(questId);
@@ -349,7 +352,10 @@ public class NoppesUtilPlayer {
while(var8.hasNext()) {
ItemStack item = (ItemStack)var8.next();
if (item.stackSize > 0) {
list.add(NpcAPI.Instance().getIItemStack(item));
IItemStack iStack = NpcAPI.Instance().getIItemStack(item);
if (iStack != null){
list.add(iStack);
}
}
}
@@ -379,8 +379,10 @@ public class ScriptPlayerEventHandler {
Entity source = NoppesUtilServer.GetDamageSourcee(event.source);
PlayerDataScript handler = ScriptController.Instance.playerScripts;
if(event.entityLiving instanceof EntityPlayer) {
IPlayer scriptPlayer = (IPlayer) NpcAPI.Instance().getIEntity(event.entityLiving);
EventHooks.onPlayerDeath(handler,scriptPlayer, event.source, source);
try {
IPlayer scriptPlayer = (IPlayer) NpcAPI.Instance().getIEntity(event.entityLiving);
EventHooks.onPlayerDeath(handler,scriptPlayer, event.source, source);
} catch (Exception ignored) {}
}
if(source instanceof EntityPlayer) {
@@ -185,6 +185,7 @@ public class GuiNpcDisplay extends GuiNPCInterface2 implements ITextfieldListene
}
else if(button.id == 11){
npc.display.skinOverlayData.overlayList.get(0).setGlow(button.getValue() == 0);
npc.display.skinOverlayData.overlayList.get(0).setBlend(button.getValue() == 0);
initGui();
}
else if(button.id == 14){
@@ -259,7 +259,7 @@ public class RenderNPCHumanMale extends RenderNPCInterface
GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
}
else if (itemstack2.getItem().isFull3D() && (customRenderer == null || pluginMod))
else if (itemstack2.getItem().isFull3D() && !is3D)
{
var6 = 0.625F;
@@ -367,7 +367,7 @@ public class RenderNPCHumanMale extends RenderNPCInterface
GL11.glRotatef(-100.0F, 1.0F, 0.0F, 0.0F);
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
}
else if (itemstack2.getItem().isFull3D())
else if (itemstack2.getItem().isFull3D() && !is3D)
{
var6 = 0.625F;
@@ -77,8 +77,8 @@ public class ItemSoulstoneFilled extends Item {
EntityNPCInterface npc = (EntityNPCInterface) entity;
npc.ai.startPos = new int[]{x, y, z};
npc.setHealth(npc.getMaxHealth());
npc.setPosition((float)x + 0.5F, npc.getStartYPos(), (float)z + 0.5F);
npc.advanced.soulStonePlayerName = player.getDisplayName();
npc.setPosition((float)x + 0.5F, npc.getStartYPos() - 0.5, (float)z + 0.5F);
npc.advanced.soulStonePlayerName = player.getDisplayName();
npc.advanced.soulStoneInit = true;
if(npc.advanced.role == EnumRoleType.Companion && player != null){
PlayerData data = PlayerDataController.instance.getPlayerData(player);
@@ -1,5 +1,6 @@
package noppes.npcs.mixin;
import noppes.npcs.CustomNpcs;
import org.spongepowered.asm.lib.tree.ClassNode;
import org.spongepowered.asm.mixin.extensibility.IMixinConfigPlugin;
import org.spongepowered.asm.mixin.extensibility.IMixinInfo;
@@ -32,9 +33,9 @@ public class CustomNPCsMixinPlugin implements IMixinConfigPlugin {
@Override
public List<String> getMixins() {
List<String> mixins = new ArrayList<>();
mixins.add("MixinEntityRenderer");
if (CustomNpcs.EntityRendererMixin){
mixins.add("MixinEntityRenderer");
}
return mixins;
}