mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-12 03:47:27 +00:00
Merge branch 'packet' into animation-events-2
This commit is contained in:
commit
16f2901fbc
119 files changed
+2688
-931
No files matched your search
@@ -35,6 +35,7 @@ public class CommandKamkeel extends CommandBase{
|
||||
registerCommand(new AnimationCommand());
|
||||
registerCommand(new OverlayCommand());
|
||||
registerCommand(new CommandCommand());
|
||||
registerCommand(new EffectCommand());
|
||||
}
|
||||
|
||||
public void registerCommand(CommandKamkeelBase command){
|
||||
|
||||
@@ -3,12 +3,15 @@ package kamkeel.npcs.command;
|
||||
import net.minecraft.command.CommandException;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import noppes.npcs.controllers.PlayerDataController;
|
||||
import noppes.npcs.controllers.CustomEffectController;
|
||||
import noppes.npcs.controllers.data.CustomEffect;
|
||||
import noppes.npcs.controllers.data.PlayerData;
|
||||
import noppes.npcs.scripted.event.PlayerEvent.EffectEvent.ExpirationType;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class EffectCommand extends CommandKamkeelBase {
|
||||
|
||||
@@ -22,118 +25,242 @@ public class EffectCommand extends CommandKamkeelBase {
|
||||
return "effect";
|
||||
}
|
||||
|
||||
// info all
|
||||
@SubCommand(desc = "Lists all effects")
|
||||
@SubCommand(desc = "Lists all Effects")
|
||||
public void infoAll(ICommandSender sender, String[] args) throws CommandException {
|
||||
// TODO: FIX EFFECT COMMAND
|
||||
// Set<Map.Entry<Integer, StatusEffect>> effects = DBCEffectController.getInstance().standardEffects.entrySet();
|
||||
// Set<Map.Entry<Integer, CustomEffect>> customEffects = DBCEffectController.getInstance().customEffects.entrySet();
|
||||
//
|
||||
// if (effects.isEmpty() && customEffects.isEmpty()) {
|
||||
// sendError(sender, "No effects found.");
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// sendResult(sender, "--------------------");
|
||||
//
|
||||
// for (Map.Entry<Integer, StatusEffect> entry : effects) {
|
||||
// sendResult(sender, String.format("\u00a7b%2$s \u00a77(ID%3$s: %1$s)", entry.getKey(), entry.getValue().getName(), entry.getValue().isCustom() ? " - CUSTOM" : " "));
|
||||
// }
|
||||
// for (Map.Entry<Integer, CustomEffect> entry : customEffects) {
|
||||
// sendResult(sender, String.format("\u00a7b%2$s \u00a77(ID%3$s: %1$s)", entry.getKey(), entry.getValue().getName(), entry.getValue().isCustom() ? " - CUSTOM" : " "));
|
||||
// }
|
||||
//
|
||||
// sendResult(sender, "--------------------");
|
||||
CustomEffectController controller = CustomEffectController.getInstance();
|
||||
if (controller.indexMapper.isEmpty()) {
|
||||
sendError(sender, "No effects found.");
|
||||
return;
|
||||
}
|
||||
|
||||
sendResult(sender, "--------------------");
|
||||
|
||||
// Get all indices, sort them in ascending order.
|
||||
List<Integer> indices = new ArrayList<>(controller.indexMapper.keySet());
|
||||
Collections.sort(indices);
|
||||
for (Integer idx : indices) {
|
||||
Map<Integer, CustomEffect> effects = controller.indexMapper.get(idx);
|
||||
if (effects == null || effects.isEmpty())
|
||||
continue;
|
||||
// Sort the effect IDs in ascending order.
|
||||
List<Integer> effectIds = new ArrayList<>(effects.keySet());
|
||||
Collections.sort(effectIds);
|
||||
for (Integer id : effectIds) {
|
||||
CustomEffect effect = effects.get(id);
|
||||
sendResult(sender, String.format("\u00a7b%s \u00a77(ID: %d, INDEX: %d)",
|
||||
effect.getName(),
|
||||
id,
|
||||
idx));
|
||||
}
|
||||
}
|
||||
|
||||
sendResult(sender, "--------------------");
|
||||
}
|
||||
|
||||
@SubCommand(desc = "Gives a effect to a player", usage = "<player> <time> <effectName>")
|
||||
// Give effect by name.
|
||||
// Usage: <player> <time> <effectName> [index]
|
||||
@SubCommand(desc = "Gives an effect to a player", usage = "<player> <time> <effectName> [index]")
|
||||
public void give(ICommandSender sender, String[] args) throws CommandException {
|
||||
// String playername = args[0];
|
||||
// int time = Integer.parseInt(args[1]);
|
||||
// String name = "";
|
||||
// for (int i = 2; i < args.length; i++) {
|
||||
// name += args[i] + (i != args.length - 1 ? " " : "");
|
||||
// }
|
||||
//
|
||||
// List<PlayerData> data = PlayerDataController.Instance.getPlayersData(sender, playername);
|
||||
// if (data.isEmpty()) {
|
||||
// sendError(sender, "Unknown player: " + playername);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// StatusEffect statusEffect = DBCEffectController.getInstance().get(name);
|
||||
// if (statusEffect == null) {
|
||||
// sendError(sender, "Unknown effect: " + name);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// for (PlayerData playerdata : data) {
|
||||
// DBCEffectController.getInstance().applyEffect(playerdata.player, statusEffect.getID(), time);
|
||||
// sendResult(sender, String.format("%s §agiven to §7'§b%s§7'", statusEffect.getName(), playerdata.playername));
|
||||
// if (sender != playerdata.player) {
|
||||
// sendResult(playerdata.player, String.format("§Effect §7%s §aadded.", statusEffect.getName()));
|
||||
// }
|
||||
// }
|
||||
if (args.length < 3) {
|
||||
sendError(sender, "Usage: <player> <time> <effectName> [index]");
|
||||
return;
|
||||
}
|
||||
|
||||
String playername = args[0];
|
||||
int time;
|
||||
try {
|
||||
time = Integer.parseInt(args[1]);
|
||||
} catch (NumberFormatException e) {
|
||||
sendError(sender, "Invalid time: " + args[1]);
|
||||
return;
|
||||
}
|
||||
|
||||
int index = 0;
|
||||
String effectName;
|
||||
if (args.length > 3) {
|
||||
// Try to parse the last argument as the index.
|
||||
try {
|
||||
index = Integer.parseInt(args[args.length - 1]);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 2; i < args.length - 1; i++) {
|
||||
sb.append(args[i]).append(i < args.length - 2 ? " " : "");
|
||||
}
|
||||
effectName = sb.toString();
|
||||
} catch (NumberFormatException e) {
|
||||
// If parsing fails, assume the entire remainder is the effect name.
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 2; i < args.length; i++) {
|
||||
sb.append(args[i]).append(i < args.length - 1 ? " " : "");
|
||||
}
|
||||
effectName = sb.toString();
|
||||
}
|
||||
} else {
|
||||
effectName = args[2];
|
||||
}
|
||||
|
||||
List<PlayerData> players = PlayerDataController.Instance.getPlayersData(sender, playername);
|
||||
if (players.isEmpty()) {
|
||||
sendError(sender, "Unknown player: " + playername);
|
||||
return;
|
||||
}
|
||||
|
||||
CustomEffect effect = CustomEffectController.getInstance().get(effectName, index);
|
||||
if (effect == null) {
|
||||
sendError(sender, "Unknown effect: " + effectName + " with index " + index);
|
||||
return;
|
||||
}
|
||||
|
||||
for (PlayerData pdata : players) {
|
||||
CustomEffectController.getInstance().applyEffect(pdata.player, effect.getID(), time, (byte) 1, index);
|
||||
sendResult(sender, String.format("%s §agiven to §7'§b%s§7'", effect.getName(), pdata.playername));
|
||||
if (sender != pdata.player) {
|
||||
sendResult(pdata.player, String.format("Effect §7%s §aadded.", effect.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@SubCommand(desc = "Removes a effect from a player", usage = "<player> <effectName>")
|
||||
// Remove effect by name.
|
||||
// Usage: <player> <effectName> [index]
|
||||
@SubCommand(desc = "Removes an effect from a player", usage = "<player> <effectName> [index]")
|
||||
public void remove(ICommandSender sender, String[] args) throws CommandException {
|
||||
// String playername = args[0];
|
||||
// String name = "";
|
||||
// for (int i = 1; i < args.length; i++) {
|
||||
// name += args[i] + (i != args.length - 1 ? " " : "");
|
||||
// }
|
||||
//
|
||||
// List<PlayerData> data = PlayerDataController.Instance.getPlayersData(sender, playername);
|
||||
// if (data.isEmpty()) {
|
||||
// sendError(sender, "Unknown player: " + playername);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// StatusEffect statusEffect = DBCEffectController.getInstance().get(name);
|
||||
// if (statusEffect == null) {
|
||||
// sendError(sender, "Unknown effect: " + name);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// for (PlayerData playerData : data) {
|
||||
// DBCEffectController.getInstance().removeEffect(playerData.player, statusEffect.getID(), DBCPlayerEvent.EffectEvent.ExpirationType.REMOVED);
|
||||
// sendResult(sender, String.format("Effect %s removed from %s", statusEffect.getName(), playerData.playername));
|
||||
// }
|
||||
if (args.length < 2) {
|
||||
sendError(sender, "Usage: <player> <effectName> [index]");
|
||||
return;
|
||||
}
|
||||
|
||||
String playername = args[0];
|
||||
int index = 0;
|
||||
String effectName;
|
||||
if (args.length > 2) {
|
||||
try {
|
||||
index = Integer.parseInt(args[args.length - 1]);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 1; i < args.length - 1; i++) {
|
||||
sb.append(args[i]).append(i < args.length - 2 ? " " : "");
|
||||
}
|
||||
effectName = sb.toString();
|
||||
} catch (NumberFormatException e) {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for (int i = 1; i < args.length; i++) {
|
||||
sb.append(args[i]).append(i < args.length - 1 ? " " : "");
|
||||
}
|
||||
effectName = sb.toString();
|
||||
}
|
||||
} else {
|
||||
effectName = args[1];
|
||||
}
|
||||
|
||||
List<PlayerData> players = PlayerDataController.Instance.getPlayersData(sender, playername);
|
||||
if (players.isEmpty()) {
|
||||
sendError(sender, "Unknown player: " + playername);
|
||||
return;
|
||||
}
|
||||
|
||||
CustomEffect effect = CustomEffectController.getInstance().get(effectName, index);
|
||||
if (effect == null) {
|
||||
sendError(sender, "Unknown effect: " + effectName + " with index " + index);
|
||||
return;
|
||||
}
|
||||
|
||||
for (PlayerData pdata : players) {
|
||||
CustomEffectController.getInstance().removeEffect(pdata.player, effect.getID(), index, ExpirationType.REMOVED);
|
||||
sendResult(sender, String.format("Effect %s removed from %s", effect.getName(), pdata.playername));
|
||||
}
|
||||
}
|
||||
|
||||
@SubCommand(desc = "Gives a effect to a player", usage = "<player> <time> <effectId>")
|
||||
// Give effect by ID.
|
||||
// Usage: <player> <time> <effectId> [index]
|
||||
@SubCommand(desc = "Gives an effect to a player by ID", usage = "<player> <time> <effectId> [index]")
|
||||
public void giveId(ICommandSender sender, String[] args) throws CommandException {
|
||||
// String playername = args[0];
|
||||
// int time = Integer.parseInt(args[1]);
|
||||
//
|
||||
// List<PlayerData> data = PlayerDataController.Instance.getPlayersData(sender, playername);
|
||||
// if (data.isEmpty()) {
|
||||
// sendError(sender, "Unknown player: " + playername);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// for (PlayerData playerdata : data) {
|
||||
// int statusEffectId = Integer.parseInt(args[2]);
|
||||
// DBCEffectController.getInstance().applyEffect(playerdata.player, statusEffectId, time);
|
||||
// sendResult(sender, String.format("Effect %d given to %s", statusEffectId, playerdata.playername));
|
||||
// }
|
||||
if (args.length < 3) {
|
||||
sendError(sender, "Usage: <player> <time> <effectId> [index]");
|
||||
return;
|
||||
}
|
||||
|
||||
String playername = args[0];
|
||||
int time;
|
||||
try {
|
||||
time = Integer.parseInt(args[1]);
|
||||
} catch (NumberFormatException e) {
|
||||
sendError(sender, "Invalid time: " + args[1]);
|
||||
return;
|
||||
}
|
||||
|
||||
int effectId;
|
||||
int index = 0;
|
||||
try {
|
||||
effectId = Integer.parseInt(args[2]);
|
||||
} catch (NumberFormatException e) {
|
||||
sendError(sender, "Invalid effect ID: " + args[2]);
|
||||
return;
|
||||
}
|
||||
if (args.length > 3) {
|
||||
try {
|
||||
index = Integer.parseInt(args[3]);
|
||||
} catch (NumberFormatException e) {
|
||||
index = 0;
|
||||
}
|
||||
}
|
||||
|
||||
List<PlayerData> players = PlayerDataController.Instance.getPlayersData(sender, playername);
|
||||
if (players.isEmpty()) {
|
||||
sendError(sender, "Unknown player: " + playername);
|
||||
return;
|
||||
}
|
||||
|
||||
CustomEffect effect = CustomEffectController.getInstance().get(effectId, index);
|
||||
if (effect == null) {
|
||||
sendError(sender, "Unknown effect with ID: " + effectId + " and index " + index);
|
||||
return;
|
||||
}
|
||||
|
||||
for (PlayerData pdata : players) {
|
||||
CustomEffectController.getInstance().applyEffect(pdata.player, effectId, time, (byte) 1, index);
|
||||
sendResult(sender, String.format("Effect %d given to %s", effectId, pdata.playername));
|
||||
}
|
||||
}
|
||||
|
||||
@SubCommand(desc = "Removes a effect from a player", usage = "<player> <effectId>")
|
||||
// Remove effect by ID.
|
||||
// Usage: <player> <effectId> [index]
|
||||
@SubCommand(desc = "Removes an effect from a player by ID", usage = "<player> <effectId> [index]")
|
||||
public void removeId(ICommandSender sender, String[] args) throws CommandException {
|
||||
// String playername = args[0];
|
||||
// List<PlayerData> data = PlayerDataController.Instance.getPlayersData(sender, playername);
|
||||
// if (data.isEmpty()) {
|
||||
// sendError(sender, "Unknown player: " + playername);
|
||||
// return;
|
||||
// }
|
||||
//
|
||||
// for (PlayerData playerData : data) {
|
||||
// int statusEffectId = Integer.parseInt(args[1]);
|
||||
// DBCEffectController.getInstance().removeEffect(playerData.player, statusEffectId, DBCPlayerEvent.EffectEvent.ExpirationType.REMOVED);
|
||||
// sendResult(sender, String.format("Effect %d removed from %s", statusEffectId, playerData.playername));
|
||||
// }
|
||||
if (args.length < 2) {
|
||||
sendError(sender, "Usage: <player> <effectId> [index]");
|
||||
return;
|
||||
}
|
||||
|
||||
String playername = args[0];
|
||||
int effectId;
|
||||
int index = 0;
|
||||
try {
|
||||
effectId = Integer.parseInt(args[1]);
|
||||
} catch (NumberFormatException e) {
|
||||
sendError(sender, "Invalid effect ID: " + args[1]);
|
||||
return;
|
||||
}
|
||||
if (args.length > 2) {
|
||||
try {
|
||||
index = Integer.parseInt(args[2]);
|
||||
} catch (NumberFormatException e) {
|
||||
index = 0;
|
||||
}
|
||||
}
|
||||
|
||||
List<PlayerData> players = PlayerDataController.Instance.getPlayersData(sender, playername);
|
||||
if (players.isEmpty()) {
|
||||
sendError(sender, "Unknown player: " + playername);
|
||||
return;
|
||||
}
|
||||
|
||||
CustomEffect effect = CustomEffectController.getInstance().get(effectId, index);
|
||||
if (effect == null) {
|
||||
sendError(sender, "Unknown effect with ID: " + effectId + " and index " + index);
|
||||
return;
|
||||
}
|
||||
|
||||
for (PlayerData pdata : players) {
|
||||
CustomEffectController.getInstance().removeEffect(pdata.player, effectId, index, ExpirationType.REMOVED);
|
||||
sendResult(sender, String.format("Effect %d removed from %s", effectId, pdata.playername));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -165,7 +165,7 @@ public class SyncController {
|
||||
public static NBTTagCompound customEffectsNBT(){
|
||||
NBTTagList list = new NBTTagList();
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
for (CustomEffect effect : CustomEffectController.getInstance().customEffects.values()) {
|
||||
for (CustomEffect effect : CustomEffectController.getInstance().getCustomEffects().values()) {
|
||||
list.appendTag(effect.writeToNBT(false));
|
||||
}
|
||||
compound.setTag("Data", list);
|
||||
@@ -396,15 +396,18 @@ public class SyncController {
|
||||
}
|
||||
case CUSTOM_EFFECTS: {
|
||||
NBTTagList list = fullCompound.getTagList("Data", 10);
|
||||
CustomEffectController ce = CustomEffectController.getInstance();
|
||||
ce.customEffectsSync.clear();
|
||||
for (int i = 0; i < list.tagCount(); i++) {
|
||||
CustomEffect effect = new CustomEffect();
|
||||
effect.readFromNBT(list.getCompoundTagAt(i));
|
||||
ClientCacheHandler.getImageData(effect.icon);
|
||||
CustomEffectController.getInstance().customEffectsSync.put(effect.id, effect);
|
||||
ce.customEffectsSync.put(effect.id, effect);
|
||||
}
|
||||
|
||||
CustomEffectController.getInstance().customEffects = CustomEffectController.getInstance().customEffectsSync;
|
||||
CustomEffectController.getInstance().customEffectsSync = new HashMap<>();
|
||||
ce.getCustomEffects().clear();
|
||||
ce.getCustomEffects().putAll(ce.customEffectsSync);
|
||||
ce.customEffectsSync.clear();
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -485,7 +488,7 @@ public class SyncController {
|
||||
effect.readFromNBT(compound);
|
||||
ClientCacheHandler.getImageData(effect.icon);
|
||||
|
||||
CustomEffectController.Instance.customEffects.put(effect.id, effect);
|
||||
CustomEffectController.Instance.getCustomEffects().put(effect.id, effect);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -558,7 +561,7 @@ public class SyncController {
|
||||
case MAGIC:
|
||||
break;
|
||||
case CUSTOM_EFFECTS:
|
||||
CustomEffectController.Instance.customEffects.remove(id);
|
||||
CustomEffectController.Instance.getCustomEffects().remove(id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@ import noppes.npcs.controllers.CustomEffectController;
|
||||
import noppes.npcs.controllers.data.CustomEffect;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
|
||||
public final class EffectGetPacket extends AbstractPacket {
|
||||
public static final String packetName = "NPC|GetEffect";
|
||||
@@ -48,7 +49,6 @@ public final class EffectGetPacket extends AbstractPacket {
|
||||
CustomEffect Effect = (CustomEffect) CustomEffectController.getInstance().get(effectID);
|
||||
if (Effect != null) {
|
||||
compound = Effect.writeToNBT(false);
|
||||
compound.setString("Type", "ViewEffect");
|
||||
}
|
||||
}
|
||||
GuiDataPacket.sendGuiData((EntityPlayerMP) player, compound);
|
||||
|
||||
@@ -27,6 +27,7 @@ public class CustomItems {
|
||||
public static Item moving;
|
||||
public static Item mount;
|
||||
public static Item teleporter;
|
||||
public static Item tool;
|
||||
public static Item scripted_item;
|
||||
|
||||
public static Item soulstoneEmpty;
|
||||
@@ -169,6 +170,7 @@ public class CustomItems {
|
||||
public static Block banner;
|
||||
public static Block wallBanner;
|
||||
public static Block tallLamp;
|
||||
public static Block shortLamp;
|
||||
public static Block blood;
|
||||
public static Block book;
|
||||
public static Block chair;
|
||||
@@ -187,11 +189,11 @@ public class CustomItems {
|
||||
public static Block beam;
|
||||
public static Block crystal;
|
||||
|
||||
public static Block lamp;
|
||||
public static Block lantern;
|
||||
public static Block campfire;
|
||||
public static Block candle;
|
||||
|
||||
public static Block lamp_unlit;
|
||||
public static Block lantern_unlit;
|
||||
public static Block campfire_unlit;
|
||||
public static Block candle_unlit;
|
||||
public static Block scripted;
|
||||
@@ -215,6 +217,7 @@ public class CustomItems {
|
||||
if(!ConfigMain.DisableExtraBlock){
|
||||
GameRegistry.registerTileEntity(TileWallBanner.class, "TileNPCWallBanner");
|
||||
GameRegistry.registerTileEntity(TileTallLamp.class, "TileNPCTallLamp");
|
||||
GameRegistry.registerTileEntity(TileShortLamp.class, "TileNPCShortLamp");
|
||||
GameRegistry.registerTileEntity(TileChair.class, "TileNPCChair");
|
||||
GameRegistry.registerTileEntity(TileCrate.class, "TileNPCCrate");
|
||||
GameRegistry.registerTileEntity(TileWeaponRack.class, "TileNPCWeaponRack");
|
||||
@@ -242,9 +245,10 @@ public class CustomItems {
|
||||
mount = new ItemMounter().setUnlocalizedName("npcMounter").setFull3D();
|
||||
teleporter = new ItemTeleporter().setUnlocalizedName("npcTeleporter").setFull3D();
|
||||
scripted_item = new ItemScripted().setUnlocalizedName("scripted_item").setFull3D();
|
||||
tool = new ItemNpcTool().setUnlocalizedName("npcTool").setFull3D();
|
||||
|
||||
redstoneBlock = new BlockNpcRedstone().setHardness(50.0F).setResistance(2000).setBlockName("npcRedstoneBlock").setBlockTextureName("customnpcs:npcRedstoneBlock").setCreativeTab(tab);
|
||||
carpentyBench = new BlockCarpentryBench().setBlockName("npcCarpentyBench").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood).setCreativeTab(tabBlocks);
|
||||
carpentyBench = new BlockCarpentryBench().setBlockName("npcCarpentyBench").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypePiston).setCreativeTab(tabBlocks);
|
||||
mailbox = new BlockMailbox().setBlockName("npcMailbox").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(tabBlocks);
|
||||
waypoint = new BlockWaypoint().setBlockName("npcLocationBlock").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName("customnpcs:npcWaypoint").setCreativeTab(tab);
|
||||
border = new BlockBorder().setBlockName("npcBorder").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood).setCreativeTab(tab).setBlockTextureName("customnpcs:npcBorder");
|
||||
@@ -279,17 +283,18 @@ public class CustomItems {
|
||||
|
||||
if(!ConfigMain.DisableExtraBlock){
|
||||
blood = new BlockBlood().setBlockName("npcBloodBlock").setBlockTextureName("customnpcs:npcBloodBlock").setCreativeTab(tabBlocks);
|
||||
banner = new BlockBanner().setBlockName("npcBanner").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(tabBlocks);
|
||||
wallBanner = new BlockWallBanner().setBlockName("npcWallBanner").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(tabBlocks);
|
||||
banner = new BlockBanner().setBlockName("npcBanner").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeCloth).setCreativeTab(tabBlocks);
|
||||
wallBanner = new BlockWallBanner().setBlockName("npcWallBanner").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeCloth).setCreativeTab(tabBlocks);
|
||||
tallLamp = new BlockTallLamp().setBlockName("npcTallLamp").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(tabBlocks);
|
||||
chair = new BlockChair().setBlockName("npcChair").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood).setCreativeTab(tabBlocks);
|
||||
shortLamp = new BlockShortLamp().setBlockName("npcShortLamp").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(tabBlocks);
|
||||
chair = new BlockChair().setBlockName("npcChair").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood).setCreativeTab(tabBlocks);
|
||||
crate = new BlockCrate().setBlockName("npcCrate").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood).setCreativeTab(tabBlocks);
|
||||
weaponsRack = new BlockWeaponRack().setBlockName("npcWeaponRack").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood).setCreativeTab(tabBlocks);
|
||||
couchWool = new BlockCouchWool().setBlockName("npcCouchWool").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood).setCreativeTab(tabBlocks);
|
||||
table = new BlockTable().setBlockName("npcTable").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood).setCreativeTab(tabBlocks);
|
||||
couchWood = new BlockCouchWood().setBlockName("npcCouchWood").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood).setCreativeTab(tabBlocks);
|
||||
lamp = new BlockLamp(true).setBlockName("npcLamp").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood).setCreativeTab(tabBlocks);
|
||||
candle = new BlockCandle(true).setBlockName("npcCandle").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood).setCreativeTab(tabBlocks);
|
||||
lantern = new BlockLantern(true).setBlockName("npcLamp").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setCreativeTab(tabBlocks).setBlockTextureName("customnpcs:lantern");;
|
||||
candle = new BlockCandle(true).setBlockName("npcCandle").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeStone).setCreativeTab(tabBlocks).setBlockTextureName("customnpcs:candle");;
|
||||
stool = new BlockStool().setBlockName("npcStool").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood).setCreativeTab(tabBlocks);
|
||||
Block placeholder = new BlockPlaceholder().setBlockName("npcPlaceholder").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood).setCreativeTab(tabMisc);
|
||||
bigsign = new BlockBigSign().setBlockName("npcBigSign").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood).setCreativeTab(tabBlocks);
|
||||
@@ -304,13 +309,14 @@ public class CustomItems {
|
||||
crystal = new BlockCrystal().setBlockName("npcCrystal").setBlockTextureName("customnpcs:npcCrystal").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeGlass).setCreativeTab(tabBlocks);
|
||||
|
||||
campfire_unlit = new BlockCampfire(false).setBlockName("npcCampfire").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeStone);
|
||||
lamp_unlit = new BlockLamp(false).setBlockName("npcLamp").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood);
|
||||
candle_unlit = new BlockCandle(false).setBlockName("npcCandle").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeWood);
|
||||
lantern_unlit = new BlockLantern(false).setBlockName("npcLamp").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeMetal).setBlockTextureName("customnpcs:lantern");
|
||||
candle_unlit = new BlockCandle(false).setBlockName("npcCandle").setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundTypeStone).setBlockTextureName("customnpcs:candle");
|
||||
|
||||
GameRegistry.registerBlock(blood, "npcBloodBlock");
|
||||
GameRegistry.registerBlock(banner, ItemBlock.class, "npcBanner");
|
||||
GameRegistry.registerBlock(wallBanner, ItemBlock.class, "npcWallBanner");
|
||||
GameRegistry.registerBlock(tallLamp, ItemBlock.class, "npcTallLamp");
|
||||
GameRegistry.registerBlock(shortLamp, ItemBlock.class, "npcShortLamp");
|
||||
GameRegistry.registerBlock(chair, ItemBlock.class, "npcChair");
|
||||
GameRegistry.registerBlock(crate, ItemBlock.class, "npcCrate");
|
||||
GameRegistry.registerBlock(weaponsRack, ItemBlock.class, "npcWeaponRack");
|
||||
@@ -329,15 +335,16 @@ public class CustomItems {
|
||||
GameRegistry.registerBlock(pedestal, ItemBlock.class, "npcPedestal");
|
||||
GameRegistry.registerBlock(crystal, ItemNpcColored.class, "npcCrystalBlock");
|
||||
GameRegistry.registerBlock(campfire, "npcCampfire");
|
||||
GameRegistry.registerBlock(lamp, "npcLamp");
|
||||
GameRegistry.registerBlock(lantern, "npcLamp");
|
||||
GameRegistry.registerBlock(candle, "npcCandle");
|
||||
GameRegistry.registerBlock(campfire_unlit, "npcCampfireUnlit");
|
||||
GameRegistry.registerBlock(candle_unlit, "npcLampUnlit");
|
||||
GameRegistry.registerBlock(lamp_unlit, "npcCandleUnlit");
|
||||
GameRegistry.registerBlock(lantern_unlit, "npcCandleUnlit");
|
||||
|
||||
Item.getItemFromBlock(banner).setHasSubtypes(true);
|
||||
Item.getItemFromBlock(wallBanner).setHasSubtypes(true);
|
||||
Item.getItemFromBlock(tallLamp).setHasSubtypes(true);
|
||||
Item.getItemFromBlock(shortLamp).setHasSubtypes(true);
|
||||
Item.getItemFromBlock(chair).setHasSubtypes(true);
|
||||
Item.getItemFromBlock(crate).setHasSubtypes(true);
|
||||
Item.getItemFromBlock(weaponsRack).setHasSubtypes(true);
|
||||
|
||||
@@ -210,6 +210,9 @@ public class CustomNpcs {
|
||||
new LinkedNpcController();
|
||||
new AnimationController();
|
||||
|
||||
// Custom Effects
|
||||
CustomEffectController.getInstance().load();
|
||||
|
||||
// Profile Controller
|
||||
new ProfileController();
|
||||
ProfileController.registerProfileType(new CNPCData());
|
||||
|
||||
@@ -658,7 +658,7 @@ public class NoppesUtilServer {
|
||||
|
||||
public static void sendCustomEffectDataAll(EntityPlayerMP player) {
|
||||
Map<String, Integer> map = new HashMap<String, Integer>();
|
||||
for (CustomEffect effect : CustomEffectController.getInstance().customEffects.values()) {
|
||||
for (CustomEffect effect : CustomEffectController.getInstance().getCustomEffects().values()) {
|
||||
map.put(effect.name, effect.id);
|
||||
}
|
||||
ScrollDataPacket.sendScrollData(player, map);
|
||||
|
||||
@@ -3,6 +3,7 @@ package noppes.npcs.blocks;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -15,18 +16,18 @@ import noppes.npcs.blocks.tiles.TileColorable;
|
||||
import java.util.Random;
|
||||
|
||||
public class BlockCandle extends BlockLightable{
|
||||
|
||||
|
||||
public BlockCandle(boolean lit) {
|
||||
super(Blocks.planks, lit);
|
||||
super(Blocks.stone, lit);
|
||||
setBlockBounds(0.3f, 0, 0.3f, 0.7f, 0.5f, 0.7f);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public int maxRotation(){
|
||||
return 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z){
|
||||
TileEntity tileentity = world.getTileEntity(x, y, z);
|
||||
if(!(tileentity instanceof TileColorable)){
|
||||
@@ -45,23 +46,23 @@ public class BlockCandle extends BlockLightable{
|
||||
xOffset = 0.2f;
|
||||
else if(tile.rotation == 2)
|
||||
xOffset = -0.2f;
|
||||
|
||||
|
||||
setBlockBounds(0.2f + xOffset, 0.4f, 0.2f + yOffset, 0.8f + xOffset, 0.9f, 0.8f + yOffset);
|
||||
}
|
||||
else if(tile.color == 1)
|
||||
setBlockBounds(0.1f, 0.1f, 0.1f, 0.9f, 0.8f, 0.9f);
|
||||
else
|
||||
setBlockBounds(0.3f, 0, 0.3f, 0.7f, 0.5f, 0.7f);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public int onBlockPlaced(World world, int x, int y, int z, int side, float p_149660_6_, float p_149660_7_, float p_149660_8_, int meta){
|
||||
return side;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public void onPostBlockPlaced(World world, int x, int y, int z, int meta) {
|
||||
TileCandle tile = (TileCandle) world.getTileEntity(x, y, z);
|
||||
if(meta == 1)
|
||||
@@ -81,10 +82,16 @@ public class BlockCandle extends BlockLightable{
|
||||
}
|
||||
world.setBlockMetadataWithNotify(x, y, z, 0, 4);
|
||||
}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister){
|
||||
this.blockIcon = par1IconRegister.registerIcon(this.getTextureName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int p_149691_1_, int meta){
|
||||
return Blocks.soul_sand.getIcon(p_149691_1_, meta);
|
||||
return this.blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -97,18 +104,18 @@ public class BlockCandle extends BlockLightable{
|
||||
if(this == unlitBlock())
|
||||
return;
|
||||
TileCandle tile = (TileCandle) world.getTileEntity(x, y, z);
|
||||
|
||||
|
||||
if(tile.color == 1){
|
||||
if(tile.rotation % 2 == 0){
|
||||
world.spawnParticle("smoke", x + 0.5f, y + 0.66f, z + 0.13f, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", x + 0.5f, y + 0.65f, z + 0.13f, 0.0D, 0.0D, 0.0D);
|
||||
|
||||
|
||||
world.spawnParticle("smoke", x + 0.5f, y + 0.66f, z + 0.87f, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", x + 0.5f, y + 0.65f, z + 0.87f, 0.0D, 0.0D, 0.0D);
|
||||
|
||||
|
||||
world.spawnParticle("smoke", x + 0.13f, y + 0.66f, z + 0.5f, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", x + 0.13f, y + 0.65f, z + 0.5f, 0.0D, 0.0D, 0.0D);
|
||||
|
||||
|
||||
world.spawnParticle("smoke", x + 0.87f, y + 0.66f, z + 0.5f, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", x + 0.87f, y + 0.65f, z + 0.5f, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
@@ -125,11 +132,11 @@ public class BlockCandle extends BlockLightable{
|
||||
world.spawnParticle("smoke", x + 0.76f, y + 0.66f, z + 0.24f, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", x + 0.76f, y + 0.65f, z + 0.24f, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
float xOffset = 0.5f, yOffset = 0.45f, zOffset = 0.5f;
|
||||
|
||||
|
||||
if(tile.color == 2){
|
||||
yOffset = 1.05f;
|
||||
if(tile.rotation == 0)
|
||||
@@ -144,7 +151,7 @@ public class BlockCandle extends BlockLightable{
|
||||
double d0 = (double)((float)x + xOffset);
|
||||
double d1 = (double)((float)y + yOffset);
|
||||
double d2 = (double)((float)z + zOffset);
|
||||
|
||||
|
||||
world.spawnParticle("smoke", d0, d1, d2, 0.0D, 0.0D, 0.0D);
|
||||
world.spawnParticle("flame", d0, d1, d2, 0.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
@@ -14,6 +14,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.CustomNpcs;
|
||||
import noppes.npcs.blocks.tiles.TileBlockAnvil;
|
||||
@@ -26,8 +27,23 @@ public class BlockCarpentryBench extends BlockContainer
|
||||
public int renderId = -1;
|
||||
public BlockCarpentryBench()
|
||||
{
|
||||
super(Material.wood);
|
||||
setStepSound(soundTypeWood);
|
||||
super(Material.rock);
|
||||
setStepSound(soundTypePiston);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getLightValue(IBlockAccess world, int x, int y, int z)
|
||||
{
|
||||
Block block = world.getBlock(x, y, z);
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if (block != this)
|
||||
{
|
||||
return block.getLightValue(world, x, y, z);
|
||||
}
|
||||
if(meta >= 4)
|
||||
return 5;
|
||||
|
||||
return getLightValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -68,6 +84,9 @@ public class BlockCarpentryBench extends BlockContainer
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta)
|
||||
{
|
||||
if(meta >= 4){
|
||||
return Blocks.anvil.getIcon(side, 0);
|
||||
}
|
||||
return Blocks.planks.getIcon(side, 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -26,13 +26,13 @@ import noppes.npcs.blocks.tiles.TileCouchWool;
|
||||
import java.util.List;
|
||||
|
||||
public class BlockCouchWool extends BlockContainer{
|
||||
|
||||
|
||||
public int renderId = -1;
|
||||
|
||||
|
||||
public BlockCouchWool() {
|
||||
super(Material.wood);
|
||||
}
|
||||
@Override
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int i, int j, int k, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
ItemStack item = player.inventory.getCurrentItem();
|
||||
if(item == null || item.getItem() != Items.dye)
|
||||
@@ -49,8 +49,8 @@ public class BlockCouchWool extends BlockContainer{
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List){
|
||||
par3List.add(new ItemStack(par1, 1, 0));
|
||||
par3List.add(new ItemStack(par1, 1, 1));
|
||||
@@ -60,7 +60,7 @@ public class BlockCouchWool extends BlockContainer{
|
||||
par3List.add(new ItemStack(par1, 1, 5));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public int damageDropped(int par1)
|
||||
{
|
||||
return par1;
|
||||
@@ -69,7 +69,7 @@ public class BlockCouchWool extends BlockContainer{
|
||||
return AxisAlignedBB.getBoundingBox(x, y, z, x + 1, y + 0.5, z + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack)
|
||||
{
|
||||
int l = MathHelper.floor_double((double)(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
|
||||
@@ -77,7 +77,7 @@ public class BlockCouchWool extends BlockContainer{
|
||||
TileCouchWool tile = (TileCouchWool) par1World.getTileEntity(par2, par3, par4);
|
||||
tile.rotation = l;
|
||||
tile.color = 15 - par6ItemStack.getItemDamage();
|
||||
|
||||
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, par6ItemStack.getItemDamage(), 2);
|
||||
updateModel(par1World, par2, par3, par4, tile);
|
||||
onNeighborBlockChange(par1World, par2 + 1, par3, par4, this);
|
||||
@@ -88,7 +88,7 @@ public class BlockCouchWool extends BlockContainer{
|
||||
par1World.markBlockForUpdate(par2, par3, par4);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void onNeighborBlockChange(World worldObj, int x, int y, int z, Block block) {
|
||||
if(worldObj.isRemote || block != this)
|
||||
return;
|
||||
@@ -98,7 +98,7 @@ public class BlockCouchWool extends BlockContainer{
|
||||
updateModel(worldObj, x, y, z, (TileCouchWool) tile);
|
||||
worldObj.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
|
||||
|
||||
private void updateModel(World world, int x, int y, int z, TileCouchWool tile){
|
||||
if(world.isRemote)
|
||||
return;
|
||||
@@ -130,16 +130,16 @@ public class BlockCouchWool extends BlockContainer{
|
||||
}
|
||||
private boolean compareCornerTiles(TileCouchWool tile, int x, int y, int z, World world, int meta, boolean isLeft){
|
||||
int meta2 = world.getBlockMetadata(x, y, z);
|
||||
if(meta2 != meta)
|
||||
return false;
|
||||
// if(meta2 != meta)
|
||||
// return false;
|
||||
TileEntity tile2 = world.getTileEntity(x , y, z);
|
||||
int rotation = (tile.rotation + (!isLeft?1:3)) % 4;
|
||||
return tile2 != null & tile2 instanceof TileCouchWool && ((TileCouchWool)tile2).rotation == rotation;
|
||||
}
|
||||
private boolean compareTiles(TileCouchWool tile, int x, int y, int z, World world, int meta){
|
||||
int meta2 = world.getBlockMetadata(x, y, z);
|
||||
if(meta2 != meta)
|
||||
return false;
|
||||
// if(meta2 != meta)
|
||||
// return false;
|
||||
TileEntity tile2 = world.getTileEntity(x, y, z);
|
||||
if(tile2 == null || !(tile2 instanceof TileCouchWool))
|
||||
return false;
|
||||
@@ -155,25 +155,25 @@ public class BlockCouchWool extends BlockContainer{
|
||||
return tile.rotation == rotation;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return renderId;
|
||||
return renderId;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
+20
-13
@@ -3,6 +3,7 @@ package noppes.npcs.blocks;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.IIcon;
|
||||
@@ -12,10 +13,10 @@ import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.blocks.tiles.TileColorable;
|
||||
import noppes.npcs.blocks.tiles.TileLamp;
|
||||
|
||||
public class BlockLamp extends BlockLightable{
|
||||
public class BlockLantern extends BlockLightable{
|
||||
|
||||
public BlockLamp(boolean lit) {
|
||||
super(Blocks.planks, lit);
|
||||
public BlockLantern(boolean lit) {
|
||||
super(Blocks.iron_block, lit);
|
||||
setBlockBounds(0.3f, 0, 0.3f, 0.7f, 0.6f, 0.7f);
|
||||
}
|
||||
|
||||
@@ -23,8 +24,8 @@ public class BlockLamp extends BlockLightable{
|
||||
public int maxRotation(){
|
||||
return 8;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z){
|
||||
TileEntity tileentity = world.getTileEntity(x, y, z);
|
||||
if(!(tileentity instanceof TileColorable)){
|
||||
@@ -43,20 +44,20 @@ public class BlockLamp extends BlockLightable{
|
||||
xOffset = 0.2f;
|
||||
else if(tile.rotation == 2)
|
||||
xOffset = -0.2f;
|
||||
|
||||
|
||||
setBlockBounds(0.3f + xOffset, 0.2f, 0.3f + yOffset, 0.7f + xOffset, 0.7f, 0.7f + yOffset);
|
||||
}
|
||||
else
|
||||
setBlockBounds(0.3f, 0, 0.3f, 0.7f, 0.6f, 0.7f);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public int onBlockPlaced(World world, int x, int y, int z, int side, float p_149660_6_, float p_149660_7_, float p_149660_8_, int meta){
|
||||
return side;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void onPostBlockPlaced(World world, int x, int y, int z, int meta) {
|
||||
TileLamp tile = (TileLamp) world.getTileEntity(x, y, z);
|
||||
if(meta == 1)
|
||||
@@ -77,10 +78,16 @@ public class BlockLamp extends BlockLightable{
|
||||
world.setBlockMetadataWithNotify(x, y, z, 0, 4);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister){
|
||||
this.blockIcon = par1IconRegister.registerIcon(this.getTextureName());
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int p_149691_1_, int meta){
|
||||
return Blocks.soul_sand.getIcon(p_149691_1_, meta);
|
||||
return this.blockIcon;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,11 +97,11 @@ public class BlockLamp extends BlockLightable{
|
||||
|
||||
@Override
|
||||
public Block unlitBlock() {
|
||||
return CustomItems.lamp_unlit;
|
||||
return CustomItems.lantern_unlit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Block litBlock() {
|
||||
return CustomItems.lamp;
|
||||
return CustomItems.lantern;
|
||||
}
|
||||
}
|
||||
@@ -15,7 +15,7 @@ import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
import noppes.npcs.blocks.tiles.TileColorable;
|
||||
|
||||
public abstract class BlockRotated extends BlockContainer{
|
||||
public abstract class BlockRotated extends BlockContainer {
|
||||
private Block block;
|
||||
protected BlockRotated(Block block) {
|
||||
super(block.getMaterial());
|
||||
@@ -24,38 +24,38 @@ public abstract class BlockRotated extends BlockContainer{
|
||||
|
||||
public int renderId = -1;
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack){
|
||||
int l = MathHelper.floor_double((double)(par5EntityLivingBase.rotationYaw * maxRotation() / 360.0F) + 0.5D) & (maxRotation() - 1);
|
||||
l %= maxRotation();
|
||||
|
||||
TileColorable tile = (TileColorable) par1World.getTileEntity(par2, par3, par4);
|
||||
tile.rotation = l;
|
||||
tile.rotation = l;
|
||||
}
|
||||
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z){
|
||||
setBlockBoundsBasedOnState(world, x, y, z);
|
||||
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
|
||||
}
|
||||
|
||||
|
||||
public int maxRotation(){
|
||||
return 4;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return renderId;
|
||||
return renderId;
|
||||
}
|
||||
@Override
|
||||
@Override
|
||||
public boolean isSideSolid(IBlockAccess world, int x, int y, int z, ForgeDirection side){
|
||||
return true;
|
||||
}
|
||||
@@ -64,7 +64,7 @@ public abstract class BlockRotated extends BlockContainer{
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
|
||||
@@ -0,0 +1,135 @@
|
||||
package noppes.npcs.blocks;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.block.BlockColored;
|
||||
import net.minecraft.block.BlockContainer;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.NoppesUtilServer;
|
||||
import noppes.npcs.blocks.tiles.TileColorable;
|
||||
import noppes.npcs.blocks.tiles.TileShortLamp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockShortLamp extends BlockContainer {
|
||||
|
||||
public int renderId = -1;
|
||||
|
||||
public BlockShortLamp() {
|
||||
super(Material.wood);
|
||||
setLightLevel(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player,
|
||||
int side, float hitX, float hitY, float hitZ) {
|
||||
ItemStack item = player.inventory.getCurrentItem();
|
||||
if (item == null || item.getItem() != Items.dye)
|
||||
return false;
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
TileColorable tile = (TileColorable) world.getTileEntity(x, y, z);
|
||||
int color = BlockColored.func_150031_c(item.getItemDamage());
|
||||
if (tile.color != color) {
|
||||
NoppesUtilServer.consumeItemStack(1, player);
|
||||
tile.color = color;
|
||||
world.markBlockForUpdate(x, y, z);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z) {
|
||||
setBlockBoundsBasedOnState(world, x, y, z);
|
||||
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
|
||||
list.add(new ItemStack(item, 1, 0));
|
||||
list.add(new ItemStack(item, 1, 1));
|
||||
list.add(new ItemStack(item, 1, 2));
|
||||
list.add(new ItemStack(item, 1, 3));
|
||||
list.add(new ItemStack(item, 1, 4));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageDropped(int meta) {
|
||||
return meta;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World world, int x, int y, int z,
|
||||
EntityLivingBase entity, ItemStack stack) {
|
||||
int l = MathHelper.floor_double((double)(entity.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
|
||||
l %= 4;
|
||||
TileColorable tile = (TileColorable) world.getTileEntity(x, y, z);
|
||||
tile.rotation = l;
|
||||
tile.color = 15 - stack.getItemDamage();
|
||||
world.setBlockMetadataWithNotify(x, y, z, stack.getItemDamage(), 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
// Always one block tall.
|
||||
setBlockBounds(0, 0, 0, 1, 1, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return renderId;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister reg) {
|
||||
// Optional icon registration
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIcon getIcon(int side, int meta) {
|
||||
if(meta == 1)
|
||||
return Blocks.stone.getIcon(side, 0);
|
||||
else if(meta == 2)
|
||||
return Blocks.iron_block.getIcon(side, 0);
|
||||
else if(meta == 3)
|
||||
return Blocks.gold_block.getIcon(side, 0);
|
||||
else if(meta == 4)
|
||||
return Blocks.diamond_block.getIcon(side, 0);
|
||||
return Blocks.planks.getIcon(side, 0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createNewTileEntity(World world, int meta) {
|
||||
return new TileShortLamp();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockHarvested(World world, int x, int y, int z, int meta, EntityPlayer player) {
|
||||
super.onBlockHarvested(world, x, y, z, meta, player);
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,25 @@
|
||||
package noppes.npcs.blocks;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.blocks.tiles.TileTable;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockTable extends BlockRotated{
|
||||
public class BlockTable extends BlockRotated {
|
||||
|
||||
public BlockTable() {
|
||||
super(Blocks.planks);
|
||||
this.setLightOpacity(-1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List){
|
||||
par3List.add(new ItemStack(par1, 1, 0));
|
||||
par3List.add(new ItemStack(par1, 1, 1));
|
||||
@@ -28,15 +29,14 @@ public class BlockTable extends BlockRotated{
|
||||
par3List.add(new ItemStack(par1, 1, 5));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public int damageDropped(int par1){
|
||||
return par1;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack){
|
||||
super.onBlockPlacedBy(par1World, par2, par3, par4, par5EntityLivingBase, par6ItemStack);
|
||||
super.onBlockPlacedBy(par1World, par2, par3, par4, par5EntityLivingBase, par6ItemStack);
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, par6ItemStack.getItemDamage() , 2);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ import noppes.npcs.blocks.tiles.TileTallLamp;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class BlockTallLamp extends BlockContainer{
|
||||
|
||||
public class BlockTallLamp extends BlockContainer {
|
||||
|
||||
public int renderId = -1;
|
||||
|
||||
public BlockTallLamp() {
|
||||
@@ -34,7 +34,7 @@ public class BlockTallLamp extends BlockContainer{
|
||||
setBlockBounds(0, 0, 0, 1, 2, 1);
|
||||
setLightLevel(1);
|
||||
}
|
||||
@Override
|
||||
@Override
|
||||
public boolean onBlockActivated(World par1World, int i, int j, int k, EntityPlayer player, int par6, float par7, float par8, float par9){
|
||||
ItemStack item = player.inventory.getCurrentItem();
|
||||
if(item == null || item.getItem() != Items.dye)
|
||||
@@ -56,7 +56,7 @@ public class BlockTallLamp extends BlockContainer{
|
||||
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void getSubBlocks(Item par1, CreativeTabs par2CreativeTabs, List par3List){
|
||||
par3List.add(new ItemStack(par1, 1, 0));
|
||||
par3List.add(new ItemStack(par1, 1, 1));
|
||||
@@ -65,32 +65,37 @@ public class BlockTallLamp extends BlockContainer{
|
||||
par3List.add(new ItemStack(par1, 1, 4));
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public int damageDropped(int par1){
|
||||
return par1 % 7;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public boolean canPlaceBlockAt(World world, int x, int y, int z) {
|
||||
return super.canPlaceBlockAt(world, x, y, z) && world.isAirBlock(x, y + 1, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack)
|
||||
{
|
||||
if(!par1World.isAirBlock(par2, par3 + 1, par4)){
|
||||
par1World.setBlockToAir(par2, par3, par4);
|
||||
}
|
||||
else{
|
||||
|
||||
|
||||
int l = MathHelper.floor_double((double)(par5EntityLivingBase.rotationYaw * 4.0F / 360.0F) + 0.5D) & 3;
|
||||
l %= 4;
|
||||
|
||||
|
||||
TileColorable tile = (TileColorable) par1World.getTileEntity(par2, par3, par4);
|
||||
tile.rotation = l;
|
||||
tile.color = 15 - par6ItemStack.getItemDamage();
|
||||
|
||||
|
||||
par1World.setBlockMetadataWithNotify(par2, par3, par4, par6ItemStack.getItemDamage() , 2);
|
||||
par1World.setBlock(par2, par3 + 1, par4, this, par6ItemStack.getItemDamage() + 7, 2);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z){
|
||||
int meta = world.getBlockMetadata(x, y, z);
|
||||
if(meta >= 7)
|
||||
@@ -99,26 +104,24 @@ public class BlockTallLamp extends BlockContainer{
|
||||
setBlockBounds(0, 0, 0, 1, 2, 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public boolean isOpaqueCube(){
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public boolean renderAsNormalBlock(){
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
@Override
|
||||
public int getRenderType(){
|
||||
return renderId;
|
||||
return renderId;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerBlockIcons(IIconRegister par1IconRegister)
|
||||
{
|
||||
|
||||
}
|
||||
{}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -149,7 +152,7 @@ public class BlockTallLamp extends BlockContainer{
|
||||
{
|
||||
if (p_149681_5_ >= 7 && p_149681_1_.getBlock(p_149681_2_, p_149681_3_ - 1, p_149681_4_) == this)
|
||||
p_149681_1_.setBlockToAir(p_149681_2_, p_149681_3_ - 1, p_149681_4_);
|
||||
|
||||
|
||||
else if (p_149681_5_ < 7 && p_149681_1_.getBlock(p_149681_2_, p_149681_3_ + 1, p_149681_4_) == this)
|
||||
p_149681_1_.setBlockToAir(p_149681_2_, p_149681_3_ + 1, p_149681_4_);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,24 @@
|
||||
package noppes.npcs.blocks.tiles;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.EnumSkyBlock;
|
||||
|
||||
public class TileBlockAnvil extends TileEntity {
|
||||
|
||||
public TileBlockAnvil(){
|
||||
public boolean firstTick = true;
|
||||
|
||||
}
|
||||
public TileBlockAnvil(){}
|
||||
|
||||
public boolean canUpdate(){
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if (hasWorldObj() && firstTick && !getWorldObj().isRemote) {
|
||||
firstTick = false;
|
||||
getWorldObj().updateLightByType(EnumSkyBlock.Block, xCoord, yCoord, zCoord);
|
||||
getWorldObj().markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package noppes.npcs.blocks.tiles;
|
||||
|
||||
public class TileShortLamp extends TileColorable { }
|
||||
@@ -113,6 +113,7 @@ public class ClientProxy extends CommonProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileBanner.class, new BlockBannerRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileWallBanner.class, new BlockWallBannerRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileTallLamp.class, new BlockTallLampRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileShortLamp.class, new BlockShortLampRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileChair.class, new BlockChairRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileWeaponRack.class, new BlockWeaponRackRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileCrate.class, new BlockCrateRenderer());
|
||||
@@ -120,7 +121,7 @@ public class ClientProxy extends CommonProxy {
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileCouchWood.class, new BlockCouchWoodRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileTable.class, new BlockTableRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileCandle.class, new BlockCandleRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileLamp.class, new BlockLampRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileLamp.class, new BlockLanternRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileStool.class, new BlockStoolRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileBigSign.class, new BlockBigSignRenderer());
|
||||
ClientRegistry.bindTileEntitySpecialRenderer(TileBarrel.class, new BlockBarrelRenderer());
|
||||
|
||||
@@ -32,7 +32,7 @@ public class GuiMagicMap extends GuiDiagram {
|
||||
for (Magic magic : MagicController.getInstance().magics.values()) {
|
||||
magics.add(magic);
|
||||
}
|
||||
setLayout(DiagramLayout.CHART);
|
||||
setLayout(DiagramLayout.CIRCULAR_MANUAL);
|
||||
this.setCurvedArrows(true);
|
||||
this.setCurveAngle(-20);
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ public class SubGuiEffectGeneral extends SubGuiInterface implements ITextfieldLi
|
||||
super.initGui();
|
||||
GuiMenuTopButton close = new GuiMenuTopButton(-5, guiLeft + xSize - 22, guiTop - 10, "X");
|
||||
|
||||
GuiMenuTopButton general = new GuiMenuTopButton(-1, guiLeft + 4, guiTop - 10, "display.general");
|
||||
GuiMenuTopButton general = new GuiMenuTopButton(-1, guiLeft + 4, guiTop - 10, "menu.general");
|
||||
GuiMenuTopButton scripts = new GuiMenuTopButton(-2, general.xPosition + general.getWidth(), guiTop - 10, "script.scripts");
|
||||
|
||||
close.active = false;
|
||||
@@ -131,7 +131,7 @@ public class SubGuiEffectGeneral extends SubGuiInterface implements ITextfieldLi
|
||||
|
||||
// TODO: FIX TEXTURE
|
||||
// textureManager.bindTexture(new ResourceLocation(CustomNpcPlusDBC.ID + ":textures/gui/icons.png"));
|
||||
func_152125_a(x, y, 0, 240, 16, 16, iconRenderSize, iconRenderSize, 256, 256);
|
||||
// func_152125_a(x, y, 0, 240, 16, 16, iconRenderSize, iconRenderSize, 256, 256);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -50,7 +50,7 @@ public class GuiNPCManageEffects extends GuiNPCInterface2 implements ICustomScro
|
||||
addButton(new GuiNpcButton(1, guiLeft + 368, guiTop + 32, 45, 20, "gui.remove"));
|
||||
getButton(1).enabled = effect != null && effect.id != -1;
|
||||
|
||||
addButton(new GuiNpcButton(2, guiLeft + 368, guiTop + 56, 45, 20, "gui.clone"));
|
||||
addButton(new GuiNpcButton(2, guiLeft + 368, guiTop + 56, 45, 20, "gui.copy"));
|
||||
getButton(2).enabled = effect != null && effect.id != -1;
|
||||
|
||||
addButton(new GuiNpcButton(3, guiLeft + 368, guiTop + 80, 45, 20, "gui.edit"));
|
||||
@@ -112,7 +112,7 @@ public class GuiNPCManageEffects extends GuiNPCInterface2 implements ICustomScro
|
||||
effect.readFromNBT(compound);
|
||||
setSelected(effect.name);
|
||||
if (effect.id != -1) {
|
||||
CustomEffectController.getInstance().customEffects.replace(effect.id, effect);
|
||||
CustomEffectController.getInstance().getCustomEffects().replace(effect.id, effect);
|
||||
}
|
||||
initGui();
|
||||
}
|
||||
@@ -173,7 +173,7 @@ public class GuiNPCManageEffects extends GuiNPCInterface2 implements ICustomScro
|
||||
|
||||
// TODO: Fix ICONS
|
||||
// textureManager.bindTexture(new ResourceLocation(CustomNpcPlusDBC.ID + ":textures/gui/icons.png"));
|
||||
func_152125_a(x, y, 0, 240, 16, 16, iconRenderSize, iconRenderSize, 256, 256);
|
||||
// func_152125_a(x, y, 0, 240, 16, 16, iconRenderSize, iconRenderSize, 256, 256);
|
||||
GL11.glEnable(GL11.GL_DEPTH_TEST);
|
||||
|
||||
x += iconRenderSize + 3;
|
||||
|
||||
@@ -142,8 +142,7 @@ public abstract class GuiNPCInterface extends GuiScreen {
|
||||
tf.mouseClicked(i, j, k);
|
||||
|
||||
for (GuiScrollWindow guiScrollableComponent : scrollWindows.values()) {
|
||||
if (guiScrollableComponent.isMouseOver(i, j))
|
||||
guiScrollableComponent.mouseClicked(i, j, k);
|
||||
guiScrollableComponent.mouseClicked(i, j, k);
|
||||
}
|
||||
|
||||
if (k == 0) {
|
||||
|
||||
@@ -94,7 +94,6 @@ public class GuiScrollWindow extends GuiScreen implements ITextfieldListener, IC
|
||||
}
|
||||
|
||||
public void mouseClicked(int i, int j, int k) {
|
||||
|
||||
i = i - xPos;
|
||||
j = (int) (j - yPos + scrollY);
|
||||
|
||||
|
||||
@@ -1,90 +1,136 @@
|
||||
// Date: 11-10-2012 19:29:20
|
||||
// Template version 1.1
|
||||
// Java generated by Techne
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
package noppes.npcs.client.model.blocks;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelAnvil extends ModelBase {
|
||||
ModelRenderer Tail;
|
||||
ModelRenderer Nose1;
|
||||
ModelRenderer Nose2;
|
||||
ModelRenderer Nose3;
|
||||
ModelRenderer Nose4;
|
||||
ModelRenderer Head1;
|
||||
ModelRenderer Head2;
|
||||
ModelRenderer Neck2;
|
||||
ModelRenderer Bottom2;
|
||||
ModelRenderer Bottom3;
|
||||
ModelRenderer Foot4;
|
||||
public final ModelRenderer Anvil;
|
||||
public final ModelRenderer Desk;
|
||||
public final ModelRenderer Bucket;
|
||||
private final ModelRenderer cube_r1;
|
||||
private final ModelRenderer cube_r2;
|
||||
public final ModelRenderer Lava;
|
||||
public final ModelRenderer Hammer;
|
||||
private final ModelRenderer Hammer_r1;
|
||||
public final ModelRenderer Mold;
|
||||
private final ModelRenderer cube_r3;
|
||||
private final ModelRenderer cube_r4;
|
||||
private final ModelRenderer cube_r5;
|
||||
private final ModelRenderer cube_r6;
|
||||
private final ModelRenderer cube_r7;
|
||||
private final ModelRenderer cube_r8;
|
||||
|
||||
public ModelAnvil() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
public ModelAnvil() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
Tail = new ModelRenderer(this, 0, 0);
|
||||
Tail.addBox(0F, 0F, 0F, 1, 2, 4);
|
||||
Tail.setRotationPoint(-7F, 12F, -2F);
|
||||
Anvil = new ModelRenderer(this);
|
||||
Anvil.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Anvil.cubeList.add(new ModelBox(Anvil, 0, 16, -6.0F, -4.0F, -8.0F, 12, 4, 12, 0.0F));
|
||||
Anvil.cubeList.add(new ModelBox(Anvil, 0, 32, -5.0F, -5.0F, -6.0F, 10, 1, 8, 0.0F));
|
||||
Anvil.cubeList.add(new ModelBox(Anvil, 0, 41, -4.0F, -10.0F, -4.0F, 8, 5, 4, 0.0F));
|
||||
Anvil.cubeList.add(new ModelBox(Anvil, 0, 0, -8.0F, -16.0F, -7.0F, 16, 6, 10, 0.0F));
|
||||
|
||||
Nose1 = new ModelRenderer(this, 0, 0);
|
||||
Nose1.addBox(0F, 0F, 0F, 1, 5, 6);
|
||||
Nose1.setRotationPoint(6F, 10F, -3F);
|
||||
Desk = new ModelRenderer(this);
|
||||
Desk.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Desk.cubeList.add(new ModelBox(Desk, 52, 0, 5.0F, -14.0F, 5.0F, 3, 14, 3, 0.0F));
|
||||
Desk.cubeList.add(new ModelBox(Desk, 52, 0, -8.0F, -14.0F, 5.0F, 3, 14, 3, 0.0F));
|
||||
Desk.cubeList.add(new ModelBox(Desk, 0, 50, -8.0F, -16.0F, 3.0F, 16, 2, 5, 0.0F));
|
||||
|
||||
Nose2 = new ModelRenderer(this, 0, 0);
|
||||
Nose2.addBox(0F, 0F, 0F, 1, 4, 5);
|
||||
Nose2.setRotationPoint(7F, 10F, -2.5F);
|
||||
Bucket = new ModelRenderer(this);
|
||||
Bucket.setRotationPoint(3.0F, 5.5F, 4.0F);
|
||||
setRotationAngle(Bucket, 0.0F, 0.3927F, 0.0F);
|
||||
Bucket.cubeList.add(new ModelBox(Bucket, 48, 17, -2.0F, 1.5F, -2.0F, 4, 1, 4, 0.0F));
|
||||
Bucket.cubeList.add(new ModelBox(Bucket, 54, 22, 1.5F, -2.5F, -2.0F, 1, 4, 4, 0.0F));
|
||||
Bucket.cubeList.add(new ModelBox(Bucket, 54, 22, -2.5F, -2.5F, -2.0F, 1, 4, 4, 0.0F));
|
||||
|
||||
Nose3 = new ModelRenderer(this, 0, 0);
|
||||
Nose3.addBox(0F, 0F, 0F, 1, 3, 4);
|
||||
Nose3.setRotationPoint(8F, 10F, -2F);
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(0.0F, -0.5F, -2.0F);
|
||||
Bucket.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, 1.5708F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 54, 22, -0.5F, -2.0F, -2.0F, 1, 4, 4, 0.0F));
|
||||
|
||||
Nose4 = new ModelRenderer(this, 0, 0);
|
||||
Nose4.addBox(0F, 0F, 0F, 1, 2, 2);
|
||||
Nose4.setRotationPoint(9F, 10F, -1F);
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(0.0F, -0.5F, 2.0F);
|
||||
Bucket.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, -1.5708F, 0.0F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 54, 22, -0.5F, -2.0F, -2.0F, 1, 4, 4, 0.0F));
|
||||
|
||||
Head1 = new ModelRenderer(this, 0, 0);
|
||||
Head1.addBox(0F, 0F, 0F, 12, 4, 7);
|
||||
Head1.setRotationPoint(-6F, 12F, -3.5F);
|
||||
Lava = new ModelRenderer(this);
|
||||
Lava.setRotationPoint(3.0F, 5.5F, 4.0F);
|
||||
setRotationAngle(Lava, 0.0F, 0.3927F, 0.0F);
|
||||
Lava.cubeList.add(new ModelBox(Lava, 48, 30, -2.0F, -1.5F, -2.0F, 4, 3, 4, 0.0F));
|
||||
|
||||
Head2 = new ModelRenderer(this, 0, 0);
|
||||
Head2.addBox(0F, 0F, 0F, 14, 2, 9);
|
||||
Head2.setRotationPoint(-8F, 10F, -4.5F);
|
||||
Hammer = new ModelRenderer(this);
|
||||
Hammer.setRotationPoint(4.9909F, 6.5642F, -4.0337F);
|
||||
setRotationAngle(Hammer, 0.1327F, 0.0189F, 0.1303F);
|
||||
|
||||
Neck2 = new ModelRenderer(this, 0, 0);
|
||||
Neck2.addBox(0F, 0F, 0F, 10, 1, 6);
|
||||
Neck2.setRotationPoint(-5F, 16F, -3F);
|
||||
|
||||
Bottom2 = new ModelRenderer(this, 0, 0);
|
||||
Bottom2.addBox(0F, 0F, 0F, 10, 2, 7);
|
||||
Bottom2.setRotationPoint(-5F, 20F, -3.5F);
|
||||
Hammer_r1 = new ModelRenderer(this);
|
||||
Hammer_r1.setRotationPoint(-0.2409F, 0.5358F, -0.4663F);
|
||||
Hammer.addChild(Hammer_r1);
|
||||
setRotationAngle(Hammer_r1, 2.9697F, -0.7703F, -2.8972F);
|
||||
Hammer_r1.cubeList.add(new ModelBox(Hammer_r1, 56, 45, -2.8377F, -0.7659F, -1.0002F, 3, 1, 1, 0.0F));
|
||||
Hammer_r1.cubeList.add(new ModelBox(Hammer_r1, 48, 37, 0.1623F, -1.7659F, -3.0002F, 3, 3, 5, 0.0F));
|
||||
|
||||
Bottom3 = new ModelRenderer(this, 0, 0);
|
||||
Bottom3.addBox(0F, 0F, 0F, 8, 3, 4);
|
||||
Bottom3.setRotationPoint(-4F, 17F, -2F);
|
||||
Mold = new ModelRenderer(this);
|
||||
Mold.setRotationPoint(-3.2778F, 7.5556F, 1.5F);
|
||||
setRotationAngle(Mold, 0.0F, 0.7854F, 0.0F);
|
||||
Mold.cubeList.add(new ModelBox(Mold, -5, 59, -3.7222F, 0.3444F, -2.5F, 7, 0, 5, 0.0F));
|
||||
Mold.cubeList.add(new ModelBox(Mold, 14, 62, -3.7222F, -0.5556F, -2.5F, 7, 1, 1, 0.0F));
|
||||
Mold.cubeList.add(new ModelBox(Mold, 14, 62, -3.7222F, -0.5556F, 1.5F, 7, 1, 1, 0.0F));
|
||||
|
||||
Foot4 = new ModelRenderer(this, 0, 0);
|
||||
Foot4.addBox(0F, 0F, 0F, 14, 2, 10);
|
||||
Foot4.setRotationPoint(-7F, 22F, -5F);
|
||||
cube_r3 = new ModelRenderer(this);
|
||||
cube_r3.setRotationPoint(0.7778F, -0.0556F, -1.0F);
|
||||
Mold.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, 0.0F, 0.0F, 0.0F);
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 31, 62, 0.5F, -0.5F, -0.5F, 1, 1, 1, 0.0F));
|
||||
|
||||
cube_r4 = new ModelRenderer(this);
|
||||
cube_r4.setRotationPoint(-1.2222F, -0.0556F, -1.0F);
|
||||
Mold.addChild(cube_r4);
|
||||
setRotationAngle(cube_r4, 0.0F, 0.0F, 0.0F);
|
||||
cube_r4.cubeList.add(new ModelBox(cube_r4, 25, 60, -1.5F, -0.5F, -0.5F, 3, 1, 1, 0.0F));
|
||||
|
||||
cube_r5 = new ModelRenderer(this);
|
||||
cube_r5.setRotationPoint(0.7778F, -0.0556F, 1.0F);
|
||||
Mold.addChild(cube_r5);
|
||||
setRotationAngle(cube_r5, 0.0F, 0.0F, 0.0F);
|
||||
cube_r5.cubeList.add(new ModelBox(cube_r5, 31, 62, 0.5F, -0.5F, -0.5F, 1, 1, 1, 0.0F));
|
||||
|
||||
cube_r6 = new ModelRenderer(this);
|
||||
cube_r6.setRotationPoint(-1.2222F, -0.0556F, 1.0F);
|
||||
Mold.addChild(cube_r6);
|
||||
setRotationAngle(cube_r6, 0.0F, 0.0F, 0.0F);
|
||||
cube_r6.cubeList.add(new ModelBox(cube_r6, 25, 60, -1.5F, -0.5F, -0.5F, 3, 1, 1, 0.0F));
|
||||
|
||||
cube_r7 = new ModelRenderer(this);
|
||||
cube_r7.setRotationPoint(2.7778F, -0.0556F, 0.0F);
|
||||
Mold.addChild(cube_r7);
|
||||
setRotationAngle(cube_r7, 0.0F, -1.5708F, 0.0F);
|
||||
cube_r7.cubeList.add(new ModelBox(cube_r7, 15, 60, -1.5F, -0.5F, -0.5F, 3, 1, 1, 0.0F));
|
||||
|
||||
cube_r8 = new ModelRenderer(this);
|
||||
cube_r8.setRotationPoint(-3.2222F, -0.0556F, 0.0F);
|
||||
Mold.addChild(cube_r8);
|
||||
setRotationAngle(cube_r8, 0.0F, -1.5708F, 0.0F);
|
||||
cube_r8.cubeList.add(new ModelBox(cube_r8, 15, 60, -1.5F, -0.5F, -0.5F, 3, 1, 1, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
Anvil.render(f5);
|
||||
Desk.render(f5);
|
||||
Bucket.render(f5);
|
||||
Hammer.render(f5);
|
||||
Mold.render(f5);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5,entity);
|
||||
Tail.render(f5);
|
||||
Nose1.render(f5);
|
||||
Nose2.render(f5);
|
||||
Nose3.render(f5);
|
||||
Nose4.render(f5);
|
||||
Head1.render(f5);
|
||||
Head2.render(f5);
|
||||
Neck2.render(f5);
|
||||
Bottom2.render(f5);
|
||||
Bottom3.render(f5);
|
||||
Foot4.render(f5);
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -1,40 +1,31 @@
|
||||
package noppes.npcs.client.model.blocks;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ModelPedestal extends ModelBase {
|
||||
ModelRenderer Main_Block;
|
||||
ModelRenderer Front;
|
||||
private final ModelRenderer bb_main;
|
||||
|
||||
public ModelPedestal() {
|
||||
Main_Block = new ModelRenderer(this, 1, 0);
|
||||
Main_Block.addBox(-7F, 0F, -8F, 14, 3, 16);
|
||||
Main_Block.setRotationPoint(0, 16F, 0F);
|
||||
|
||||
Front = new ModelRenderer(this, 16, 8);
|
||||
Front.addBox(-8F, 0F, -8F, 16, 5, 16);
|
||||
Front.setRotationPoint(0F, 19F, 0F);
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
bb_main = new ModelRenderer(this);
|
||||
bb_main.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
bb_main.cubeList.add(new ModelBox(bb_main, 0, 0, -6.0F, -4.0F, -6.0F, 12, 4, 12, 0.0F));
|
||||
bb_main.cubeList.add(new ModelBox(bb_main, 0, 16, -5.0F, -5.0F, -4.0F, 10, 1, 8, 0.0F));
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3,
|
||||
float f4, float f5) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1, 1, 0.5f);
|
||||
Main_Block.render(f5);
|
||||
GL11.glScalef(1, 1, 1.25f);
|
||||
Front.render(f5);
|
||||
GL11.glPopMatrix();
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
bb_main.render(f5);
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -6,77 +6,77 @@ import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelTable extends ModelBase {
|
||||
public final ModelRenderer Shape1;
|
||||
private final ModelRenderer cube_r1;
|
||||
private final ModelRenderer cube_r2;
|
||||
public final ModelRenderer Shape3;
|
||||
public final ModelRenderer Shape4;
|
||||
private final ModelRenderer cube_r3;
|
||||
public final ModelRenderer Shape2;
|
||||
private final ModelRenderer cube_r4;
|
||||
private final ModelRenderer cube_r1;
|
||||
public final ModelRenderer Shape1;
|
||||
private final ModelRenderer cube_r2;
|
||||
private final ModelRenderer cube_r3;
|
||||
public final ModelRenderer Shape5;
|
||||
private final ModelRenderer cube_r4;
|
||||
public final ModelRenderer Table;
|
||||
|
||||
public ModelTable() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
public ModelTable() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
Shape1 = new ModelRenderer(this);
|
||||
Shape1.setRotationPoint(-4.8333F, 14.8333F, 4.8333F);
|
||||
Shape1.cubeList.add(new ModelBox(Shape1, 0, 19, -2.1667F, -3.8333F, 0.1667F, 2, 13, 2, 0.0F));
|
||||
Shape3 = new ModelRenderer(this);
|
||||
Shape3.setRotationPoint(-6.0F, 24.0F, 6.0F);
|
||||
Shape3.cubeList.add(new ModelBox(Shape3, 8, 19, 6.0F, -13.0F, -12.0F, 5, 5, 0, 0.0F));
|
||||
Shape3.cubeList.add(new ModelBox(Shape3, 0, 0, 11.0F, -13.0F, -13.0F, 2, 13, 2, 0.0F));
|
||||
Shape3.cubeList.add(new ModelBox(Shape3, 8, 14, 12.0F, -13.0F, -11.0F, 0, 5, 5, 0.0F));
|
||||
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(-1.1667F, -1.3333F, -2.3333F);
|
||||
Shape1.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, 3.1416F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 8, 14, 0.0F, -2.5F, -2.5F, 0, 5, 5, 0.0F));
|
||||
Shape4 = new ModelRenderer(this);
|
||||
Shape4.setRotationPoint(-6.0F, 24.0F, 6.0F);
|
||||
Shape4.cubeList.add(new ModelBox(Shape4, 8, 19, 6.0F, -13.0F, 0.0F, 5, 5, 0, 0.0F));
|
||||
Shape4.cubeList.add(new ModelBox(Shape4, 0, 0, 11.0F, -13.0F, -1.0F, 2, 13, 2, 0.0F));
|
||||
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(2.3333F, -1.3333F, 1.1667F);
|
||||
Shape1.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, 3.1416F, 0.0F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 8, 19, -2.5F, -2.5F, 0.0F, 5, 5, 0, 0.0F));
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(12.0F, -10.5F, -3.5F);
|
||||
Shape4.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, 3.1416F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 8, 14, 0.0F, -2.5F, -2.5F, 0, 5, 5, 0.0F));
|
||||
|
||||
Shape3 = new ModelRenderer(this);
|
||||
Shape3.setRotationPoint(-6.0F, 24.0F, 6.0F);
|
||||
Shape3.cubeList.add(new ModelBox(Shape3, 8, 19, 6.0F, -13.0F, -12.0F, 5, 5, 0, 0.0F));
|
||||
Shape3.cubeList.add(new ModelBox(Shape3, 0, 19, 11.0F, -13.0F, -13.0F, 2, 13, 2, 0.0F));
|
||||
Shape3.cubeList.add(new ModelBox(Shape3, 8, 14, 12.0F, -13.0F, -11.0F, 0, 5, 5, 0.0F));
|
||||
Shape1 = new ModelRenderer(this);
|
||||
Shape1.setRotationPoint(-6.0F, 24.0F, 6.0F);
|
||||
Shape1.cubeList.add(new ModelBox(Shape1, 0, 0, -1.0F, -13.0F, -1.0F, 2, 13, 2, 0.0F));
|
||||
|
||||
Shape4 = new ModelRenderer(this);
|
||||
Shape4.setRotationPoint(-6.0F, 24.0F, 6.0F);
|
||||
Shape4.cubeList.add(new ModelBox(Shape4, 8, 19, 6.0F, -13.0F, 0.0F, 5, 5, 0, 0.0F));
|
||||
Shape4.cubeList.add(new ModelBox(Shape4, 0, 19, 11.0F, -13.0F, -1.0F, 2, 13, 2, 0.0F));
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(0.0F, -10.5F, -3.5F);
|
||||
Shape1.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, 3.1416F, 0.0F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 8, 14, 0.0F, -2.5F, -2.5F, 0, 5, 5, 0.0F));
|
||||
|
||||
cube_r3 = new ModelRenderer(this);
|
||||
cube_r3.setRotationPoint(12.0F, -10.5F, -3.5F);
|
||||
Shape4.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, 0.0F, 3.1416F, 0.0F);
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 8, 14, 0.0F, -2.5F, -2.5F, 0, 5, 5, 0.0F));
|
||||
cube_r3 = new ModelRenderer(this);
|
||||
cube_r3.setRotationPoint(3.5F, -10.5F, 0.0F);
|
||||
Shape1.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, 0.0F, 3.1416F, 0.0F);
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 8, 19, -2.5F, -2.5F, 0.0F, 5, 5, 0, 0.0F));
|
||||
|
||||
Shape2 = new ModelRenderer(this);
|
||||
Shape2.setRotationPoint(0.0F, 24.0F, 6.0F);
|
||||
Shape2.cubeList.add(new ModelBox(Shape2, 0, 19, -7.0F, -13.0F, -13.0F, 2, 13, 2, 0.0F));
|
||||
Shape2.cubeList.add(new ModelBox(Shape2, 8, 14, -6.0F, -13.0F, -11.0F, 0, 5, 5, 0.0F));
|
||||
Shape5 = new ModelRenderer(this);
|
||||
Shape5.setRotationPoint(-6.0F, 24.0F, 6.0F);
|
||||
Shape5.cubeList.add(new ModelBox(Shape5, 0, 0, -1.0F, -13.0F, -13.0F, 2, 13, 2, 0.0F));
|
||||
Shape5.cubeList.add(new ModelBox(Shape5, 8, 14, 0.0F, -13.0F, -11.0F, 0, 5, 5, 0.0F));
|
||||
|
||||
cube_r4 = new ModelRenderer(this);
|
||||
cube_r4.setRotationPoint(-2.5F, -10.5F, -12.0F);
|
||||
Shape2.addChild(cube_r4);
|
||||
setRotationAngle(cube_r4, 0.0F, 3.1416F, 0.0F);
|
||||
cube_r4.cubeList.add(new ModelBox(cube_r4, 8, 19, -2.5F, -2.5F, 0.0F, 5, 5, 0, 0.0F));
|
||||
cube_r4 = new ModelRenderer(this);
|
||||
cube_r4.setRotationPoint(3.5F, -10.5F, -12.0F);
|
||||
Shape5.addChild(cube_r4);
|
||||
setRotationAngle(cube_r4, 0.0F, 3.1416F, 0.0F);
|
||||
cube_r4.cubeList.add(new ModelBox(cube_r4, 8, 19, -2.5F, -2.5F, 0.0F, 5, 5, 0, 0.0F));
|
||||
|
||||
Table = new ModelRenderer(this);
|
||||
Table.setRotationPoint(0.0F, 24.0F, 6.0F);
|
||||
Table.cubeList.add(new ModelBox(Table, 0, 0, -8.0F, -16.0F, -14.0F, 16, 3, 16, 0.0F));
|
||||
}
|
||||
Table = new ModelRenderer(this);
|
||||
Table.setRotationPoint(-6.0F, 24.0F, 6.0F);
|
||||
Table.cubeList.add(new ModelBox(Table, 0, 0, -2.0F, -16.0F, -14.0F, 16, 3, 16, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
Shape3.render(f5);
|
||||
Shape4.render(f5);
|
||||
Shape1.render(f5);
|
||||
Shape3.render(f5);
|
||||
Shape4.render(f5);
|
||||
Shape2.render(f5);
|
||||
}
|
||||
Shape5.render(f5);
|
||||
}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
|
||||
@@ -7,6 +7,7 @@ import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelBannerWallFlag extends ModelBase {
|
||||
public final ModelRenderer BannerFlag;
|
||||
public final float rotationX = 0;
|
||||
|
||||
public ModelBannerWallFlag() {
|
||||
textureWidth = 32;
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
package noppes.npcs.client.model.blocks.candle;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCandle extends ModelBase {
|
||||
public final ModelRenderer Candle;
|
||||
private final ModelRenderer cube_r1;
|
||||
private final ModelRenderer cube_r2;
|
||||
public final ModelRenderer Holder;
|
||||
|
||||
public ModelCandle() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
Candle = new ModelRenderer(this);
|
||||
Candle.setRotationPoint(0.0F, 23.0F, 0.0F);
|
||||
Candle.cubeList.add(new ModelBox(Candle, 28, 1, -1.0F, -5.0F, -1.0F, 2, 5, 2, 0.0F));
|
||||
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(0.0F, -5.5F, 0.0F);
|
||||
Candle.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, 2.3562F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
|
||||
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(0.0F, -5.5F, 0.0F);
|
||||
Candle.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, 0.7854F, 0.0F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
|
||||
|
||||
Holder = new ModelRenderer(this);
|
||||
Holder.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Holder.cubeList.add(new ModelBox(Holder, 12, 0, -2.0F, -1.0F, -2.0F, 4, 1, 4, 0.0F));
|
||||
Holder.cubeList.add(new ModelBox(Holder, 36, 0, 2.0F, -2.0F, -3.0F, 1, 1, 6, 0.0F));
|
||||
Holder.cubeList.add(new ModelBox(Holder, 36, 0, -3.0F, -2.0F, -3.0F, 1, 1, 6, 0.0F));
|
||||
Holder.cubeList.add(new ModelBox(Holder, 36, 7, -2.0F, -2.0F, -3.0F, 4, 1, 1, 0.0F));
|
||||
Holder.cubeList.add(new ModelBox(Holder, 36, 7, -2.0F, -2.0F, 2.0F, 4, 1, 1, 0.0F));
|
||||
Holder.cubeList.add(new ModelBox(Holder, 12, 11, 2.0F, -4.0F, 0.0F, 3, 3, 0, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
Candle.render(f5);
|
||||
Holder.render(f5);
|
||||
}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,145 @@
|
||||
package noppes.npcs.client.model.blocks.candle;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCandleCeiling extends ModelBase {
|
||||
public final ModelRenderer Candle;
|
||||
private final ModelRenderer cube_r1;
|
||||
private final ModelRenderer cube_r2;
|
||||
private final ModelRenderer cube_r3;
|
||||
private final ModelRenderer cube_r4;
|
||||
private final ModelRenderer cube_r5;
|
||||
private final ModelRenderer cube_r6;
|
||||
private final ModelRenderer cube_r7;
|
||||
private final ModelRenderer cube_r8;
|
||||
public final ModelRenderer Holder;
|
||||
public final ModelRenderer Base;
|
||||
private final ModelRenderer cube_r9;
|
||||
private final ModelRenderer cube_r10;
|
||||
private final ModelRenderer cube_r11;
|
||||
public final ModelRenderer Chain;
|
||||
private final ModelRenderer cube_r12;
|
||||
private final ModelRenderer cube_r13;
|
||||
|
||||
public ModelCandleCeiling() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
Candle = new ModelRenderer(this);
|
||||
Candle.setRotationPoint(0.0F, 23.0F, 0.0F);
|
||||
Candle.cubeList.add(new ModelBox(Candle, 28, 1, -1.0F, -9.0F, 5.0F, 2, 5, 2, 0.0F));
|
||||
Candle.cubeList.add(new ModelBox(Candle, 28, 1, -7.0F, -9.0F, -1.0F, 2, 5, 2, 0.0F));
|
||||
Candle.cubeList.add(new ModelBox(Candle, 28, 1, 5.0F, -9.0F, -1.0F, 2, 5, 2, 0.0F));
|
||||
Candle.cubeList.add(new ModelBox(Candle, 28, 1, -1.0F, -9.0F, -7.0F, 2, 5, 2, 0.0F));
|
||||
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(0.0F, -9.5F, -6.0F);
|
||||
Candle.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, 2.3562F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
|
||||
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(0.0F, -9.5F, -6.0F);
|
||||
Candle.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, 0.7854F, 0.0F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
|
||||
|
||||
cube_r3 = new ModelRenderer(this);
|
||||
cube_r3.setRotationPoint(6.0F, -9.5F, 0.0F);
|
||||
Candle.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, 0.0F, 2.3562F, 0.0F);
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
|
||||
|
||||
cube_r4 = new ModelRenderer(this);
|
||||
cube_r4.setRotationPoint(6.0F, -9.5F, 0.0F);
|
||||
Candle.addChild(cube_r4);
|
||||
setRotationAngle(cube_r4, 0.0F, 0.7854F, 0.0F);
|
||||
cube_r4.cubeList.add(new ModelBox(cube_r4, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
|
||||
|
||||
cube_r5 = new ModelRenderer(this);
|
||||
cube_r5.setRotationPoint(-6.0F, -9.5F, 0.0F);
|
||||
Candle.addChild(cube_r5);
|
||||
setRotationAngle(cube_r5, 0.0F, 2.3562F, 0.0F);
|
||||
cube_r5.cubeList.add(new ModelBox(cube_r5, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
|
||||
|
||||
cube_r6 = new ModelRenderer(this);
|
||||
cube_r6.setRotationPoint(-6.0F, -9.5F, 0.0F);
|
||||
Candle.addChild(cube_r6);
|
||||
setRotationAngle(cube_r6, 0.0F, 0.7854F, 0.0F);
|
||||
cube_r6.cubeList.add(new ModelBox(cube_r6, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
|
||||
|
||||
cube_r7 = new ModelRenderer(this);
|
||||
cube_r7.setRotationPoint(0.0F, -9.5F, 6.0F);
|
||||
Candle.addChild(cube_r7);
|
||||
setRotationAngle(cube_r7, 0.0F, 2.3562F, 0.0F);
|
||||
cube_r7.cubeList.add(new ModelBox(cube_r7, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
|
||||
|
||||
cube_r8 = new ModelRenderer(this);
|
||||
cube_r8.setRotationPoint(0.0F, -9.5F, 6.0F);
|
||||
Candle.addChild(cube_r8);
|
||||
setRotationAngle(cube_r8, 0.0F, 0.7854F, 0.0F);
|
||||
cube_r8.cubeList.add(new ModelBox(cube_r8, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
|
||||
|
||||
Holder = new ModelRenderer(this);
|
||||
Holder.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Holder.cubeList.add(new ModelBox(Holder, 12, 0, -2.0F, -5.0F, 4.0F, 4, 1, 4, 0.0F));
|
||||
Holder.cubeList.add(new ModelBox(Holder, 12, 0, -8.0F, -5.0F, -2.0F, 4, 1, 4, 0.0F));
|
||||
Holder.cubeList.add(new ModelBox(Holder, 12, 0, 4.0F, -5.0F, -2.0F, 4, 1, 4, 0.0F));
|
||||
Holder.cubeList.add(new ModelBox(Holder, 12, 0, -2.0F, -5.0F, -8.0F, 4, 1, 4, 0.0F));
|
||||
|
||||
Base = new ModelRenderer(this);
|
||||
Base.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Base.cubeList.add(new ModelBox(Base, 12, 0, -2.0F, -2.0F, -2.0F, 4, 1, 4, 0.0F));
|
||||
Base.cubeList.add(new ModelBox(Base, 12, 0, 0.0F, -4.0F, 2.0F, 0, 3, 5, 0.0F));
|
||||
|
||||
cube_r9 = new ModelRenderer(this);
|
||||
cube_r9.setRotationPoint(4.5F, -2.5F, 0.0F);
|
||||
Base.addChild(cube_r9);
|
||||
setRotationAngle(cube_r9, 0.0F, 1.5708F, 0.0F);
|
||||
cube_r9.cubeList.add(new ModelBox(cube_r9, 12, 0, 0.0F, -1.5F, -2.5F, 0, 3, 5, 0.0F));
|
||||
|
||||
cube_r10 = new ModelRenderer(this);
|
||||
cube_r10.setRotationPoint(-7.0F, -2.5F, 0.0F);
|
||||
Base.addChild(cube_r10);
|
||||
setRotationAngle(cube_r10, 0.0F, -1.5708F, 0.0F);
|
||||
cube_r10.cubeList.add(new ModelBox(cube_r10, 12, 0, 0.0F, -1.5F, -5.0F, 0, 3, 5, 0.0F));
|
||||
|
||||
cube_r11 = new ModelRenderer(this);
|
||||
cube_r11.setRotationPoint(0.0F, -2.5F, -4.5F);
|
||||
Base.addChild(cube_r11);
|
||||
setRotationAngle(cube_r11, 0.0F, 3.1416F, 0.0F);
|
||||
cube_r11.cubeList.add(new ModelBox(cube_r11, 12, 0, 0.0F, -1.5F, -2.5F, 0, 3, 5, 0.0F));
|
||||
|
||||
Chain = new ModelRenderer(this);
|
||||
Chain.setRotationPoint(0.0F, 18.0F, 0.0F);
|
||||
|
||||
|
||||
cube_r12 = new ModelRenderer(this);
|
||||
cube_r12.setRotationPoint(0.0F, -3.0F, 0.0F);
|
||||
Chain.addChild(cube_r12);
|
||||
setRotationAngle(cube_r12, 0.0F, 0.7854F, 0.0F);
|
||||
cube_r12.cubeList.add(new ModelBox(cube_r12, 6, -1, 0.0F, -7.0F, -1.5F, 0, 14, 3, 0.0F));
|
||||
|
||||
cube_r13 = new ModelRenderer(this);
|
||||
cube_r13.setRotationPoint(0.0F, -3.0F, 0.0F);
|
||||
Chain.addChild(cube_r13);
|
||||
setRotationAngle(cube_r13, 0.0F, -0.7854F, 0.0F);
|
||||
cube_r13.cubeList.add(new ModelBox(cube_r13, 0, -1, 0.0F, -7.0F, -1.5F, 0, 14, 3, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
Candle.render(f5);
|
||||
Holder.render(f5);
|
||||
Base.render(f5);
|
||||
}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package noppes.npcs.client.model.blocks.candle;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCandleWall extends ModelBase {
|
||||
private final ModelRenderer Candle;
|
||||
private final ModelRenderer cube_r1;
|
||||
private final ModelRenderer cube_r2;
|
||||
private final ModelRenderer Holder;
|
||||
private final ModelRenderer bb_main;
|
||||
private final ModelRenderer cube_r3;
|
||||
private final ModelRenderer cube_r4;
|
||||
|
||||
public ModelCandleWall() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
Candle = new ModelRenderer(this);
|
||||
Candle.setRotationPoint(0.0F, 23.0F, 0.0F);
|
||||
Candle.cubeList.add(new ModelBox(Candle, 28, 1, -1.0F, -12.0F, 2.0F, 2, 5, 2, 0.0F));
|
||||
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(0.0F, -12.5F, 3.0F);
|
||||
Candle.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, 2.3562F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
|
||||
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(0.0F, -12.5F, 3.0F);
|
||||
Candle.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, 0.7854F, 0.0F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 31, -1, 0.0F, -0.5F, -0.5F, 0, 1, 1, 0.0F));
|
||||
|
||||
Holder = new ModelRenderer(this);
|
||||
Holder.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Holder.cubeList.add(new ModelBox(Holder, 12, 0, -2.0F, -8.0F, 1.0F, 4, 1, 4, 0.0F));
|
||||
|
||||
bb_main = new ModelRenderer(this);
|
||||
bb_main.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
|
||||
|
||||
cube_r3 = new ModelRenderer(this);
|
||||
cube_r3.setRotationPoint(0.0F, -5.5F, 4.5F);
|
||||
bb_main.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, 0.0F, 3.1416F, 0.0F);
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 12, 3, 0.0F, -1.5F, -2.5F, 0, 3, 5, 0.0F));
|
||||
|
||||
cube_r4 = new ModelRenderer(this);
|
||||
cube_r4.setRotationPoint(0.0F, -4.5F, 9.0F);
|
||||
bb_main.addChild(cube_r4);
|
||||
setRotationAngle(cube_r4, 1.5708F, 0.0F, 0.0F);
|
||||
cube_r4.cubeList.add(new ModelBox(cube_r4, 12, 0, -2.0F, -2.0F, -1.5F, 4, 1, 4, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
Candle.render(f5);
|
||||
Holder.render(f5);
|
||||
bb_main.render(f5);
|
||||
}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
package noppes.npcs.client.model.blocks.couch;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCouch extends ModelBase {
|
||||
public final ModelRenderer CouchBack;
|
||||
public final ModelRenderer Cussion;
|
||||
|
||||
public ModelCouch() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
CouchBack = new ModelRenderer(this);
|
||||
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 18, -8.0F, -2.0F, -8.0F, 16, 1, 15, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 46, -8.0F, -10.0F, 7.0F, 16, 9, 1, 0.0F));
|
||||
|
||||
Cussion = new ModelRenderer(this);
|
||||
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 0, 0, -8.0F, -5.0F, -8.0F, 16, 3, 15, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 0, 34, -8.0F, -14.0F, 4.0F, 16, 9, 3, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 0, 56, -8.0F, -14.0F, 7.0F, 16, 4, 1, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
CouchBack.render(f5);
|
||||
Cussion.render(f5);
|
||||
}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -6,59 +6,56 @@ import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCouchCorner extends ModelBase {
|
||||
private final ModelRenderer CouchBack;
|
||||
private final ModelRenderer cube_r1;
|
||||
private final ModelRenderer Cussion;
|
||||
private final ModelRenderer cube_r2;
|
||||
private final ModelRenderer cube_r3;
|
||||
public final ModelRenderer CouchBack;
|
||||
private final ModelRenderer cube_r1;
|
||||
public final ModelRenderer Cussion;
|
||||
private final ModelRenderer cube_r2;
|
||||
private final ModelRenderer cube_r3;
|
||||
|
||||
public ModelCouchCorner() {
|
||||
textureWidth = 16;
|
||||
textureHeight = 16;
|
||||
public ModelCouchCorner() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
CouchBack = new ModelRenderer(this);
|
||||
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, -20, -13, -8.0F, -2.0F, -8.0F, 16, 1, 15, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, -6, 1, -8.0F, -10.0F, 7.0F, 16, 9, 1, 0.0F));
|
||||
CouchBack = new ModelRenderer(this);
|
||||
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 1, 35, -8.0F, -3.0F, -8.0F, 15, 1, 15, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 51, -8.0F, -12.0F, 7.0F, 16, 10, 1, 0.0F));
|
||||
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(-7.5F, -6.5F, -1.0F);
|
||||
CouchBack.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, -1.5708F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, -6, 1, -7.0F, -3.5F, -0.5F, 15, 8, 1, 0.0F));
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(7.5F, -7.5F, -1.0F);
|
||||
CouchBack.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, 1.5708F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 1, 51, -8.0F, -4.5F, -0.5F, 15, 10, 1, 0.0F));
|
||||
|
||||
Cussion = new ModelRenderer(this);
|
||||
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, -20, -13, -7.0F, -5.0F, -8.0F, 15, 3, 15, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, -8, -1, -7.0F, -14.0F, 4.0F, 15, 9, 3, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, -6, 1, -8.0F, -14.0F, 7.0F, 16, 4, 1, 0.0F));
|
||||
Cussion = new ModelRenderer(this);
|
||||
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 1, 37, -8.0F, -7.0F, -8.0F, 15, 4, 15, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 0, 19, -8.0F, -16.0F, 3.0F, 15, 9, 4, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 0, 32, -8.0F, -16.0F, 7.0F, 16, 4, 1, 0.0F));
|
||||
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(-7.5F, -12.0F, -1.0F);
|
||||
Cussion.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, -1.5708F, 0.0F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, -6, 1, -7.0F, -2.0F, -0.5F, 15, 4, 1, 0.0F));
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(7.5F, -14.0F, -1.0F);
|
||||
Cussion.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, 1.5708F, 0.0F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 1, 32, -8.0F, -2.0F, -0.5F, 15, 4, 1, 0.0F));
|
||||
|
||||
cube_r3 = new ModelRenderer(this);
|
||||
cube_r3.setRotationPoint(-5.5F, -9.5F, -3.5F);
|
||||
Cussion.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, 0.0F, -1.5708F, 0.0F);
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, -8, -1, -4.5F, -4.5F, -1.5F, 12, 9, 3, 0.0F));
|
||||
}
|
||||
cube_r3 = new ModelRenderer(this);
|
||||
cube_r3.setRotationPoint(5.5F, -11.5F, -3.5F);
|
||||
Cussion.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, 0.0F, 1.5708F, 0.0F);
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 5, 19, -6.5F, -4.5F, -2.5F, 11, 9, 4, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
CouchBack.render(f5);
|
||||
Cussion.render(f5);
|
||||
}
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -6,43 +6,43 @@ import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCouchLeft extends ModelBase {
|
||||
private final ModelRenderer CouchBack;
|
||||
private final ModelRenderer Cussion;
|
||||
public final ModelRenderer CouchBack;
|
||||
public final ModelRenderer Cussion;
|
||||
|
||||
public ModelCouchLeft() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
public ModelCouchLeft() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
CouchBack = new ModelRenderer(this);
|
||||
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 18, -6.0F, -2.0F, -8.0F, 14, 1, 15, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 4, 46, -6.0F, -10.0F, 7.0F, 14, 9, 1, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 13, 14, -8.0F, -5.0F, -8.0F, 2, 4, 16, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 1, 47, -8.0F, -10.0F, 4.0F, 2, 5, 4, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 15, 19, -8.0F, -10.0F, -8.0F, 2, 2, 12, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 44, 51, -7.0F, -8.0F, -6.0F, 0, 3, 10, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 15, 18, -8.0F, -8.0F, -8.0F, 2, 3, 2, 0.0F));
|
||||
CouchBack = new ModelRenderer(this);
|
||||
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -6.0F, -3.0F, -8.0F, 14, 1, 15, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 51, -6.0F, -12.0F, 7.0F, 14, 10, 1, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 21, -8.0F, -6.0F, -6.0F, 2, 4, 10, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 22, 48, -8.0F, -12.0F, 4.0F, 2, 10, 4, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 24, 21, -8.0F, -12.0F, -8.0F, 2, 2, 12, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 14, 17, -7.0F, -10.0F, -6.0F, 0, 4, 10, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 40, 23, -8.0F, -10.0F, -8.0F, 2, 8, 2, 0.0F));
|
||||
|
||||
Cussion = new ModelRenderer(this);
|
||||
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 1, 0, -6.0F, -5.0F, -8.0F, 14, 3, 15, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 1, 34, -6.0F, -14.0F, 4.0F, 14, 9, 3, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 3, 56, -6.0F, -14.0F, 7.0F, 14, 4, 1, 0.0F));
|
||||
}
|
||||
Cussion = new ModelRenderer(this);
|
||||
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 2, 0, -6.0F, -7.0F, -8.0F, 14, 4, 15, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 2, 19, -6.0F, -16.0F, 3.0F, 14, 9, 4, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 2, 32, -6.0F, -16.0F, 7.0F, 14, 4, 1, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
CouchBack.render(f5);
|
||||
Cussion.render(f5);
|
||||
}
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
CouchBack.render(f5);
|
||||
Cussion.render(f5);
|
||||
}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
package noppes.npcs.client.model.blocks.couch;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCouchMiddle extends ModelBase {
|
||||
public final ModelRenderer CouchBack;
|
||||
public final ModelRenderer Cussion;
|
||||
|
||||
public ModelCouchMiddle() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
CouchBack = new ModelRenderer(this);
|
||||
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -3.0F, -8.0F, 16, 1, 15, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 51, -8.0F, -12.0F, 7.0F, 16, 10, 1, 0.0F));
|
||||
|
||||
Cussion = new ModelRenderer(this);
|
||||
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 0, 0, -8.0F, -7.0F, -8.0F, 16, 4, 15, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 0, 19, -8.0F, -16.0F, 3.0F, 16, 9, 4, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 0, 32, -8.0F, -16.0F, 7.0F, 16, 4, 1, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -6,43 +6,45 @@ import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCouchRight extends ModelBase {
|
||||
private final ModelRenderer CouchBack;
|
||||
private final ModelRenderer Cussion;
|
||||
public final ModelRenderer CouchBack;
|
||||
public final ModelRenderer Cussion;
|
||||
|
||||
public ModelCouchRight() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
public ModelCouchRight() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
CouchBack = new ModelRenderer(this);
|
||||
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, -8.0F, 14, 1, 15, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 51, -8.0F, -10.0F, 7.0F, 14, 9, 1, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 36, 50, 6.0F, -5.0F, -6.0F, 2, 4, 10, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 52, 35, 6.0F, -10.0F, 4.0F, 2, 9, 4, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 36, 50, 6.0F, -10.0F, -8.0F, 2, 2, 12, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 44, 51, 7.0F, -8.0F, -6.0F, 0, 3, 10, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 15, 18, 6.0F, -8.0F, -8.0F, 2, 7, 2, 0.0F));
|
||||
CouchBack = new ModelRenderer(this);
|
||||
CouchBack.mirror = true;
|
||||
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -3.0F, -8.0F, 14, 1, 15, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 51, -8.0F, -12.0F, 7.0F, 14, 10, 1, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 21, 6.0F, -6.0F, -6.0F, 2, 4, 10, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 22, 48, 6.0F, -12.0F, 4.0F, 2, 10, 4, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 24, 21, 6.0F, -12.0F, -8.0F, 2, 2, 12, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 14, 17, 7.0F, -10.0F, -6.0F, 0, 4, 10, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 40, 23, 6.0F, -10.0F, -8.0F, 2, 8, 2, 0.0F));
|
||||
|
||||
Cussion = new ModelRenderer(this);
|
||||
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 1, 0, -8.0F, -5.0F, -8.0F, 14, 3, 15, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 1, 18, -8.0F, -14.0F, 4.0F, 14, 9, 3, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 4, 30, -8.0F, -14.0F, 7.0F, 14, 4, 1, 0.0F));
|
||||
}
|
||||
Cussion = new ModelRenderer(this);
|
||||
Cussion.mirror = true;
|
||||
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 2, 0, -8.0F, -7.0F, -8.0F, 14, 4, 15, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 2, 19, -8.0F, -16.0F, 3.0F, 14, 9, 4, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 2, 32, -8.0F, -16.0F, 7.0F, 14, 4, 1, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
CouchBack.render(f5);
|
||||
Cussion.render(f5);
|
||||
}
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
CouchBack.render(f5);
|
||||
Cussion.render(f5);
|
||||
}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -6,40 +6,57 @@ import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCouchSingle extends ModelBase {
|
||||
private final ModelRenderer CouchBack;
|
||||
private final ModelRenderer Cussion;
|
||||
public final ModelRenderer CouchBack;
|
||||
private final ModelRenderer ArmL;
|
||||
private final ModelRenderer ArmR;
|
||||
public final ModelRenderer Cussion;
|
||||
|
||||
public ModelCouchSingle() {
|
||||
textureWidth = 16;
|
||||
textureHeight = 16;
|
||||
public ModelCouchSingle() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
CouchBack = new ModelRenderer(this);
|
||||
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, -8.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, -8.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 0, 6.0F, -1.0F, 6.0F, 2, 1, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, -18, -13, -6.0F, -2.0F, -8.0F, 12, 1, 15, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, -4, 1, -6.0F, -10.0F, 7.0F, 12, 9, 1, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, -14, -14, 6.0F, -10.0F, -8.0F, 2, 9, 16, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, -14, -14, -8.0F, -10.0F, -8.0F, 2, 9, 16, 0.0F));
|
||||
CouchBack = new ModelRenderer(this);
|
||||
CouchBack.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, -8.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, -8.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 0, 35, 6.0F, -2.0F, 6.0F, 2, 2, 2, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 2, 35, -6.0F, -3.0F, -8.0F, 12, 1, 15, 0.0F));
|
||||
CouchBack.cubeList.add(new ModelBox(CouchBack, 2, 51, -6.0F, -12.0F, 7.0F, 12, 10, 1, 0.0F));
|
||||
|
||||
Cussion = new ModelRenderer(this);
|
||||
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, -18, -13, -6.0F, -5.0F, -8.0F, 12, 3, 15, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, -6, -1, -6.0F, -14.0F, 4.0F, 12, 9, 3, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, -4, 1, -6.0F, -14.0F, 7.0F, 12, 4, 1, 0.0F));
|
||||
}
|
||||
ArmL = new ModelRenderer(this);
|
||||
ArmL.setRotationPoint(9.0F, -7.0F, 0.0F);
|
||||
CouchBack.addChild(ArmL);
|
||||
ArmL.mirror = true;
|
||||
ArmL.cubeList.add(new ModelBox(ArmL, 24, 21, -3.0F, -5.0F, -8.0F, 2, 2, 12, 0.0F));
|
||||
ArmL.cubeList.add(new ModelBox(ArmL, 14, 17, -2.0F, -3.0F, -6.0F, 0, 4, 10, 0.0F));
|
||||
ArmL.cubeList.add(new ModelBox(ArmL, 40, 23, -3.0F, -3.0F, -8.0F, 2, 8, 2, 0.0F));
|
||||
ArmL.cubeList.add(new ModelBox(ArmL, 0, 21, -3.0F, 1.0F, -6.0F, 2, 4, 10, 0.0F));
|
||||
ArmL.cubeList.add(new ModelBox(ArmL, 22, 48, -3.0F, -5.0F, 4.0F, 2, 10, 4, 0.0F));
|
||||
ArmL.mirror = false;
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
CouchBack.render(f5);
|
||||
Cussion.render(f5);
|
||||
}
|
||||
ArmR = new ModelRenderer(this);
|
||||
ArmR.setRotationPoint(-9.0F, -7.0F, 0.0F);
|
||||
CouchBack.addChild(ArmR);
|
||||
ArmR.cubeList.add(new ModelBox(ArmR, 24, 21, 1.0F, -5.0F, -8.0F, 2, 2, 12, 0.0F));
|
||||
ArmR.cubeList.add(new ModelBox(ArmR, 14, 17, 2.0F, -3.0F, -6.0F, 0, 4, 10, 0.0F));
|
||||
ArmR.cubeList.add(new ModelBox(ArmR, 0, 21, 1.0F, 1.0F, -6.0F, 2, 4, 10, 0.0F));
|
||||
ArmR.cubeList.add(new ModelBox(ArmR, 40, 23, 1.0F, -3.0F, -8.0F, 2, 8, 2, 0.0F));
|
||||
ArmR.cubeList.add(new ModelBox(ArmR, 22, 48, 1.0F, -5.0F, 4.0F, 2, 10, 4, 0.0F));
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
Cussion = new ModelRenderer(this);
|
||||
Cussion.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 2, 0, -6.0F, -7.0F, -8.0F, 12, 4, 15, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 2, 19, -6.0F, -16.0F, 3.0F, 12, 9, 4, 0.0F));
|
||||
Cussion.cubeList.add(new ModelBox(Cussion, 2, 32, -6.0F, -16.0F, 7.0F, 12, 4, 1, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package noppes.npcs.client.model.blocks.lamp;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelShortLamp extends ModelBase {
|
||||
public final ModelRenderer Shade;
|
||||
private final ModelRenderer cube_r1;
|
||||
private final ModelRenderer cube_r2;
|
||||
public final ModelRenderer Lamp;
|
||||
private final ModelRenderer cube_r3;
|
||||
private final ModelRenderer cube_r4;
|
||||
private final ModelRenderer cube_r5;
|
||||
public final ModelRenderer Light;
|
||||
|
||||
public ModelShortLamp() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
Shade = new ModelRenderer(this);
|
||||
Shade.setRotationPoint(-4.0F, 12.0F, 0.0F);
|
||||
Shade.cubeList.add(new ModelBox(Shade, 0, 8, 0.0F, -4.0F, -4.0F, 8, 8, 0, 0.0F));
|
||||
Shade.cubeList.add(new ModelBox(Shade, -8, 0, 0.0F, -4.0F, -4.0F, 8, 0, 8, 0.0F));
|
||||
Shade.cubeList.add(new ModelBox(Shade, 0, 8, 0.0F, -4.0F, 4.0F, 8, 8, 0, 0.0F));
|
||||
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(0.0F, 0.0F, 0.0F);
|
||||
Shade.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, 1.5708F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 0, 8, -4.0F, -4.0F, 0.0F, 8, 8, 0, 0.0F));
|
||||
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(8.0F, 0.0F, 0.0F);
|
||||
Shade.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, 1.5708F, 0.0F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 0, 8, -4.0F, -4.0F, 0.0F, 8, 8, 0, 0.0F));
|
||||
|
||||
Lamp = new ModelRenderer(this);
|
||||
Lamp.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Lamp.cubeList.add(new ModelBox(Lamp, 28, 8, -3.0F, -6.0F, -3.0F, 6, 6, 6, 0.0F));
|
||||
Lamp.cubeList.add(new ModelBox(Lamp, 20, 5, -1.0F, -9.0F, -1.0F, 2, 3, 2, 0.0F));
|
||||
Lamp.cubeList.add(new ModelBox(Lamp, 20, 0, -1.0F, -16.0F, -1.0F, 2, 3, 2, 0.0F));
|
||||
Lamp.cubeList.add(new ModelBox(Lamp, 14, 0, -3.0F, -16.0F, -1.0F, 2, 0, 2, 0.0F));
|
||||
|
||||
cube_r3 = new ModelRenderer(this);
|
||||
cube_r3.setRotationPoint(0.0F, -16.0F, -2.5F);
|
||||
Lamp.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, 0.0F, -1.5708F, 0.0F);
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 14, 0, -0.5F, 0.0F, -1.0F, 2, 0, 2, 0.0F));
|
||||
|
||||
cube_r4 = new ModelRenderer(this);
|
||||
cube_r4.setRotationPoint(0.0F, -16.0F, 2.5F);
|
||||
Lamp.addChild(cube_r4);
|
||||
setRotationAngle(cube_r4, 0.0F, 1.5708F, 0.0F);
|
||||
cube_r4.cubeList.add(new ModelBox(cube_r4, 14, 0, -0.5F, 0.0F, -1.0F, 2, 0, 2, 0.0F));
|
||||
|
||||
cube_r5 = new ModelRenderer(this);
|
||||
cube_r5.setRotationPoint(2.5F, -16.0F, 0.0F);
|
||||
Lamp.addChild(cube_r5);
|
||||
setRotationAngle(cube_r5, -3.1416F, 0.0F, 0.0F);
|
||||
cube_r5.cubeList.add(new ModelBox(cube_r5, 14, 0, -1.5F, 0.0F, -1.0F, 2, 0, 2, 0.0F));
|
||||
|
||||
Light = new ModelRenderer(this);
|
||||
Light.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Light.cubeList.add(new ModelBox(Light, 28, 0, -2.0F, -13.0F, -2.0F, 4, 4, 4, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
package noppes.npcs.client.model.blocks.lamp;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelTallLamp extends ModelBase {
|
||||
public final ModelRenderer Shade;
|
||||
private final ModelRenderer cube_r1;
|
||||
private final ModelRenderer cube_r2;
|
||||
public final ModelRenderer Lamp;
|
||||
private final ModelRenderer cube_r3;
|
||||
private final ModelRenderer cube_r4;
|
||||
private final ModelRenderer cube_r5;
|
||||
public final ModelRenderer Light;
|
||||
|
||||
public ModelTallLamp() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 64;
|
||||
|
||||
Shade = new ModelRenderer(this);
|
||||
Shade.setRotationPoint(0.0F, -6.0F, 7.0F);
|
||||
Shade.cubeList.add(new ModelBox(Shade, 0, 12, -6.0F, -2.0F, -13.0F, 12, 12, 0, 0.0F));
|
||||
Shade.cubeList.add(new ModelBox(Shade, -12, 0, -6.0F, -2.0F, -13.0F, 12, 0, 12, 0.0F));
|
||||
Shade.cubeList.add(new ModelBox(Shade, 0, 12, -6.0F, -2.0F, -1.0F, 12, 12, 0, 0.0F));
|
||||
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(6.0F, 4.0F, -7.0F);
|
||||
Shade.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, 1.5708F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 0, 12, -6.0F, -6.0F, 0.0F, 12, 12, 0, 0.0F));
|
||||
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(-6.0F, 4.0F, -7.0F);
|
||||
Shade.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, 1.5708F, 0.0F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 0, 12, -6.0F, -6.0F, 0.0F, 12, 12, 0, 0.0F));
|
||||
|
||||
Lamp = new ModelRenderer(this);
|
||||
Lamp.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Lamp.cubeList.add(new ModelBox(Lamp, 40, 22, -3.0F, -2.0F, -3.0F, 6, 2, 6, 0.0F));
|
||||
Lamp.cubeList.add(new ModelBox(Lamp, 32, 5, -1.0F, -25.0F, -1.0F, 2, 23, 2, 0.0F));
|
||||
Lamp.cubeList.add(new ModelBox(Lamp, 32, 0, -1.0F, -32.0F, -1.0F, 2, 3, 2, 0.0F));
|
||||
Lamp.cubeList.add(new ModelBox(Lamp, 22, 0, -4.0F, -32.0F, -1.0F, 3, 0, 2, 0.0F));
|
||||
|
||||
cube_r3 = new ModelRenderer(this);
|
||||
cube_r3.setRotationPoint(0.0F, -32.0F, -2.5F);
|
||||
Lamp.addChild(cube_r3);
|
||||
setRotationAngle(cube_r3, 0.0F, -1.5708F, 0.0F);
|
||||
cube_r3.cubeList.add(new ModelBox(cube_r3, 22, 0, -1.5F, 0.0F, -1.0F, 3, 0, 2, 0.0F));
|
||||
|
||||
cube_r4 = new ModelRenderer(this);
|
||||
cube_r4.setRotationPoint(0.0F, -32.0F, 2.5F);
|
||||
Lamp.addChild(cube_r4);
|
||||
setRotationAngle(cube_r4, 0.0F, 1.5708F, 0.0F);
|
||||
cube_r4.cubeList.add(new ModelBox(cube_r4, 22, 0, -1.5F, 0.0F, -1.0F, 3, 0, 2, 0.0F));
|
||||
|
||||
cube_r5 = new ModelRenderer(this);
|
||||
cube_r5.setRotationPoint(2.5F, -32.0F, 0.0F);
|
||||
Lamp.addChild(cube_r5);
|
||||
setRotationAngle(cube_r5, -3.1416F, 0.0F, 0.0F);
|
||||
cube_r5.cubeList.add(new ModelBox(cube_r5, 22, 0, -1.5F, 0.0F, -1.0F, 3, 0, 2, 0.0F));
|
||||
|
||||
Light = new ModelRenderer(this);
|
||||
Light.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Light.cubeList.add(new ModelBox(Light, 40, 14, -2.0F, -29.0F, -2.0F, 4, 4, 4, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
package noppes.npcs.client.model.blocks.lantern;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class LanternCeiling extends ModelBase {
|
||||
public final ModelRenderer Light;
|
||||
public final ModelRenderer Lantern;
|
||||
public final ModelRenderer Chain;
|
||||
private final ModelRenderer cube_r1;
|
||||
private final ModelRenderer cube_r2;
|
||||
|
||||
public LanternCeiling() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
Light = new ModelRenderer(this);
|
||||
Light.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Light.cubeList.add(new ModelBox(Light, 28, 8, -3.0F, -9.0F, -3.0F, 6, 7, 6, 0.0F));
|
||||
|
||||
Lantern = new ModelRenderer(this);
|
||||
Lantern.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Lantern.cubeList.add(new ModelBox(Lantern, 28, 0, -3.0F, -2.0F, -3.0F, 6, 2, 6, 0.0F));
|
||||
Lantern.cubeList.add(new ModelBox(Lantern, 28, 21, -2.0F, -11.0F, -2.0F, 4, 2, 4, 0.0F));
|
||||
Lantern.cubeList.add(new ModelBox(Lantern, 46, 21, -5.0F, -11.0F, 0.0F, 3, 11, 0, 0.0F));
|
||||
Lantern.mirror = true;
|
||||
Lantern.cubeList.add(new ModelBox(Lantern, 46, 21, 2.0F, -11.0F, 0.0F, 3, 11, 0, 0.0F));
|
||||
Lantern.mirror = false;
|
||||
|
||||
Chain = new ModelRenderer(this);
|
||||
Chain.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(0.0F, -18.0F, 0.0F);
|
||||
Chain.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, -0.7854F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 0, -1, 0.0F, 2.0F, -1.5F, 0, 5, 3, 0.0F));
|
||||
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(0.0F, -18.0F, 0.0F);
|
||||
Chain.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, 0.0F, 0.7854F, 0.0F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 6, -1, 0.0F, 2.0F, -1.5F, 0, 5, 3, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
Light.render(f5);
|
||||
Lantern.render(f5);
|
||||
Chain.render(f5);
|
||||
}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package noppes.npcs.client.model.blocks.lantern;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class LanternFloor extends ModelBase {
|
||||
public final ModelRenderer Light;
|
||||
public final ModelRenderer Lantern;
|
||||
|
||||
public LanternFloor() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
Light = new ModelRenderer(this);
|
||||
Light.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Light.cubeList.add(new ModelBox(Light, 28, 8, -3.0F, -9.0F, -3.0F, 6, 7, 6, 0.0F));
|
||||
|
||||
Lantern = new ModelRenderer(this);
|
||||
Lantern.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Lantern.cubeList.add(new ModelBox(Lantern, 28, 0, -3.0F, -2.0F, -3.0F, 6, 2, 6, 0.0F));
|
||||
Lantern.cubeList.add(new ModelBox(Lantern, 28, 21, -2.0F, -11.0F, -2.0F, 4, 2, 4, 0.0F));
|
||||
Lantern.cubeList.add(new ModelBox(Lantern, 46, 21, -5.0F, -11.0F, 0.0F, 3, 11, 0, 0.0F));
|
||||
Lantern.mirror = true;
|
||||
Lantern.cubeList.add(new ModelBox(Lantern, 46, 21, 2.0F, -11.0F, 0.0F, 3, 11, 0, 0.0F));
|
||||
Lantern.mirror = false;
|
||||
Lantern.cubeList.add(new ModelBox(Lantern, 28, 27, -3.0F, -13.0F, 0.0F, 6, 2, 0, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
Light.render(f5);
|
||||
Lantern.render(f5);
|
||||
}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
package noppes.npcs.client.model.blocks.lantern;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBox;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class LanternWall extends ModelBase {
|
||||
public final ModelRenderer Light;
|
||||
public final ModelRenderer Lantern;
|
||||
public final ModelRenderer Holder;
|
||||
private final ModelRenderer cube_r1;
|
||||
private final ModelRenderer cube_r2;
|
||||
|
||||
public LanternWall() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
Light = new ModelRenderer(this);
|
||||
Light.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Light.cubeList.add(new ModelBox(Light, 28, 8, -3.0F, -12.0F, -1.0F, 6, 7, 6, 0.0F));
|
||||
|
||||
Lantern = new ModelRenderer(this);
|
||||
Lantern.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
Lantern.cubeList.add(new ModelBox(Lantern, 28, 0, -3.0F, -5.0F, -1.0F, 6, 2, 6, 0.0F));
|
||||
Lantern.cubeList.add(new ModelBox(Lantern, 28, 21, -2.0F, -14.0F, 0.0F, 4, 2, 4, 0.0F));
|
||||
Lantern.cubeList.add(new ModelBox(Lantern, 46, 21, -5.0F, -14.0F, 2.0F, 3, 11, 0, 0.0F));
|
||||
Lantern.mirror = true;
|
||||
Lantern.cubeList.add(new ModelBox(Lantern, 46, 21, 2.0F, -14.0F, 2.0F, 3, 11, 0, 0.0F));
|
||||
Lantern.mirror = false;
|
||||
Lantern.cubeList.add(new ModelBox(Lantern, 28, 27, -3.0F, -16.0F, 2.0F, 6, 2, 0, 0.0F));
|
||||
|
||||
Holder = new ModelRenderer(this);
|
||||
Holder.setRotationPoint(0.0F, 24.0F, 0.0F);
|
||||
|
||||
|
||||
cube_r1 = new ModelRenderer(this);
|
||||
cube_r1.setRotationPoint(0.0F, -14.5F, 4.5F);
|
||||
Holder.addChild(cube_r1);
|
||||
setRotationAngle(cube_r1, 0.0F, 3.1416F, 0.0F);
|
||||
cube_r1.cubeList.add(new ModelBox(cube_r1, 12, 0, 0.0F, -1.5F, -2.5F, 0, 3, 5, 0.0F));
|
||||
|
||||
cube_r2 = new ModelRenderer(this);
|
||||
cube_r2.setRotationPoint(0.0F, -14.0F, 6.5F);
|
||||
Holder.addChild(cube_r2);
|
||||
setRotationAngle(cube_r2, -1.5708F, 0.0F, 0.0F);
|
||||
cube_r2.cubeList.add(new ModelBox(cube_r2, 12, 0, -2.0F, -1.5F, -2.0F, 4, 1, 4, 0.0F));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
Light.render(f5);
|
||||
Lantern.render(f5);
|
||||
Holder.render(f5);
|
||||
}
|
||||
|
||||
public void setRotationAngle(ModelRenderer modelRenderer, float x, float y, float z) {
|
||||
modelRenderer.rotateAngleX = x;
|
||||
modelRenderer.rotateAngleY = y;
|
||||
modelRenderer.rotateAngleZ = z;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
// Date: 11-10-2012 19:29:20
|
||||
// Template version 1.1
|
||||
// Java generated by Techne
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
package noppes.npcs.client.model.blocks.legacy;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelLegacyAnvil extends ModelBase {
|
||||
ModelRenderer Tail;
|
||||
ModelRenderer Nose1;
|
||||
ModelRenderer Nose2;
|
||||
ModelRenderer Nose3;
|
||||
ModelRenderer Nose4;
|
||||
ModelRenderer Head1;
|
||||
ModelRenderer Head2;
|
||||
ModelRenderer Neck2;
|
||||
ModelRenderer Bottom2;
|
||||
ModelRenderer Bottom3;
|
||||
ModelRenderer Foot4;
|
||||
|
||||
public ModelLegacyAnvil() {
|
||||
textureWidth = 64;
|
||||
textureHeight = 32;
|
||||
|
||||
Tail = new ModelRenderer(this, 0, 0);
|
||||
Tail.addBox(0F, 0F, 0F, 1, 2, 4);
|
||||
Tail.setRotationPoint(-7F, 12F, -2F);
|
||||
|
||||
Nose1 = new ModelRenderer(this, 0, 0);
|
||||
Nose1.addBox(0F, 0F, 0F, 1, 5, 6);
|
||||
Nose1.setRotationPoint(6F, 10F, -3F);
|
||||
|
||||
Nose2 = new ModelRenderer(this, 0, 0);
|
||||
Nose2.addBox(0F, 0F, 0F, 1, 4, 5);
|
||||
Nose2.setRotationPoint(7F, 10F, -2.5F);
|
||||
|
||||
Nose3 = new ModelRenderer(this, 0, 0);
|
||||
Nose3.addBox(0F, 0F, 0F, 1, 3, 4);
|
||||
Nose3.setRotationPoint(8F, 10F, -2F);
|
||||
|
||||
Nose4 = new ModelRenderer(this, 0, 0);
|
||||
Nose4.addBox(0F, 0F, 0F, 1, 2, 2);
|
||||
Nose4.setRotationPoint(9F, 10F, -1F);
|
||||
|
||||
Head1 = new ModelRenderer(this, 0, 0);
|
||||
Head1.addBox(0F, 0F, 0F, 12, 4, 7);
|
||||
Head1.setRotationPoint(-6F, 12F, -3.5F);
|
||||
|
||||
Head2 = new ModelRenderer(this, 0, 0);
|
||||
Head2.addBox(0F, 0F, 0F, 14, 2, 9);
|
||||
Head2.setRotationPoint(-8F, 10F, -4.5F);
|
||||
|
||||
Neck2 = new ModelRenderer(this, 0, 0);
|
||||
Neck2.addBox(0F, 0F, 0F, 10, 1, 6);
|
||||
Neck2.setRotationPoint(-5F, 16F, -3F);
|
||||
|
||||
Bottom2 = new ModelRenderer(this, 0, 0);
|
||||
Bottom2.addBox(0F, 0F, 0F, 10, 2, 7);
|
||||
Bottom2.setRotationPoint(-5F, 20F, -3.5F);
|
||||
|
||||
Bottom3 = new ModelRenderer(this, 0, 0);
|
||||
Bottom3.addBox(0F, 0F, 0F, 8, 3, 4);
|
||||
Bottom3.setRotationPoint(-4F, 17F, -2F);
|
||||
|
||||
Foot4 = new ModelRenderer(this, 0, 0);
|
||||
Foot4.addBox(0F, 0F, 0F, 14, 2, 10);
|
||||
Foot4.setRotationPoint(-7F, 22F, -5F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
setRotationAngles(f, f1, f2, f3, f4, f5,entity);
|
||||
Tail.render(f5);
|
||||
Nose1.render(f5);
|
||||
Nose2.render(f5);
|
||||
Nose3.render(f5);
|
||||
Nose4.render(f5);
|
||||
Head1.render(f5);
|
||||
Head2.render(f5);
|
||||
Neck2.render(f5);
|
||||
Bottom2.render(f5);
|
||||
Bottom3.render(f5);
|
||||
Foot4.render(f5);
|
||||
}
|
||||
}
|
||||
+8
-8
@@ -1,10 +1,10 @@
|
||||
package noppes.npcs.client.model.blocks;
|
||||
package noppes.npcs.client.model.blocks.legacy;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCandle extends ModelBase {
|
||||
public class ModelLegacyCandle extends ModelBase {
|
||||
// fields
|
||||
ModelRenderer Base;
|
||||
ModelRenderer Bar1;
|
||||
@@ -13,27 +13,27 @@ public class ModelCandle extends ModelBase {
|
||||
ModelRenderer Bar4;
|
||||
ModelRenderer Wax;
|
||||
|
||||
public ModelCandle() {
|
||||
public ModelLegacyCandle() {
|
||||
Base = new ModelRenderer(this, 0, 0);
|
||||
Base.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
Base.setRotationPoint(-2F, 23F, -2F);
|
||||
|
||||
|
||||
Bar1 = new ModelRenderer(this, 0, 0);
|
||||
Bar1.addBox(0F, 0F, 0F, 1, 1, 6);
|
||||
Bar1.setRotationPoint(-3F, 22F, -3F);
|
||||
|
||||
|
||||
Bar2 = new ModelRenderer(this, 0, 0);
|
||||
Bar2.addBox(0F, 0F, 0F, 1, 1, 6);
|
||||
Bar2.setRotationPoint(2F, 22F, -3F);
|
||||
|
||||
|
||||
Bar3 = new ModelRenderer(this, 0, 0);
|
||||
Bar3.addBox(0F, 0F, 0F, 4, 1, 1);
|
||||
Bar3.setRotationPoint(-2F, 22F, -3F);
|
||||
|
||||
|
||||
Bar4 = new ModelRenderer(this, 0, 0);
|
||||
Bar4.addBox(0F, 0F, 0F, 4, 1, 1);
|
||||
Bar4.setRotationPoint(-2F, 22F, 2F);
|
||||
|
||||
|
||||
Wax = new ModelRenderer(this, 16, 0);
|
||||
Wax.addBox(0F, 0F, 0F, 2, 4, 2);
|
||||
Wax.setRotationPoint(-1F, 19F, -1F);
|
||||
+21
-21
@@ -1,10 +1,10 @@
|
||||
package noppes.npcs.client.model.blocks;
|
||||
package noppes.npcs.client.model.blocks.legacy;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCandleCeiling extends ModelBase {
|
||||
public class ModelLegacyCandleCeiling extends ModelBase {
|
||||
ModelRenderer Wax1;
|
||||
ModelRenderer Wax2;
|
||||
ModelRenderer Wax3;
|
||||
@@ -25,85 +25,85 @@ public class ModelCandleCeiling extends ModelBase {
|
||||
ModelRenderer BottomBar2;
|
||||
ModelRenderer BottomBar4;
|
||||
|
||||
public ModelCandleCeiling() {
|
||||
public ModelLegacyCandleCeiling() {
|
||||
Wax1 = new ModelRenderer(this, 16, 0);
|
||||
Wax1.addBox(0F, 0F, 0F, 2, 4, 2);
|
||||
Wax1.setRotationPoint(-1F, 15.5F, 5F);
|
||||
|
||||
|
||||
Wax2 = new ModelRenderer(this, 16, 0);
|
||||
Wax2.addBox(0F, 0F, 0F, 2, 4, 2);
|
||||
Wax2.setRotationPoint(7F, 15.5F, 1F);
|
||||
setRotation(Wax2, 0F, 3.141593F, 0F);
|
||||
|
||||
|
||||
Wax3 = new ModelRenderer(this, 16, 0);
|
||||
Wax3.addBox(0F, 0F, 0F, 2, 4, 2);
|
||||
Wax3.setRotationPoint(-7F, 15.5F, -1F);
|
||||
|
||||
|
||||
Wax4 = new ModelRenderer(this, 16, 0);
|
||||
Wax4.addBox(0F, 0F, 0F, 2, 4, 2);
|
||||
Wax4.setRotationPoint(1F, 15.5F, -5F);
|
||||
setRotation(Wax4, 0F, 3.141593F, 0F);
|
||||
|
||||
|
||||
TippyTop1 = new ModelRenderer(this, 0, 0);
|
||||
TippyTop1.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
TippyTop1.setRotationPoint(-2.8F, 7.5F, 0F);
|
||||
setRotation(TippyTop1, 0F, 0.7853982F, 0F);
|
||||
|
||||
|
||||
TippyTop2 = new ModelRenderer(this, 0, 0);
|
||||
TippyTop2.addBox(0F, 0F, 0F, 3, 1, 3);
|
||||
TippyTop2.setRotationPoint(-2.1F, 8F, 0F);
|
||||
setRotation(TippyTop2, 0F, 0.7853982F, 0F);
|
||||
|
||||
|
||||
Middle = new ModelRenderer(this, 0, 0);
|
||||
Middle.addBox(0F, 0F, 0F, 1, 13, 1);
|
||||
Middle.setRotationPoint(-0.5F, 9F, -0.5F);
|
||||
|
||||
|
||||
BottomBar1 = new ModelRenderer(this, 0, 4);
|
||||
BottomBar1.addBox(0F, 0F, 0F, 1, 1, 5);
|
||||
BottomBar1.setRotationPoint(-0.5F, 21F, 0.5F);
|
||||
|
||||
|
||||
Rod1 = new ModelRenderer(this, 0, 0);
|
||||
Rod1.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Rod1.setRotationPoint(-0.5F, 20F, 5.5F);
|
||||
|
||||
|
||||
Rod2 = new ModelRenderer(this, 0, 0);
|
||||
Rod2.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Rod2.setRotationPoint(5.5F, 20F, -0.5F);
|
||||
|
||||
|
||||
Rod3 = new ModelRenderer(this, 0, 0);
|
||||
Rod3.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Rod3.setRotationPoint(-6.5F, 20F, -0.5F);
|
||||
|
||||
|
||||
Rod4 = new ModelRenderer(this, 0, 0);
|
||||
Rod4.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Rod4.setRotationPoint(-0.5F, 20F, -6.5F);
|
||||
|
||||
|
||||
Base1 = new ModelRenderer(this, 0, 0);
|
||||
Base1.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
Base1.setRotationPoint(-2F, 19F, 4F);
|
||||
|
||||
|
||||
Base2 = new ModelRenderer(this, 0, 0);
|
||||
Base2.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
Base2.setRotationPoint(4F, 19F, -2F);
|
||||
|
||||
|
||||
Base3 = new ModelRenderer(this, 0, 0);
|
||||
Base3.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
Base3.setRotationPoint(-8F, 19F, -2F);
|
||||
|
||||
|
||||
Base4 = new ModelRenderer(this, 0, 0);
|
||||
Base4.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
Base4.setRotationPoint(-2F, 19F, -8F);
|
||||
|
||||
|
||||
BottomBar3 = new ModelRenderer(this, 0, 4);
|
||||
BottomBar3.addBox(0F, 0F, 0F, 1, 1, 5);
|
||||
BottomBar3.setRotationPoint(-0.5F, 21F, -0.5F);
|
||||
setRotation(BottomBar3, 0F, -1.570796F, 0F);
|
||||
|
||||
|
||||
BottomBar2 = new ModelRenderer(this, 0, 4);
|
||||
BottomBar2.addBox(0F, 0F, 0F, 1, 1, 5);
|
||||
BottomBar2.setRotationPoint(0.5F, 21F, 0.5F);
|
||||
setRotation(BottomBar2, 0F, 1.570796F, 0F);
|
||||
|
||||
|
||||
BottomBar4 = new ModelRenderer(this, 0, 4);
|
||||
BottomBar4.addBox(0F, 0F, 0F, 1, 1, 5);
|
||||
BottomBar4.setRotationPoint(0.4F, 21F, -0.5F);
|
||||
+12
-12
@@ -1,10 +1,10 @@
|
||||
package noppes.npcs.client.model.blocks;
|
||||
package noppes.npcs.client.model.blocks.legacy;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelCandleWall extends ModelBase {
|
||||
public class ModelLegacyCandleWall extends ModelBase {
|
||||
ModelRenderer Base;
|
||||
ModelRenderer Bar1;
|
||||
ModelRenderer Bar2;
|
||||
@@ -16,45 +16,45 @@ public class ModelCandleWall extends ModelBase {
|
||||
ModelRenderer Bar5;
|
||||
ModelRenderer Bar6;
|
||||
|
||||
public ModelCandleWall() {
|
||||
public ModelLegacyCandleWall() {
|
||||
Base = new ModelRenderer(this, 0, 0);
|
||||
Base.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
Base.setRotationPoint(-2F, 13F, -4F);
|
||||
|
||||
|
||||
Bar1 = new ModelRenderer(this, 0, 0);
|
||||
Bar1.addBox(0F, 0F, 0F, 1, 1, 6);
|
||||
Bar1.setRotationPoint(-3F, 12F, -5F);
|
||||
|
||||
|
||||
Bar2 = new ModelRenderer(this, 0, 0);
|
||||
Bar2.addBox(0F, 0F, 0F, 1, 1, 6);
|
||||
Bar2.setRotationPoint(2F, 12F, -5F);
|
||||
|
||||
|
||||
Bar3 = new ModelRenderer(this, 0, 0);
|
||||
Bar3.addBox(0F, 0F, 0F, 4, 1, 1);
|
||||
Bar3.setRotationPoint(-2F, 12F, -5F);
|
||||
|
||||
|
||||
Bar4 = new ModelRenderer(this, 0, 0);
|
||||
Bar4.addBox(0F, 0F, 0F, 4, 1, 1);
|
||||
Bar4.setRotationPoint(-2F, 12F, 0F);
|
||||
|
||||
|
||||
Wax = new ModelRenderer(this, 16, 0);
|
||||
Wax.addBox(0F, 0F, 0F, 2, 4, 2);
|
||||
Wax.setRotationPoint(-1F, 9F, -3F);
|
||||
|
||||
|
||||
Wall2 = new ModelRenderer(this, 0, 0);
|
||||
Wall2.addBox(0F, 0F, 0F, 3, 3, 1);
|
||||
Wall2.setRotationPoint(0F, 13.7F, -7.5F);
|
||||
setRotation(Wall2, 0F, 0F, 0.7853982F);
|
||||
|
||||
|
||||
Wall1 = new ModelRenderer(this, 0, 0);
|
||||
Wall1.addBox(0F, 0F, 0F, 4, 4, 1);
|
||||
Wall1.setRotationPoint(0F, 13F, -8F);
|
||||
setRotation(Wall1, 0F, 0F, 0.7853982F);
|
||||
|
||||
|
||||
Bar5 = new ModelRenderer(this, 0, 0);
|
||||
Bar5.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Bar5.setRotationPoint(-0.5F, 13.5F, -2.5F);
|
||||
|
||||
|
||||
Bar6 = new ModelRenderer(this, 0, 0);
|
||||
Bar6.addBox(0F, 0F, 0F, 1, 1, 5);
|
||||
Bar6.setRotationPoint(-0.5F, 15.5F, -6.5F);
|
||||
+19
-19
@@ -1,10 +1,10 @@
|
||||
package noppes.npcs.client.model.blocks;
|
||||
package noppes.npcs.client.model.blocks.legacy;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelLampCeiling extends ModelBase {
|
||||
public class ModelLegacyCeiling extends ModelBase {
|
||||
ModelRenderer Base;
|
||||
ModelRenderer Top1;
|
||||
ModelRenderer Top2;
|
||||
@@ -23,73 +23,73 @@ public class ModelLampCeiling extends ModelBase {
|
||||
ModelRenderer Shape1;
|
||||
ModelRenderer Shape2;
|
||||
|
||||
public ModelLampCeiling() {
|
||||
public ModelLegacyCeiling() {
|
||||
Base = new ModelRenderer(this, 0, 6);
|
||||
Base.addBox(0F, 0F, 0F, 4, 7, 4);
|
||||
Base.setRotationPoint(-2F, 17F, -2F);
|
||||
|
||||
|
||||
Top1 = new ModelRenderer(this, 0, 0);
|
||||
Top1.addBox(0F, 0F, 0F, 5, 1, 5);
|
||||
Top1.setRotationPoint(-2.5F, 17F, -2.5F);
|
||||
|
||||
|
||||
Top2 = new ModelRenderer(this, 0, 0);
|
||||
Top2.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
Top2.setRotationPoint(-2F, 16.5F, -2F);
|
||||
|
||||
|
||||
Top3 = new ModelRenderer(this, 0, 0);
|
||||
Top3.addBox(0F, 0F, 0F, 3, 1, 3);
|
||||
Top3.setRotationPoint(-1.5F, 16F, -1.5F);
|
||||
|
||||
|
||||
Chain8 = new ModelRenderer(this, 0, 0);
|
||||
Chain8.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Chain8.setRotationPoint(-0.5F, 14F, -1.5F);
|
||||
|
||||
|
||||
Chain1 = new ModelRenderer(this, 0, 0);
|
||||
Chain1.addBox(0F, 0F, 0F, 1, 3, 1);
|
||||
Chain1.setRotationPoint(0.5F, 8F, -0.5F);
|
||||
|
||||
|
||||
Chain2 = new ModelRenderer(this, 0, 0);
|
||||
Chain2.addBox(0F, 0F, 0F, 1, 3, 1);
|
||||
Chain2.setRotationPoint(-1.5F, 8F, -0.5F);
|
||||
|
||||
|
||||
Chain3 = new ModelRenderer(this, 0, 0);
|
||||
Chain3.addBox(0F, 0F, 0F, 1, 3, 1);
|
||||
Chain3.setRotationPoint(-0.5F, 10F, 0.5F);
|
||||
|
||||
|
||||
Chain4 = new ModelRenderer(this, 0, 0);
|
||||
Chain4.addBox(0F, 0F, 0F, 1, 3, 1);
|
||||
Chain4.setRotationPoint(-0.5F, 10F, -1.5F);
|
||||
|
||||
|
||||
Chain5 = new ModelRenderer(this, 0, 0);
|
||||
Chain5.addBox(0F, 0F, 0F, 1, 3, 1);
|
||||
Chain5.setRotationPoint(-1.5F, 12F, -0.5F);
|
||||
|
||||
|
||||
Chain6 = new ModelRenderer(this, 0, 0);
|
||||
Chain6.addBox(0F, 0F, 0F, 1, 3, 1);
|
||||
Chain6.setRotationPoint(0.5F, 12F, -0.5F);
|
||||
|
||||
|
||||
Chain7 = new ModelRenderer(this, 0, 0);
|
||||
Chain7.addBox(0F, 0F, 0F, 1, 2, 1);
|
||||
Chain7.setRotationPoint(-0.5F, 14F, 0.5F);
|
||||
|
||||
|
||||
TippyTop1 = new ModelRenderer(this, 0, 0);
|
||||
TippyTop1.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
TippyTop1.setRotationPoint(-2.8F, 8F, 0F);
|
||||
setRotation(TippyTop1, 0F, 0.7853982F, 0F);
|
||||
|
||||
|
||||
TippyTop2 = new ModelRenderer(this, 0, 0);
|
||||
TippyTop2.addBox(0F, 0F, 0F, 3, 1, 3);
|
||||
TippyTop2.setRotationPoint(-2.1F, 8.5F, 0F);
|
||||
setRotation(TippyTop2, 0F, 0.7853982F, 0F);
|
||||
|
||||
|
||||
Shape3 = new ModelRenderer(this, 0, 0);
|
||||
Shape3.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
Shape3.setRotationPoint(-0.5F, 14F, -0.5F);
|
||||
|
||||
|
||||
Shape1 = new ModelRenderer(this, 0, 0);
|
||||
Shape1.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
Shape1.setRotationPoint(-0.5F, 10F, -0.5F);
|
||||
|
||||
|
||||
Shape2 = new ModelRenderer(this, 0, 0);
|
||||
Shape2.addBox(0F, 0F, 0F, 1, 1, 1);
|
||||
Shape2.setRotationPoint(-0.5F, 12F, -0.5F);
|
||||
+8
-8
@@ -4,13 +4,13 @@
|
||||
// Keep in mind that you still need to fill in some blanks
|
||||
// - ZeuX
|
||||
|
||||
package noppes.npcs.client.model.blocks;
|
||||
package noppes.npcs.client.model.blocks.legacy;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelLamp extends ModelBase {
|
||||
public class ModelLegacyLantern extends ModelBase {
|
||||
ModelRenderer Base;
|
||||
ModelRenderer Top1;
|
||||
ModelRenderer Top2;
|
||||
@@ -18,28 +18,28 @@ public class ModelLamp extends ModelBase {
|
||||
ModelRenderer Handle;
|
||||
ModelRenderer Shape1;
|
||||
|
||||
public ModelLamp() {
|
||||
public ModelLegacyLantern() {
|
||||
Base = new ModelRenderer(this, 0, 6);
|
||||
Base.addBox(0F, 0F, 0F, 4, 7, 4);
|
||||
Base.setRotationPoint(-2F, 16F, -2F);
|
||||
|
||||
|
||||
Top1 = new ModelRenderer(this, 0, 0);
|
||||
Top1.addBox(0F, 0F, 0F, 5, 1, 5);
|
||||
Top1.setRotationPoint(-2.5F, 16F, -2.5F);
|
||||
|
||||
|
||||
Top2 = new ModelRenderer(this, 0, 0);
|
||||
Top2.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
Top2.setRotationPoint(-2F, 15.5F, -2F);
|
||||
|
||||
|
||||
Top3 = new ModelRenderer(this, 0, 0);
|
||||
Top3.addBox(0F, 0F, 0F, 3, 1, 3);
|
||||
Top3.setRotationPoint(-1.5F, 15F, -1.5F);
|
||||
|
||||
|
||||
Handle = new ModelRenderer(this, 24, 0);
|
||||
Handle.addBox(0F, 0F, 0F, 3, 0, 3);
|
||||
Handle.setRotationPoint(0F, 15F, 0F);
|
||||
setRotation(Handle, 0.296706F, 0.1745329F, 0F);
|
||||
|
||||
|
||||
Shape1 = new ModelRenderer(this, 0, 17);
|
||||
Shape1.addBox(-2F, 0F, -2F, 4, 1, 4);
|
||||
Shape1.setRotationPoint(0F, 23F, 0F);
|
||||
@@ -0,0 +1,40 @@
|
||||
package noppes.npcs.client.model.blocks.legacy;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
public class ModelLegacyPedestal extends ModelBase {
|
||||
ModelRenderer Main_Block;
|
||||
ModelRenderer Front;
|
||||
|
||||
public ModelLegacyPedestal() {
|
||||
Main_Block = new ModelRenderer(this, 1, 0);
|
||||
Main_Block.addBox(-7F, 0F, -8F, 14, 3, 16);
|
||||
Main_Block.setRotationPoint(0, 16F, 0F);
|
||||
|
||||
Front = new ModelRenderer(this, 16, 8);
|
||||
Front.addBox(-8F, 0F, -8F, 16, 5, 16);
|
||||
Front.setRotationPoint(0F, 19F, 0F);
|
||||
}
|
||||
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3,
|
||||
float f4, float f5) {
|
||||
super.render(entity, f, f1, f2, f3, f4, f5);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1, 1, 0.5f);
|
||||
Main_Block.render(f5);
|
||||
GL11.glScalef(1, 1, 1.25f);
|
||||
Front.render(f5);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z) {
|
||||
model.rotateAngleX = x;
|
||||
model.rotateAngleY = y;
|
||||
model.rotateAngleZ = z;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
+11
-11
@@ -1,10 +1,10 @@
|
||||
package noppes.npcs.client.model.blocks;
|
||||
package noppes.npcs.client.model.blocks.legacy;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelTallLamp extends ModelBase
|
||||
public class ModelLegacyTallLamp extends ModelBase
|
||||
{
|
||||
//fields
|
||||
ModelRenderer Base;
|
||||
@@ -13,37 +13,37 @@ public class ModelTallLamp extends ModelBase
|
||||
ModelRenderer LampShadeStick2;
|
||||
ModelRenderer LampShadeStick3;
|
||||
ModelRenderer LampShadeStick4;
|
||||
|
||||
public ModelTallLamp()
|
||||
|
||||
public ModelLegacyTallLamp()
|
||||
{
|
||||
Base = new ModelRenderer(this, 6, 2);
|
||||
Base.addBox(-6F, 0F, -6F, 12, 1, 12);
|
||||
Base.setRotationPoint(0F, 23F, 0F);
|
||||
|
||||
|
||||
MiddleStick = new ModelRenderer(this, 12, 2);
|
||||
MiddleStick.addBox(-1F, 0F, -1F, 2, 28, 2);
|
||||
MiddleStick.setRotationPoint(0F, -5F, 0F);
|
||||
|
||||
|
||||
LampShadeStick1 = new ModelRenderer(this, 0, 30);
|
||||
LampShadeStick1.addBox(0F, 0F, 0F, 5, 1, 1);
|
||||
LampShadeStick1.setRotationPoint(1F, -1F, -0.5F);
|
||||
|
||||
|
||||
LampShadeStick2 = new ModelRenderer(this, 0, 30);
|
||||
LampShadeStick2.addBox(0F, 0F, 0F, 5, 1, 1);
|
||||
LampShadeStick2.setRotationPoint(-0.5F, -1F, -1F);
|
||||
setRotation(LampShadeStick2, 0F, 1.570796F, 0F);
|
||||
|
||||
|
||||
LampShadeStick3 = new ModelRenderer(this, 0, 30);
|
||||
LampShadeStick3.addBox(0F, 0F, 0F, 5, 1, 1);
|
||||
LampShadeStick3.setRotationPoint(-1F, -1F, 0.5F);
|
||||
setRotation(LampShadeStick3, 0F, 3.141593F, 0F);
|
||||
|
||||
|
||||
LampShadeStick4 = new ModelRenderer(this, 0, 30);
|
||||
LampShadeStick4.addBox(0F, 0F, 0F, 5, 1, 1);
|
||||
LampShadeStick4.setRotationPoint(0.5F, -1F, 1F);
|
||||
setRotation(LampShadeStick4, 0F, -1.570796F, 0F);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
@@ -55,7 +55,7 @@ public class ModelTallLamp extends ModelBase
|
||||
LampShadeStick3.render(f5);
|
||||
LampShadeStick4.render(f5);
|
||||
}
|
||||
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
+9
-9
@@ -1,35 +1,35 @@
|
||||
package noppes.npcs.client.model.blocks;
|
||||
package noppes.npcs.client.model.blocks.legacy;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelTallLampTop extends ModelBase
|
||||
public class ModelLegacyTallLampTop extends ModelBase
|
||||
{
|
||||
ModelRenderer LampShade1;
|
||||
ModelRenderer LampShade3;
|
||||
ModelRenderer LampShade2;
|
||||
ModelRenderer LampShade4;
|
||||
|
||||
public ModelTallLampTop()
|
||||
|
||||
public ModelLegacyTallLampTop()
|
||||
{
|
||||
LampShade1 = new ModelRenderer(this, 0, 0);
|
||||
LampShade1.addBox(-.5F, -6F, -6F, 1, 12, 12);
|
||||
LampShade1.setRotationPoint(6F, -1F, 0F);
|
||||
|
||||
|
||||
LampShade3 = new ModelRenderer(this, 0, 0);
|
||||
LampShade3.addBox(-6F, -6F, -.5F, 12, 12, 1);
|
||||
LampShade3.setRotationPoint(0F, -1F, -6F);
|
||||
|
||||
|
||||
LampShade2 = new ModelRenderer(this, 0, 0);
|
||||
LampShade2.addBox(-.5F, -6F, -6F, 1, 12, 12);
|
||||
LampShade2.setRotationPoint(-6F, -1F, 0F);
|
||||
|
||||
|
||||
LampShade4 = new ModelRenderer(this, 0, 0);
|
||||
LampShade4.addBox(-6F, -6F, -.5F, 12, 12, 1);
|
||||
LampShade4.setRotationPoint(0F, -1F, 6F);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5)
|
||||
{
|
||||
@@ -39,7 +39,7 @@ public class ModelTallLampTop extends ModelBase
|
||||
LampShade2.render(f5);
|
||||
LampShade4.render(f5);
|
||||
}
|
||||
|
||||
|
||||
private void setRotation(ModelRenderer model, float x, float y, float z)
|
||||
{
|
||||
model.rotateAngleX = x;
|
||||
+10
-10
@@ -1,10 +1,10 @@
|
||||
package noppes.npcs.client.model.blocks;
|
||||
package noppes.npcs.client.model.blocks.legacy;
|
||||
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelRenderer;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
public class ModelLampWall extends ModelBase {
|
||||
public class ModelLegacyWall extends ModelBase {
|
||||
ModelRenderer Base;
|
||||
ModelRenderer Top1;
|
||||
ModelRenderer Top2;
|
||||
@@ -14,36 +14,36 @@ public class ModelLampWall extends ModelBase {
|
||||
ModelRenderer Shape4;
|
||||
ModelRenderer Shape5;
|
||||
|
||||
public ModelLampWall() {
|
||||
public ModelLegacyWall() {
|
||||
Base = new ModelRenderer(this, 0, 6);
|
||||
Base.addBox(0F, 0F, 0F, 4, 7, 4);
|
||||
Base.setRotationPoint(-2F, 14F, 1F);
|
||||
|
||||
|
||||
Top1 = new ModelRenderer(this, 0, 0);
|
||||
Top1.addBox(0F, 0F, 0F, 5, 1, 5);
|
||||
Top1.setRotationPoint(-2.5F, 14F, 0.5F);
|
||||
|
||||
|
||||
Top2 = new ModelRenderer(this, 0, 0);
|
||||
Top2.addBox(0F, 0F, 0F, 4, 1, 4);
|
||||
Top2.setRotationPoint(-2F, 13.5F, 1F);
|
||||
|
||||
|
||||
Top3 = new ModelRenderer(this, 0, 0);
|
||||
Top3.addBox(0F, 0F, 0F, 3, 1, 3);
|
||||
Top3.setRotationPoint(-1.5F, 13F, 1.5F);
|
||||
|
||||
|
||||
Shape2 = new ModelRenderer(this, 0, 0);
|
||||
Shape2.addBox(0F, 0F, 0F, 1, 1, 3);
|
||||
Shape2.setRotationPoint(-0.5F, 11F, 3.5F);
|
||||
|
||||
|
||||
Shape3 = new ModelRenderer(this, 0, 0);
|
||||
Shape3.addBox(0F, 0F, 0F, 3, 3, 1);
|
||||
Shape3.setRotationPoint(0F, 9.5F, 6.5F);
|
||||
setRotation(Shape3, 0F, 0F, 0.7853982F);
|
||||
|
||||
|
||||
Shape4 = new ModelRenderer(this, 0, 0);
|
||||
Shape4.addBox(0F, 0F, 0F, 1, 3, 1);
|
||||
Shape4.setRotationPoint(-0.5F, 10.5F, 2.5F);
|
||||
|
||||
|
||||
Shape5 = new ModelRenderer(this, 0, 0);
|
||||
Shape5.addBox(0F, 0F, 0F, 4, 4, 1);
|
||||
Shape5.setRotationPoint(0F, 8.7F, 7F);
|
||||
@@ -55,6 +55,7 @@ public class BlockBannerRenderer extends BlockRendererInterface{
|
||||
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
|
||||
double var6, float var8) {
|
||||
TileBanner tile = (TileBanner) var1;
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glPushMatrix();
|
||||
@@ -103,6 +104,7 @@ public class BlockBannerRenderer extends BlockRendererInterface{
|
||||
doRender(var2, var4, var6, tile.rotation, tile.icon, angle_x);
|
||||
}
|
||||
}
|
||||
GL11.glPopAttrib();
|
||||
}
|
||||
public void doRender(double par2, double par4, double par6, int meta, ItemStack iicon, float rotate)
|
||||
{
|
||||
|
||||
@@ -30,11 +30,11 @@ public class BlockBarrelRenderer extends BlockRendererInterface{
|
||||
private static final ResourceLocation trimTexture = new ResourceLocation("customnpcs","textures/models/barrel/trim.png");
|
||||
|
||||
private static final ResourceLocation oak_lid = new ResourceLocation("customnpcs","textures/models/barrel/oak_lid.png");
|
||||
private static final ResourceLocation spruce_lid = new ResourceLocation("customnpcs","textures/models/barrel/oak_lid.png");
|
||||
private static final ResourceLocation birch_lid = new ResourceLocation("customnpcs","textures/models/barrel/oak_lid.png");
|
||||
private static final ResourceLocation jungle_lid = new ResourceLocation("customnpcs","textures/models/barrel/oak_lid.png");
|
||||
private static final ResourceLocation acacia_lid = new ResourceLocation("customnpcs","textures/models/barrel/oak_lid.png");
|
||||
private static final ResourceLocation dark_oak_lid = new ResourceLocation("customnpcs","textures/models/barrel/oak_lid.png");
|
||||
private static final ResourceLocation spruce_lid = new ResourceLocation("customnpcs","textures/models/barrel/spruce_lid.png");
|
||||
private static final ResourceLocation birch_lid = new ResourceLocation("customnpcs","textures/models/barrel/birch_lid.png");
|
||||
private static final ResourceLocation jungle_lid = new ResourceLocation("customnpcs","textures/models/barrel/jungle_lid.png");
|
||||
private static final ResourceLocation acacia_lid = new ResourceLocation("customnpcs","textures/models/barrel/acacia_lid.png");
|
||||
private static final ResourceLocation dark_oak_lid = new ResourceLocation("customnpcs","textures/models/barrel/dark_oak_lid.png");
|
||||
|
||||
public BlockBarrelRenderer(){
|
||||
((BlockBarrel)CustomItems.barrel).renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
@@ -122,15 +122,15 @@ public class BlockBarrelRenderer extends BlockRendererInterface{
|
||||
public void setLidTexture(int meta){
|
||||
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
|
||||
if(meta == 1)
|
||||
manager.bindTexture(oak_lid);
|
||||
manager.bindTexture(spruce_lid);
|
||||
else if(meta == 2)
|
||||
manager.bindTexture(oak_lid);
|
||||
manager.bindTexture(birch_lid);
|
||||
else if(meta == 3)
|
||||
manager.bindTexture(oak_lid);
|
||||
manager.bindTexture(jungle_lid);
|
||||
else if(meta == 4)
|
||||
manager.bindTexture(oak_lid);
|
||||
manager.bindTexture(acacia_lid);
|
||||
else if(meta == 5)
|
||||
manager.bindTexture(oak_lid);
|
||||
manager.bindTexture(dark_oak_lid);
|
||||
else
|
||||
manager.bindTexture(oak_lid);
|
||||
}
|
||||
|
||||
@@ -64,12 +64,14 @@ public class BlockCampfireRenderer extends BlockRendererInterface {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(Cobble);
|
||||
stonesModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
if(block == CustomItems.campfire){
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(Flame);
|
||||
flameModel.render(null, tile.getWorldObj().getWorldTime(), 0, 0, 0, 0.0F, 0.0625F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glPopAttrib();
|
||||
}
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(coalsTexture);
|
||||
coalsModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
|
||||
@@ -12,19 +12,30 @@ import net.minecraft.world.IBlockAccess;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.blocks.BlockCandle;
|
||||
import noppes.npcs.blocks.tiles.TileCandle;
|
||||
import noppes.npcs.client.model.blocks.ModelCandle;
|
||||
import noppes.npcs.client.model.blocks.ModelCandleCeiling;
|
||||
import noppes.npcs.client.model.blocks.ModelCandleWall;
|
||||
import noppes.npcs.client.model.blocks.candle.ModelCandle;
|
||||
import noppes.npcs.client.model.blocks.candle.ModelCandleCeiling;
|
||||
import noppes.npcs.client.model.blocks.candle.ModelCandleWall;
|
||||
import noppes.npcs.client.model.blocks.legacy.ModelLegacyCandle;
|
||||
import noppes.npcs.client.model.blocks.legacy.ModelLegacyCandleCeiling;
|
||||
import noppes.npcs.client.model.blocks.legacy.ModelLegacyCandleWall;
|
||||
import noppes.npcs.config.ConfigClient;
|
||||
import noppes.npcs.config.legacy.LegacyConfig;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
public class BlockCandleRenderer extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler{
|
||||
|
||||
private final ModelCandle model = new ModelCandle();
|
||||
private final ModelCandleWall modelWall = new ModelCandleWall();
|
||||
private final ModelCandleCeiling modelCeiling = new ModelCandleCeiling();
|
||||
private static final ResourceLocation resource1 = new ResourceLocation("customnpcs","textures/models/Candle.png");
|
||||
|
||||
private final ModelLegacyCandle legacyCandle = new ModelLegacyCandle();
|
||||
private final ModelLegacyCandleWall legacyCandleWall = new ModelLegacyCandleWall();
|
||||
private final ModelLegacyCandleCeiling legacyCandleCeiling = new ModelLegacyCandleCeiling();
|
||||
|
||||
private final ModelCandle candle = new ModelCandle();
|
||||
private final ModelCandleWall candleWall = new ModelCandleWall();
|
||||
private final ModelCandleCeiling candleCeiling = new ModelCandleCeiling();
|
||||
|
||||
private static final ResourceLocation legacy = new ResourceLocation("customnpcs","textures/models/legacy/Candle.png");
|
||||
private static final ResourceLocation texture = new ResourceLocation("customnpcs","textures/models/candle.png");
|
||||
|
||||
public BlockCandleRenderer(){
|
||||
((BlockCandle)CustomItems.candle).renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
((BlockCandle)CustomItems.candle_unlit).renderId = ((BlockCandle)CustomItems.candle).renderId;
|
||||
@@ -40,19 +51,44 @@ public class BlockCandleRenderer extends TileEntitySpecialRenderer implements IS
|
||||
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.5f, (float)var6 + 0.5f);
|
||||
//GL11.glScalef(0.95f, 0.95f, 0.95f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(resource1);
|
||||
if(tile.color == 0)
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
else if(tile.color == 1)
|
||||
modelCeiling.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
else{
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
modelWall.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
if(ConfigClient.LegacyCandle){
|
||||
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(legacy);
|
||||
if(tile.color == 0)
|
||||
legacyCandle.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
else if(tile.color == 1)
|
||||
legacyCandleCeiling.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
else{
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
legacyCandleWall.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
} else {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
if(tile.color == 0){
|
||||
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
candle.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
else if(tile.color == 1){
|
||||
GL11.glPushMatrix();
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
GL11.glRotatef( 90, 0, 1, 0);
|
||||
candleCeiling.Chain.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
|
||||
candleCeiling.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
else{
|
||||
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
candleWall.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -65,9 +101,15 @@ public class BlockCandleRenderer extends TileEntitySpecialRenderer implements IS
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(resource1);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
if(ConfigClient.LegacyCandle){
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(legacy);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
legacyCandle.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
} else {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
candle.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
@@ -82,7 +124,7 @@ public class BlockCandleRenderer extends TileEntitySpecialRenderer implements IS
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
return ConfigClient.LegacyCandle;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ package noppes.npcs.client.renderer.blocks;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
@@ -10,7 +11,9 @@ import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.blocks.BlockCarpentryBench;
|
||||
import noppes.npcs.blocks.tiles.TileBlockAnvil;
|
||||
import noppes.npcs.client.model.blocks.ModelAnvil;
|
||||
import noppes.npcs.client.model.blocks.legacy.ModelLegacyAnvil;
|
||||
import noppes.npcs.client.model.blocks.ModelCarpentryBench;
|
||||
import noppes.npcs.client.model.blocks.legacy.ModelLegacyCarpentryBench;
|
||||
import noppes.npcs.config.ConfigClient;
|
||||
@@ -21,12 +24,14 @@ public class BlockCarpentryBenchRenderer extends TileEntitySpecialRenderer imple
|
||||
private final ModelCarpentryBench modelCarpentryBench = new ModelCarpentryBench();
|
||||
private static final ResourceLocation carpentryBenchTexture = new ResourceLocation("customnpcs","textures/models/CarpentryBench.png");
|
||||
|
||||
private final ModelAnvil anvil = new ModelAnvil();
|
||||
private static final ResourceLocation legacyAnvilTexture = new ResourceLocation("customnpcs","textures/models/legacy/Steel.png");
|
||||
private static final ResourceLocation anvilTexture = new ResourceLocation("customnpcs","textures/models/anvil.png");
|
||||
|
||||
private static final ResourceLocation anvilTexture = new ResourceLocation("customnpcs","textures/models/Steel.png");
|
||||
|
||||
private final ModelLegacyCarpentryBench legacyBench = new ModelLegacyCarpentryBench();
|
||||
private static final ResourceLocation legacyCarpentryBench = new ResourceLocation("customnpcs","textures/models/legacy/bench.png");
|
||||
private final ModelLegacyAnvil legacyAnvil = new ModelLegacyAnvil();
|
||||
private final ModelAnvil anvil = new ModelAnvil();
|
||||
|
||||
public BlockCarpentryBenchRenderer(){
|
||||
((BlockCarpentryBench)CustomItems.carpentyBench).renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
@@ -42,9 +47,34 @@ public class BlockCarpentryBenchRenderer extends TileEntitySpecialRenderer imple
|
||||
GL11.glScalef(0.95f, 0.95f, 0.95f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(90 * (meta % 4), 0, 1, 0);
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
if(meta >= 4){
|
||||
this.bindTexture(anvilTexture);
|
||||
anvil.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
if(ConfigClient.LegacyAnvil){
|
||||
this.bindTexture(legacyAnvilTexture);
|
||||
legacyAnvil.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
} else {
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
this.bindTexture(anvilTexture);
|
||||
|
||||
// Get current brightness at the tile entity's location
|
||||
int light = var1.getWorldObj().getLightBrightnessForSkyBlocks(var1.xCoord, var1.yCoord, var1.zCoord, 0);
|
||||
int brightX = light % 65536;
|
||||
int brightY = light / 65536;
|
||||
|
||||
// Set full brightness for the lava
|
||||
int fullBright = 0xF000F0;
|
||||
int fullBrightX = fullBright % 65536;
|
||||
int fullBrightY = fullBright / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)fullBrightX, (float)fullBrightY);
|
||||
|
||||
// Render the lava part glowing
|
||||
anvil.Lava.render(0.0625F);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)brightX, (float)brightY);
|
||||
|
||||
// Now render the rest (the anvil) normally
|
||||
anvil.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -58,6 +88,7 @@ public class BlockCarpentryBenchRenderer extends TileEntitySpecialRenderer imple
|
||||
}
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
}
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -81,8 +112,14 @@ public class BlockCarpentryBenchRenderer extends TileEntitySpecialRenderer imple
|
||||
}
|
||||
}
|
||||
else{
|
||||
this.bindTexture(anvilTexture);
|
||||
anvil.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
if(ConfigClient.LegacyAnvil){
|
||||
this.bindTexture(legacyAnvilTexture);
|
||||
legacyAnvil.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
} else {
|
||||
this.bindTexture(anvilTexture);
|
||||
anvil.Lava.render(0.0625F);
|
||||
anvil.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
|
||||
@@ -39,6 +39,7 @@ public class BlockChairRenderer extends BlockRendererInterface{
|
||||
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
|
||||
double var6, float var8) {
|
||||
TileColorable tile = (TileColorable) var1;
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.65f, (float)var6 + 0.5f);
|
||||
@@ -60,7 +61,7 @@ public class BlockChairRenderer extends BlockRendererInterface{
|
||||
}
|
||||
}
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -69,15 +70,19 @@ public class BlockChairRenderer extends BlockRendererInterface{
|
||||
RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0, 1f, 0);
|
||||
GL11.glScalef(1.2f, 1.1f, 1.2f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
|
||||
setWoodTexture(metadata);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
if(ConfigClient.LegacyChair)
|
||||
if(ConfigClient.LegacyChair){
|
||||
setWoodTexture(metadata);
|
||||
GL11.glScalef(1.2f, 1.1f, 1.2f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
legacyModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
else {
|
||||
GL11.glTranslatef(0, -0.15f, 0);
|
||||
GL11.glScalef(1f, 0.9f, 1f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
if(ConfigClient.WoodTextures)
|
||||
chairSpoof.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
else {
|
||||
|
||||
@@ -2,9 +2,12 @@ package noppes.npcs.client.renderer.blocks;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.blocks.BlockCouchWool;
|
||||
import noppes.npcs.blocks.tiles.TileCouchWool;
|
||||
@@ -16,11 +19,11 @@ import org.lwjgl.opengl.GL12;
|
||||
|
||||
public class BlockCouchWoolRenderer extends BlockRendererInterface{
|
||||
|
||||
private final ModelBase modelCouchLeft = new ModelCouchLeft();
|
||||
private final ModelBase modelCouchRight = new ModelCouchRight();
|
||||
private final ModelBase modelCouchCorner = new ModelCouchCorner();
|
||||
private final ModelBase modelCouch = new ModelCouch();
|
||||
private final ModelBase modelCouchSingle = new ModelCouchSingle();
|
||||
private final ModelCouchLeft modelCouchLeft = new ModelCouchLeft();
|
||||
private final ModelCouchRight modelCouchRight = new ModelCouchRight();
|
||||
private final ModelCouchCorner modelCouchCorner = new ModelCouchCorner();
|
||||
private final ModelCouchMiddle modelCouch = new ModelCouchMiddle();
|
||||
private final ModelCouchSingle modelCouchSingle = new ModelCouchSingle();
|
||||
|
||||
private final ModelBase modelLegacyCouchMiddle = new ModelLegacyCouchMiddle();
|
||||
private final ModelBase modelLegacyCouchMiddleWool = new ModelLegacyCouchMiddleWool();
|
||||
@@ -34,6 +37,16 @@ public class BlockCouchWoolRenderer extends BlockRendererInterface{
|
||||
private final ModelBase modelLegacyCouchCorner = new ModelLegacyCouchCorner();
|
||||
private final ModelBase modelLegacyCouchCornerWool = new ModelLegacyCouchCornerWool();
|
||||
|
||||
|
||||
private static final ResourceLocation oak = new ResourceLocation("customnpcs","textures/models/couch/oak.png");
|
||||
private static final ResourceLocation spruce = new ResourceLocation("customnpcs","textures/models/couch/spruce.png");
|
||||
private static final ResourceLocation birch = new ResourceLocation("customnpcs","textures/models/couch/birch.png");
|
||||
private static final ResourceLocation jungle = new ResourceLocation("customnpcs","textures/models/couch/jungle.png");
|
||||
private static final ResourceLocation acacia = new ResourceLocation("customnpcs","textures/models/couch/acacia.png");
|
||||
private static final ResourceLocation dark_oak = new ResourceLocation("customnpcs","textures/models/couch/dark_oak.png");
|
||||
|
||||
private static final ResourceLocation wool = new ResourceLocation("customnpcs","textures/models/couch/wool.png");
|
||||
|
||||
public BlockCouchWoolRenderer(){
|
||||
((BlockCouchWool)CustomItems.couchWool).renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
RenderingRegistry.registerBlockHandler(this);
|
||||
@@ -42,6 +55,7 @@ public class BlockCouchWoolRenderer extends BlockRendererInterface{
|
||||
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
|
||||
double var6, float var8) {
|
||||
TileCouchWool tile = (TileCouchWool) var1;
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.5f, (float)var6 + 0.5f);
|
||||
@@ -49,8 +63,8 @@ public class BlockCouchWoolRenderer extends BlockRendererInterface{
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(90 * tile.rotation, 0, 1, 0);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
if(false){
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
if(ConfigClient.LegacyCouch){
|
||||
setWoodTexture(var1.getBlockMetadata());
|
||||
if(tile.hasCornerLeft)
|
||||
modelLegacyCouchCorner.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
@@ -82,23 +96,45 @@ public class BlockCouchWoolRenderer extends BlockRendererInterface{
|
||||
else
|
||||
modelLegacyCouchMiddleWool.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
} else {
|
||||
setWoodTexture(var1.getBlockMetadata());
|
||||
if(tile.hasCornerLeft)
|
||||
modelCouchCorner.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
else if(tile.hasCornerRight){
|
||||
setCouchWood(var1.getBlockMetadata());
|
||||
if(tile.hasCornerLeft){
|
||||
GL11.glPushMatrix();
|
||||
GL11.glRotatef(90, 0, 1, 0);
|
||||
modelCouchCorner.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
modelCouchCorner.CouchBack.render(0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else if(tile.hasCornerRight)
|
||||
modelCouchCorner.CouchBack.render(0.0625F);
|
||||
else if(tile.hasLeft && tile.hasRight)
|
||||
modelCouch.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
modelCouch.CouchBack.render(0.0625F);
|
||||
else if(tile.hasLeft)
|
||||
modelCouchLeft.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
modelCouchLeft.CouchBack.render(0.0625F);
|
||||
else if(tile.hasRight)
|
||||
modelCouchRight.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
else
|
||||
modelCouchSingle.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
modelCouchRight.CouchBack.render(0.0625F);
|
||||
else {
|
||||
modelCouchSingle.CouchBack.render(0.0625F);
|
||||
}
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(wool);
|
||||
float[] color = BlockBannerRenderer.colorTable[tile.color];
|
||||
GL11.glColor3f(color[0], color[1], color[2]);
|
||||
|
||||
if(tile.hasCornerLeft)
|
||||
modelCouchCorner.Cussion.render(0.0625F);
|
||||
else if(tile.hasCornerRight)
|
||||
modelCouchCorner.Cussion.render(0.0625F);
|
||||
else if(tile.hasLeft && tile.hasRight)
|
||||
modelCouch.Cussion.render(0.0625F);
|
||||
else if(tile.hasLeft)
|
||||
modelCouchLeft.Cussion.render(0.0625F);
|
||||
else if(tile.hasRight)
|
||||
modelCouchRight.Cussion.render(0.0625F);
|
||||
else {
|
||||
modelCouchSingle.Cussion.render(0.0625F);
|
||||
}
|
||||
}
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -122,6 +158,22 @@ public class BlockCouchWoolRenderer extends BlockRendererInterface{
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void setCouchWood(int meta){
|
||||
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
|
||||
if(meta == 1)
|
||||
manager.bindTexture(spruce);
|
||||
else if(meta == 2)
|
||||
manager.bindTexture(birch);
|
||||
else if(meta == 3)
|
||||
manager.bindTexture(jungle);
|
||||
else if(meta == 4)
|
||||
manager.bindTexture(acacia);
|
||||
else if(meta == 5)
|
||||
manager.bindTexture(dark_oak);
|
||||
else
|
||||
manager.bindTexture(oak);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return CustomItems.couchWool.getRenderType();
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
package noppes.npcs.client.renderer.blocks;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.blocks.BlockLamp;
|
||||
import noppes.npcs.blocks.tiles.TileLamp;
|
||||
import noppes.npcs.client.model.blocks.ModelLamp;
|
||||
import noppes.npcs.client.model.blocks.ModelLampCeiling;
|
||||
import noppes.npcs.client.model.blocks.ModelLampWall;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
public class BlockLampRenderer extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler{
|
||||
|
||||
private final ModelLamp model = new ModelLamp();
|
||||
private final ModelLampCeiling model2 = new ModelLampCeiling();
|
||||
private final ModelLampWall model3 = new ModelLampWall();
|
||||
private static final ResourceLocation resource1 = new ResourceLocation("customnpcs","textures/models/Lamp.png");
|
||||
|
||||
public BlockLampRenderer(){
|
||||
((BlockLamp)CustomItems.lamp).renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
((BlockLamp)CustomItems.lamp_unlit).renderId = ((BlockLamp)CustomItems.lamp).renderId;
|
||||
RenderingRegistry.registerBlockHandler(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
|
||||
double var6, float var8) {
|
||||
TileLamp tile = (TileLamp) var1;
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.5f, (float)var6 + 0.5f);
|
||||
//GL11.glScalef(0.95f, 0.95f, 0.95f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(resource1);
|
||||
if(tile.color == 0)
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
else if(tile.color == 1)
|
||||
model2.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
else
|
||||
model3.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0, 2.2f, 0);
|
||||
GL11.glScalef(2f, 2f, 2f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(resource1);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,
|
||||
Block block, int modelId, RenderBlocks renderer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return CustomItems.lamp.getRenderType();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
package noppes.npcs.client.renderer.blocks;
|
||||
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.blocks.BlockLantern;
|
||||
import noppes.npcs.blocks.tiles.TileLamp;
|
||||
import noppes.npcs.client.model.blocks.lantern.LanternCeiling;
|
||||
import noppes.npcs.client.model.blocks.lantern.LanternFloor;
|
||||
import noppes.npcs.client.model.blocks.lantern.LanternWall;
|
||||
import noppes.npcs.client.model.blocks.legacy.ModelLegacyLantern;
|
||||
import noppes.npcs.client.model.blocks.legacy.ModelLegacyCeiling;
|
||||
import noppes.npcs.client.model.blocks.legacy.ModelLegacyWall;
|
||||
import noppes.npcs.config.ConfigClient;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
public class BlockLanternRenderer extends TileEntitySpecialRenderer implements ISimpleBlockRenderingHandler{
|
||||
|
||||
private final ModelLegacyLantern modelLegacyLantern = new ModelLegacyLantern();
|
||||
private final ModelLegacyCeiling modelLegacyCeiling = new ModelLegacyCeiling();
|
||||
private final ModelLegacyWall modelLegacyWall = new ModelLegacyWall();
|
||||
private static final ResourceLocation legacyTexture = new ResourceLocation("customnpcs","textures/models/legacy/Lamp.png");
|
||||
|
||||
private final LanternFloor modelLantern = new LanternFloor();
|
||||
private final LanternWall modelLanternWall = new LanternWall();
|
||||
private final LanternCeiling modelLanternCeiling = new LanternCeiling();
|
||||
private static final ResourceLocation texture = new ResourceLocation("customnpcs","textures/models/lantern.png");
|
||||
|
||||
public BlockLanternRenderer(){
|
||||
((BlockLantern)CustomItems.lantern).renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
((BlockLantern)CustomItems.lantern_unlit).renderId = ((BlockLantern)CustomItems.lantern).renderId;
|
||||
RenderingRegistry.registerBlockHandler(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
|
||||
double var6, float var8) {
|
||||
TileLamp tile = (TileLamp) var1;
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.5f, (float)var6 + 0.5f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
if(ConfigClient.LegacyLantern){
|
||||
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(legacyTexture);
|
||||
if(tile.color == 0)
|
||||
modelLegacyLantern.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
else if(tile.color == 1)
|
||||
modelLegacyCeiling.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
else
|
||||
modelLegacyWall.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
} else {
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
if(tile.color == 0){
|
||||
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
|
||||
modelLantern.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
else if(tile.color == 1){
|
||||
GL11.glRotatef(90, 0, 1, 0);
|
||||
modelLanternCeiling.Chain.render(0.0625F);
|
||||
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
|
||||
modelLanternCeiling.Lantern.render(0.0625F);
|
||||
modelLanternCeiling.Light.render(0.0625F);
|
||||
}
|
||||
else {
|
||||
GL11.glRotatef(45 * tile.rotation, 0, 1, 0);
|
||||
GL11.glTranslatef(0, 0.3f, 0);
|
||||
modelLanternWall.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
}
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glPopAttrib();
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0, 2.2f, 0);
|
||||
GL11.glScalef(2f, 2f, 2f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
|
||||
if(ConfigClient.LegacyLantern){
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(legacyTexture);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
modelLegacyLantern.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
else {
|
||||
GL11.glScalef(0.7f, 0.7f, 0.7f);
|
||||
GL11.glTranslatef(0, 0.4f, 0);
|
||||
Minecraft.getMinecraft().getTextureManager().bindTexture(texture);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
modelLantern.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,
|
||||
Block block, int modelId, RenderBlocks renderer) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean shouldRender3DInInventory(int modelId) {
|
||||
return ConfigClient.LegacyLantern;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return CustomItems.lantern.getRenderType();
|
||||
}
|
||||
}
|
||||
@@ -14,14 +14,23 @@ import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.blocks.BlockRotated;
|
||||
import noppes.npcs.blocks.tiles.TilePedestal;
|
||||
import noppes.npcs.client.model.blocks.ModelPedestal;
|
||||
import noppes.npcs.client.model.blocks.legacy.ModelLegacyPedestal;
|
||||
import noppes.npcs.config.ConfigClient;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
public class BlockPedestalRenderer extends BlockRendererInterface{
|
||||
|
||||
private final ModelPedestal model = new ModelPedestal();
|
||||
private final static ResourceLocation resource = new ResourceLocation("customnpcs:textures/models/npcPedestal.png");
|
||||
|
||||
private final ModelLegacyPedestal legacyModel = new ModelLegacyPedestal();
|
||||
private final static ResourceLocation resource = new ResourceLocation("customnpcs:textures/models/legacy/npcPedestal.png");
|
||||
|
||||
private final ModelPedestal model = new ModelPedestal();
|
||||
private final static ResourceLocation wood = new ResourceLocation("customnpcs:textures/models/pedestal/wood.png");
|
||||
private final static ResourceLocation stone = new ResourceLocation("customnpcs:textures/models/pedestal/stone.png");
|
||||
private final static ResourceLocation iron = new ResourceLocation("customnpcs:textures/models/pedestal/iron.png");
|
||||
private final static ResourceLocation gold = new ResourceLocation("customnpcs:textures/models/pedestal/gold.png");
|
||||
private final static ResourceLocation diamond = new ResourceLocation("customnpcs:textures/models/pedestal/diamond.png");
|
||||
|
||||
public BlockPedestalRenderer(){
|
||||
((BlockRotated)CustomItems.pedestal).renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
RenderingRegistry.registerBlockHandler(this);
|
||||
@@ -35,17 +44,26 @@ public class BlockPedestalRenderer extends BlockRendererInterface{
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.5f, (float)var6 + 0.5f);
|
||||
//GL11.glScalef(0.95f, 0.95f, 0.95f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(90 * tile.rotation, 0, 1, 0);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
setMaterialTexture(var1.getBlockMetadata());
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
GL11.glScalef(1f, 0.99f, 1f);
|
||||
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
|
||||
manager.bindTexture(resource);
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
|
||||
if(ConfigClient.LegacyPedestal){
|
||||
setMaterialTexture(var1.getBlockMetadata());
|
||||
legacyModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
GL11.glScalef(1f, 0.99f, 1f);
|
||||
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
|
||||
manager.bindTexture(resource);
|
||||
legacyModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
} else {
|
||||
setPedestalTexture(var1.getBlockMetadata());
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(1f, 1.3f, 1f);
|
||||
GL11.glTranslatef(0f, -0.34f, 0f);
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glScalef(1f, 0.99f, 1f);
|
||||
}
|
||||
if(!this.playerTooFar(tile))
|
||||
doRender(tile.getStackInSlot(0));
|
||||
GL11.glPopMatrix();
|
||||
@@ -55,7 +73,10 @@ public class BlockPedestalRenderer extends BlockRendererInterface{
|
||||
if(item == null || item.getItem() == null || item.getItem() instanceof ItemBlock)
|
||||
return;
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0.06f, 0.30f, 0.02f);
|
||||
if(ConfigClient.LegacyPedestal)
|
||||
GL11.glTranslatef(0.06f, 0.30f, 0.02f);
|
||||
else
|
||||
GL11.glTranslatef(0.06f, 0.490f, 0.02f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(90, 0, 1, 0);
|
||||
GL11.glScalef(0.6f, 0.6f, 0.6f);
|
||||
@@ -90,30 +111,53 @@ public class BlockPedestalRenderer extends BlockRendererInterface{
|
||||
RenderManager.instance.itemRenderer.renderItem(Minecraft.getMinecraft().thePlayer, item, 0);
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId,
|
||||
RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef(0, 0.44f, 0);
|
||||
GL11.glScalef(0.76f, 0.66f, 0.76f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
|
||||
setMaterialTexture(metadata);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
|
||||
if(ConfigClient.LegacyPedestal){
|
||||
GL11.glTranslatef(0, 0.44f, 0);
|
||||
GL11.glScalef(0.76f, 0.66f, 0.76f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
setMaterialTexture(metadata);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
legacyModel.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
} else {
|
||||
GL11.glTranslatef(0, 1.9f, 0);
|
||||
GL11.glScalef(1f, 1.4f, 1f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
setPedestalTexture(metadata);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void setPedestalTexture(int meta){
|
||||
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
|
||||
if(meta == 1)
|
||||
manager.bindTexture(stone);
|
||||
else if(meta == 2)
|
||||
manager.bindTexture(iron);
|
||||
else if(meta == 3)
|
||||
manager.bindTexture(gold);
|
||||
else if(meta == 4)
|
||||
manager.bindTexture(diamond);
|
||||
else
|
||||
manager.bindTexture(wood);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return CustomItems.pedestal.getRenderType();
|
||||
}
|
||||
|
||||
|
||||
public int specialRenderDistance(){
|
||||
return 40;
|
||||
}
|
||||
|
||||
@@ -67,7 +67,35 @@ public abstract class BlockRendererInterface extends TileEntitySpecialRenderer i
|
||||
0.1F, 0.1F, 0.1F
|
||||
}
|
||||
};
|
||||
@Override
|
||||
|
||||
public static int colorTableInts[][] = {
|
||||
{ 0xFFFFFF }, // White
|
||||
{ 0xF2B233 }, // Light Orange
|
||||
{ 0xE680D9 }, // Pinkish Purple
|
||||
{ 0x99B2F2 }, // Light Blue
|
||||
{ 0xE6E633 }, // Yellow
|
||||
{ 0x80CC1A }, // Green
|
||||
{ 0xF2B2CC }, // Light Pink
|
||||
{ 0x4D4D4D }, // Dark Gray
|
||||
{ 0x999999 }, // Gray
|
||||
{ 0x4D99B2 }, // Teal
|
||||
{ 0xB266E6 }, // Purple
|
||||
{ 0x3366CC }, // Deep Blue
|
||||
{ 0x805D4D }, // Brown
|
||||
{ 0x668033 }, // Olive Green
|
||||
{ 0xCC4D4D }, // Red
|
||||
{ 0x1A1A1A } // Black
|
||||
};
|
||||
|
||||
public static float[] hexToRGB(int hex) {
|
||||
float r = ((hex >> 16) & 0xFF) / 255.0F;
|
||||
float g = ((hex >> 8) & 0xFF) / 255.0F;
|
||||
float b = (hex & 0xFF) / 255.0F;
|
||||
return new float[]{r, g, b};
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean renderWorldBlock(IBlockAccess world, int x, int y, int z,
|
||||
Block block, int modelId, RenderBlocks renderer) {
|
||||
return false;
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
package noppes.npcs.client.renderer.blocks;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.blocks.BlockShortLamp;
|
||||
import noppes.npcs.blocks.tiles.TileShortLamp;
|
||||
import noppes.npcs.client.model.blocks.lamp.ModelShortLamp;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
public class BlockShortLampRenderer extends BlockRendererInterface {
|
||||
|
||||
private final ModelShortLamp model = new ModelShortLamp();
|
||||
|
||||
public static final ResourceLocation wood = new ResourceLocation("customnpcs","textures/models/lamp/short/wood.png");
|
||||
public static final ResourceLocation stone = new ResourceLocation("customnpcs","textures/models/lamp/short/stone.png");
|
||||
public static final ResourceLocation iron = new ResourceLocation("customnpcs","textures/models/lamp/short/iron.png");
|
||||
public static final ResourceLocation gold = new ResourceLocation("customnpcs","textures/models/lamp/short/gold.png");
|
||||
public static final ResourceLocation diamond = new ResourceLocation("customnpcs","textures/models/lamp/short/diamond.png");
|
||||
|
||||
public BlockShortLampRenderer(){
|
||||
((BlockShortLamp)CustomItems.shortLamp).renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
RenderingRegistry.registerBlockHandler(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double z, float partialTicks) {
|
||||
TileShortLamp tile = (TileShortLamp) tileEntity;
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPushMatrix();
|
||||
|
||||
GL11.glTranslatef((float)x + 0.5f, (float)y + 1.5f, (float)z + 0.5f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(90 * tile.rotation, 0, 1, 0);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
setLampTexture(tileEntity.getBlockMetadata());
|
||||
model.Lamp.render(0.0625F);
|
||||
int light = tileEntity.getWorldObj().getLightBrightnessForSkyBlocks(tileEntity.xCoord, tileEntity.yCoord, tileEntity.zCoord, 0);
|
||||
int brightX = light % 65536;
|
||||
int brightY = light / 65536;
|
||||
|
||||
// Set full brightness for the light
|
||||
int fullBright = 0xF000F0;
|
||||
int fullBrightX = fullBright % 65536;
|
||||
int fullBrightY = fullBright / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)fullBrightX, (float)fullBrightY);
|
||||
model.Light.render(0.0625F);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)brightX, (float)brightY);
|
||||
|
||||
float[] color = BlockBannerRenderer.colorTable[tile.color];
|
||||
GL11.glColor3f(color[0], color[1], color[2]);
|
||||
model.Shade.render(0.0625F);
|
||||
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderInventoryBlock(Block block, int metadata, int modelId, RenderBlocks renderer) {
|
||||
GL11.glPushMatrix();
|
||||
// Adjust transformation for inventory rendering.
|
||||
GL11.glTranslatef(0, 0.42f, 0);
|
||||
GL11.glScalef(0.76f, 0.76f, 0.76f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
|
||||
setLampTexture(metadata);
|
||||
model.Lamp.render(0.0625F);
|
||||
model.Light.render(0.0625F);
|
||||
float[] color = BlockBannerRenderer.colorTable[15 - metadata];
|
||||
GL11.glColor3f(color[0], color[1], color[2]);
|
||||
model.Shade.render(0.0625F);
|
||||
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void setLampTexture(int meta){
|
||||
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
|
||||
if(meta == 1)
|
||||
manager.bindTexture(stone);
|
||||
else if(meta == 2)
|
||||
manager.bindTexture(iron);
|
||||
else if(meta == 3)
|
||||
manager.bindTexture(gold);
|
||||
else if(meta == 4)
|
||||
manager.bindTexture(diamond);
|
||||
else
|
||||
manager.bindTexture(wood);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
return CustomItems.shortLamp.getRenderType();
|
||||
}
|
||||
}
|
||||
@@ -43,7 +43,7 @@ public class BlockStoolRenderer extends BlockRendererInterface{
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
if(ConfigClient.LegacyStool){
|
||||
setWoodTexture(var1.getBlockMetadata());
|
||||
@@ -59,6 +59,7 @@ public class BlockStoolRenderer extends BlockRendererInterface{
|
||||
stool.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
@@ -45,30 +45,27 @@ public class BlockTableRenderer extends BlockRendererInterface{
|
||||
boolean east = var1.getWorldObj().getBlock(var1.xCoord, var1.yCoord, var1.zCoord + 1) == CustomItems.table;
|
||||
boolean west = var1.getWorldObj().getBlock(var1.xCoord, var1.yCoord, var1.zCoord - 1) == CustomItems.table;
|
||||
|
||||
legacyTable.Shape1.showModel = !south && !east;
|
||||
legacyTable.Shape3.showModel = !north && !west;
|
||||
legacyTable.Shape4.showModel = !north && !east;
|
||||
legacyTable.Shape5.showModel = !south && !west;
|
||||
|
||||
table.Shape1.showModel = !south && !east;
|
||||
table.Shape2.showModel = !south && !west;
|
||||
table.Shape3.showModel = !north && !west;
|
||||
table.Shape4.showModel = !north && !east;
|
||||
legacyTable.Shape1.showModel = table.Shape1.showModel = !south && !east;
|
||||
legacyTable.Shape3.showModel = table.Shape3.showModel = !north && !west;
|
||||
legacyTable.Shape4.showModel = table.Shape4.showModel = !north && !east;
|
||||
legacyTable.Shape5.showModel = table.Shape5.showModel = !south && !west;
|
||||
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
if(ConfigClient.LegacyTable){
|
||||
setWoodTexture(var1.getBlockMetadata());
|
||||
legacyTable.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
GL11.glRotatef(90 * tile.rotation, 0, 1, 0);
|
||||
legacyTable.Table.render(0.0625f);
|
||||
} else {
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
setTableTexture(var1.getBlockMetadata());
|
||||
table.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
GL11.glRotatef(90 * tile.rotation, 0, 1, 0);
|
||||
table.Table.render(0.0625f);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
}
|
||||
|
||||
}
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -94,9 +91,9 @@ public class BlockTableRenderer extends BlockRendererInterface{
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
table.Table.render(0.0625f);
|
||||
table.Shape1.showModel = true;
|
||||
table.Shape2.showModel = true;
|
||||
table.Shape3.showModel = true;
|
||||
table.Shape4.showModel = true;
|
||||
table.Shape5.showModel = true;
|
||||
table.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
|
||||
|
||||
@@ -2,24 +2,37 @@ package noppes.npcs.client.renderer.blocks;
|
||||
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.RenderBlocks;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import noppes.npcs.CustomItems;
|
||||
import noppes.npcs.blocks.BlockTallLamp;
|
||||
import noppes.npcs.blocks.tiles.TileTallLamp;
|
||||
import noppes.npcs.client.model.blocks.ModelTallLamp;
|
||||
import noppes.npcs.client.model.blocks.ModelTallLampTop;
|
||||
import noppes.npcs.client.model.blocks.lamp.ModelTallLamp;
|
||||
import noppes.npcs.client.model.blocks.legacy.ModelLegacyTallLamp;
|
||||
import noppes.npcs.client.model.blocks.legacy.ModelLegacyTallLampTop;
|
||||
import noppes.npcs.config.ConfigClient;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
public class BlockTallLampRenderer extends BlockRendererInterface{
|
||||
|
||||
private final ModelTallLamp model = new ModelTallLamp();
|
||||
|
||||
private final ModelTallLampTop top = new ModelTallLampTop();
|
||||
private final ModelLegacyTallLamp modelLegacy = new ModelLegacyTallLamp();
|
||||
private final ModelLegacyTallLampTop topLegacy = new ModelLegacyTallLampTop();
|
||||
public static final ResourceLocation resourceTop = new ResourceLocation("customnpcs","textures/cache/wool_colored_white.png");
|
||||
|
||||
|
||||
|
||||
private final ModelTallLamp model = new ModelTallLamp();
|
||||
|
||||
public static final ResourceLocation wood = new ResourceLocation("customnpcs","textures/models/lamp/tall/wood.png");
|
||||
public static final ResourceLocation stone = new ResourceLocation("customnpcs","textures/models/lamp/tall/stone.png");
|
||||
public static final ResourceLocation iron = new ResourceLocation("customnpcs","textures/models/lamp/tall/iron.png");
|
||||
public static final ResourceLocation gold = new ResourceLocation("customnpcs","textures/models/lamp/tall/gold.png");
|
||||
public static final ResourceLocation diamond = new ResourceLocation("customnpcs","textures/models/lamp/tall/diamond.png");
|
||||
|
||||
public BlockTallLampRenderer(){
|
||||
((BlockTallLamp)CustomItems.tallLamp).renderId = RenderingRegistry.getNextAvailableRenderId();
|
||||
RenderingRegistry.registerBlockHandler(this);
|
||||
@@ -29,22 +42,43 @@ public class BlockTallLampRenderer extends BlockRendererInterface{
|
||||
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
|
||||
double var6, float var8) {
|
||||
TileTallLamp tile = (TileTallLamp) var1;
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)var2 + 0.5f, (float)var4 + 1.5f, (float)var6 + 0.5f);
|
||||
//GL11.glScalef(0.95f, 0.95f, 0.95f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(90 * tile.rotation, 0, 1, 0);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
|
||||
setMaterialTexture(var1.getBlockMetadata());
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
|
||||
this.bindTexture(resourceTop);
|
||||
float[] color = BlockBannerRenderer.colorTable[tile.color];
|
||||
GL11.glColor3f(color[0], color[1], color[2]);
|
||||
top.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
if(ConfigClient.LegacyTallLamp){
|
||||
setMaterialTexture(var1.getBlockMetadata());
|
||||
modelLegacy.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
|
||||
this.bindTexture(resourceTop);
|
||||
float[] color = BlockBannerRenderer.colorTable[tile.color];
|
||||
GL11.glColor3f(color[0], color[1], color[2]);
|
||||
topLegacy.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
} else {
|
||||
setLampTexture(var1.getBlockMetadata());
|
||||
model.Lamp.render(0.0625F);
|
||||
int light = var1.getWorldObj().getLightBrightnessForSkyBlocks(var1.xCoord, var1.yCoord, var1.zCoord, 0);
|
||||
int brightX = light % 65536;
|
||||
int brightY = light / 65536;
|
||||
|
||||
// Set full brightness for the light
|
||||
int fullBright = 0xF000F0;
|
||||
int fullBrightX = fullBright % 65536;
|
||||
int fullBrightY = fullBright / 65536;
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)fullBrightX, (float)fullBrightY);
|
||||
model.Light.render(0.0625F);
|
||||
OpenGlHelper.setLightmapTextureCoords(OpenGlHelper.lightmapTexUnit, (float)brightX, (float)brightY);
|
||||
|
||||
float[] color = BlockBannerRenderer.colorTable[tile.color];
|
||||
GL11.glColor3f(color[0], color[1], color[2]);
|
||||
model.Shade.render(0.0625F);
|
||||
}
|
||||
|
||||
GL11.glPopAttrib();
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
@@ -56,18 +90,40 @@ public class BlockTallLampRenderer extends BlockRendererInterface{
|
||||
GL11.glScalef(0.76f, 0.66f, 0.76f);
|
||||
GL11.glRotatef(180, 0, 0, 1);
|
||||
GL11.glRotatef(180, 0, 1, 0);
|
||||
if(ConfigClient.LegacyTallLamp){
|
||||
setMaterialTexture(metadata);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
modelLegacy.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
|
||||
setMaterialTexture(metadata);
|
||||
GL11.glColor3f(1, 1, 1);
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
this.bindTexture(resourceTop);
|
||||
float[] color = BlockBannerRenderer.colorTable[15 - metadata];
|
||||
GL11.glColor3f(color[0], color[1], color[2]);
|
||||
topLegacy.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
} else {
|
||||
setLampTexture(metadata);
|
||||
model.Lamp.render(0.0625F);
|
||||
model.Light.render(0.0625F);
|
||||
float[] color = BlockBannerRenderer.colorTable[15 - metadata];
|
||||
GL11.glColor3f(color[0], color[1], color[2]);
|
||||
model.Shade.render(0.0625F);
|
||||
}
|
||||
|
||||
this.bindTexture(resourceTop);
|
||||
float[] color = BlockBannerRenderer.colorTable[15 - metadata];
|
||||
GL11.glColor3f(color[0], color[1], color[2]);
|
||||
top.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
public void setLampTexture(int meta){
|
||||
TextureManager manager = Minecraft.getMinecraft().getTextureManager();
|
||||
if(meta == 1)
|
||||
manager.bindTexture(stone);
|
||||
else if(meta == 2)
|
||||
manager.bindTexture(iron);
|
||||
else if(meta == 3)
|
||||
manager.bindTexture(gold);
|
||||
else if(meta == 4)
|
||||
manager.bindTexture(diamond);
|
||||
else
|
||||
manager.bindTexture(wood);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getRenderId() {
|
||||
|
||||
@@ -41,6 +41,7 @@ public class BlockWallBannerRenderer extends BlockRendererInterface{
|
||||
public void renderTileEntityAt(TileEntity var1, double var2, double var4,
|
||||
double var6, float var8) {
|
||||
TileWallBanner tile = (TileWallBanner) var1;
|
||||
GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||
GL11.glPushMatrix();
|
||||
@@ -89,6 +90,7 @@ public class BlockWallBannerRenderer extends BlockRendererInterface{
|
||||
doRender(var2, var4, var6, tile.rotation, tile.icon, angle_x);
|
||||
}
|
||||
}
|
||||
GL11.glPopAttrib();
|
||||
}
|
||||
public void doRender(double par2, double par4, double par6, int meta, ItemStack iicon, float rotate)
|
||||
{
|
||||
@@ -203,6 +205,7 @@ public class BlockWallBannerRenderer extends BlockRendererInterface{
|
||||
modelLegacyWallBannerFlag.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
}
|
||||
else {
|
||||
flag.BannerFlag.rotateAngleX = 0;
|
||||
BlockBannerRenderer.setBannerMaterial(metadata);
|
||||
model.render(null, 0, 0, 0, 0, 0.0F, 0.0625F);
|
||||
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
package noppes.npcs.client.renderer.items;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.ItemRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.texture.TextureManager;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.IItemRenderer;
|
||||
import noppes.npcs.items.ItemRenderInterface;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
import org.lwjgl.opengl.GL12;
|
||||
|
||||
public class NpcItemToolRenderer implements IItemRenderer {
|
||||
|
||||
// Textures for the assembled paintbrush parts:
|
||||
private static final ResourceLocation PAINTBRUSH_HANDLE = new ResourceLocation("noppes", "textures/items/paintbrush_handle.png");
|
||||
private static final ResourceLocation PAINTBRUSH_BRUSH = new ResourceLocation("noppes", "textures/items/paintbrush_brush.png");
|
||||
private static final ResourceLocation ENCHANT = new ResourceLocation("textures/misc/enchanted_item_glint.png");
|
||||
|
||||
@Override
|
||||
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
|
||||
// Only handle equipped types (first person or third person equipped)
|
||||
return type == ItemRenderType.EQUIPPED || type == ItemRenderType.EQUIPPED_FIRST_PERSON;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
|
||||
// Ensure the item implements our render interface
|
||||
if (!(item.getItem() instanceof ItemRenderInterface))
|
||||
return;
|
||||
|
||||
EntityLivingBase entity = (EntityLivingBase) data[1];
|
||||
|
||||
GL11.glPushMatrix();
|
||||
// Apply base translations/rotations
|
||||
GL11.glTranslatef(0.9375F, 0.0625F, 0.0F);
|
||||
GL11.glRotatef(-315.0F, 0.0F, 0.0F, 1.0F);
|
||||
|
||||
// For meta==1 (paintbrush) we want to assemble the texture from two parts
|
||||
if (item.getItemDamage() == 1) {
|
||||
renderPaintbrush(entity, item);
|
||||
} else {
|
||||
// For other tools, fall back on the normal special render routine.
|
||||
((ItemRenderInterface) item.getItem()).renderSpecial();
|
||||
GL11.glRotatef(-20.0F, 0.0F, 0.0F, 1.0F);
|
||||
GL11.glRotatef(-50.0F, 0.0F, 1.0F, 0.0F);
|
||||
GL11.glTranslatef(-0.09375F, 0.0625F, 0.0F);
|
||||
renderItem3d(entity, item);
|
||||
}
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the paintbrush by drawing its handle first, then overlaying the brush part tinted
|
||||
* by the NBT "Color" value (an integer/hex value).
|
||||
*/
|
||||
private void renderPaintbrush(EntityLivingBase entity, ItemStack item) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
TextureManager textureManager = mc.getTextureManager();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
int width = 16;
|
||||
int height = 16;
|
||||
float thickness = 0.0625F;
|
||||
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
// Render the handle (untinted)
|
||||
textureManager.bindTexture(PAINTBRUSH_HANDLE);
|
||||
// Using full texture coordinates (0→1) in the same order as vanilla's renderItemIn2D:
|
||||
ItemRenderer.renderItemIn2D(tessellator, 1.0F, 0.0F, 0.0F, 1.0F, width, height, thickness);
|
||||
|
||||
// Get the NBT color (default is white if not present)
|
||||
int color = 0xFFFFFF;
|
||||
if (item.hasTagCompound() && item.getTagCompound().hasKey("Color")) {
|
||||
color = item.getTagCompound().getInteger("Color");
|
||||
}
|
||||
float red = ((color >> 16) & 0xFF) / 255.0F;
|
||||
float green = ((color >> 8) & 0xFF) / 255.0F;
|
||||
float blue = (color & 0xFF) / 255.0F;
|
||||
GL11.glColor3f(red, green, blue);
|
||||
|
||||
// Render the brush (tinted by the color)
|
||||
textureManager.bindTexture(PAINTBRUSH_BRUSH);
|
||||
ItemRenderer.renderItemIn2D(tessellator, 1.0F, 0.0F, 0.0F, 1.0F, width, height, thickness);
|
||||
|
||||
// Reset GL color to white so that subsequent rendering is not tinted
|
||||
GL11.glColor3f(1.0F, 1.0F, 1.0F);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
|
||||
// If the item is enchanted, render the enchanted glint effect on top
|
||||
if (item.hasEffect(0)) {
|
||||
renderEnchantedEffect(tessellator, textureManager);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Fallback 3D item renderer (for non-paintbrush items)
|
||||
*/
|
||||
private void renderItem3d(EntityLivingBase entity, ItemStack item) {
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
TextureManager textureManager = mc.getTextureManager();
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
textureManager.bindTexture(textureManager.getResourceLocation(item.getItemSpriteNumber()));
|
||||
IIcon icon = entity.getItemIcon(item, 0);
|
||||
if (icon == null) {
|
||||
return;
|
||||
}
|
||||
float minU = icon.getMinU();
|
||||
float maxU = icon.getMaxU();
|
||||
float minV = icon.getMinV();
|
||||
float maxV = icon.getMaxV();
|
||||
int width = icon.getIconWidth();
|
||||
int height = icon.getIconHeight();
|
||||
|
||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||
// Note: The order here mimics vanilla's 2D item rendering
|
||||
ItemRenderer.renderItemIn2D(tessellator, maxU, minV, minU, maxV, width, height, 0.0625F);
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
}
|
||||
|
||||
/**
|
||||
* Renders the enchanted glint overlay.
|
||||
*/
|
||||
private void renderEnchantedEffect(Tessellator tessellator, TextureManager textureManager) {
|
||||
GL11.glDepthFunc(GL11.GL_EQUAL);
|
||||
GL11.glDisable(GL11.GL_LIGHTING);
|
||||
textureManager.bindTexture(ENCHANT);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
GL11.glBlendFunc(GL11.GL_SRC_COLOR, GL11.GL_ONE);
|
||||
float f7 = 0.76F;
|
||||
GL11.glColor4f(0.5F * f7, 0.25F * f7, 0.8F * f7, 1.0F);
|
||||
GL11.glMatrixMode(GL11.GL_TEXTURE);
|
||||
GL11.glPushMatrix();
|
||||
float f8 = 0.125F;
|
||||
GL11.glScalef(f8, f8, f8);
|
||||
float f9 = (float) (Minecraft.getSystemTime() % 3000L) / 3000.0F * 8.0F;
|
||||
GL11.glTranslatef(f9, 0.0F, 0.0F);
|
||||
GL11.glRotatef(-50.0F, 0.0F, 0.0F, 1.0F);
|
||||
ItemRenderer.renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F, 256, 256, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glPushMatrix();
|
||||
GL11.glScalef(f8, f8, f8);
|
||||
f9 = (float) (Minecraft.getSystemTime() % 4873L) / 4873.0F * 8.0F;
|
||||
GL11.glTranslatef(-f9, 0.0F, 0.0F);
|
||||
GL11.glRotatef(10.0F, 0.0F, 0.0F, 1.0F);
|
||||
ItemRenderer.renderItemIn2D(tessellator, 0.0F, 0.0F, 1.0F, 1.0F, 256, 256, 0.0625F);
|
||||
GL11.glPopMatrix();
|
||||
GL11.glMatrixMode(GL11.GL_MODELVIEW);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
GL11.glEnable(GL11.GL_LIGHTING);
|
||||
GL11.glDepthFunc(GL11.GL_LEQUAL);
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
}
|
||||
@@ -90,6 +90,11 @@ public class ConfigClient
|
||||
public static boolean LegacyTable = false;
|
||||
public static boolean LegacyBarrel = false;
|
||||
public static boolean LegacyCarpentryBench = false;
|
||||
public static boolean LegacyAnvil = false;
|
||||
public static boolean LegacyLantern = false;
|
||||
public static boolean LegacyCandle = false;
|
||||
public static boolean LegacyTallLamp = false;
|
||||
public static boolean LegacyPedestal = false;
|
||||
|
||||
public static void init(File configFile)
|
||||
{
|
||||
@@ -156,7 +161,12 @@ public class ConfigClient
|
||||
LegacyStool = config.get(MODEL, "Legacy Stool Model", false).getBoolean(false);
|
||||
LegacyCouch = config.get(MODEL, "Legacy Couch Model", false).getBoolean(false);
|
||||
LegacyTable = config.get(MODEL, "Legacy Table Model", false).getBoolean(false);
|
||||
LegacyAnvil = config.get(MODEL, "Legacy Anvil Model", false).getBoolean(false);
|
||||
LegacyCarpentryBench = config.get(MODEL, "Legacy Carpentry Bench Model", false).getBoolean(false);
|
||||
LegacyLantern = config.get(MODEL, "Legacy Lantern Model", false).getBoolean(false);
|
||||
LegacyCandle = config.get(MODEL, "Legacy Candle Model", false).getBoolean(false);
|
||||
LegacyTallLamp = config.get(MODEL, "Legacy Tall Lamp Model", false).getBoolean(false);
|
||||
LegacyPedestal = config.get(MODEL, "Legacy Pedestal Model", false).getBoolean(false);
|
||||
|
||||
// Convert to Legacy
|
||||
if(CustomNpcs.legacyExist){
|
||||
|
||||
@@ -34,7 +34,6 @@ public class CustomEffectController implements ICustomEffectHandler {
|
||||
public HashMap<Integer, HashMap<Integer, CustomEffect>> indexMapper = new HashMap<>();
|
||||
|
||||
public HashMap<Integer, CustomEffect> customEffectsSync = new HashMap<>();
|
||||
public HashMap<Integer, CustomEffect> customEffects = new HashMap<>();
|
||||
|
||||
public HashMap<Integer, EffectScript> customEffectScriptHandlers = new HashMap<>();
|
||||
private HashMap<Integer, String> bootOrder;
|
||||
@@ -42,15 +41,21 @@ public class CustomEffectController implements ICustomEffectHandler {
|
||||
private int lastUsedID = 0;
|
||||
public ConcurrentHashMap<UUID, ConcurrentHashMap<EffectKey, PlayerEffect>> playerEffects = new ConcurrentHashMap<>();
|
||||
|
||||
public CustomEffectController() {}
|
||||
public CustomEffectController(){
|
||||
HashMap<Integer, CustomEffect> customEffects = new HashMap<>();
|
||||
registerEffectMap(0, customEffects);
|
||||
}
|
||||
|
||||
public static CustomEffectController getInstance() {
|
||||
return Instance;
|
||||
}
|
||||
|
||||
public <T extends CustomEffect> void registerEffectMap(int index, HashMap<Integer, T> effectHashMap) {
|
||||
HashMap<Integer, CustomEffect> map = new HashMap<>(effectHashMap);
|
||||
indexMapper.put(index, map);
|
||||
indexMapper.put(index, (HashMap<Integer, CustomEffect>) effectHashMap);
|
||||
}
|
||||
|
||||
public HashMap<Integer, CustomEffect> getCustomEffects(){
|
||||
return indexMapper.get(0);
|
||||
}
|
||||
|
||||
public void load() {
|
||||
@@ -104,12 +109,12 @@ public class CustomEffectController implements ICustomEffectHandler {
|
||||
|
||||
if (effect.id == -1) {
|
||||
int id = getUnusedId();
|
||||
while (customEffects.containsKey(id)) {
|
||||
while (getCustomEffects().containsKey(id)) {
|
||||
id = getUnusedId();
|
||||
}
|
||||
effect.id = id;
|
||||
}
|
||||
customEffects.put(effect.id, effect);
|
||||
getCustomEffects().put(effect.id, effect);
|
||||
return effect;
|
||||
}
|
||||
|
||||
@@ -122,14 +127,14 @@ public class CustomEffectController implements ICustomEffectHandler {
|
||||
public void deleteEffect(String name) {
|
||||
ICustomEffect effect = getEffect(name);
|
||||
if (effect != null) {
|
||||
CustomEffect foundEffect = customEffects.remove(effect.getID());
|
||||
CustomEffect foundEffect = getCustomEffects().remove(effect.getID());
|
||||
customEffectScriptHandlers.remove(effect.getID());
|
||||
if (foundEffect != null && foundEffect.name != null) {
|
||||
File dir = this.getDir();
|
||||
for (File file : dir.listFiles()) {
|
||||
if (!file.isFile() || !file.getName().endsWith(".json"))
|
||||
continue;
|
||||
if (file.getName().equals(foundEffect.name + ".json")) {
|
||||
if (file.getName().equalsIgnoreCase(foundEffect.name + ".json")) {
|
||||
file.delete();
|
||||
SyncController.syncRemove(EnumSyncType.CUSTOM_EFFECTS, foundEffect.getID());
|
||||
break;
|
||||
@@ -143,14 +148,14 @@ public class CustomEffectController implements ICustomEffectHandler {
|
||||
public void delete(int id) {
|
||||
ICustomEffect effect = get(id);
|
||||
if (effect != null) {
|
||||
CustomEffect foundEffect = customEffects.remove(effect.getID());
|
||||
CustomEffect foundEffect = getCustomEffects().remove(effect.getID());
|
||||
customEffectScriptHandlers.remove(effect.getID());
|
||||
if (foundEffect != null && foundEffect.name != null) {
|
||||
File dir = this.getDir();
|
||||
for (File file : dir.listFiles()) {
|
||||
if (!file.isFile() || !file.getName().endsWith(".json"))
|
||||
continue;
|
||||
if (file.getName().equals(foundEffect.name + ".json")) {
|
||||
if (file.getName().equalsIgnoreCase(foundEffect.name + ".json")) {
|
||||
file.delete();
|
||||
SyncController.syncRemove(EnumSyncType.CUSTOM_EFFECTS, foundEffect.getID());
|
||||
break;
|
||||
@@ -162,7 +167,7 @@ public class CustomEffectController implements ICustomEffectHandler {
|
||||
}
|
||||
|
||||
public int getUnusedId() {
|
||||
for (int catid : customEffects.keySet()) {
|
||||
for (int catid : getCustomEffects().keySet()) {
|
||||
if (catid > lastUsedID)
|
||||
lastUsedID = catid;
|
||||
}
|
||||
@@ -299,15 +304,13 @@ public class CustomEffectController implements ICustomEffectHandler {
|
||||
customEffect.setID(getUnusedId());
|
||||
while (has(customEffect.getName()))
|
||||
customEffect.setName(customEffect.getName() + "_");
|
||||
} else {
|
||||
CustomEffect existing = customEffects.get(customEffect.getID());
|
||||
if (existing != null && !existing.name.equals(customEffect.getName()))
|
||||
while (has(customEffect.getName()))
|
||||
customEffect.setName(customEffect.getName() + "_");
|
||||
}
|
||||
|
||||
customEffects.remove(customEffect.getID());
|
||||
customEffects.put(customEffect.getID(), (CustomEffect) customEffect);
|
||||
while (hasOther(customEffect.getName(), customEffect.getID()))
|
||||
customEffect.setName(customEffect.getName() + "_");
|
||||
|
||||
getCustomEffects().remove(customEffect.getID());
|
||||
getCustomEffects().put(customEffect.getID(), (CustomEffect) customEffect);
|
||||
|
||||
saveEffectLoadMap();
|
||||
|
||||
@@ -329,7 +332,15 @@ public class CustomEffectController implements ICustomEffectHandler {
|
||||
} catch (Exception e) {
|
||||
LogWriter.except(e);
|
||||
}
|
||||
return customEffects.get(customEffect.getID());
|
||||
return getCustomEffects().get(customEffect.getID());
|
||||
}
|
||||
|
||||
private boolean hasOther(String name, int id) {
|
||||
for (CustomEffect effect : getCustomEffects().values()) {
|
||||
if (effect.getID() != id && effect.getName().equalsIgnoreCase(name))
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void clearEffects(EntityPlayer player) {
|
||||
@@ -377,7 +388,7 @@ public class CustomEffectController implements ICustomEffectHandler {
|
||||
Map<EffectKey, PlayerEffect> currentEffects = getPlayerEffects(player);
|
||||
CustomEffect parent = get(id, index);
|
||||
if (parent != null) {
|
||||
PlayerEffect playerEffect = new PlayerEffect(id, duration, level);
|
||||
PlayerEffect playerEffect = new PlayerEffect(id, duration, level, index);
|
||||
playerEffect.index = index;
|
||||
currentEffects.put(new EffectKey(id, index), playerEffect);
|
||||
parent.onAdded(player, playerEffect);
|
||||
@@ -418,7 +429,7 @@ public class CustomEffectController implements ICustomEffectHandler {
|
||||
if (effect.duration == -100)
|
||||
continue;
|
||||
if (effect.duration <= 0) {
|
||||
CustomEffect parent = CustomEffectController.Instance.get(effect.id);
|
||||
CustomEffect parent = CustomEffectController.Instance.get(effect.id, effect.index);
|
||||
if (parent != null) {
|
||||
parent.onRemoved(player, effect, ExpirationType.RUN_OUT);
|
||||
}
|
||||
@@ -437,7 +448,7 @@ public class CustomEffectController implements ICustomEffectHandler {
|
||||
}
|
||||
|
||||
private void loadCustomEffects() {
|
||||
customEffects.clear();
|
||||
getCustomEffects().clear();
|
||||
|
||||
File dir = getDir();
|
||||
if (!dir.exists()) {
|
||||
@@ -455,9 +466,9 @@ public class CustomEffectController implements ICustomEffectHandler {
|
||||
}
|
||||
int originalID = effect.id;
|
||||
int setID = effect.id;
|
||||
while (bootOrder.containsKey(setID) || customEffects.containsKey(setID)) {
|
||||
while (bootOrder.containsKey(setID) || getCustomEffects().containsKey(setID)) {
|
||||
if (bootOrder.containsKey(setID))
|
||||
if (bootOrder.get(setID).equals(effect.name))
|
||||
if (bootOrder.get(setID).equalsIgnoreCase(effect.name))
|
||||
break;
|
||||
setID++;
|
||||
}
|
||||
@@ -466,13 +477,13 @@ public class CustomEffectController implements ICustomEffectHandler {
|
||||
LogWriter.info("Found Custom Effect ID Mismatch: " + effect.name + ", New ID: " + setID);
|
||||
effect.save();
|
||||
}
|
||||
customEffects.put(effect.id, effect);
|
||||
getCustomEffects().put(effect.id, effect);
|
||||
} catch (Exception e) {
|
||||
LogWriter.error("Error loading: " + file.getAbsolutePath(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
registerEffectMap(0, customEffects);
|
||||
this.registerEffectMap(0, getCustomEffects());
|
||||
saveEffectLoadMap();
|
||||
}
|
||||
|
||||
@@ -513,8 +524,8 @@ public class CustomEffectController implements ICustomEffectHandler {
|
||||
private NBTTagCompound writeMapNBT() {
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
NBTTagList customEffectsList = new NBTTagList();
|
||||
for (Integer key : this.customEffects.keySet()) {
|
||||
CustomEffect customEffect = this.customEffects.get(key);
|
||||
for (Integer key : this.getCustomEffects().keySet()) {
|
||||
CustomEffect customEffect = this.getCustomEffects().get(key);
|
||||
if (!customEffect.getName().isEmpty()) {
|
||||
NBTTagCompound effectCompound = new NBTTagCompound();
|
||||
effectCompound.setString("Name", customEffect.getName());
|
||||
|
||||
@@ -12,34 +12,11 @@ public class PlayerEffect implements IPlayerEffect {
|
||||
public byte level;
|
||||
public int index;
|
||||
|
||||
public PlayerEffect(int id, int duration, byte level) {
|
||||
public PlayerEffect(int id, int duration, byte level, int index) {
|
||||
this.id = id;
|
||||
this.duration = duration;
|
||||
this.level = level;
|
||||
}
|
||||
|
||||
public static PlayerEffect readEffectData(NBTTagCompound nbt) {
|
||||
int id = nbt.getInteger("Id");
|
||||
int index = nbt.getInteger("Index");
|
||||
if (id > 0) {
|
||||
CustomEffectController controller = CustomEffectController.getInstance();
|
||||
boolean found = controller.has(id);
|
||||
// StatusEffectController.getInstance().customEffects.containsKey(id);
|
||||
if (found) {
|
||||
byte level = nbt.getByte("Level");
|
||||
int dur = nbt.getInteger("Dur");
|
||||
return new PlayerEffect(id, dur, level);
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public NBTTagCompound writeEffectData(NBTTagCompound nbt) {
|
||||
nbt.setInteger("Id", this.id);
|
||||
nbt.setByte("Level", this.level);
|
||||
nbt.setInteger("Dur", this.duration);
|
||||
nbt.setInteger("Index", this.index);
|
||||
return nbt;
|
||||
this.index = index;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -74,7 +51,7 @@ public class PlayerEffect implements IPlayerEffect {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
CustomEffect effect = CustomEffectController.getInstance().get(this.id);
|
||||
CustomEffect effect = CustomEffectController.getInstance().get(this.id, this.index);
|
||||
if(effect != null)
|
||||
return effect.getName();
|
||||
|
||||
@@ -84,7 +61,7 @@ public class PlayerEffect implements IPlayerEffect {
|
||||
@Override
|
||||
public void performEffect(IPlayer player) {
|
||||
if (player != null && player.getMCEntity() != null && player.getMCEntity() instanceof EntityPlayer) {
|
||||
CustomEffect effect = CustomEffectController.getInstance().get(this.id);
|
||||
CustomEffect effect = CustomEffectController.getInstance().get(this.id, this.index);
|
||||
if(effect != null)
|
||||
effect.onTick((EntityPlayer) player.getMCEntity(), this);
|
||||
}
|
||||
|
||||
@@ -46,8 +46,7 @@ public class PlayerEffectData {
|
||||
effect.duration = duration;
|
||||
effect.level = level;
|
||||
} else {
|
||||
effect = new PlayerEffect(id, duration, level);
|
||||
effect.index = index;
|
||||
effect = new PlayerEffect(id, duration, level, index);
|
||||
effects.put(key, effect);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -30,6 +30,10 @@ public class RecipesDefault {
|
||||
addRecipe("Mob Cloner", CustomItems.cloner, true, "XX","XY"," Y",'X', Items.bread,'Y', Items.stick);
|
||||
addRecipe("Carpentry Bench", CustomItems.carpentyBench, true, "XYX","Z Z","Z Z", 'X', Blocks.planks, 'Z', Items.stick, 'Y', Blocks.crafting_table);
|
||||
|
||||
ItemStack anvil = new ItemStack(CustomItems.carpentyBench);
|
||||
anvil.setItemDamage(1);
|
||||
addRecipe("Anvil", anvil, true, "XXX","Z Z","Z Z", 'X', Blocks.iron_block, 'Z', Items.iron_ingot);
|
||||
|
||||
if(!ConfigMain.DisableExtraItems){
|
||||
addRecipe("Mana", CustomItems.mana, true, "XY",'X',Items.redstone,'Y',Items.glowstone_dust);
|
||||
addRecipe("Gun Wooden", CustomItems.gunWood, false, "XXXY"," ZM "," M ",'Y', Blocks.lever, 'M', Items.stick, 'Z', Blocks.stone_button,'X', Blocks.planks);
|
||||
@@ -146,7 +150,7 @@ public class RecipesDefault {
|
||||
addRecipe("Sign Wood5", new ItemStack(CustomItems.sign, 1, 4), false, "YYY", "XXX", "XXX", 'X', new ItemStack(Blocks.planks,1,4), 'Y', Items.iron_ingot);
|
||||
addRecipe("Sign Wood6", new ItemStack(CustomItems.sign, 1, 5), false, "YYY", "XXX", "XXX", 'X', new ItemStack(Blocks.planks,1,5), 'Y', Items.iron_ingot);
|
||||
|
||||
addRecipe("Lamp", new ItemStack(CustomItems.lamp), false, "XXX","YZY","XXX", 'X', Items.iron_ingot, 'Y', Blocks.glass, 'Z', Blocks.torch);
|
||||
addRecipe("Lamp", new ItemStack(CustomItems.lantern), false, "XXX","YZY","XXX", 'X', Items.iron_ingot, 'Y', Blocks.glass, 'Z', Blocks.torch);
|
||||
addRecipe("Candle", new ItemStack(CustomItems.candle), false, "XZX"," X ", 'X', Items.iron_ingot, 'Z', Blocks.torch);
|
||||
addRecipe("BigSign", new ItemStack(CustomItems.bigsign, 2), false, "XXX","XXX","XXX", 'X', Blocks.planks);
|
||||
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
package noppes.npcs.items;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ChatComponentTranslation;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.CustomItems;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ItemNpcTool extends Item {
|
||||
|
||||
// Define our tool types based on metadata:
|
||||
// meta 0: Hammer, meta 1: Paintbrush, meta 2: Wrench
|
||||
public static final String[] toolTypes = new String[] {"hammer", "paintbrush", "wrench"};
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon[] icons;
|
||||
|
||||
public ItemNpcTool() {
|
||||
super();
|
||||
maxStackSize = 1;
|
||||
setHasSubtypes(true);
|
||||
setMaxDamage(0);
|
||||
setCreativeTab(CustomItems.tab);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUnlocalizedName(ItemStack stack) {
|
||||
int meta = stack.getItemDamage();
|
||||
if(meta < 0 || meta >= toolTypes.length){
|
||||
meta = 0;
|
||||
}
|
||||
return super.getUnlocalizedName() + "." + toolTypes[meta];
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
icons = new IIcon[toolTypes.length];
|
||||
for (int i = 0; i < toolTypes.length; i++) {
|
||||
icons[i] = iconRegister.registerIcon("noppes:npc_tool_" + toolTypes[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIconFromDamage(int meta) {
|
||||
if(meta < 0 || meta >= icons.length){
|
||||
meta = 0;
|
||||
}
|
||||
return icons[meta];
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item item, CreativeTabs tab, List subItems) {
|
||||
for (int i = 0; i < toolTypes.length; i++) {
|
||||
subItems.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
if(world.isRemote) {
|
||||
int meta = stack.getItemDamage();
|
||||
if(meta < 0 || meta >= toolTypes.length) meta = 0;
|
||||
// Send a simple chat message indicating which tool was used
|
||||
player.addChatMessage(new ChatComponentTranslation("item.npc_tool." + toolTypes[meta] + ".use"));
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item setUnlocalizedName(String name){
|
||||
GameRegistry.registerItem(this, name);
|
||||
return super.setUnlocalizedName(name);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user