Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
迫不得已
  • Loading branch information
nageih committed Feb 8, 2024
1 parent 551e849 commit 5ceecef
Show file tree
Hide file tree
Showing 33 changed files with 15,315 additions and 0 deletions.
513 changes: 513 additions & 0 deletions Patch-Pack-CN/FTB_AI/customnpcs/clones/1/Air Core.json

Large diffs are not rendered by default.

527 changes: 527 additions & 0 deletions Patch-Pack-CN/FTB_AI/customnpcs/clones/1/Earth Core.json

Large diffs are not rendered by default.

862 changes: 862 additions & 0 deletions Patch-Pack-CN/FTB_AI/customnpcs/clones/1/Evil Witch Bossfight.json

Large diffs are not rendered by default.

862 changes: 862 additions & 0 deletions Patch-Pack-CN/FTB_AI/customnpcs/clones/1/Evil Witch.json

Large diffs are not rendered by default.

646 changes: 646 additions & 0 deletions Patch-Pack-CN/FTB_AI/customnpcs/clones/1/Fire Core #2.json

Large diffs are not rendered by default.

516 changes: 516 additions & 0 deletions Patch-Pack-CN/FTB_AI/customnpcs/clones/1/Fire Core.json

Large diffs are not rendered by default.

696 changes: 696 additions & 0 deletions Patch-Pack-CN/FTB_AI/customnpcs/clones/1/Sealed Witch.json

Large diffs are not rendered by default.

93 changes: 93 additions & 0 deletions Patch-Pack-CN/FTB_AI/customnpcs/dialogs/Villager/1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
"DialogShowWheel": 0b,
"AvailabilityQuestId": -1,
"Options": [
{
"OptionSlot": 0,
"Option": {
"DialogCommand": "",
"Dialog": 3,
"Title": "Who are you?",
"DialogColor": 14737632,
"OptionType": 1
}
},
{
"OptionSlot": 1,
"Option": {
"DialogCommand": "",
"Dialog": 2,
"Title": "Tell me something about this village",
"DialogColor": 14737632,
"OptionType": 1
}
},
{
"OptionSlot": 2,
"Option": {
"DialogCommand": "",
"Dialog": -1,
"Title": "Goodbye",
"DialogColor": 14737632,
"OptionType": 0
}
}
],
"AvailabilityScoreboardType": 1,
"DialogHideNPC": 0b,
"AvailabilityFactionStance": 0,
"AvailabilityScoreboard2Value": 1,
"DialogId": 1,
"AvailabilityQuest": 0,
"AvailabilityDialog4": 0,
"AvailabilityScoreboardObjective": "",
"AvailabilityDialog3": 0,
"AvailabilityQuest2": 0,
"AvailabilityQuest3": 0,
"AvailabilityScoreboard2Objective": "",
"AvailabilityQuest4": 0,
"ModRev": 18,
"DecreaseFaction1Points": 0b,
"DialogQuest": -1,
"AvailabilityDialog2": 0,
"OptionFactions1": -1,
"AvailabilityDayTime": 0,
"OptionFactions2": -1,
"AvailabilityFaction2Id": -1,
"OptionFaction1Points": 100,
"AvailabilityScoreboardValue": 1,
"DialogDisableEsc": 0b,
"AvailabilityFaction": 0,
"DialogTitle": "Start",
"AvailabilityDialog": 0,
"AvailabilityScoreboard2Type": 1,
"AvailabilityFaction2": 0,
"AvailabilityFactionId": -1,
"AvailabilityFaction2Stance": 0,
"DialogCommand": "",
"AvailabilityDialogId": -1,
"OptionFaction2Points": 100,
"DialogText": "Hello {player},

Welcome to our village. I hope you enjoy your stay",
"AvailabilityQuest4Id": -1,
"AvailabilityQuest3Id": -1,
"AvailabilityQuest2Id": -1,
"AvailabilityDialog2Id": -1,
"AvailabilityDialog3Id": -1,
"AvailabilityDialog4Id": -1,
"AvailabilityMinPlayerLevel": 0,
"DecreaseFaction2Points": 0b,
"DialogMail": {
"Sender": "",
"BeenRead": 0b,
"Message": {
},
"MailItems": [
],
"MailQuest": -1,
"TimePast": 1691230546297L,
"Time": 0L,
"Subject": ""
}
}
71 changes: 71 additions & 0 deletions Patch-Pack-CN/FTB_AI/customnpcs/dialogs/Villager/2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"DialogShowWheel": 0b,
"AvailabilityQuestId": -1,
"Options": [
{
"OptionSlot": 1,
"Option": {
"DialogCommand": "",
"Dialog": 1,
"Title": "Back",
"DialogColor": 14737632,
"OptionType": 1
}
}
],
"AvailabilityScoreboardType": 1,
"DialogHideNPC": 0b,
"AvailabilityFactionStance": 0,
"AvailabilityScoreboard2Value": 1,
"DialogId": 2,
"AvailabilityQuest": 0,
"AvailabilityDialog4": 0,
"AvailabilityScoreboardObjective": "",
"AvailabilityDialog3": 0,
"AvailabilityQuest2": 0,
"AvailabilityQuest3": 0,
"AvailabilityScoreboard2Objective": "",
"AvailabilityQuest4": 0,
"ModRev": 18,
"DecreaseFaction1Points": 0b,
"DialogQuest": -1,
"AvailabilityDialog2": 0,
"OptionFactions1": -1,
"AvailabilityDayTime": 0,
"OptionFactions2": -1,
"AvailabilityFaction2Id": -1,
"OptionFaction1Points": 100,
"AvailabilityScoreboardValue": 1,
"DialogDisableEsc": 0b,
"AvailabilityFaction": 0,
"DialogTitle": "Ask about village",
"AvailabilityDialog": 0,
"AvailabilityScoreboard2Type": 1,
"AvailabilityFaction2": 0,
"AvailabilityFactionId": -1,
"AvailabilityFaction2Stance": 0,
"DialogCommand": "",
"AvailabilityDialogId": -1,
"OptionFaction2Points": 100,
"DialogText": "This village has been around for ages. Enjoy your stay here.",
"AvailabilityQuest4Id": -1,
"AvailabilityQuest3Id": -1,
"AvailabilityQuest2Id": -1,
"AvailabilityDialog2Id": -1,
"AvailabilityDialog3Id": -1,
"AvailabilityDialog4Id": -1,
"AvailabilityMinPlayerLevel": 0,
"DecreaseFaction2Points": 0b,
"DialogMail": {
"Sender": "",
"BeenRead": 0b,
"Message": {
},
"MailItems": [
],
"MailQuest": -1,
"TimePast": 1691230546299L,
"Time": 0L,
"Subject": ""
}
}
71 changes: 71 additions & 0 deletions Patch-Pack-CN/FTB_AI/customnpcs/dialogs/Villager/3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"DialogShowWheel": 0b,
"AvailabilityQuestId": -1,
"Options": [
{
"OptionSlot": 1,
"Option": {
"DialogCommand": "",
"Dialog": 1,
"Title": "Back",
"DialogColor": 14737632,
"OptionType": 1
}
}
],
"AvailabilityScoreboardType": 1,
"DialogHideNPC": 0b,
"AvailabilityFactionStance": 0,
"AvailabilityScoreboard2Value": 1,
"DialogId": 3,
"AvailabilityQuest": 0,
"AvailabilityDialog4": 0,
"AvailabilityScoreboardObjective": "",
"AvailabilityDialog3": 0,
"AvailabilityQuest2": 0,
"AvailabilityQuest3": 0,
"AvailabilityScoreboard2Objective": "",
"AvailabilityQuest4": 0,
"ModRev": 18,
"DecreaseFaction1Points": 0b,
"DialogQuest": -1,
"AvailabilityDialog2": 0,
"OptionFactions1": -1,
"AvailabilityDayTime": 0,
"OptionFactions2": -1,
"AvailabilityFaction2Id": -1,
"OptionFaction1Points": 100,
"AvailabilityScoreboardValue": 1,
"DialogDisableEsc": 0b,
"AvailabilityFaction": 0,
"DialogTitle": "Who are you",
"AvailabilityDialog": 0,
"AvailabilityScoreboard2Type": 1,
"AvailabilityFaction2": 0,
"AvailabilityFactionId": -1,
"AvailabilityFaction2Stance": 0,
"DialogCommand": "",
"AvailabilityDialogId": -1,
"OptionFaction2Points": 100,
"DialogText": "I'm a villager here. I have lived in this village my whole life.",
"AvailabilityQuest4Id": -1,
"AvailabilityQuest3Id": -1,
"AvailabilityQuest2Id": -1,
"AvailabilityDialog2Id": -1,
"AvailabilityDialog3Id": -1,
"AvailabilityDialog4Id": -1,
"AvailabilityMinPlayerLevel": 0,
"DecreaseFaction2Points": 0b,
"DialogMail": {
"Sender": "",
"BeenRead": 0b,
"Message": {
},
"MailItems": [
],
"MailQuest": -1,
"TimePast": 1691230546300L,
"Time": 0L,
"Subject": ""
}
}
72 changes: 72 additions & 0 deletions Patch-Pack-CN/FTB_AI/customnpcs/ecmascript/animation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
function moveBody(npc, pose){

moveBodypart(npc, pose.head)
moveBodypart(npc, pose.body)
moveBodypart(npc, pose.arm.left)
moveBodypart(npc, pose.arm.right)
moveBodypart(npc, pose.leg.left)
moveBodypart(npc, pose.leg.right)

}
function moveBodypart(npc, bodyPart){
var puppet = npc.job
var origin = {
x:puppet.getPart(bodyPart.id).getRotationX(),
y:puppet.getPart(bodyPart.id).getRotationY(),
z:puppet.getPart(bodyPart.id).getRotationZ()
}
if(
bodyPart.x == origin.x &&
bodyPart.y == origin.y &&
bodyPart.z == origin.z
) return

var ease = bodyPart.ease
var animationDelay = bodyPart.animationDelay
var animationResolution = bodyPart.animationResolution


var MyThread = Java.extend(Thread, {
run: function() {
for (var i = 0; i <= animationResolution; i++){
var t
if(ease == "none") t = i/animationResolution
else t = ease(i/animationResolution)

var iRot = {
x: lerp(origin.x, bodyPart.x, t),
y: lerp(origin.y, bodyPart.y, t),
z: lerp(origin.z, bodyPart.z, t)
};
puppet.getPart(bodyPart.id).setRotation(iRot.x, iRot.y, iRot.z)
npc.updateClient()
// MCEntity.f_19864_ = true

Thread.sleep(animationDelay)
}
}
}); var th = new MyThread(); th.start()
}
function animateList(npc, list){

var MyThread = Java.extend(Thread, {
run: function() {
for(var i = 0; i < list.length; i++){
var cur_animation = list[i]
//get all animation delay*resolution and get the highest value
var times = [
cur_animation.head.animationDelay*cur_animation.head.animationResolution,
cur_animation.arm.left.animationDelay*cur_animation.arm.left.animationResolution,
cur_animation.arm.right.animationDelay*cur_animation.arm.right.animationResolution,
cur_animation.body.animationDelay*cur_animation.body.animationResolution,
cur_animation.leg.left.animationDelay*cur_animation.leg.left.animationResolution,
cur_animation.leg.right.animationDelay*cur_animation.leg.right.animationResolution,
]

var duration = Math.max(times[0], times[1], times[2], times[3], times[4], times[5])
moveBody(npc, list[i])
Thread.sleep(duration+200)
}
}
}); var th = new MyThread(); th.start()
}
Loading

0 comments on commit 5ceecef

Please sign in to comment.