Skip to content

Commit

Permalink
Time for me to lock in
Browse files Browse the repository at this point in the history
  • Loading branch information
Stunf committed Aug 8, 2024
1 parent 4db4aa8 commit 2129837
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/nexia/core/games/util/LobbyUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ public static void giveItems(NexiaPlayer player) {


com.nexia.nexus.api.world.item.ItemStack queueSword = com.nexia.nexus.api.world.item.ItemStack.create(Minecraft.Item.IRON_SWORD);
queueSword.setItemNBT(hideAttrubtesNBTObject.copy());
queueSword.setItemNBT(unbreakableNBTObject.copy());
queueSword.setLore(new ArrayList<>(Arrays.asList(
Component.text("Right click to open the queue menu.", ChatFormat.Minecraft.gray).decoration(ChatFormat.italic, false),
Component.text("Hit a player to duel them.", ChatFormat.Minecraft.gray).decoration(ChatFormat.italic, false)
Expand All @@ -150,7 +150,7 @@ public static void giveItems(NexiaPlayer player) {


com.nexia.nexus.api.world.item.ItemStack teamSword = com.nexia.nexus.api.world.item.ItemStack.create(Minecraft.Item.IRON_AXE);
teamSword.setItemNBT(hideAttrubtesNBTObject.copy());
teamSword.setItemNBT(unbreakableNBTObject.copy());
teamSword.setLore(new ArrayList<>(Arrays.asList(
Component.text("Right click to list the team you're in.", ChatFormat.Minecraft.gray).decoration(ChatFormat.italic, false),
Component.text("Hit a player to invite them to your team.", ChatFormat.Minecraft.gray).decoration(ChatFormat.italic, false)
Expand All @@ -159,7 +159,7 @@ public static void giveItems(NexiaPlayer player) {


com.nexia.nexus.api.world.item.ItemStack customDuelSword = com.nexia.nexus.api.world.item.ItemStack.create(Minecraft.Item.DIAMOND_SWORD);
customDuelSword.setItemNBT(hideAttrubtesNBTObject.copy());
customDuelSword.setItemNBT(unbreakableNBTObject.copy());
customDuelSword.setLore(Component.text("Hit a player to duel them in your custom kit.", ChatFormat.Minecraft.gray).decoration(ChatFormat.italic, false));
customDuelSword.setDisplayName(Component.text("Custom Duel Sword", ChatFormat.Minecraft.yellow).decoration(ChatFormat.italic, false));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void knockback(float f, double d, double e) {
instance.hasImpulse = true;
Vec3 vec3 = instance.getDeltaMovement();
Vec3 vec32 = (new Vec3(d, 0.0, e)).normalize().scale(f);
instance.setDeltaMovement(vec3.x / 2.0 - vec32.x, instance.isOnGround() ? Math.min(0.4, (double)f * 0.75) : Math.min(0.4, vec3.y + (double)f * 0.5),vec3.z / 2.5 - vec32.z);
instance.setDeltaMovement(vec3.x / 2.0 - vec32.x, instance.isOnGround() ? Math.min(0.4, (double)f * 0.75) : Math.min(0.4, vec3.y + (double)f * 0.5),vec3.z / 2.0 - vec32.z);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ private void playEquipSoundForClient(ServerPlayer player, ItemStack itemStack) {
soundEvent = SoundEvents.ARMOR_EQUIP_ELYTRA;
}

//player.playSound(soundEvent, 1.0F, 1.0F);
player.connection.send(new ClientboundSoundPacket(soundEvent, player.getSoundSource(),
player.position().x, player.position().y, player.position().z, 16f * 1.0F, 1.0F));
player.position().x, player.position().y, player.position().z, 16f, 1.0F));
}
}

Expand All @@ -52,7 +51,7 @@ public void use(Level level, Player player, InteractionHand interactionHand, Cal
ItemStack itemStack = player.getItemInHand(interactionHand);
EquipmentSlot equipmentSlot = Mob.getEquipmentSlotForItem(itemStack);
ItemStack itemStack2 = player.getItemBySlot(equipmentSlot);
if ((EnchantmentHelper.hasBindingCurse(itemStack2) && !player.isCreative()) || ItemStack.matches(itemStack, itemStack2)) {
if (EnchantmentHelper.hasBindingCurse(itemStack2) && !player.isCreative() || ItemStack.matches(itemStack, itemStack2)) {
cir.setReturnValue(InteractionResultHolder.fail(itemStack));
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class WorldUtil {
.setGameRule(GameRules.RULE_WEATHER_CYCLE, false)
.setGameRule(GameRules.RULE_DAYLIGHT, false)
.setGameRule(GameRules.RULE_DO_IMMEDIATE_RESPAWN, false)
.setGameRule(GameRules.RULE_DOMOBLOOT, false)
.setGameRule(GameRules.RULE_DOMOBSPAWNING, false)
.setGameRule(GameRules.RULE_SHOWDEATHMESSAGES, true)
.setGameRule(GameRules.RULE_SPAWN_RADIUS, 0);
Expand Down

0 comments on commit 2129837

Please sign in to comment.