Added a few guns, bullet trails, 3d models for guns (texture pack), bug fixes, QOL like not shooting valuable entities when clicking on them.

This commit is contained in:
5gi 2025-03-05 21:59:07 -05:00
parent 3cea7f339a
commit ae299530b2
33 changed files with 1138 additions and 37 deletions

View File

@ -37,11 +37,14 @@ public final class giGuns extends JavaPlugin {
BulletType.init(); BulletType.init();
Guns.init(); Guns.init();
getServer().getPluginManager().registerEvents(new GunHandler(), this); getServer().getPluginManager().registerEvents(new GunHandler(), this);
getServer().getScheduler().scheduleSyncRepeatingTask(this, GunHandler::BulletRoutine, 0, 1);
getCommand("hekateII").setExecutor((commandSender, command, s, strings) -> { getServer().getScheduler().scheduleSyncRepeatingTask(this, GunHandler::BulletRoutine, 0, 1);
getServer().getScheduler().scheduleSyncRepeatingTask(this, GunHandler::BulletTrailRoutine, 0, 3);
getCommand("getgun").setExecutor((commandSender, command, s, args) -> {
if (commandSender instanceof Player player) { if (commandSender instanceof Player player) {
IGun gun = GunHandler.registeredGuns.values().stream().toList().getFirst(); IGun gun = GunHandler.registeredGuns.values().stream().toList().get(Integer.parseInt(args[0]));
player.getInventory().addItem(gun.compileGun()); player.getInventory().addItem(gun.compileGun());
} }
return false; return false;

View File

@ -50,7 +50,7 @@ public enum BulletType {
} }
public static ShapedRecipe pistol() { public static ShapedRecipe pistol() {
ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("cancerguns:pistol_ammo"), makeAmmo("&cPistol")); ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("giguns:pistol_ammo"), makeAmmo("&cPistol"));
recipe.shape(" c ", "ngn", "nnn"); recipe.shape(" c ", "ngn", "nnn");
recipe.setIngredient('c', Material.COPPER_INGOT); recipe.setIngredient('c', Material.COPPER_INGOT);
recipe.setIngredient('n', Material.IRON_NUGGET); recipe.setIngredient('n', Material.IRON_NUGGET);
@ -58,7 +58,7 @@ public enum BulletType {
return recipe; return recipe;
} }
public static ShapedRecipe rifle() { public static ShapedRecipe rifle() {
ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("cancerguns:rifle_ammo"), makeAmmo("&eRifle")); ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("giguns:rifle_ammo"), makeAmmo("&eRifle"));
recipe.shape(" c ", "ngn", "nIn"); recipe.shape(" c ", "ngn", "nIn");
recipe.setIngredient('c', Material.COPPER_INGOT); recipe.setIngredient('c', Material.COPPER_INGOT);
recipe.setIngredient('n', Material.IRON_NUGGET); recipe.setIngredient('n', Material.IRON_NUGGET);
@ -67,7 +67,7 @@ public enum BulletType {
return recipe; return recipe;
} }
public static ShapedRecipe heavy() { public static ShapedRecipe heavy() {
ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("cancerguns:heavy_ammo"), makeAmmo("&6Heavy")); ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("giguns:heavy_ammo"), makeAmmo("&6Heavy"));
recipe.shape(" c ", "IgI", "InI"); recipe.shape(" c ", "IgI", "InI");
recipe.setIngredient('c', Material.COPPER_INGOT); recipe.setIngredient('c', Material.COPPER_INGOT);
recipe.setIngredient('n', Material.IRON_NUGGET); recipe.setIngredient('n', Material.IRON_NUGGET);
@ -76,7 +76,7 @@ public enum BulletType {
return recipe; return recipe;
} }
public static ShapedRecipe explosive() { public static ShapedRecipe explosive() {
ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("cancerguns:explosive_ammo"), makeAmmo("&4Explosive")); ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("giguns:explosive_ammo"), makeAmmo("&4Explosive"));
recipe.shape(" c ", "ngn", "nIn"); recipe.shape(" c ", "ngn", "nIn");
recipe.setIngredient('c', Material.COPPER_INGOT); recipe.setIngredient('c', Material.COPPER_INGOT);
recipe.setIngredient('n', Material.IRON_NUGGET); recipe.setIngredient('n', Material.IRON_NUGGET);
@ -85,14 +85,14 @@ public enum BulletType {
return recipe; return recipe;
} }
public static ShapedRecipe grenade() { public static ShapedRecipe grenade() {
ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("cancerguns:grenade_ammo"), makeAmmo("&2Grenade")); ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("giguns:grenade_ammo"), makeAmmo("&2Grenade"));
recipe.shape(" I ", "ITI", "III"); recipe.shape(" I ", "ITI", "III");
recipe.setIngredient('T', Material.TNT); recipe.setIngredient('T', Material.TNT);
recipe.setIngredient('I', Material.IRON_INGOT); recipe.setIngredient('I', Material.IRON_INGOT);
return recipe; return recipe;
} }
public static ShapedRecipe antiTank() { public static ShapedRecipe antiTank() {
ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("cancerguns:antitank_ammo"), makeAmmo("&9Anti-Tank")); ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("giguns:antitank_ammo"), makeAmmo("&9Anti-Tank"));
recipe.shape(" B ", "ITI", "III"); recipe.shape(" B ", "ITI", "III");
recipe.setIngredient('T', Material.TNT); recipe.setIngredient('T', Material.TNT);
recipe.setIngredient('I', Material.IRON_INGOT); recipe.setIngredient('I', Material.IRON_INGOT);

View File

@ -7,10 +7,12 @@ import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener; import org.bukkit.event.Listener;
import org.bukkit.event.block.Action; import org.bukkit.event.block.Action;
import org.bukkit.event.entity.ProjectileHitEvent; import org.bukkit.event.entity.ProjectileHitEvent;
import org.bukkit.event.player.PlayerInteractAtEntityEvent;
import org.bukkit.event.player.PlayerInteractEvent; import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory; import org.bukkit.inventory.PlayerInventory;
import org.bukkit.metadata.FixedMetadataValue; import org.bukkit.metadata.FixedMetadataValue;
import org.bukkit.util.Vector;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
@ -19,6 +21,7 @@ import java.util.List;
public class GunHandler implements Listener { public class GunHandler implements Listener {
public static HashMap<String, IGun> registeredGuns = new HashMap<>(); public static HashMap<String, IGun> registeredGuns = new HashMap<>();
public static HashMap<Snowball, IBullet> physicsBullets = new HashMap<>(); public static HashMap<Snowball, IBullet> physicsBullets = new HashMap<>();
public static HashMap<Snowball, Location> lastLocationsOfBullets = new HashMap<>();
public static void register(IGun gun) { public static void register(IGun gun) {
registeredGuns.put(giGuns.color(gun.name()), gun); registeredGuns.put(giGuns.color(gun.name()), gun);
@ -48,31 +51,67 @@ public class GunHandler implements Listener {
} }
} }
public static void BulletTrailRoutine() {
for (Snowball physbullet : physicsBullets.keySet()) {
Location currentLocation = physbullet.getLocation();
Location lastLocation = lastLocationsOfBullets.get(physbullet);
if (lastLocation != null) {
Calc.drawParticleLine(lastLocation, currentLocation);
}
lastLocationsOfBullets.put(physbullet, currentLocation);
}
}
public static void shoot(Player from) {
World world = from.getWorld();
IGun gun = GunHandler.getRegisteredGun(from.getInventory().getItemInMainHand().getItemMeta().getItemName());
IBullet bullet = gun.compileBullet();
if (from.hasCooldown(from.getInventory().getItemInMainHand())) return;
if (!Calc.decreaseMatchingItem(from, gun.bulletType().getItem())) {
world.playSound(from.getEyeLocation(), Sound.BLOCK_DISPENSER_FAIL, SoundCategory.PLAYERS, 3f, 1f);
return;
}
Snowball physbullet = from.getWorld().spawn(from.getEyeLocation().subtract(0,0.2f,0), Snowball.class);
physbullet.setShooter(from);
physbullet.setItem(new ItemStack(bullet.mat()));
physbullet.setGravity(gun.gravity());
physbullet.setVelocity(from.getEyeLocation().getDirection().multiply(gun.bulletSpeed()));
physbullet.setMetadata("isBullet", new FixedMetadataValue(giGuns.plugin, true));
physbullet.setMetadata("bornAt", new FixedMetadataValue(giGuns.plugin, System.currentTimeMillis()));
for (Sound sound : gun.sound()) {
world.playSound(from.getEyeLocation(), sound, SoundCategory.PLAYERS, 15f, gun.soundPitch());
}
from.setCooldown(from.getInventory().getItemInMainHand(), gun.cooldown());
lastLocationsOfBullets.put(physbullet, physbullet.getLocation());
physicsBullets.put(physbullet, bullet);
}
@EventHandler @EventHandler
public static void onRightClick(PlayerInteractEvent event) { public static void onRightClick(PlayerInteractEvent event) {
if (event.getPlayer().getInventory().getItemInMainHand() !=null && event.getPlayer().getInventory().getItemInMainHand().getItemMeta()!=null && GunHandler.isRegisteredGun(event.getPlayer().getInventory().getItemInMainHand().getItemMeta().getItemName()) if (event.getPlayer().getInventory().getItemInMainHand() !=null && event.getPlayer().getInventory().getItemInMainHand().getItemMeta()!=null && GunHandler.isRegisteredGun(event.getPlayer().getInventory().getItemInMainHand().getItemMeta().getItemName())
&& (event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_AIR)) { && (event.getAction() == Action.RIGHT_CLICK_BLOCK || event.getAction() == Action.RIGHT_CLICK_AIR)) {
Player player = event.getPlayer(); event.setCancelled(true);
World world = player.getWorld(); shoot(event.getPlayer());
IGun gun = GunHandler.getRegisteredGun(player.getInventory().getItemInMainHand().getItemMeta().getItemName()); } else if (event.getPlayer().getInventory().getItemInMainHand() != null &&
IBullet bullet = gun.compileBullet(); event.getPlayer().getInventory().getItemInMainHand().getType().equals(Material.BLACK_DYE) &&
if (player.hasCooldown(player.getInventory().getItemInMainHand())) return; event.getPlayer().getInventory().getItemInMainHand().getItemMeta()!=null &&
if (!Calc.decreaseMatchingItem(player, gun.bulletType().getItem())) { event.getPlayer().getInventory().getItemInMainHand().getItemMeta().getItemName().contains("Ammo")) {
world.playSound(player.getEyeLocation(), Sound.BLOCK_DISPENSER_FAIL, SoundCategory.PLAYERS, 3f, 1f); event.setCancelled(true);
return; }
} }
Snowball physbullet = player.getWorld().spawn(player.getEyeLocation().subtract(0,0.2f,0), Snowball.class); @EventHandler
physbullet.setShooter(player); public static void onPlayerInteract(PlayerInteractAtEntityEvent event) {
physbullet.setItem(new ItemStack(bullet.mat())); if (event.getPlayer().getInventory().getItemInMainHand() !=null && event.getPlayer().getInventory().getItemInMainHand().getItemMeta()!=null &&
physbullet.setGravity(gun.gravity()); GunHandler.isRegisteredGun(event.getPlayer().getInventory().getItemInMainHand().getItemMeta().getItemName())) {
physbullet.setVelocity(player.getEyeLocation().getDirection().multiply(gun.bulletSpeed())); if (event.getRightClicked() instanceof Villager || event.getRightClicked() instanceof ItemFrame) {return;}
physbullet.setMetadata("isBullet", new FixedMetadataValue(giGuns.plugin, true)); event.setCancelled(true);
physbullet.setMetadata("bornAt", new FixedMetadataValue(giGuns.plugin, System.currentTimeMillis())); shoot(event.getPlayer());
for (Sound sound : gun.sound()) { } else if (event.getPlayer().getInventory().getItemInMainHand() != null &&
world.playSound(player.getEyeLocation(), sound, SoundCategory.PLAYERS, 15f, gun.soundPitch()); event.getPlayer().getInventory().getItemInMainHand().getType().equals(Material.BLACK_DYE) &&
} event.getPlayer().getInventory().getItemInMainHand().getItemMeta()!=null &&
player.setCooldown(player.getInventory().getItemInMainHand(), gun.cooldown()); event.getPlayer().getInventory().getItemInMainHand().getItemMeta().getItemName().contains("Ammo")) {
physicsBullets.put(physbullet, bullet); event.setCancelled(true);
} }
} }
@ -175,5 +214,17 @@ public class GunHandler implements Listener {
} }
return player.getGameMode().equals(GameMode.CREATIVE); // No matching item found return player.getGameMode().equals(GameMode.CREATIVE); // No matching item found
} }
public static void drawParticleLine(Location from, Location to) {
Vector direction = to.toVector().subtract(from.toVector());
double distance = direction.length();
direction.normalize();
for (double d = 0; d < distance; d += 0.5) {
Location point = from.clone().add(direction.clone().multiply(d));
from.getWorld().spawnParticle(Particle.DUST, point, 3, 0.01f, 0.01f, 0.01f, 0, new Particle.DustOptions(Color.WHITE, 0.5f));
}
}
} }
} }

View File

@ -1,14 +1,15 @@
package com.s5gi.giGuns.guns; package com.s5gi.giGuns.guns;
import com.s5gi.giGuns.guns.ind._1911; import com.s5gi.giGuns.guns.ind.*;
import com.s5gi.giGuns.guns.ind.desertDeagle;
import com.s5gi.giGuns.guns.ind.hecateII;
public class Guns { public class Guns {
public static void init() { public static void init() {
GunHandler.register(new hecateII()); GunHandler.register(new hecateII());
GunHandler.register(new _1911()); GunHandler.register(new _1911());
GunHandler.register(new desertDeagle()); GunHandler.register(new desertDeagle());
GunHandler.register(new m1Bazooka());
GunHandler.register(new barrettM82());
GunHandler.register(new AK47());
} }
// public static final IGun hecateII = new IGun() { // public static final IGun hecateII = new IGun() {

View File

@ -1,6 +1,7 @@
package com.s5gi.giGuns.guns; package com.s5gi.giGuns.guns;
import com.s5gi.giGuns.giGuns; import com.s5gi.giGuns.giGuns;
import org.bukkit.Color;
import org.bukkit.Location; import org.bukkit.Location;
import org.bukkit.Material; import org.bukkit.Material;
import org.bukkit.Sound; import org.bukkit.Sound;
@ -9,9 +10,12 @@ import org.bukkit.entity.LivingEntity;
import org.bukkit.inventory.CraftingRecipe; import org.bukkit.inventory.CraftingRecipe;
import org.bukkit.inventory.ItemStack; import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta; import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.inventory.meta.components.CustomModelDataComponent;
import org.jetbrains.annotations.NotNull;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map;
public interface IGun { public interface IGun {
String name(); String name();
@ -26,6 +30,9 @@ public interface IGun {
double damage(); double damage();
//in ticks //in ticks
int cooldown(); int cooldown();
default int textureId() {
return 0;
}
CraftingRecipe recipe(); CraftingRecipe recipe();
default List<String> getLore() { default List<String> getLore() {
List<String> lore = new ArrayList<>(); List<String> lore = new ArrayList<>();
@ -42,6 +49,9 @@ public interface IGun {
ItemMeta meta = gunItem.getItemMeta(); ItemMeta meta = gunItem.getItemMeta();
meta.setItemName(giGuns.color(gun.name())); meta.setItemName(giGuns.color(gun.name()));
meta.setLore(gun.getLore()); meta.setLore(gun.getLore());
CustomModelDataComponent component = meta.getCustomModelDataComponent();
component.setStrings(List.of("gunmodel" + gun.textureId()));
meta.setCustomModelDataComponent(component);
gunItem.setItemMeta(meta); gunItem.setItemMeta(meta);
return gunItem; return gunItem;
} }

View File

@ -0,0 +1,93 @@
package com.s5gi.giGuns.guns.ind;
import com.s5gi.giGuns.guns.BulletType;
import com.s5gi.giGuns.guns.IGun;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.entity.LivingEntity;
import org.bukkit.inventory.CraftingRecipe;
import org.bukkit.inventory.ShapedRecipe;
import java.util.List;
public class AK47 implements IGun {
@Override
public String name() {
return "&cAK-47";
}
@Override
public int textureId() {
return 1;
}
@Override
public List<String> description() {
return List.of("&cSoviet &eUnion", "&7A gas-operated, long-stroke piston, closed rotating bolt, assault rifle");
}
@Override
public Material getItem() {
return Material.DIAMOND_HOE;
}
@Override
public BulletType bulletType() {
return BulletType.RIFLE;
}
@Override
public List<Sound> sound() {
return List.of(Sound.ENTITY_FIREWORK_ROCKET_BLAST);
}
@Override
public float soundPitch() {
return 0.8f;
}
@Override
public void onHitPlayer(Location location, LivingEntity entity) {
}
@Override
public void onHitBlock(Location location, Block block) {
}
@Override
public double bulletSpeed() {
return 3.4;
}
@Override
public double damage() {
return 6;
}
@Override
public boolean gravity() {
return true;
}
@Override
public int cooldown() {
return 4;
}
@Override
public CraftingRecipe recipe() {
ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("giguns:ak47"), compileGun());
recipe.shape("iii","rdI","iis");
recipe.setIngredient('i', Material.IRON_INGOT);
recipe.setIngredient('I', Material.IRON_BLOCK);
recipe.setIngredient('r', Material.BLAZE_ROD);
recipe.setIngredient('d', Material.DISPENSER);
recipe.setIngredient('s', Material.STICK);
return recipe;
}
}

View File

@ -77,7 +77,7 @@ public class _1911 implements IGun {
@Override @Override
public CraftingRecipe recipe() { public CraftingRecipe recipe() {
ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("cancerguns:1911"), compileGun()); ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("giguns:1911"), compileGun());
recipe.shape(" ii"," rd"," is"); recipe.shape(" ii"," rd"," is");
recipe.setIngredient('i', Material.IRON_INGOT); recipe.setIngredient('i', Material.IRON_INGOT);
recipe.setIngredient('r', Material.BLAZE_ROD); recipe.setIngredient('r', Material.BLAZE_ROD);

View File

@ -0,0 +1,84 @@
package com.s5gi.giGuns.guns.ind;
import com.s5gi.giGuns.guns.BulletType;
import com.s5gi.giGuns.guns.IGun;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.Sound;
import org.bukkit.block.Block;
import org.bukkit.entity.LivingEntity;
import org.bukkit.inventory.CraftingRecipe;
import org.bukkit.inventory.ShapedRecipe;
import java.util.List;
public class barrettM82 implements IGun {
@Override
public String name() {
return "&cBarrett M82";
}
@Override
public List<String> description() {
return List.of("&9U.S.A.","&7A recoil-operated, semi-automatic anti-tank rifle");
}
@Override
public Material getItem() {
return Material.STONE_HOE;
}
@Override
public BulletType bulletType() {
return BulletType.ANTI_TANK;
}
@Override
public List<Sound> sound() {
return List.of(Sound.ENTITY_FIREWORK_ROCKET_BLAST);
}
@Override
public float soundPitch() {
return 0.5f;
}
@Override
public void onHitPlayer(Location location, LivingEntity entity) {
}
@Override
public void onHitBlock(Location location, Block block) {
}
@Override
public double bulletSpeed() {
return 4;
}
@Override
public double damage() {
return 14;
}
@Override
public int cooldown() {
return 40;
}
@Override
public CraftingRecipe recipe() {
ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("giguns:barettm82"), compileGun());
recipe.shape("Iii", "rRd", "Iis");
recipe.setIngredient('i', Material.IRON_INGOT);
recipe.setIngredient('I', Material.IRON_BLOCK);
recipe.setIngredient('r', Material.BREEZE_ROD);
recipe.setIngredient('R', Material.BLAZE_ROD);
recipe.setIngredient('d', Material.DISPENSER);
recipe.setIngredient('s', Material.STICK);
return recipe;
}
}

View File

@ -71,7 +71,7 @@ public class desertDeagle implements IGun {
@Override @Override
public CraftingRecipe recipe() { public CraftingRecipe recipe() {
ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("cancerguns:desert_eagle"), compileGun()); ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("giguns:desert_eagle"), compileGun());
recipe.shape(" II"," rd"," is"); recipe.shape(" II"," rd"," is");
recipe.setIngredient('i', Material.IRON_INGOT); recipe.setIngredient('i', Material.IRON_INGOT);
recipe.setIngredient('I', Material.IRON_BLOCK); recipe.setIngredient('I', Material.IRON_BLOCK);

View File

@ -72,7 +72,7 @@ public class hecateII implements IGun {
@Override @Override
public CraftingRecipe recipe() { public CraftingRecipe recipe() {
ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("cancerguns:hekateii"), compileGun()); ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("giguns:hekateii"), compileGun());
recipe.shape("iii", "rRd", "iis"); recipe.shape("iii", "rRd", "iis");
recipe.setIngredient('i', Material.IRON_INGOT); recipe.setIngredient('i', Material.IRON_INGOT);
recipe.setIngredient('r', Material.BREEZE_ROD); recipe.setIngredient('r', Material.BREEZE_ROD);

View File

@ -0,0 +1,85 @@
package com.s5gi.giGuns.guns.ind;
import com.s5gi.giGuns.guns.BulletType;
import com.s5gi.giGuns.guns.IGun;
import org.bukkit.*;
import org.bukkit.block.Block;
import org.bukkit.entity.LivingEntity;
import org.bukkit.inventory.CraftingRecipe;
import org.bukkit.inventory.ShapedRecipe;
import java.util.List;
public class m1Bazooka implements IGun {
@Override
public String name() {
return "&4M1 Bazooka";
}
@Override
public List<String> description() {
return List.of("&9U.S.A.", "&7A man-portable recoilless anti-tank rocket launcher");
}
@Override
public Material getItem() {
return Material.GOLDEN_HOE;
}
@Override
public BulletType bulletType() {
return BulletType.ANTI_TANK;
}
@Override
public List<Sound> sound() {
return List.of(Sound.ENTITY_GENERIC_EXPLODE, Sound.ENTITY_FIREWORK_ROCKET_BLAST);
}
@Override
public float soundPitch() {
return 0.55f;
}
@Override
public void onHitPlayer(Location location, LivingEntity entity) {
explode(location);
}
@Override
public void onHitBlock(Location location, Block block) {
explode(location);
}
private static void explode(Location location) {
location.getWorld().createExplosion(location, 4.5f, false, false);
location.getWorld().spawnParticle(Particle.EXPLOSION, location, 10, 0.1f, 0.1f, 0.1f);
}
@Override
public double bulletSpeed() {
return 2.8;
}
@Override
public double damage() {
return 18;
}
@Override
public int cooldown() {
return 200;
}
@Override
public CraftingRecipe recipe() {
ShapedRecipe recipe = new ShapedRecipe(NamespacedKey.fromString("giguns:m1_bazooka"), compileGun());
recipe.shape("III","rgT","IIs");
recipe.setIngredient('T', Material.TNT);
recipe.setIngredient('I', Material.IRON_BLOCK);
recipe.setIngredient('r', Material.BLAZE_ROD);
recipe.setIngredient('s', Material.STICK);
recipe.setIngredient('g', Material.GUNPOWDER);
return recipe;
}
}

View File

@ -0,0 +1,26 @@
{
"model": {
"type": "select",
"property": "custom_model_data",
"fallback": {
"type": "model",
"model": "item/diamond_hoe"
},
"cases": [
{
"when": "gunmodel0",
"model": {
"type": "model",
"model": "item/deserteagle"
}
},
{
"when": "gunmodel1",
"model": {
"type": "model",
"model": "item/ak47"
}
}
]
}
}

View File

@ -0,0 +1,19 @@
{
"model": {
"type": "select",
"property": "custom_model_data",
"fallback": {
"type": "model",
"model": "item/iron_hoe"
},
"cases": [
{
"when": "gunmodel0",
"model": {
"type": "model",
"model": "item/hecateii"
}
}
]
}
}

View File

@ -0,0 +1,19 @@
{
"model": {
"type": "select",
"property": "custom_model_data",
"fallback": {
"type": "model",
"model": "item/stone_hoe"
},
"cases": [
{
"when": "gunmodel0",
"model": {
"type": "model",
"model": "item/barettm82"
}
}
]
}
}

View File

@ -0,0 +1,19 @@
{
"model": {
"type": "select",
"property": "custom_model_data",
"fallback": {
"type": "model",
"model": "item/wooden_hoe"
},
"cases": [
{
"when": "gunmodel0",
"model": {
"type": "model",
"model": "item/1911"
}
}
]
}
}

View File

@ -0,0 +1,54 @@
{
"credit": "Made with Blockbench",
"textures": {
"0": "item/1911",
"particle": "item/1911"
},
"elements": [
{
"from": [7, 5, 7],
"to": [9, 10, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 5, 9]},
"faces": {
"north": {"uv": [2, 0, 4, 5], "texture": "#0"},
"east": {"uv": [4, 0, 6, 5], "texture": "#0"},
"south": {"uv": [0, 5, 2, 10], "texture": "#0"},
"west": {"uv": [0, 0, 2, 5], "texture": "#0"},
"up": {"uv": [9, 6, 7, 4], "rotation": 270, "texture": "#0"},
"down": {"uv": [9, 6, 7, 8], "rotation": 90, "texture": "#0"}
}
},
{
"from": [7, 8, 2],
"to": [9, 10, 7],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 10, 7]},
"faces": {
"north": {"uv": [7, 8, 9, 10], "texture": "#0"},
"east": {"uv": [6, 0, 11, 2], "texture": "#0"},
"south": {"uv": [2, 9, 4, 11], "texture": "#0"},
"west": {"uv": [2, 5, 7, 7], "texture": "#0"},
"up": {"uv": [11, 4, 6, 2], "rotation": 270, "texture": "#0"},
"down": {"uv": [7, 7, 2, 9], "rotation": 90, "texture": "#0"}
}
}
],
"display": {
"gui": {
"rotation": [36, 118, 3],
"translation": [4.25, 0, 0],
"scale": [2, 2, 2]
},
"fixed": {
"rotation": [0, -90, 0],
"translation": [-2.25, 0, 0]
}
},
"groups": [
{
"name": "group",
"origin": [7, 5, 7],
"color": 0,
"children": [0, 1]
}
]
}

View File

@ -0,0 +1,157 @@
{
"credit": "Made with Blockbench",
"texture_size": [64, 64],
"textures": {
"0": "item/ak47",
"particle": "item/ak47"
},
"elements": [
{
"name": "sight",
"from": [8, 3, 0],
"to": [9, 4, 1],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 2, -1]},
"faces": {
"north": {"uv": [3.25, 7.5, 3.5, 7.75], "texture": "#0"},
"east": {"uv": [3, 7.5, 3.25, 7.75], "texture": "#0"},
"south": {"uv": [3.75, 7.5, 4, 7.75], "texture": "#0"},
"west": {"uv": [3.5, 7.5, 3.75, 7.75], "texture": "#0"},
"up": {"uv": [3.5, 7.5, 3.25, 7.25], "texture": "#0"},
"down": {"uv": [3.75, 7.25, 3.5, 7.5], "texture": "#0"}
}
},
{
"name": "fore",
"from": [8, 3, 5],
"to": [9, 4, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [8, 2, 4]},
"faces": {
"north": {"uv": [2.75, 7, 3, 7.25], "texture": "#0"},
"east": {"uv": [0, 7, 2.75, 7.25], "texture": "#0"},
"south": {"uv": [5.75, 7, 6, 7.25], "texture": "#0"},
"west": {"uv": [3, 7, 5.75, 7.25], "texture": "#0"},
"up": {"uv": [3, 7, 2.75, 4.25], "texture": "#0"},
"down": {"uv": [3.25, 4.25, 3, 7], "texture": "#0"}
}
},
{
"name": "rod",
"from": [8, 2, 0],
"to": [9, 3, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 6]},
"faces": {
"north": {"uv": [4, 4, 4.25, 4.25], "texture": "#0"},
"east": {"uv": [0, 4, 4, 4.25], "texture": "#0"},
"south": {"uv": [8.25, 4, 8.5, 4.25], "texture": "#0"},
"west": {"uv": [4.25, 4, 8.25, 4.25], "texture": "#0"},
"up": {"uv": [4.25, 4, 4, 0], "texture": "#0"},
"down": {"uv": [4.5, 0, 4.25, 4], "texture": "#0"}
}
},
{
"name": "grip",
"from": [8, -2, 14],
"to": [9, 3, 16],
"rotation": {"angle": -22.5, "axis": "x", "origin": [8, 1, 15]},
"faces": {
"north": {"uv": [0.5, 7.75, 0.75, 9], "texture": "#0"},
"east": {"uv": [0, 7.75, 0.5, 9], "texture": "#0"},
"south": {"uv": [1.25, 7.75, 1.5, 9], "texture": "#0"},
"west": {"uv": [0.75, 7.75, 1.25, 9], "texture": "#0"},
"up": {"uv": [0.75, 7.75, 0.5, 7.25], "texture": "#0"},
"down": {"uv": [1, 7.25, 0.75, 7.75], "texture": "#0"}
}
},
{
"name": "mag",
"from": [8, -5, 9],
"to": [9, 3, 11],
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 1, 10]},
"faces": {
"north": {"uv": [6.5, 6.5, 6.75, 8.5], "texture": "#0"},
"east": {"uv": [6, 6.5, 6.5, 8.5], "texture": "#0"},
"south": {"uv": [7.25, 6.5, 7.5, 8.5], "texture": "#0"},
"west": {"uv": [6.75, 6.5, 7.25, 8.5], "texture": "#0"},
"up": {"uv": [6.75, 6.5, 6.5, 6], "texture": "#0"},
"down": {"uv": [7, 6, 6.75, 6.5], "texture": "#0"}
}
},
{
"name": "stock",
"from": [8, 2, 16],
"to": [9, 3.25, 22],
"rotation": {"angle": 0, "axis": "x", "origin": [8, 3, 22]},
"faces": {
"north": {"uv": [7.5, 5.75, 7.75, 6], "texture": "#0"},
"east": {"uv": [6, 5.75, 7.5, 6], "texture": "#0"},
"south": {"uv": [9.25, 5.75, 9.5, 6], "texture": "#0"},
"west": {"uv": [7.75, 5.75, 9.25, 6], "texture": "#0"},
"up": {"uv": [7.75, 5.75, 7.5, 4.25], "texture": "#0"},
"down": {"uv": [8, 4.25, 7.75, 5.75], "texture": "#0"}
}
},
{
"name": "stockend",
"from": [8, 0.85, 20.198],
"to": [9, 1.6, 22.198],
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 2.3, 23.15]},
"faces": {
"north": {"uv": [2, 7.75, 2.25, 7.75], "texture": "#0"},
"east": {"uv": [1.5, 7.75, 2, 7.75], "texture": "#0"},
"south": {"uv": [2.75, 7.75, 3, 7.75], "texture": "#0"},
"west": {"uv": [2.25, 7.75, 2.75, 7.75], "texture": "#0"},
"up": {"uv": [2.25, 7.75, 2, 7.25], "texture": "#0"},
"down": {"uv": [2.5, 7.25, 2.25, 7.75], "texture": "#0"}
}
},
{
"name": "trigger",
"from": [8, 0.75, 12.25],
"to": [9, 2, 12.5],
"rotation": {"angle": 22.5, "axis": "x", "origin": [8, 0, 13]},
"faces": {
"north": {"uv": [4, 7.25, 4.25, 7.5], "texture": "#0"},
"east": {"uv": [4, 7.25, 4, 7.5], "texture": "#0"},
"south": {"uv": [4.25, 7.25, 4.5, 7.5], "texture": "#0"},
"west": {"uv": [4.25, 7.25, 4.25, 7.5], "texture": "#0"},
"up": {"uv": [4.25, 7.25, 4, 7.25], "texture": "#0"},
"down": {"uv": [4.5, 7.25, 4.25, 7.25], "texture": "#0"}
}
}
],
"display": {
"thirdperson_righthand": {
"translation": [-0.25, 6.75, -4]
},
"thirdperson_lefthand": {
"translation": [1, 6.75, -4.25]
},
"firstperson_righthand": {
"translation": [0, 9, -2]
},
"firstperson_lefthand": {
"translation": [0, 5, 0]
},
"ground": {
"translation": [0, 10, -5.25]
},
"gui": {
"rotation": [27, 132, 0],
"translation": [-1.5, 3.5, 0],
"scale": [0.9, 0.9, 0.9]
},
"fixed": {
"rotation": [0, -90, 0],
"translation": [2, 4, 0],
"scale": [1, 0.75, 0.75]
}
},
"groups": [
{
"name": "gun",
"origin": [7, 2, 6],
"color": 0,
"children": [0, 1, 2, 3, 4, 5, 6, 7]
}
]
}

View File

@ -0,0 +1,183 @@
{
"credit": "Made with Blockbench",
"texture_size": [64, 64],
"textures": {
"0": "item/barettm82",
"particle": "item/barettm82"
},
"elements": [
{
"name": "barrel",
"from": [7, 3, -15.25],
"to": [8, 4, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 3, -4]},
"faces": {
"north": {"uv": [5.75, 5, 6, 5.25], "texture": "#0"},
"east": {"uv": [2.5, 3, 9.375, 3.25], "texture": "#0"},
"south": {"uv": [5.75, 5.25, 6, 5.5], "texture": "#0"},
"west": {"uv": [2.5, 3.25, 9.375, 3.5], "texture": "#0"},
"up": {"uv": [2.75, 10.375, 2.5, 3.5], "texture": "#0"},
"down": {"uv": [3, 3.5, 2.75, 10.375], "texture": "#0"}
}
},
{
"name": "barrel",
"from": [7, 2, 9],
"to": [8, 3, 29],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 13]},
"faces": {
"north": {"uv": [5.75, 5.5, 6, 5.75], "texture": "#0"},
"east": {"uv": [4, 0.5, 9, 0.75], "texture": "#0"},
"south": {"uv": [5.75, 5.75, 6, 6], "texture": "#0"},
"west": {"uv": [4, 0.75, 9, 1], "texture": "#0"},
"up": {"uv": [1.25, 8.75, 1, 3.75], "texture": "#0"},
"down": {"uv": [1.5, 3.75, 1.25, 8.75], "texture": "#0"}
}
},
{
"name": "stockend",
"from": [6.75, -0.15, 28.198],
"to": [8.25, 1.35, 31.948],
"rotation": {"angle": 22.5, "axis": "x", "origin": [7, 2.05, 32.9]},
"faces": {
"north": {"uv": [5.5, 4.5, 5.875, 4.875], "texture": "#0"},
"east": {"uv": [4, 4, 5, 4.375], "texture": "#0"},
"south": {"uv": [5, 5.5, 5.375, 5.875], "texture": "#0"},
"west": {"uv": [4, 4.5, 5, 4.875], "texture": "#0"},
"up": {"uv": [4.375, 6, 4, 5], "texture": "#0"},
"down": {"uv": [5.375, 4, 5, 5], "texture": "#0"}
}
},
{
"name": "stock",
"from": [6.75, 1.75, 24.5],
"to": [8.25, 3.25, 31.75],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 3, 30.5]},
"faces": {
"north": {"uv": [1.75, 1.75, 2, 2], "texture": "#0"},
"east": {"uv": [0, 1.75, 1.75, 2], "texture": "#0"},
"south": {"uv": [3.75, 1.75, 4, 2], "texture": "#0"},
"west": {"uv": [2, 1.75, 3.75, 2], "texture": "#0"},
"up": {"uv": [2, 1.75, 1.75, 0], "texture": "#0"},
"down": {"uv": [2.25, 0, 2, 1.75], "texture": "#0"}
}
},
{
"name": "Scope",
"from": [6.5, 4, 7.75],
"to": [8.5, 6, 19],
"rotation": {"angle": 0, "axis": "y", "origin": [6.5, 4, 8]},
"faces": {
"north": {"uv": [4.5, 5, 5, 5.5], "texture": "#0"},
"east": {"uv": [3, 3.5, 5.875, 4], "texture": "#0"},
"south": {"uv": [5, 5, 5.5, 5.5], "texture": "#0"},
"west": {"uv": [4, 0, 6.875, 0.5], "texture": "#0"},
"up": {"uv": [0.5, 6.625, 0, 3.75], "texture": "#0"},
"down": {"uv": [1, 3.75, 0.5, 6.625], "texture": "#0"}
}
},
{
"name": "mag",
"from": [6.5, 1.75, -1.5],
"to": [8.5, 3.75, 16.25],
"rotation": {"angle": 0, "axis": "y", "origin": [6.5, 1.75, 10]},
"faces": {
"north": {"uv": [5.5, 4, 6, 4.5], "texture": "#0"},
"east": {"uv": [1.5, 2, 6, 2.5], "texture": "#0"},
"south": {"uv": [4.5, 5.5, 5, 6], "texture": "#0"},
"west": {"uv": [1.5, 2.5, 6, 3], "texture": "#0"},
"up": {"uv": [2, 7.5, 1.5, 3], "texture": "#0"},
"down": {"uv": [2.5, 3, 2, 7.5], "texture": "#0"}
}
},
{
"name": "trigger",
"from": [7.25, 0.75, 12.25],
"to": [8.25, 2, 12.5],
"rotation": {"angle": 22.5, "axis": "x", "origin": [7.25, 0, 13]},
"faces": {
"north": {"uv": [5.5, 5, 5.75, 5.375], "texture": "#0"},
"east": {"uv": [6, 2, 6.125, 2.375], "texture": "#0"},
"south": {"uv": [5.5, 5.5, 5.75, 5.875], "texture": "#0"},
"west": {"uv": [6, 2.5, 6.125, 2.875], "texture": "#0"},
"up": {"uv": [3.25, 6.125, 3, 6], "texture": "#0"},
"down": {"uv": [3.5, 6, 3.25, 6.125], "texture": "#0"}
}
},
{
"name": "grip",
"from": [7.25, -2, 14],
"to": [8.25, 3, 16],
"rotation": {"angle": -22.5, "axis": "x", "origin": [7.25, 1, 15]},
"faces": {
"north": {"uv": [0.5, 2.5, 0.75, 3.75], "texture": "#0"},
"east": {"uv": [0, 2.5, 0.5, 3.75], "texture": "#0"},
"south": {"uv": [1.25, 2.5, 1.5, 3.75], "texture": "#0"},
"west": {"uv": [0.75, 2.5, 1.25, 3.75], "texture": "#0"},
"up": {"uv": [0.75, 2.5, 0.5, 2], "texture": "#0"},
"down": {"uv": [1, 2, 0.75, 2.5], "texture": "#0"}
}
},
{
"from": [7, 1, -7.5],
"to": [8, 2, 0.5],
"rotation": {"angle": -22.5, "axis": "y", "origin": [8, 1, 1.5]},
"faces": {
"north": {"uv": [6, 1.25, 6.25, 1.5], "texture": "#0"},
"east": {"uv": [4, 1.25, 6, 1.5], "texture": "#0"},
"south": {"uv": [6, 1, 6.25, 1.25], "texture": "#0"},
"west": {"uv": [4, 1, 6, 1.25], "texture": "#0"},
"up": {"uv": [3.25, 6, 3, 4], "rotation": 180, "texture": "#0"},
"down": {"uv": [3.5, 4, 3.25, 6], "rotation": 180, "texture": "#0"}
}
},
{
"from": [7, 1, -7.75],
"to": [8, 2, 0.25],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 1, 1.25]},
"faces": {
"north": {"uv": [6, 1.75, 6.25, 2], "texture": "#0"},
"east": {"uv": [4, 1.75, 6, 2], "texture": "#0"},
"south": {"uv": [6, 1.5, 6.25, 1.75], "texture": "#0"},
"west": {"uv": [4, 1.5, 6, 1.75], "texture": "#0"},
"up": {"uv": [3.75, 6, 3.5, 4], "rotation": 180, "texture": "#0"},
"down": {"uv": [4, 4, 3.75, 6], "rotation": 180, "texture": "#0"}
}
}
],
"display": {
"thirdperson_righthand": {
"translation": [0.5, 6.75, -6.5]
},
"thirdperson_lefthand": {
"translation": [-0.5, 6.75, -6.5]
},
"firstperson_righthand": {
"translation": [-0.75, 9.75, -7.5]
},
"firstperson_lefthand": {
"translation": [-2.25, 6.5, -5]
},
"ground": {
"translation": [0, 8.25, 0]
},
"gui": {
"rotation": [26, 124, -3],
"translation": [-0.25, 1, 0],
"scale": [0.39, 0.39, 0.39]
},
"fixed": {
"rotation": [180, -90, 180],
"translation": [0, 1.25, 0],
"scale": [0.39, 0.39, 0.39]
}
},
"groups": [
{
"name": "group",
"origin": [0, 0, 0],
"color": 0,
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
}
]
}

View File

@ -0,0 +1,95 @@
{
"credit": "Made with Blockbench",
"texture_size": [32, 32],
"textures": {
"0": "item/deserteagle",
"particle": "item/deserteagle"
},
"elements": [
{
"from": [6, 5, 1],
"to": [9, 8, 9],
"rotation": {"angle": 0, "axis": "x", "origin": [7, 5, 9]},
"faces": {
"north": {"uv": [6, 4, 7.5, 5.5], "texture": "#0"},
"east": {"uv": [1, 9, 5, 10.5], "texture": "#0"},
"south": {"uv": [6, 5.5, 7.5, 7], "texture": "#0"},
"west": {"uv": [0, 1.5, 4, 3], "texture": "#0"},
"up": {"uv": [1.5, 7, 0, 3], "texture": "#0"},
"down": {"uv": [3, 3, 1.5, 7], "texture": "#0"}
}
},
{
"from": [6, 0, 9],
"to": [9, 8, 12],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 0, 9]},
"faces": {
"north": {"uv": [3, 3, 4.5, 7], "texture": "#0"},
"east": {"uv": [4.5, 0, 6, 4], "texture": "#0"},
"south": {"uv": [4.5, 4, 6, 8], "texture": "#0"},
"west": {"uv": [6, 0, 7.5, 4], "texture": "#0"},
"up": {"uv": [1.5, 8.5, 0, 7], "texture": "#0"},
"down": {"uv": [3, 7, 1.5, 8.5], "texture": "#0"}
}
},
{
"from": [7, 5, 12],
"to": [8, 7, 13],
"rotation": {"angle": 0, "axis": "y", "origin": [6, 5, 12]},
"faces": {
"north": {"uv": [11, 15, 11.5, 16], "texture": "#0"},
"east": {"uv": [4, 14.5, 4.5, 15.5], "texture": "#0"},
"south": {"uv": [2.5, 13.5, 3, 14.5], "texture": "#0"},
"west": {"uv": [4.5, 12.5, 5, 13.5], "texture": "#0"},
"up": {"uv": [1.5, 14.5, 2, 15], "texture": "#0"},
"down": {"uv": [5, 14.5, 5.5, 15], "texture": "#0"}
}
},
{
"from": [7, 3, 8],
"to": [8, 5, 9],
"rotation": {"angle": 0, "axis": "y", "origin": [6, 3, 8]},
"faces": {
"north": {"uv": [5.5, 8.5, 6, 9.5], "texture": "#0"},
"east": {"uv": [6.5, 15, 7, 16], "texture": "#0"},
"south": {"uv": [6.5, 12, 7, 13], "texture": "#0"},
"west": {"uv": [8.5, 12, 9, 13], "texture": "#0"},
"up": {"uv": [8, 8.5, 8.5, 9], "texture": "#0"},
"down": {"uv": [3.5, 8.375, 4, 8.875], "texture": "#0"}
}
}
],
"display": {
"thirdperson_righthand": {
"translation": [0.5, 3.5, 0]
},
"thirdperson_lefthand": {
"translation": [-0.5, 3.5, 0]
},
"firstperson_righthand": {
"translation": [0, 6, 0]
},
"firstperson_lefthand": {
"translation": [0, 2.75, 0]
},
"ground": {
"translation": [0, 5.25, 0]
},
"gui": {
"rotation": [35, 126, -5],
"translation": [0, 2.75, 0]
},
"fixed": {
"rotation": [180, -90, 180],
"translation": [-0.5, 2.25, 0]
}
},
"groups": [
{
"name": "group",
"origin": [8, 8, 8],
"color": 0,
"children": [0, 1, 2, 3]
}
]
}

View File

@ -0,0 +1,183 @@
{
"credit": "Made with Blockbench",
"texture_size": [64, 64],
"textures": {
"0": "item/hecateii",
"particle": "item/hecateii"
},
"elements": [
{
"name": "barrel",
"from": [7, 3, -11.25],
"to": [8, 4, 16],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 3, 0]},
"faces": {
"north": {"uv": [5.75, 5, 6, 5.25], "texture": "#0"},
"east": {"uv": [2.5, 3, 9.375, 3.25], "texture": "#0"},
"south": {"uv": [5.75, 5.25, 6, 5.5], "texture": "#0"},
"west": {"uv": [2.5, 3.25, 9.375, 3.5], "texture": "#0"},
"up": {"uv": [2.75, 10.375, 2.5, 3.5], "texture": "#0"},
"down": {"uv": [3, 3.5, 2.75, 10.375], "texture": "#0"}
}
},
{
"name": "barrel",
"from": [7, 2, 4],
"to": [8, 3, 24],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 2, 8]},
"faces": {
"north": {"uv": [5.75, 5.5, 6, 5.75], "texture": "#0"},
"east": {"uv": [4, 0.5, 9, 0.75], "texture": "#0"},
"south": {"uv": [5.75, 5.75, 6, 6], "texture": "#0"},
"west": {"uv": [4, 0.75, 9, 1], "texture": "#0"},
"up": {"uv": [1.25, 8.75, 1, 3.75], "texture": "#0"},
"down": {"uv": [1.5, 3.75, 1.25, 8.75], "texture": "#0"}
}
},
{
"name": "stockend",
"from": [6.75, -0.15, 23.198],
"to": [8.25, 1.35, 26.948],
"rotation": {"angle": 22.5, "axis": "x", "origin": [7, 2.05, 27.9]},
"faces": {
"north": {"uv": [5.5, 4.5, 5.875, 4.875], "texture": "#0"},
"east": {"uv": [4, 4, 5, 4.375], "texture": "#0"},
"south": {"uv": [5, 5.5, 5.375, 5.875], "texture": "#0"},
"west": {"uv": [4, 4.5, 5, 4.875], "texture": "#0"},
"up": {"uv": [4.375, 6, 4, 5], "texture": "#0"},
"down": {"uv": [5.375, 4, 5, 5], "texture": "#0"}
}
},
{
"name": "stock",
"from": [6.75, 1.75, 19.5],
"to": [8.25, 3.25, 26.75],
"rotation": {"angle": 0, "axis": "y", "origin": [7, 3, 25.5]},
"faces": {
"north": {"uv": [1.75, 1.75, 2, 2], "texture": "#0"},
"east": {"uv": [0, 1.75, 1.75, 2], "texture": "#0"},
"south": {"uv": [3.75, 1.75, 4, 2], "texture": "#0"},
"west": {"uv": [2, 1.75, 3.75, 2], "texture": "#0"},
"up": {"uv": [2, 1.75, 1.75, 0], "texture": "#0"},
"down": {"uv": [2.25, 0, 2, 1.75], "texture": "#0"}
}
},
{
"name": "Scope",
"from": [6.5, 4, 7.75],
"to": [8.5, 6, 19],
"rotation": {"angle": 0, "axis": "y", "origin": [6.5, 4, 8]},
"faces": {
"north": {"uv": [4.5, 5, 5, 5.5], "texture": "#0"},
"east": {"uv": [3, 3.5, 5.875, 4], "texture": "#0"},
"south": {"uv": [5, 5, 5.5, 5.5], "texture": "#0"},
"west": {"uv": [4, 0, 6.875, 0.5], "texture": "#0"},
"up": {"uv": [0.5, 6.625, 0, 3.75], "texture": "#0"},
"down": {"uv": [1, 3.75, 0.5, 6.625], "texture": "#0"}
}
},
{
"name": "mag",
"from": [6.5, 1.75, -1.5],
"to": [8.5, 3.75, 16.25],
"rotation": {"angle": 0, "axis": "y", "origin": [6.5, 1.75, 10]},
"faces": {
"north": {"uv": [5.5, 4, 6, 4.5], "texture": "#0"},
"east": {"uv": [1.5, 2, 6, 2.5], "texture": "#0"},
"south": {"uv": [4.5, 5.5, 5, 6], "texture": "#0"},
"west": {"uv": [1.5, 2.5, 6, 3], "texture": "#0"},
"up": {"uv": [2, 7.5, 1.5, 3], "texture": "#0"},
"down": {"uv": [2.5, 3, 2, 7.5], "texture": "#0"}
}
},
{
"name": "trigger",
"from": [7.25, 0.75, 12.25],
"to": [8.25, 2, 12.5],
"rotation": {"angle": 22.5, "axis": "x", "origin": [7.25, 0, 13]},
"faces": {
"north": {"uv": [5.5, 5, 5.75, 5.375], "texture": "#0"},
"east": {"uv": [6, 2, 6.125, 2.375], "texture": "#0"},
"south": {"uv": [5.5, 5.5, 5.75, 5.875], "texture": "#0"},
"west": {"uv": [6, 2.5, 6.125, 2.875], "texture": "#0"},
"up": {"uv": [3.25, 6.125, 3, 6], "texture": "#0"},
"down": {"uv": [3.5, 6, 3.25, 6.125], "texture": "#0"}
}
},
{
"name": "grip",
"from": [7.25, -2, 14],
"to": [8.25, 3, 16],
"rotation": {"angle": -22.5, "axis": "x", "origin": [7.25, 1, 15]},
"faces": {
"north": {"uv": [0.5, 2.5, 0.75, 3.75], "texture": "#0"},
"east": {"uv": [0, 2.5, 0.5, 3.75], "texture": "#0"},
"south": {"uv": [1.25, 2.5, 1.5, 3.75], "texture": "#0"},
"west": {"uv": [0.75, 2.5, 1.25, 3.75], "texture": "#0"},
"up": {"uv": [0.75, 2.5, 0.5, 2], "texture": "#0"},
"down": {"uv": [1, 2, 0.75, 2.5], "texture": "#0"}
}
},
{
"from": [7, 1, -7.5],
"to": [8, 2, 0.5],
"rotation": {"angle": -22.5, "axis": "y", "origin": [8, 1, 1.5]},
"faces": {
"north": {"uv": [6, 1.25, 6.25, 1.5], "texture": "#0"},
"east": {"uv": [4, 1.25, 6, 1.5], "texture": "#0"},
"south": {"uv": [6, 1, 6.25, 1.25], "texture": "#0"},
"west": {"uv": [4, 1, 6, 1.25], "texture": "#0"},
"up": {"uv": [3.25, 6, 3, 4], "rotation": 180, "texture": "#0"},
"down": {"uv": [3.5, 4, 3.25, 6], "rotation": 180, "texture": "#0"}
}
},
{
"from": [7, 1, -7.75],
"to": [8, 2, 0.25],
"rotation": {"angle": 22.5, "axis": "y", "origin": [8, 1, 1.25]},
"faces": {
"north": {"uv": [6, 1.75, 6.25, 2], "texture": "#0"},
"east": {"uv": [4, 1.75, 6, 2], "texture": "#0"},
"south": {"uv": [6, 1.5, 6.25, 1.75], "texture": "#0"},
"west": {"uv": [4, 1.5, 6, 1.75], "texture": "#0"},
"up": {"uv": [3.75, 6, 3.5, 4], "rotation": 180, "texture": "#0"},
"down": {"uv": [4, 4, 3.75, 6], "rotation": 180, "texture": "#0"}
}
}
],
"display": {
"thirdperson_righthand": {
"translation": [0.5, 6.75, -5]
},
"thirdperson_lefthand": {
"translation": [-0.5, 6.75, -5.25]
},
"firstperson_righthand": {
"translation": [-0.75, 8.75, -6]
},
"firstperson_lefthand": {
"translation": [-2.25, 6.5, -5]
},
"ground": {
"translation": [0, 8.25, 0]
},
"gui": {
"rotation": [26, 124, -3],
"translation": [-0.25, 1, 0],
"scale": [0.48, 0.48, 0.48]
},
"fixed": {
"rotation": [180, -90, 180],
"translation": [0, 1.25, 0],
"scale": [0.5, 0.5, 0.5]
}
},
"groups": [
{
"name": "group",
"origin": [0, 0, 0],
"color": 0,
"children": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 948 B

View File

@ -0,0 +1 @@
{"meta":{"format_version":"4.10","model_format":"java_block","box_uv":false},"name":"1911","parent":"","ambientocclusion":true,"front_gui_light":false,"visible_box":[1,1,0],"variable_placeholders":"","variable_placeholder_buttons":[],"unhandled_root_fields":{},"resolution":{"width":16,"height":16},"elements":[{"name":"cube","box_uv":false,"rescale":false,"locked":false,"light_emission":0,"render_order":"default","allow_mirror_modeling":true,"from":[7,5,7],"to":[9,10,9],"autouv":0,"color":6,"origin":[7,5,9],"faces":{"north":{"uv":[2,0,4,5],"texture":0},"east":{"uv":[4,0,6,5],"texture":0},"south":{"uv":[0,5,2,10],"texture":0},"west":{"uv":[0,0,2,5],"texture":0},"up":{"uv":[9,6,7,4],"rotation":270,"texture":0},"down":{"uv":[9,6,7,8],"rotation":90,"texture":0}},"type":"cube","uuid":"f7a7d3df-4d65-af56-50b9-0399fa6051ff"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"light_emission":0,"render_order":"default","allow_mirror_modeling":true,"from":[7,8,2],"to":[9,10,7],"autouv":0,"color":6,"origin":[7,10,7],"faces":{"north":{"uv":[7,8,9,10],"texture":0},"east":{"uv":[6,0,11,2],"texture":0},"south":{"uv":[2,9,4,11],"texture":0},"west":{"uv":[2,5,7,7],"texture":0},"up":{"uv":[11,4,6,2],"rotation":270,"texture":0},"down":{"uv":[7,7,2,9],"rotation":90,"texture":0}},"type":"cube","uuid":"be7a956e-877b-f0eb-4f22-dc52c69bda61"}],"outliner":[{"name":"group","origin":[7,5,7],"color":0,"uuid":"6ba8cac1-e6f6-5299-d3a0-e32836954692","export":true,"mirror_uv":false,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"selected":false,"children":["f7a7d3df-4d65-af56-50b9-0399fa6051ff","be7a956e-877b-f0eb-4f22-dc52c69bda61"]}],"textures":[{"path":"C:\\Users\\5gi\\AppData\\Roaming\\ModrinthApp\\profiles\\Fabulously Optimized\\resourcepacks\\giGuns Pack Java\\assets\\minecraft\\textures\\item\\1911.png","name":"1911.png","folder":"item","namespace":"minecraft","id":"0","group":"","width":16,"height":16,"uv_width":16,"uv_height":16,"particle":true,"use_as_default":false,"layers_enabled":false,"sync_to_project":"","render_mode":"default","render_sides":"auto","pbr_channel":"color","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"internal":true,"saved":true,"uuid":"2962ab16-1de3-39c6-1951-15f4d263db24","relative_path":"../assets/minecraft/textures/item/1911.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAHJJREFUOE/tkkEKwDAIBNfnePX/b/Ca57QoTZA0GtpboblswGXQVRKRAwBU1QQi4mqPmV1ba66qSqN4fagCzOYSMJtXXbwCRPAjgJnDeLfZO3iYshGy8D4C6LcBYJ9BYvYjKwEhvK15FXTaWrWVWPsBwAllyzoRXJqgwQAAAABJRU5ErkJggg=="}],"display":{"gui":{"rotation":[36,118,3],"translation":[4.25,0,0],"scale":[2,2,2]},"fixed":{"rotation":[0,-90,0],"translation":[-2.25,0,0]}}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"meta":{"format_version":"4.10","model_format":"java_block","box_uv":false},"name":"deserteagle","parent":"","ambientocclusion":true,"front_gui_light":false,"visible_box":[1,1,0],"variable_placeholders":"","variable_placeholder_buttons":[],"unhandled_root_fields":{},"resolution":{"width":32,"height":32},"elements":[{"name":"cube","box_uv":false,"rescale":false,"locked":false,"light_emission":0,"render_order":"default","allow_mirror_modeling":true,"from":[6,0,9],"to":[9,8,12],"autouv":0,"color":0,"origin":[7,0,9],"faces":{"north":{"uv":[6,6,9,14],"texture":0},"east":{"uv":[9,0,12,8],"texture":0},"south":{"uv":[9,8,12,16],"texture":0},"west":{"uv":[12,0,15,8],"texture":0},"up":{"uv":[3,17,0,14],"texture":0},"down":{"uv":[6,14,3,17],"texture":0}},"type":"cube","uuid":"9432b403-a440-cc05-1548-00375ae0f564"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"light_emission":0,"render_order":"default","allow_mirror_modeling":true,"from":[6,5,1],"to":[9,8,9],"autouv":0,"color":0,"origin":[7,5,9],"faces":{"north":{"uv":[12,8,15,11],"texture":0},"east":{"uv":[2,18,10,21],"texture":0},"south":{"uv":[12,11,15,14],"texture":0},"west":{"uv":[0,3,8,6],"texture":0},"up":{"uv":[3,14,0,6],"texture":0},"down":{"uv":[6,6,3,14],"texture":0}},"type":"cube","uuid":"043bfd91-bb96-7d98-4df0-fb6a8121329f"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"light_emission":0,"render_order":"default","allow_mirror_modeling":true,"from":[7,5,12],"to":[8,7,13],"autouv":0,"color":6,"origin":[6,5,12],"faces":{"north":{"uv":[22,30,23,32],"texture":0},"east":{"uv":[8,29,9,31],"texture":0},"south":{"uv":[5,27,6,29],"texture":0},"west":{"uv":[9,25,10,27],"texture":0},"up":{"uv":[3,29,4,30],"texture":0},"down":{"uv":[10,29,11,30],"texture":0}},"type":"cube","uuid":"55146815-efc9-57ad-b33e-0e095e299858"},{"name":"cube","box_uv":false,"rescale":false,"locked":false,"light_emission":0,"render_order":"default","allow_mirror_modeling":true,"from":[7,3,8],"to":[8,5,9],"autouv":0,"color":6,"origin":[6,3,8],"faces":{"north":{"uv":[11,17,12,19],"texture":0},"east":{"uv":[13,30,14,32],"texture":0},"south":{"uv":[13,24,14,26],"texture":0},"west":{"uv":[17,24,18,26],"texture":0},"up":{"uv":[16,17,17,18],"texture":0},"down":{"uv":[7,16.75,8,17.75],"texture":0}},"type":"cube","uuid":"d0a54ad3-f649-c932-cbe8-a587020d27e5"}],"outliner":[{"name":"group","origin":[8,8,8],"color":0,"uuid":"f63ee920-90a3-3e94-9fa2-3d6f244a1751","export":true,"mirror_uv":false,"isOpen":true,"locked":false,"visibility":true,"autouv":0,"selected":false,"children":["043bfd91-bb96-7d98-4df0-fb6a8121329f","9432b403-a440-cc05-1548-00375ae0f564","55146815-efc9-57ad-b33e-0e095e299858","d0a54ad3-f649-c932-cbe8-a587020d27e5"]}],"textures":[{"path":"C:\\Users\\5gi\\AppData\\Roaming\\ModrinthApp\\profiles\\Fabulously Optimized\\resourcepacks\\giGuns Pack Java\\assets\\minecraft\\textures\\item\\deserteagle.png","name":"deserteagle.png","folder":"item","namespace":"minecraft","id":"0","group":"","width":32,"height":32,"uv_width":32,"uv_height":32,"particle":true,"use_as_default":false,"layers_enabled":false,"sync_to_project":"","render_mode":"default","render_sides":"auto","pbr_channel":"color","frame_time":1,"frame_order_type":"loop","frame_order":"","frame_interpolate":false,"visible":true,"internal":true,"saved":true,"uuid":"00443fca-0043-fa91-ff59-fb4c130b7023","relative_path":"../assets/minecraft/textures/item/deserteagle.png","source":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAQhJREFUWEftlssNgzAMhuHeHbpAuk1myByeIzNkgO7QY3PpsTv0ThWpRA5yEtM4BakgIQEm9sfvBxkBYBoKBwCMuXeCrbSWY8s6nxcfAEEBpRSZJu/9b1LwPwD35ysW7uV8itfOObKgxVOwW4BcP4vPAazA43aNcbXWCQMADJ9Ttgu4AHhIcaZd6Z1kEuYAsAOJwsP+DoBEAdzvWGo8CbumYLcArZVe7IKS0RgzWWtjry/vJcCic87OaHMAiS9e+lilQFeAHs45Ppt/JpwgX3dBq3POehEFWrqDBVALULM3p6AlQC0NpAI9A2bnADZsBkAFnp/1gqoWIRU4/DckdsRB9SoAVUSSAG9Nb+UhRsq7nAAAAABJRU5ErkJggg=="}],"display":{"thirdperson_righthand":{"translation":[0.5,3.5,0]},"thirdperson_lefthand":{"translation":[-0.5,3.5,0]},"firstperson_righthand":{"translation":[0,6,0]},"firstperson_lefthand":{"translation":[0,2.75,0]},"ground":{"translation":[0,5.25,0]},"gui":{"rotation":[35,126,-5],"translation":[0,2.75,0]},"fixed":{"rotation":[180,-90,180],"translation":[-0.5,2.25,0]}}}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,6 @@
{
"pack": {
"pack_format": 46,
"description": "The texture pack for the giGuns spigot plugin"
}
}

View File

@ -0,0 +1,8 @@
- Blank pack -
Custom models
This pack contains a few files to help you create custom models.
Tips :
- You can use custom_model_data for blocks, but only for their model in the inventory ("item" folder)
- Be careful, custom_model_data doesn't support a 0 at the start (01200007 is not a valid data)

View File

@ -3,5 +3,5 @@ version: '1.0.0'
main: com.s5gi.giGuns.giGuns main: com.s5gi.giGuns.giGuns
api-version: '1.21' api-version: '1.21'
commands: commands:
hekateII: getgun:
description: gun description: gun