Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0732d98ff8 | ||
|
|
32f89f8e92 | ||
|
|
65bb3b5939 | ||
|
|
e95eb0ee98 | ||
|
|
ea3669fed8 | ||
|
|
6294062d23 | ||
|
|
5aa5fb335c | ||
|
|
be44db63d3 | ||
|
|
993e7a9d7c | ||
|
|
ebc0b96582 | ||
|
|
6101e75306 | ||
|
|
4abe8dca92 | ||
|
|
8749ba0280 | ||
|
|
6a0af3b0a0 | ||
|
|
f59b5d1e87 | ||
|
|
cddada1984 | ||
|
|
917f0d030a |
No files matched your search
@@ -17,7 +17,7 @@ buildscript {
|
|||||||
|
|
||||||
apply plugin: 'forge'
|
apply plugin: 'forge'
|
||||||
|
|
||||||
version = "1.5.2"
|
version = "1.5.3"
|
||||||
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
group= "com.yourname.modid" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
archivesBaseName = "CustomNPC-Plus"
|
archivesBaseName = "CustomNPC-Plus"
|
||||||
|
|
||||||
@@ -34,6 +34,16 @@ configurations {
|
|||||||
compile.extendsFrom shade
|
compile.extendsFrom shade
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// List of all supported OS for zstd compression (This is include only for anyone which is not using the default compression)
|
||||||
|
def supportedOS = [
|
||||||
|
"linux_amd64",
|
||||||
|
"linux_i386",
|
||||||
|
"win_amd64",
|
||||||
|
"win_x86",
|
||||||
|
"darwin_x86_64",
|
||||||
|
"darwin_aarch64"
|
||||||
|
]
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// you may put jars on which you depend on in ./libs
|
// you may put jars on which you depend on in ./libs
|
||||||
// or you may define them like so..
|
// or you may define them like so..
|
||||||
@@ -47,7 +57,12 @@ dependencies {
|
|||||||
// for more info...
|
// for more info...
|
||||||
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
// http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html
|
||||||
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
// http://www.gradle.org/docs/current/userguide/dependency_management.html
|
||||||
shade 'com.github.luben:zstd-jni:1.5.2-2'
|
// shade 'com.github.luben:zstd-jni:1.5.2-2' - Remove almost implementations of zstd
|
||||||
|
|
||||||
|
for (os in supportedOS) {
|
||||||
|
shade ("com.github.luben:zstd-jni:1.5.2-2:${os}")
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
processResources
|
processResources
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import foxz.commandhelper.ChMcLogger;
|
|||||||
import foxz.commandhelper.annotations.Command;
|
import foxz.commandhelper.annotations.Command;
|
||||||
import foxz.commandhelper.annotations.SubCommand;
|
import foxz.commandhelper.annotations.SubCommand;
|
||||||
import foxz.commandhelper.permissions.OpOnly;
|
import foxz.commandhelper.permissions.OpOnly;
|
||||||
import me.luizotavio.compressor.ZstdCompressor;
|
import luizotavio.compressor.ZstdCompressor;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import noppes.npcs.controllers.PlayerDataController;
|
import noppes.npcs.controllers.PlayerDataController;
|
||||||
import noppes.npcs.util.NBTJsonUtil;
|
import noppes.npcs.util.NBTJsonUtil;
|
||||||
@@ -18,7 +18,7 @@ import java.util.concurrent.ExecutionException;
|
|||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
import java.util.concurrent.TimeoutException;
|
import java.util.concurrent.TimeoutException;
|
||||||
|
|
||||||
import static me.luizotavio.compressor.executor.IOExecutor.IO_EXECUTOR;
|
import static luizotavio.compressor.executor.IOExecutor.IO_EXECUTOR;
|
||||||
|
|
||||||
@Command(
|
@Command(
|
||||||
name = "compressor",
|
name = "compressor",
|
||||||
|
|||||||
@@ -123,6 +123,6 @@ public class CmdDialog extends ChMcLogger {
|
|||||||
option.dialogId = diagid;
|
option.dialogId = diagid;
|
||||||
option.title = dialog.title;
|
option.title = dialog.title;
|
||||||
npc.dialogs.put(0, option);
|
npc.dialogs.put(0, option);
|
||||||
NoppesUtilServer.openDialog(player, npc, dialog);
|
NoppesUtilServer.openDialog(player, npc, dialog, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package me.luizotavio.compressor;
|
package luizotavio.compressor;
|
||||||
|
|
||||||
import com.github.luben.zstd.Zstd;
|
import com.github.luben.zstd.Zstd;
|
||||||
import net.minecraft.nbt.CompressedStreamTools;
|
import net.minecraft.nbt.CompressedStreamTools;
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
package me.luizotavio.compressor.executor;
|
package luizotavio.compressor.executor;
|
||||||
|
|
||||||
import java.util.concurrent.ExecutorService;
|
import java.util.concurrent.ExecutorService;
|
||||||
|
|
||||||
@@ -10,7 +10,7 @@ import cpw.mods.fml.common.network.FMLEventChannel;
|
|||||||
import cpw.mods.fml.common.network.NetworkRegistry;
|
import cpw.mods.fml.common.network.NetworkRegistry;
|
||||||
import cpw.mods.fml.common.registry.EntityRegistry;
|
import cpw.mods.fml.common.registry.EntityRegistry;
|
||||||
import foxz.command.CommandNoppes;
|
import foxz.command.CommandNoppes;
|
||||||
import me.luizotavio.compressor.executor.IOExecutor;
|
import luizotavio.compressor.executor.IOExecutor;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockIce;
|
import net.minecraft.block.BlockIce;
|
||||||
import net.minecraft.block.BlockLeavesBase;
|
import net.minecraft.block.BlockLeavesBase;
|
||||||
@@ -33,7 +33,7 @@ import java.io.File;
|
|||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.concurrent.Executors;
|
import java.util.concurrent.Executors;
|
||||||
|
|
||||||
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.5.2")
|
@Mod(modid = "customnpcs", name = "CustomNpcs", version = "1.5.3")
|
||||||
public class CustomNpcs {
|
public class CustomNpcs {
|
||||||
|
|
||||||
@ConfigProp(info = "Disable Chat Bubbles")
|
@ConfigProp(info = "Disable Chat Bubbles")
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ public class EventHooks {
|
|||||||
|
|
||||||
noppes.npcs.scripted.event.NpcEvent.InitEvent event = new noppes.npcs.scripted.event.NpcEvent.InitEvent(npc.wrappedNPC);
|
noppes.npcs.scripted.event.NpcEvent.InitEvent event = new noppes.npcs.scripted.event.NpcEvent.InitEvent(npc.wrappedNPC);
|
||||||
ScriptController.Instance.npcScripts.callScript(EnumScriptType.INIT, event);
|
ScriptController.Instance.npcScripts.callScript(EnumScriptType.INIT, event);
|
||||||
|
npc.script.callScript(EnumScriptType.INIT);
|
||||||
WrapperNpcAPI.EVENT_BUS.post(event);
|
WrapperNpcAPI.EVENT_BUS.post(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,13 +70,13 @@ public class EventHooks {
|
|||||||
WrapperNpcAPI.EVENT_BUS.post(event);
|
WrapperNpcAPI.EVENT_BUS.post(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void onNPCDialog(EntityNPCInterface npc, EntityPlayer player, int id, Dialog dialog) {
|
public static void onNPCDialog(EntityNPCInterface npc, EntityPlayer player, int dialogId, int optionId, Dialog dialog) {
|
||||||
if(npc == null || npc.wrappedNPC == null)
|
if(npc == null || npc.wrappedNPC == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
NpcEvent.DialogEvent event = new NpcEvent.DialogEvent(npc.wrappedNPC, player, id, dialog);
|
NpcEvent.DialogEvent event = new NpcEvent.DialogEvent(npc.wrappedNPC, player, dialogId, optionId, dialog);
|
||||||
ScriptController.Instance.npcScripts.callScript(EnumScriptType.DIALOG, event);
|
ScriptController.Instance.npcScripts.callScript(EnumScriptType.DIALOG, event);
|
||||||
npc.script.callScript(EnumScriptType.DIALOG, "event", new ScriptEventDialog(), "player", player, "dialog", dialog.id);
|
npc.script.callScript(EnumScriptType.DIALOG, "event", new ScriptEventDialog(player,dialogId,optionId,dialog));
|
||||||
WrapperNpcAPI.EVENT_BUS.post(event);
|
WrapperNpcAPI.EVENT_BUS.post(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -85,7 +86,7 @@ public class EventHooks {
|
|||||||
|
|
||||||
NpcEvent.DialogClosedEvent event = new NpcEvent.DialogClosedEvent(npc.wrappedNPC, player, dialogId, optionId, dialog);
|
NpcEvent.DialogClosedEvent event = new NpcEvent.DialogClosedEvent(npc.wrappedNPC, player, dialogId, optionId, dialog);
|
||||||
ScriptController.Instance.npcScripts.callScript(EnumScriptType.DIALOG_CLOSE, event);
|
ScriptController.Instance.npcScripts.callScript(EnumScriptType.DIALOG_CLOSE, event);
|
||||||
npc.script.callScript(EnumScriptType.DIALOG_CLOSE, "player", player, "dialog", dialogId, "option", optionId + 1);
|
npc.script.callScript(EnumScriptType.DIALOG_CLOSE, "event", new ScriptEventDialog(player,dialogId,optionId,dialog));
|
||||||
WrapperNpcAPI.EVENT_BUS.post(event);
|
WrapperNpcAPI.EVENT_BUS.post(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -106,7 +107,7 @@ public class EventHooks {
|
|||||||
|
|
||||||
NpcEvent.MeleeAttackEvent event = new NpcEvent.MeleeAttackEvent(npc.wrappedNPC,damage,target);
|
NpcEvent.MeleeAttackEvent event = new NpcEvent.MeleeAttackEvent(npc.wrappedNPC,damage,target);
|
||||||
ScriptController.Instance.npcScripts.callScript(EnumScriptType.ATTACK_MELEE, event);
|
ScriptController.Instance.npcScripts.callScript(EnumScriptType.ATTACK_MELEE, event);
|
||||||
boolean result = npc.script.callScript(EnumScriptType.ATTACK, "event", event, "target", target);
|
boolean result = npc.script.callScript(EnumScriptType.ATTACK, "event", new ScriptEventAttack(damage,target,false), "target", target);
|
||||||
WrapperNpcAPI.EVENT_BUS.post(event);
|
WrapperNpcAPI.EVENT_BUS.post(event);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -117,7 +118,7 @@ public class EventHooks {
|
|||||||
|
|
||||||
NpcEvent.RangedLaunchedEvent event = new NpcEvent.RangedLaunchedEvent(npc.wrappedNPC,damage,target);
|
NpcEvent.RangedLaunchedEvent event = new NpcEvent.RangedLaunchedEvent(npc.wrappedNPC,damage,target);
|
||||||
ScriptController.Instance.npcScripts.callScript(EnumScriptType.RANGED_LAUNCHED, event);
|
ScriptController.Instance.npcScripts.callScript(EnumScriptType.RANGED_LAUNCHED, event);
|
||||||
boolean result = npc.script.callScript(EnumScriptType.ATTACK, "event", event, "target", target);
|
boolean result = npc.script.callScript(EnumScriptType.ATTACK, "event", new ScriptEventAttack(damage,target,true), "target", target);
|
||||||
WrapperNpcAPI.EVENT_BUS.post(event);
|
WrapperNpcAPI.EVENT_BUS.post(event);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -138,7 +139,7 @@ public class EventHooks {
|
|||||||
|
|
||||||
NpcEvent.TargetEvent event = new NpcEvent.TargetEvent(npc.wrappedNPC,target);
|
NpcEvent.TargetEvent event = new NpcEvent.TargetEvent(npc.wrappedNPC,target);
|
||||||
ScriptController.Instance.npcScripts.callScript(EnumScriptType.TARGET, event);
|
ScriptController.Instance.npcScripts.callScript(EnumScriptType.TARGET, event);
|
||||||
boolean result = npc.script.callScript(EnumScriptType.TARGET, "event", event);
|
boolean result = npc.script.callScript(EnumScriptType.TARGET, "event", new ScriptEventTarget(target));
|
||||||
WrapperNpcAPI.EVENT_BUS.post(event);
|
WrapperNpcAPI.EVENT_BUS.post(event);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -35,9 +35,6 @@ public class ModelPartData {
|
|||||||
type = compound.getByte("Type");
|
type = compound.getByte("Type");
|
||||||
color = compound.getInteger("Color");
|
color = compound.getInteger("Color");
|
||||||
texture = compound.getString("Texture");
|
texture = compound.getString("Texture");
|
||||||
if(texture.contains("moreplayermodels:textures")){
|
|
||||||
texture = texture.replace("moreplayermodels:textures", "customnpcs:textures/parts");
|
|
||||||
}
|
|
||||||
playerTexture = compound.getBoolean("PlayerTexture");
|
playerTexture = compound.getBoolean("PlayerTexture");
|
||||||
location = null;
|
location = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -271,7 +271,7 @@ public class NoppesUtilPlayer {
|
|||||||
Server.sendData(player, EnumPacketClient.GUI_CLOSE);
|
Server.sendData(player, EnumPacketClient.GUI_CLOSE);
|
||||||
}
|
}
|
||||||
else if(option.optionType == EnumOptionType.DialogOption){
|
else if(option.optionType == EnumOptionType.DialogOption){
|
||||||
NoppesUtilServer.openDialog(player, npc, option.getDialog());
|
NoppesUtilServer.openDialog(player, npc, option.getDialog(), optionId+1);
|
||||||
}
|
}
|
||||||
else if(option.optionType == EnumOptionType.CommandBlock){
|
else if(option.optionType == EnumOptionType.CommandBlock){
|
||||||
Server.sendData(player, EnumPacketClient.GUI_CLOSE);
|
Server.sendData(player, EnumPacketClient.GUI_CLOSE);
|
||||||
|
|||||||
@@ -180,7 +180,7 @@ public class NoppesUtilServer {
|
|||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void openDialog(EntityPlayer player, EntityNPCInterface npc, Dialog dia){
|
public static void openDialog(EntityPlayer player, EntityNPCInterface npc, Dialog dia, int optionId){
|
||||||
Dialog dialog = dia.copy(player);
|
Dialog dialog = dia.copy(player);
|
||||||
|
|
||||||
EventHooks.onDialogOpen(new DialogEvent.DialogOpen(new ScriptPlayer((EntityPlayerMP) player), dialog));
|
EventHooks.onDialogOpen(new DialogEvent.DialogOpen(new ScriptPlayer((EntityPlayerMP) player), dialog));
|
||||||
@@ -203,7 +203,7 @@ public class NoppesUtilServer {
|
|||||||
if(!data.dialogsRead.contains(dialog.id))
|
if(!data.dialogsRead.contains(dialog.id))
|
||||||
data.dialogsRead.add(dialog.id);
|
data.dialogsRead.add(dialog.id);
|
||||||
setEditingNpc(player, npc);
|
setEditingNpc(player, npc);
|
||||||
EventHooks.onNPCDialog(npc, player, dialog.id, dialog);
|
EventHooks.onNPCDialog(npc, player, dialog.id, optionId, dialog);
|
||||||
}
|
}
|
||||||
public static void runCommand(EntityPlayer player, String name, String command){
|
public static void runCommand(EntityPlayer player, String name, String command){
|
||||||
runCommand(player, name, command, player);
|
runCommand(player, name, command, player);
|
||||||
|
|||||||
@@ -12,11 +12,21 @@ import noppes.npcs.controllers.Lines;
|
|||||||
import noppes.npcs.entity.EntityNPCInterface;
|
import noppes.npcs.entity.EntityNPCInterface;
|
||||||
|
|
||||||
public class VersionCompatibility {
|
public class VersionCompatibility {
|
||||||
public static int ModRev = 16;
|
public static int ModRev = 17;
|
||||||
|
|
||||||
public static void CheckNpcCompatibility(EntityNPCInterface npc, NBTTagCompound compound){
|
public static void CheckNpcCompatibility(EntityNPCInterface npc, NBTTagCompound compound){
|
||||||
if(npc.npcVersion == ModRev)
|
if(npc.npcVersion == ModRev)
|
||||||
return;
|
return;
|
||||||
|
if(npc.npcVersion < 17){
|
||||||
|
// Fix DialogDarkenScreen
|
||||||
|
if(compound.hasKey("DialogDarkenScreen")){
|
||||||
|
compound.removeTag("DialogDarkenScreen");
|
||||||
|
}
|
||||||
|
// Remove MPM Texture Requirement
|
||||||
|
String texture = compound.getString("Texture");
|
||||||
|
texture = texture.replace("moreplayermodels:textures", "customnpcs:textures/parts");
|
||||||
|
compound.setString("Texture", texture);
|
||||||
|
}
|
||||||
if(npc.npcVersion < 12){
|
if(npc.npcVersion < 12){
|
||||||
CompatabilityFix(compound, npc.advanced.writeToNBT(new NBTTagCompound()));
|
CompatabilityFix(compound, npc.advanced.writeToNBT(new NBTTagCompound()));
|
||||||
CompatabilityFix(compound, npc.ai.writeToNBT(new NBTTagCompound()));
|
CompatabilityFix(compound, npc.ai.writeToNBT(new NBTTagCompound()));
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
|
||||||
|
|
||||||
package noppes.npcs.client.model.part;
|
package noppes.npcs.client.model.part;
|
||||||
|
|
||||||
import net.minecraft.client.model.ModelBase;
|
import net.minecraft.client.model.ModelBase;
|
||||||
@@ -163,17 +165,17 @@ public class ModelLimbWear extends ModelScaleRenderer {
|
|||||||
this.addChild(back);
|
this.addChild(back);
|
||||||
|
|
||||||
Model2DRenderer right = new Model2DRenderer(base, 48, 36, 4, 12, 64, 64);
|
Model2DRenderer right = new Model2DRenderer(base, 48, 36, 4, 12, 64, 64);
|
||||||
right.setRotationPoint(0.1f+x, 12.55f+y, 2.55f);
|
right.setRotationPoint(0.62f+x, 12.55f+y, -2.55f);
|
||||||
right.setScale(0.96f,0.82f);
|
right.setScale(0.96f,0.82f);
|
||||||
right.setThickness(thick);
|
right.setThickness(thick);
|
||||||
setRotation(right, 0, (float)(Math.PI/2f), 0);
|
setRotation(right, 0, (float)(Math.PI/-2f), 0);
|
||||||
this.addChild(right);
|
this.addChild(right);
|
||||||
|
|
||||||
Model2DRenderer left = new Model2DRenderer(base, 40, 36, 4, 12, 64, 64);
|
Model2DRenderer left = new Model2DRenderer(base, 40, 36, 4, 12, 64, 64);
|
||||||
left.setRotationPoint(-3.98f+x, 12.55f+y, -2.55f);
|
left.setRotationPoint(-4.56f+x, 12.55f+y, 2.55f);
|
||||||
left.setScale(0.96f,0.82f);
|
left.setScale(0.96f,0.82f);
|
||||||
left.setThickness(thick);
|
left.setThickness(thick);
|
||||||
setRotation(left, 0, (float)(Math.PI/-2f), 0);
|
setRotation(left, 0, (float)(Math.PI/2f), 0);
|
||||||
this.addChild(left);
|
this.addChild(left);
|
||||||
|
|
||||||
Model2DRenderer top = new Model2DRenderer(base, 44, 32, 4, 4, 64, 64);
|
Model2DRenderer top = new Model2DRenderer(base, 44, 32, 4, 4, 64, 64);
|
||||||
@@ -184,7 +186,7 @@ public class ModelLimbWear extends ModelScaleRenderer {
|
|||||||
this.addChild(top);
|
this.addChild(top);
|
||||||
|
|
||||||
Model2DRenderer bottom = new Model2DRenderer(base, 48, 32, 4, 4, 64, 64);
|
Model2DRenderer bottom = new Model2DRenderer(base, 48, 32, 4, 4, 64, 64);
|
||||||
bottom.setRotationPoint(-4.5f+x, 12.0f+y, -2.545f);
|
bottom.setRotationPoint(-4.5f+x, 12.0f+y, -2.525f);
|
||||||
bottom.setScale(0.32f);
|
bottom.setScale(0.32f);
|
||||||
bottom.setThickness(thick);
|
bottom.setThickness(thick);
|
||||||
setRotation(bottom, (float)(Math.PI / -2), 0, 0);
|
setRotation(bottom, (float)(Math.PI / -2), 0, 0);
|
||||||
@@ -210,17 +212,17 @@ public class ModelLimbWear extends ModelScaleRenderer {
|
|||||||
this.addChild(back);
|
this.addChild(back);
|
||||||
|
|
||||||
Model2DRenderer right = new Model2DRenderer(base, 56, 52, 4, 12, 64, 64);
|
Model2DRenderer right = new Model2DRenderer(base, 56, 52, 4, 12, 64, 64);
|
||||||
right.setRotationPoint(0.06f+x, 12.55f+y, 2.55f);
|
right.setRotationPoint(0.62f+x, 12.55f+y, -2.55f);
|
||||||
right.setScale(0.96f,0.82f);
|
right.setScale(0.96f,0.82f);
|
||||||
right.setThickness(thick);
|
right.setThickness(thick);
|
||||||
setRotation(right, 0, (float)(Math.PI/2f), 0);
|
setRotation(right, 0, (float)(Math.PI/-2f), 0);
|
||||||
this.addChild(right);
|
this.addChild(right);
|
||||||
|
|
||||||
Model2DRenderer left = new Model2DRenderer(base, 48, 52, 4, 12, 64, 64);
|
Model2DRenderer left = new Model2DRenderer(base, 48, 52, 4, 12, 64, 64);
|
||||||
left.setRotationPoint(-4.03f+x, 12.55f+y, -2.55f);
|
left.setRotationPoint(-4.56f+x, 12.55f+y, 2.55f);
|
||||||
left.setScale(0.96f,0.82f);
|
left.setScale(0.96f,0.82f);
|
||||||
left.setThickness(thick);
|
left.setThickness(thick);
|
||||||
setRotation(left, 0, (float)(Math.PI/-2f), 0);
|
setRotation(left, 0, (float)(Math.PI/2f), 0);
|
||||||
this.addChild(left);
|
this.addChild(left);
|
||||||
|
|
||||||
|
|
||||||
@@ -258,17 +260,17 @@ public class ModelLimbWear extends ModelScaleRenderer {
|
|||||||
this.addChild(back);
|
this.addChild(back);
|
||||||
|
|
||||||
Model2DRenderer right = new Model2DRenderer(base, 8, 36, 4, 12, 64, 64);
|
Model2DRenderer right = new Model2DRenderer(base, 8, 36, 4, 12, 64, 64);
|
||||||
right.setRotationPoint(0.15f+x, 12.55f+y, 2.55f);
|
right.setRotationPoint(0.62f+x, 12.55f+y, -2.55f);
|
||||||
right.setScale(0.96f,0.82f);
|
right.setScale(0.96f,0.82f);
|
||||||
right.setThickness(thick);
|
right.setThickness(thick);
|
||||||
setRotation(right, 0, (float)(Math.PI/2f), 0);
|
setRotation(right, 0, (float)(Math.PI/-2f), 0);
|
||||||
this.addChild(right);
|
this.addChild(right);
|
||||||
|
|
||||||
Model2DRenderer left = new Model2DRenderer(base, 0, 36, 4, 12, 64, 64);
|
Model2DRenderer left = new Model2DRenderer(base, 0, 36, 4, 12, 64, 64);
|
||||||
left.setRotationPoint(-4.03f+x, 12.55f+y, -2.55f);
|
left.setRotationPoint(-4.53f+x, 12.55f+y, 2.55f);
|
||||||
left.setScale(0.96f,0.82f);
|
left.setScale(0.96f,0.82f);
|
||||||
left.setThickness(thick);
|
left.setThickness(thick);
|
||||||
setRotation(left, 0, (float)(Math.PI/-2f), 0);
|
setRotation(left, 0, (float)(Math.PI/2f), 0);
|
||||||
this.addChild(left);
|
this.addChild(left);
|
||||||
|
|
||||||
|
|
||||||
@@ -306,17 +308,17 @@ public class ModelLimbWear extends ModelScaleRenderer {
|
|||||||
this.addChild(back);
|
this.addChild(back);
|
||||||
|
|
||||||
Model2DRenderer right = new Model2DRenderer(base, 8, 52, 4, 12, 64, 64);
|
Model2DRenderer right = new Model2DRenderer(base, 8, 52, 4, 12, 64, 64);
|
||||||
right.setRotationPoint(0.15f+x, 12.55f+y, 2.55f);
|
right.setRotationPoint(0.62f+x, 12.55f+y, -2.55f);
|
||||||
right.setScale(0.96f,0.82f);
|
right.setScale(0.96f,0.82f);
|
||||||
right.setThickness(thick);
|
right.setThickness(thick);
|
||||||
setRotation(right, 0, (float)(Math.PI/2f), 0);
|
setRotation(right, 0, (float)(Math.PI/-2f), 0);
|
||||||
this.addChild(right);
|
this.addChild(right);
|
||||||
|
|
||||||
Model2DRenderer left = new Model2DRenderer(base, 0, 52, 4, 12, 64, 64);
|
Model2DRenderer left = new Model2DRenderer(base, 0, 52, 4, 12, 64, 64);
|
||||||
left.setRotationPoint(-4.03f+x, 12.55f+y, -2.55f);
|
left.setRotationPoint(-4.53f+x, 12.55f+y, 2.55f);
|
||||||
left.setScale(0.96f,0.82f);
|
left.setScale(0.96f,0.82f);
|
||||||
left.setThickness(thick);
|
left.setThickness(thick);
|
||||||
setRotation(left, 0, (float)(Math.PI/-2f), 0);
|
setRotation(left, 0, (float)(Math.PI/2f), 0);
|
||||||
this.addChild(left);
|
this.addChild(left);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -255,7 +255,13 @@ public class RenderNPCHumanMale extends RenderNPCInterface
|
|||||||
GL11.glTranslatef(x, cnpc.modelData.getBodyY(), 0);
|
GL11.glTranslatef(x, cnpc.modelData.getBodyY(), 0);
|
||||||
}
|
}
|
||||||
this.modelBipedMain.bipedRightArm.postRender(0.0625F);
|
this.modelBipedMain.bipedRightArm.postRender(0.0625F);
|
||||||
GL11.glTranslatef(-0.0625F, 0.4375F + y, 0.0625F);
|
|
||||||
|
if(npc.getModelType() == 2){
|
||||||
|
GL11.glTranslatef(-0.0125F, 0.4375F + y, 0.0625F);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
GL11.glTranslatef(-0.0625F, 0.4375F + y, 0.0625F);
|
||||||
|
}
|
||||||
|
|
||||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack2, EQUIPPED);
|
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack2, EQUIPPED);
|
||||||
boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack2, BLOCK_3D));
|
boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack2, BLOCK_3D));
|
||||||
@@ -269,8 +275,7 @@ public class RenderNPCHumanMale extends RenderNPCInterface
|
|||||||
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||||
GL11.glScalef(-var6, -var6, var6);
|
GL11.glScalef(-var6, -var6, var6);
|
||||||
}
|
}
|
||||||
// CHANGE HERE
|
else if (itemstack2.getItem() instanceof ItemBow && customRenderer == null)
|
||||||
else if (itemstack2.getItem() instanceof ItemBow)
|
|
||||||
{
|
{
|
||||||
var6 = 0.625F;
|
var6 = 0.625F;
|
||||||
GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
|
GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
|
||||||
@@ -343,8 +348,15 @@ public class RenderNPCHumanMale extends RenderNPCInterface
|
|||||||
GL11.glTranslatef(x, cnpc.modelData.getBodyY(), 0);
|
GL11.glTranslatef(x, cnpc.modelData.getBodyY(), 0);
|
||||||
}
|
}
|
||||||
this.modelBipedMain.bipedLeftArm.postRender(0.0625F);
|
this.modelBipedMain.bipedLeftArm.postRender(0.0625F);
|
||||||
GL11.glTranslatef(0.0625F, 0.4375F + y, 0.0625F);
|
|
||||||
float var6;
|
if(npc.getModelType() == 2){
|
||||||
|
GL11.glTranslatef(0.0125F, 0.4375F + y, 0.0625F);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
GL11.glTranslatef(0.0625F, 0.4375F + y, 0.0625F);
|
||||||
|
}
|
||||||
|
|
||||||
|
float var6;
|
||||||
|
|
||||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack2, EQUIPPED);
|
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack2, EQUIPPED);
|
||||||
boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack2, BLOCK_3D));
|
boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack2, BLOCK_3D));
|
||||||
@@ -362,7 +374,7 @@ public class RenderNPCHumanMale extends RenderNPCInterface
|
|||||||
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
GL11.glRotatef(45.0F, 0.0F, 1.0F, 0.0F);
|
||||||
GL11.glScalef(var6, -var6, var6);
|
GL11.glScalef(var6, -var6, var6);
|
||||||
}
|
}
|
||||||
else if (itemstack2.getItem() instanceof ItemBow)
|
else if (itemstack2.getItem() instanceof ItemBow && customRenderer == null)
|
||||||
{
|
{
|
||||||
var6 = 0.625F;
|
var6 = 0.625F;
|
||||||
GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
|
GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
|
||||||
|
|||||||
@@ -219,7 +219,6 @@ public class RenderNPCPony extends RenderNPCInterface
|
|||||||
float f4 = 0.375F * f;
|
float f4 = 0.375F * f;
|
||||||
GL11.glScalef(f4, -f4, f4);
|
GL11.glScalef(f4, -f4, f4);
|
||||||
} else
|
} else
|
||||||
// CHANGE HERE
|
|
||||||
if(itemstack.getItem() instanceof ItemBow)
|
if(itemstack.getItem() instanceof ItemBow)
|
||||||
{
|
{
|
||||||
GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
|
GL11.glTranslatef(0.0F, 0.125F, 0.3125F);
|
||||||
|
|||||||
@@ -67,10 +67,7 @@ public class Dialog implements ICompatibilty, IDialog {
|
|||||||
else {
|
else {
|
||||||
darkenScreen = true;
|
darkenScreen = true;
|
||||||
}
|
}
|
||||||
// Temporary Remove after Few Versions
|
|
||||||
if(compound.hasKey("DialogDarkenScreen")){
|
|
||||||
compound.removeTag("DialogDarkenScreen");
|
|
||||||
}
|
|
||||||
|
|
||||||
NBTTagList options = compound.getTagList("Options", 10);
|
NBTTagList options = compound.getTagList("Options", 10);
|
||||||
HashMap<Integer,DialogOption> newoptions = new HashMap<Integer,DialogOption>();
|
HashMap<Integer,DialogOption> newoptions = new HashMap<Integer,DialogOption>();
|
||||||
@@ -104,10 +101,6 @@ public class Dialog implements ICompatibilty, IDialog {
|
|||||||
compound.setBoolean("DialogDisableEsc", disableEsc);
|
compound.setBoolean("DialogDisableEsc", disableEsc);
|
||||||
|
|
||||||
compound.setBoolean("DialogDarkScreen", darkenScreen);
|
compound.setBoolean("DialogDarkScreen", darkenScreen);
|
||||||
// Temporary Remove after Few Versions
|
|
||||||
if(compound.hasKey("DialogDarkenScreen")){
|
|
||||||
compound.removeTag("DialogDarkenScreen");
|
|
||||||
}
|
|
||||||
|
|
||||||
if(sound != null && !sound.isEmpty())
|
if(sound != null && !sound.isEmpty())
|
||||||
compound.setString("DialogSound", sound);
|
compound.setString("DialogSound", sound);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
package noppes.npcs.controllers;
|
package noppes.npcs.controllers;
|
||||||
|
|
||||||
import me.luizotavio.compressor.ZstdCompressor;
|
import luizotavio.compressor.ZstdCompressor;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.nbt.CompressedStreamTools;
|
import net.minecraft.nbt.CompressedStreamTools;
|
||||||
import net.minecraft.nbt.NBTSizeTracker;
|
import net.minecraft.nbt.NBTSizeTracker;
|
||||||
@@ -17,7 +17,7 @@ import java.nio.file.StandardOpenOption;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import static me.luizotavio.compressor.executor.IOExecutor.IO_EXECUTOR;
|
import static luizotavio.compressor.executor.IOExecutor.IO_EXECUTOR;
|
||||||
|
|
||||||
public class PlayerDataController {
|
public class PlayerDataController {
|
||||||
public static PlayerDataController instance;
|
public static PlayerDataController instance;
|
||||||
|
|||||||
@@ -140,7 +140,6 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
|||||||
public boolean updateClient = false;
|
public boolean updateClient = false;
|
||||||
public boolean updateAI = false;
|
public boolean updateAI = false;
|
||||||
|
|
||||||
// Fly Change
|
|
||||||
public FlyingMoveHelper flyMoveHelper = new FlyingMoveHelper(this);
|
public FlyingMoveHelper flyMoveHelper = new FlyingMoveHelper(this);
|
||||||
public PathNavigate flyNavigator = new PathNavigateFlying(this, worldObj);
|
public PathNavigate flyNavigator = new PathNavigateFlying(this, worldObj);
|
||||||
|
|
||||||
@@ -399,7 +398,7 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
|||||||
Server.sendData((EntityPlayerMP)player, EnumPacketClient.QUEST_COMPLETION, data.quest.writeToNBT(new NBTTagCompound()));
|
Server.sendData((EntityPlayerMP)player, EnumPacketClient.QUEST_COMPLETION, data.quest.writeToNBT(new NBTTagCompound()));
|
||||||
}
|
}
|
||||||
else if (dialog != null){
|
else if (dialog != null){
|
||||||
NoppesUtilServer.openDialog(player, this, dialog);
|
NoppesUtilServer.openDialog(player, this, dialog, 0);
|
||||||
}
|
}
|
||||||
else if(roleInterface != null)
|
else if(roleInterface != null)
|
||||||
roleInterface.interact(player);
|
roleInterface.interact(player);
|
||||||
@@ -1062,7 +1061,6 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
|||||||
jobInterface.reset();
|
jobInterface.reset();
|
||||||
|
|
||||||
EventHooks.onNPCInit(this);
|
EventHooks.onNPCInit(this);
|
||||||
script.callScript(EnumScriptType.INIT);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onCollide() {
|
public void onCollide() {
|
||||||
@@ -1288,7 +1286,6 @@ public abstract class EntityNPCInterface extends EntityCreature implements IEnti
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IIcon getItemIcon(ItemStack par1ItemStack, int par2){
|
public IIcon getItemIcon(ItemStack par1ItemStack, int par2){
|
||||||
// Change Here
|
|
||||||
if (par1ItemStack.getItem() instanceof ItemBow){
|
if (par1ItemStack.getItem() instanceof ItemBow){
|
||||||
return par1ItemStack.getItem().getIcon(par1ItemStack, par2);
|
return par1ItemStack.getItem().getIcon(par1ItemStack, par2);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public class ScriptPlayer<T extends EntityPlayerMP> extends ScriptLivingBase<T>
|
|||||||
if(dialog == null)
|
if(dialog == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
NoppesUtilServer.openDialog(player, new EntityDialogNpc(this.player.worldObj), dialog);
|
NoppesUtilServer.openDialog(player, new EntityDialogNpc(this.player.worldObj), dialog, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean hasReadDialog(int id){
|
public boolean hasReadDialog(int id){
|
||||||
|
|||||||
@@ -123,12 +123,14 @@ public class NpcEvent extends CustomNPCsEvent {
|
|||||||
public static class DialogEvent extends NpcEvent {
|
public static class DialogEvent extends NpcEvent {
|
||||||
public final IPlayer player;
|
public final IPlayer player;
|
||||||
public final int id;
|
public final int id;
|
||||||
|
public final int optionId;
|
||||||
public final Dialog dialog;
|
public final Dialog dialog;
|
||||||
|
|
||||||
public DialogEvent(ICustomNpc npc, EntityPlayer player, int id, Dialog dialog) {
|
public DialogEvent(ICustomNpc npc, EntityPlayer player, int id, int optionId, Dialog dialog) {
|
||||||
super(npc);
|
super(npc);
|
||||||
this.player = (IPlayer)NpcAPI.Instance().getIEntity(player);
|
this.player = (IPlayer)NpcAPI.Instance().getIEntity(player);
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
this.optionId = optionId;
|
||||||
this.dialog = dialog;
|
this.dialog = dialog;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,39 @@
|
|||||||
package noppes.npcs.scripted.event;
|
package noppes.npcs.scripted.event;
|
||||||
|
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import noppes.npcs.controllers.Dialog;
|
||||||
|
import noppes.npcs.scripted.NpcAPI;
|
||||||
|
import noppes.npcs.scripted.interfaces.IPlayer;
|
||||||
|
|
||||||
public class ScriptEventDialog extends ScriptEvent{
|
public class ScriptEventDialog extends ScriptEvent{
|
||||||
|
public EntityPlayer player;
|
||||||
|
public int dialog;
|
||||||
|
public int option;
|
||||||
|
public Dialog dialogObj;
|
||||||
|
|
||||||
|
public ScriptEventDialog(EntityPlayer player, int dialog, int option, Dialog dialogObj){
|
||||||
|
this.player = player;
|
||||||
|
this.dialog = dialog;
|
||||||
|
this.option = option;
|
||||||
|
this.dialogObj = dialogObj;
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityPlayer getPlayer() {
|
||||||
|
return player;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Dialog getDialog() {
|
||||||
|
return dialogObj;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getDialogId() {
|
||||||
|
return dialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getOptionId() {
|
||||||
|
return option;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
|
|||||||
|
After Width: | Height: | Size: 669 B |
|
After Width: | Height: | Size: 593 B |
|
After Width: | Height: | Size: 2.9 KiB |
|
After Width: | Height: | Size: 1016 B |
|
After Width: | Height: | Size: 574 B |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 597 B |
|
After Width: | Height: | Size: 797 B |
|
After Width: | Height: | Size: 803 B |
|
After Width: | Height: | Size: 919 B |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 589 B |
|
After Width: | Height: | Size: 621 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 641 B |
|
After Width: | Height: | Size: 612 B |
|
After Width: | Height: | Size: 601 B |
|
After Width: | Height: | Size: 769 B |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 634 B |
|
After Width: | Height: | Size: 832 B |
|
After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 994 B |
|
After Width: | Height: | Size: 943 B |