Giant frying pan
Many fixes Boogaloo prep Underside eye stars and moon Commanded vfx effect icons fabric crash fixes
No files matched your search
@@ -0,0 +1,30 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
## Unreleased
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Restored Elythia Cloud Sea biome selection through a lightweight custom biome source.
|
||||||
|
- Added explicit Architectury API dependency declarations and installation documentation.
|
||||||
|
- Added Russian localization credit for suheckii.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Elythia Cloud Sea selection now begins at the distinct high-altitude threshold of Y=250.
|
||||||
|
- Permanent portal destination searches now use dimension-type coordinate scaling and a wider active-portal search radius.
|
||||||
|
- Permanent portal frames now include their corner blocks.
|
||||||
|
- Fabric keybinding conflict handling now synchronizes both held state and press-edge state for sprint when it shares a key with Antarchy mount actions.
|
||||||
|
- Removed terrain-height variance requirements from the Tiger’s Eye shrine so it can generate in Cavaryn’s irregular underground terrain.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- Queen boss music now uses a server-synchronized combat state so it can start reliably on clients during the fight.
|
||||||
|
- NeoForge creative-tab population now ignores non-vanilla namespaces when augmenting vanilla tabs.
|
||||||
|
|
||||||
|
### Verification pending
|
||||||
|
|
||||||
|
- Fresh-world Cloud Sea and Stratoshark generation.
|
||||||
|
- Permanent portal linking in both directions and complete frame detection.
|
||||||
|
- Queen music start, stop, restart, and reconnect behavior.
|
||||||
|
- Fabric toggle sprint while riding Dorrie or Hercules Beetle with shared keybindings.
|
||||||
|
- Tiger’s Eye shrine generation and `/locate structure antarchy:tigers_eye_shrine` in a fresh Cavaryn world.
|
||||||
@@ -10,6 +10,19 @@ allprojects {
|
|||||||
group = rootProject.maven_group
|
group = rootProject.maven_group
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
// CurseForge Maven artifacts must be resolved from CurseMaven. The
|
||||||
|
// Fabric repository does not proxy these coordinates reliably and can
|
||||||
|
// prevent Gradle from reaching the working repository.
|
||||||
|
maven {
|
||||||
|
name = "CurseMaven"
|
||||||
|
url = "https://www.cursemaven.com"
|
||||||
|
metadataSources {
|
||||||
|
artifact()
|
||||||
|
}
|
||||||
|
content {
|
||||||
|
includeGroupByRegex "curse\\.maven"
|
||||||
|
}
|
||||||
|
}
|
||||||
maven { url "https://maven.fabricmc.net/" }
|
maven { url "https://maven.fabricmc.net/" }
|
||||||
maven { url "https://maven.neoforged.net/releases" }
|
maven { url "https://maven.neoforged.net/releases" }
|
||||||
maven { url "https://maven.architectury.dev/" }
|
maven { url "https://maven.architectury.dev/" }
|
||||||
@@ -36,7 +49,6 @@ allprojects {
|
|||||||
maven { url "https://maven.shedaniel.me" }
|
maven { url "https://maven.shedaniel.me" }
|
||||||
maven { url "https://maven.terraformersmc.com/releases/" }
|
maven { url "https://maven.terraformersmc.com/releases/" }
|
||||||
maven { url "https://jitpack.io" }
|
maven { url "https://jitpack.io" }
|
||||||
maven { url "https://www.cursemaven.com" }
|
|
||||||
maven { url "https://api.modrinth.com/maven/" }
|
maven { url "https://api.modrinth.com/maven/" }
|
||||||
maven { url "https://maven.blamejared.com" }
|
maven { url "https://maven.blamejared.com" }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import net.minecraft.core.BlockPos;
|
|||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.server.level.ServerLevel;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
import net.minecraft.util.RandomSource;
|
import net.minecraft.util.RandomSource;
|
||||||
|
|
||||||
public interface InfinityCompatBridge {
|
public interface InfinityCompatBridge {
|
||||||
@@ -26,6 +27,10 @@ public interface InfinityCompatBridge {
|
|||||||
return InfinityWarpResult.REJECTED;
|
return InfinityWarpResult.REJECTED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
default InfinityWarpResult requestDimensionCreation(MinecraftServer server, ResourceLocation dimensionId) {
|
||||||
|
return InfinityWarpResult.REJECTED;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Converts an already-ignited vanilla Nether portal frame at {@code anyPortalBlockPos} into a real, permanent
|
* Converts an already-ignited vanilla Nether portal frame at {@code anyPortalBlockPos} into a real, permanent
|
||||||
* Infinite Dimensions portal to {@code dimensionId}, generating the dimension first if it doesn't exist yet.
|
* Infinite Dimensions portal to {@code dimensionId}, generating the dimension first if it doesn't exist yet.
|
||||||
|
|||||||
@@ -156,6 +156,7 @@ public final class AntarchyConfigCatalog {
|
|||||||
private static boolean isToolSetting(String name) {
|
private static boolean isToolSetting(String name) {
|
||||||
return name.equals("sizeChangingRaysEnabled")
|
return name.equals("sizeChangingRaysEnabled")
|
||||||
|| name.startsWith("sizeRay")
|
|| name.startsWith("sizeRay")
|
||||||
|
|| name.startsWith("temporalTuner")
|
||||||
|| name.equals("shrinkingPotionDelta")
|
|| name.equals("shrinkingPotionDelta")
|
||||||
|| name.equals("growthPotionDelta")
|
|| name.equals("growthPotionDelta")
|
||||||
|| name.startsWith("ultimate")
|
|| name.startsWith("ultimate")
|
||||||
|
|||||||
@@ -30,6 +30,8 @@ public final class AntarchySettings {
|
|||||||
private static double sizeRayMinScale = 0.1D;
|
private static double sizeRayMinScale = 0.1D;
|
||||||
private static double sizeRayMaxScale = 10.0D;
|
private static double sizeRayMaxScale = 10.0D;
|
||||||
private static double sizeRayDeltaPerHit = 0.25D;
|
private static double sizeRayDeltaPerHit = 0.25D;
|
||||||
|
private static double temporalTunerMinRate = 0.1D;
|
||||||
|
private static double temporalTunerMaxRate = 3.0D;
|
||||||
private static double shrinkingPotionDelta = 0.3D;
|
private static double shrinkingPotionDelta = 0.3D;
|
||||||
private static double growthPotionDelta = 0.5D;
|
private static double growthPotionDelta = 0.5D;
|
||||||
private static double antDanceRadius = 5.0D;
|
private static double antDanceRadius = 5.0D;
|
||||||
@@ -229,6 +231,7 @@ public final class AntarchySettings {
|
|||||||
private static double royalAssailantLeggingsDoubleDamageChance = 0.07D;
|
private static double royalAssailantLeggingsDoubleDamageChance = 0.07D;
|
||||||
private static double royalAssailantBootsDoubleDamageChance = 0.05D;
|
private static double royalAssailantBootsDoubleDamageChance = 0.05D;
|
||||||
private static double royalGuardianSwordAttackDamage = 111.0D;
|
private static double royalGuardianSwordAttackDamage = 111.0D;
|
||||||
|
private static double giantFryingPanAttackDamage = 80.0D;
|
||||||
private static double royalGuardianSwordAttackSpeed = -2.5D;
|
private static double royalGuardianSwordAttackSpeed = -2.5D;
|
||||||
private static int royalGuardianSwordElementalCooldownTicks = 120;
|
private static int royalGuardianSwordElementalCooldownTicks = 120;
|
||||||
private static double royalGuardianSwordFirePrimaryDamage = 22.0D;
|
private static double royalGuardianSwordFirePrimaryDamage = 22.0D;
|
||||||
@@ -758,6 +761,14 @@ public final class AntarchySettings {
|
|||||||
return sizeRayDeltaPerHit;
|
return sizeRayDeltaPerHit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static double temporalTunerMinRate() {
|
||||||
|
return temporalTunerMinRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double temporalTunerMaxRate() {
|
||||||
|
return temporalTunerMaxRate;
|
||||||
|
}
|
||||||
|
|
||||||
public static double shrinkingPotionDelta() {
|
public static double shrinkingPotionDelta() {
|
||||||
return shrinkingPotionDelta;
|
return shrinkingPotionDelta;
|
||||||
}
|
}
|
||||||
@@ -1385,6 +1396,14 @@ public final class AntarchySettings {
|
|||||||
sizeRayDeltaPerHit = value;
|
sizeRayDeltaPerHit = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setTemporalTunerMinRate(double value) {
|
||||||
|
temporalTunerMinRate = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setTemporalTunerMaxRate(double value) {
|
||||||
|
temporalTunerMaxRate = value;
|
||||||
|
}
|
||||||
|
|
||||||
public static void setShrinkingPotionDelta(double value) {
|
public static void setShrinkingPotionDelta(double value) {
|
||||||
shrinkingPotionDelta = value;
|
shrinkingPotionDelta = value;
|
||||||
}
|
}
|
||||||
@@ -2041,6 +2060,8 @@ public final class AntarchySettings {
|
|||||||
|
|
||||||
public static double royalGuardianSwordAttackDamage() { return royalGuardianSwordAttackDamage; }
|
public static double royalGuardianSwordAttackDamage() { return royalGuardianSwordAttackDamage; }
|
||||||
public static void setRoyalGuardianSwordAttackDamage(double v) { royalGuardianSwordAttackDamage = v; }
|
public static void setRoyalGuardianSwordAttackDamage(double v) { royalGuardianSwordAttackDamage = v; }
|
||||||
|
public static double giantFryingPanAttackDamage() { return giantFryingPanAttackDamage; }
|
||||||
|
public static void setGiantFryingPanAttackDamage(double v) { giantFryingPanAttackDamage = v; }
|
||||||
|
|
||||||
public static double royalGuardianSwordAttackSpeed() { return royalGuardianSwordAttackSpeed; }
|
public static double royalGuardianSwordAttackSpeed() { return royalGuardianSwordAttackSpeed; }
|
||||||
public static void setRoyalGuardianSwordAttackSpeed(double v) { royalGuardianSwordAttackSpeed = v; }
|
public static void setRoyalGuardianSwordAttackSpeed(double v) { royalGuardianSwordAttackSpeed = v; }
|
||||||
|
|||||||
@@ -210,6 +210,8 @@ public final class AntarchyObjects {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static Supplier<MenuType<com.craisinlord.antarchy.content.menu.RoyalJudgmentMenu>> ROYAL_JUDGMENT_MENU = (Supplier<MenuType<com.craisinlord.antarchy.content.menu.RoyalJudgmentMenu>>) UNBOUND;
|
public static Supplier<MenuType<com.craisinlord.antarchy.content.menu.RoyalJudgmentMenu>> ROYAL_JUDGMENT_MENU = (Supplier<MenuType<com.craisinlord.antarchy.content.menu.RoyalJudgmentMenu>>) UNBOUND;
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
public static Supplier<MenuType<com.craisinlord.antarchy.content.menu.GiantFryingPanMenu>> GIANT_FRYING_PAN_MENU = (Supplier<MenuType<com.craisinlord.antarchy.content.menu.GiantFryingPanMenu>>) UNBOUND;
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public static Supplier<net.minecraft.world.item.Item> CHEEP_ITEM = (Supplier<net.minecraft.world.item.Item>) UNBOUND;
|
public static Supplier<net.minecraft.world.item.Item> CHEEP_ITEM = (Supplier<net.minecraft.world.item.Item>) UNBOUND;
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static Supplier<Block> DUPLICATOR_LOG = (Supplier<Block>) UNBOUND;
|
public static Supplier<Block> DUPLICATOR_LOG = (Supplier<Block>) UNBOUND;
|
||||||
@@ -321,6 +323,10 @@ public final class AntarchyObjects {
|
|||||||
public static Supplier<Holder<MobEffect>> GLIMMERING_EFFECT = (Supplier<Holder<MobEffect>>) UNBOUND;
|
public static Supplier<Holder<MobEffect>> GLIMMERING_EFFECT = (Supplier<Holder<MobEffect>>) UNBOUND;
|
||||||
public static Supplier<Holder<MobEffect>> ROYAL_VITALITY_PENALTY_EFFECT = (Supplier<Holder<MobEffect>>) UNBOUND;
|
public static Supplier<Holder<MobEffect>> ROYAL_VITALITY_PENALTY_EFFECT = (Supplier<Holder<MobEffect>>) UNBOUND;
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
|
public static Supplier<Holder<MobEffect>> BLEEDING_EFFECT = (Supplier<Holder<MobEffect>>) UNBOUND;
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
public static Supplier<Holder<MobEffect>> BLOOD_MOON_EFFECT = (Supplier<Holder<MobEffect>>) UNBOUND;
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public static Supplier<Fluid> LUMEN = (Supplier<Fluid>) UNBOUND;
|
public static Supplier<Fluid> LUMEN = (Supplier<Fluid>) UNBOUND;
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static Supplier<Fluid> FLOWING_LUMEN = (Supplier<Fluid>) UNBOUND;
|
public static Supplier<Fluid> FLOWING_LUMEN = (Supplier<Fluid>) UNBOUND;
|
||||||
@@ -824,6 +830,14 @@ public final class AntarchyObjects {
|
|||||||
ROYAL_VITALITY_PENALTY_EFFECT = supplier;
|
ROYAL_VITALITY_PENALTY_EFFECT = supplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setBleedingEffect(Supplier<Holder<MobEffect>> supplier) {
|
||||||
|
BLEEDING_EFFECT = supplier;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void setBloodMoonEffect(Supplier<Holder<MobEffect>> supplier) {
|
||||||
|
BLOOD_MOON_EFFECT = supplier;
|
||||||
|
}
|
||||||
|
|
||||||
public static void setElka(Supplier<EntityType<com.craisinlord.antarchy.content.entity.ElkaEntity>> supplier) {
|
public static void setElka(Supplier<EntityType<com.craisinlord.antarchy.content.entity.ElkaEntity>> supplier) {
|
||||||
ELKA = supplier;
|
ELKA = supplier;
|
||||||
}
|
}
|
||||||
@@ -916,6 +930,10 @@ public final class AntarchyObjects {
|
|||||||
ROYAL_JUDGMENT_MENU = supplier;
|
ROYAL_JUDGMENT_MENU = supplier;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void setGiantFryingPanMenu(Supplier<MenuType<com.craisinlord.antarchy.content.menu.GiantFryingPanMenu>> supplier) {
|
||||||
|
GIANT_FRYING_PAN_MENU = supplier;
|
||||||
|
}
|
||||||
|
|
||||||
public static void setAmericanComponent(Supplier<net.minecraft.core.component.DataComponentType<net.minecraft.util.Unit>> supplier) {
|
public static void setAmericanComponent(Supplier<net.minecraft.core.component.DataComponentType<net.minecraft.util.Unit>> supplier) {
|
||||||
AMERICAN_COMPONENT = supplier;
|
AMERICAN_COMPONENT = supplier;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ public final class UnderVaultBlockEntity extends BlockEntity {
|
|||||||
@Override
|
@Override
|
||||||
protected void loadAdditional(CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) {
|
protected void loadAdditional(CompoundTag tag, net.minecraft.core.HolderLookup.Provider registries) {
|
||||||
vaultData.loadCustomOnly(tag, registries);
|
vaultData.loadCustomOnly(tag, registries);
|
||||||
|
vaultData.setConfig(createConfig());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.craisinlord.antarchy.content.client;
|
package com.craisinlord.antarchy.content.client;
|
||||||
|
|
||||||
import com.craisinlord.antarchy.content.effect.RoyalEffectHooks;
|
import com.craisinlord.antarchy.content.effect.RoyalEffectHooks;
|
||||||
|
import com.craisinlord.antarchy.content.item.TemporalTunerItem;
|
||||||
|
import com.craisinlord.antarchy.content.time.TimeDilationApi;
|
||||||
import java.util.ArrayDeque;
|
import java.util.ArrayDeque;
|
||||||
import java.util.Deque;
|
import java.util.Deque;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@@ -22,22 +24,19 @@ public final class ContractionAfterimages {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void tick(ClientLevel level) {
|
public static void tick(ClientLevel level) {
|
||||||
Holder<MobEffect> holder = RoyalEffectHooks.contractedHolder();
|
|
||||||
int now = (int) (level.getGameTime() & 0x7fffffffL);
|
int now = (int) (level.getGameTime() & 0x7fffffffL);
|
||||||
|
|
||||||
Iterator<Map.Entry<LivingEntity, Deque<Sample>>> iterator = HISTORY.entrySet().iterator();
|
Iterator<Map.Entry<LivingEntity, Deque<Sample>>> iterator = HISTORY.entrySet().iterator();
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
LivingEntity tracked = iterator.next().getKey();
|
LivingEntity tracked = iterator.next().getKey();
|
||||||
if (tracked == null || holder == null || tracked.isRemoved() || !tracked.isAlive()
|
if (tracked == null || tracked.isRemoved() || !tracked.isAlive() || !isActive(tracked)) {
|
||||||
|| !tracked.hasEffect(holder)) {
|
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void observe(LivingEntity living) {
|
public static void observe(LivingEntity living) {
|
||||||
Holder<MobEffect> holder = RoyalEffectHooks.contractedHolder();
|
if (!isActive(living)) {
|
||||||
if (holder == null || living.isInvisible() || !living.hasEffect(holder)) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
int now = (int) (living.level().getGameTime() & 0x7fffffffL);
|
int now = (int) (living.level().getGameTime() & 0x7fffffffL);
|
||||||
@@ -52,6 +51,15 @@ public final class ContractionAfterimages {
|
|||||||
return HISTORY.get(entity);
|
return HISTORY.get(entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean isActive(LivingEntity living) {
|
||||||
|
Holder<MobEffect> holder = RoyalEffectHooks.contractedHolder();
|
||||||
|
boolean contracted = holder != null && living.hasEffect(holder);
|
||||||
|
boolean tuned = living instanceof net.minecraft.world.entity.player.Player player
|
||||||
|
&& TemporalTunerItem.isAvailable(player)
|
||||||
|
&& TimeDilationApi.getRate(living) > 1.0D;
|
||||||
|
return !living.isInvisible() && (contracted || tuned);
|
||||||
|
}
|
||||||
|
|
||||||
public static float fade(Sample sample, int now) {
|
public static float fade(Sample sample, int now) {
|
||||||
float elapsed = now - sample.recordedTick;
|
float elapsed = now - sample.recordedTick;
|
||||||
return Math.max(0.0F, 1.0F - elapsed / SAMPLE_LIFETIME_TICKS);
|
return Math.max(0.0F, 1.0F - elapsed / SAMPLE_LIFETIME_TICKS);
|
||||||
|
|||||||
@@ -0,0 +1,50 @@
|
|||||||
|
package com.craisinlord.antarchy.content.client.renderer;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.content.item.GiantFryingPanItem;
|
||||||
|
import com.craisinlord.antarchy.content.item.GiantFryingPanStorage;
|
||||||
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.MultiBufferSource;
|
||||||
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import software.bernie.geckolib.cache.object.BakedGeoModel;
|
||||||
|
import software.bernie.geckolib.model.GeoModel;
|
||||||
|
import software.bernie.geckolib.renderer.GeoItemRenderer;
|
||||||
|
|
||||||
|
public final class GiantFryingPanRenderer extends GeoItemRenderer<GiantFryingPanItem> {
|
||||||
|
public GiantFryingPanRenderer(GeoModel<GiantFryingPanItem> model) {
|
||||||
|
super(model);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void actuallyRender(
|
||||||
|
PoseStack poseStack,
|
||||||
|
GiantFryingPanItem animatable,
|
||||||
|
BakedGeoModel model,
|
||||||
|
net.minecraft.client.renderer.RenderType renderType,
|
||||||
|
MultiBufferSource bufferSource,
|
||||||
|
com.mojang.blaze3d.vertex.VertexConsumer buffer,
|
||||||
|
boolean isReRender,
|
||||||
|
float partialTick,
|
||||||
|
int packedLight,
|
||||||
|
int packedOverlay,
|
||||||
|
int colour
|
||||||
|
) {
|
||||||
|
super.actuallyRender(poseStack, animatable, model, renderType, bufferSource, buffer, isReRender, partialTick, packedLight, packedOverlay, colour);
|
||||||
|
if (isReRender || this.renderPerspective == ItemDisplayContext.GUI) return;
|
||||||
|
ItemStack pan = this.getCurrentItemStack();
|
||||||
|
if (!(Minecraft.getInstance().player instanceof net.minecraft.world.entity.player.Player player)) return;
|
||||||
|
GiantFryingPanStorage storage = new GiantFryingPanStorage(pan, player);
|
||||||
|
for (int slot = 0; slot < GiantFryingPanStorage.SLOT_COUNT; slot++) {
|
||||||
|
ItemStack stack = storage.getItem(slot);
|
||||||
|
if (stack.isEmpty()) continue;
|
||||||
|
int row = slot / 3;
|
||||||
|
int column = slot % 3;
|
||||||
|
poseStack.pushPose();
|
||||||
|
poseStack.translate((column - 1) * 0.42D, 1.72D, (row - 1) * 0.42D);
|
||||||
|
poseStack.scale(0.24F, 0.24F, 0.24F);
|
||||||
|
Minecraft.getInstance().getItemRenderer().renderStatic(stack, ItemDisplayContext.FIXED, packedLight, packedOverlay, poseStack, bufferSource, Minecraft.getInstance().level, 0);
|
||||||
|
poseStack.popPose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,10 +3,15 @@ package com.craisinlord.antarchy.content.client.renderer;
|
|||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||||
import net.minecraft.client.renderer.MultiBufferSource;
|
import net.minecraft.client.renderer.MultiBufferSource;
|
||||||
|
import net.minecraft.client.renderer.LightTexture;
|
||||||
import net.minecraft.client.renderer.RenderType;
|
import net.minecraft.client.renderer.RenderType;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
|
||||||
public final class RoyalIndicatorRenderer {
|
public final class RoyalIndicatorRenderer {
|
||||||
|
private static final ResourceLocation COMMANDED_CROWN_TEXTURE = ResourceLocation.fromNamespaceAndPath(
|
||||||
|
com.craisinlord.antarchy.Antarchy.MODID, "textures/vfx/commanded_vfx_side.png");
|
||||||
|
|
||||||
private RoyalIndicatorRenderer() {
|
private RoyalIndicatorRenderer() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -25,7 +30,7 @@ public final class RoyalIndicatorRenderer {
|
|||||||
|
|
||||||
if (commanded) {
|
if (commanded) {
|
||||||
ring(lines, pose, radius, spin, 0.95F, 0.63F, 0.10F, 0.95F, 36);
|
ring(lines, pose, radius, spin, 0.95F, 0.63F, 0.10F, 0.95F, 36);
|
||||||
crownPoints(lines, pose, radius, spin, 1.0F, 0.80F, 0.22F, 0.95F);
|
crownTexture(poseStack, buffers, LightTexture.FULL_BRIGHT, radius, spin);
|
||||||
}
|
}
|
||||||
if (judged) {
|
if (judged) {
|
||||||
float markY = commanded ? -0.13F : 0.08F;
|
float markY = commanded ? -0.13F : 0.08F;
|
||||||
@@ -48,23 +53,38 @@ public final class RoyalIndicatorRenderer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void crownPoints(VertexConsumer out, PoseStack.Pose pose, float radius, float rotation,
|
private static void crownTexture(PoseStack poseStack, MultiBufferSource buffers, int packedLight,
|
||||||
float r, float g, float b, float a) {
|
float radius, float rotation) {
|
||||||
final int spikes = 5;
|
VertexConsumer crown = buffers.getBuffer(RenderType.entityTranslucentEmissive(COMMANDED_CROWN_TEXTURE));
|
||||||
float innerRadius = radius * 0.72F;
|
float halfWidth = radius * 0.78F;
|
||||||
for (int i = 0; i < spikes; i++) {
|
float bottom = 0.02F;
|
||||||
double outerAngle = rotation + Math.PI * 2.0D * i / spikes;
|
float top = 0.40F;
|
||||||
double innerAngle = rotation + Math.PI * 2.0D * (i + 0.5D) / spikes;
|
|
||||||
float outerX = (float) Math.cos(outerAngle) * radius;
|
poseStack.pushPose();
|
||||||
float outerZ = (float) Math.sin(outerAngle) * radius;
|
poseStack.mulPose(com.mojang.math.Axis.YP.rotation(rotation));
|
||||||
float innerX = (float) Math.cos(innerAngle) * innerRadius;
|
for (int side = 0; side < 4; side++) {
|
||||||
float innerZ = (float) Math.sin(innerAngle) * innerRadius;
|
poseStack.pushPose();
|
||||||
float nextOuterX = (float) Math.cos(rotation + Math.PI * 2.0D * (i + 1) / spikes) * radius;
|
poseStack.mulPose(com.mojang.math.Axis.YP.rotationDegrees(side * 90.0F));
|
||||||
float nextOuterZ = (float) Math.sin(rotation + Math.PI * 2.0D * (i + 1) / spikes) * radius;
|
PoseStack.Pose pose = poseStack.last();
|
||||||
line(out, pose, outerX, 0.0F, outerZ, innerX, 0.34F, innerZ, r, g, b, a);
|
quad(crown, pose, -halfWidth, bottom, halfWidth, top, halfWidth, packedLight);
|
||||||
line(out, pose, innerX, 0.34F, innerZ, nextOuterX, 0.0F, nextOuterZ, r, g, b, a);
|
poseStack.popPose();
|
||||||
line(out, pose, outerX, 0.0F, outerZ, nextOuterX, 0.0F, nextOuterZ, r, g, b, a);
|
|
||||||
}
|
}
|
||||||
|
poseStack.popPose();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void quad(VertexConsumer out, PoseStack.Pose pose, float left, float bottom,
|
||||||
|
float right, float top, float depth, int packedLight) {
|
||||||
|
out.addVertex(pose, left, bottom, depth).setUv(0.0F, 1.0F).setOverlay(0).setLight(packedLight).setNormal(pose, 0.0F, 0.0F, 1.0F);
|
||||||
|
out.addVertex(pose, right, bottom, depth).setUv(1.0F, 1.0F).setOverlay(0).setLight(packedLight).setNormal(pose, 0.0F, 0.0F, 1.0F);
|
||||||
|
out.addVertex(pose, right, top, depth).setUv(1.0F, 0.0F).setOverlay(0).setLight(packedLight).setNormal(pose, 0.0F, 0.0F, 1.0F);
|
||||||
|
out.addVertex(pose, left, top, depth).setUv(0.0F, 0.0F).setOverlay(0).setLight(packedLight).setNormal(pose, 0.0F, 0.0F, 1.0F);
|
||||||
|
|
||||||
|
// Emit the reverse winding as well. The crown is viewed from every angle, and
|
||||||
|
// a single-sided quad can vanish when the renderer's culling state rejects it.
|
||||||
|
out.addVertex(pose, left, top, depth).setUv(0.0F, 0.0F).setOverlay(0).setLight(packedLight).setNormal(pose, 0.0F, 0.0F, -1.0F);
|
||||||
|
out.addVertex(pose, right, top, depth).setUv(1.0F, 0.0F).setOverlay(0).setLight(packedLight).setNormal(pose, 0.0F, 0.0F, -1.0F);
|
||||||
|
out.addVertex(pose, right, bottom, depth).setUv(1.0F, 1.0F).setOverlay(0).setLight(packedLight).setNormal(pose, 0.0F, 0.0F, -1.0F);
|
||||||
|
out.addVertex(pose, left, bottom, depth).setUv(0.0F, 1.0F).setOverlay(0).setLight(packedLight).setNormal(pose, 0.0F, 0.0F, -1.0F);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void brackets(VertexConsumer out, PoseStack.Pose pose, float radius, float rotation) {
|
private static void brackets(VertexConsumer out, PoseStack.Pose pose, float radius, float rotation) {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.craisinlord.antarchy.content.client.renderer;
|
package com.craisinlord.antarchy.content.client.renderer;
|
||||||
|
|
||||||
import com.craisinlord.antarchy.content.client.ContractionAfterimages;
|
import com.craisinlord.antarchy.content.client.ContractionAfterimages;
|
||||||
import com.craisinlord.antarchy.content.effect.RoyalEffectHooks;
|
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||||
import java.util.Deque;
|
import java.util.Deque;
|
||||||
@@ -30,8 +29,7 @@ public final class TemporalContractionAfterimageLayer<T extends LivingEntity, M
|
|||||||
public void render(PoseStack poseStack, MultiBufferSource buffer, int packedLight, T entity,
|
public void render(PoseStack poseStack, MultiBufferSource buffer, int packedLight, T entity,
|
||||||
float limbSwing, float limbSwingAmount, float partialTick, float ageInTicks, float netHeadYaw,
|
float limbSwing, float limbSwingAmount, float partialTick, float ageInTicks, float netHeadYaw,
|
||||||
float headPitch) {
|
float headPitch) {
|
||||||
if (entity.isSpectator() || entity.isInvisible() || RoyalEffectHooks.contractedHolder() == null
|
if (entity.isSpectator() || !ContractionAfterimages.isActive(entity)) {
|
||||||
|| !entity.hasEffect(RoyalEffectHooks.contractedHolder())) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Deque<ContractionAfterimages.Sample> samples = ContractionAfterimages.samples(entity);
|
Deque<ContractionAfterimages.Sample> samples = ContractionAfterimages.samples(entity);
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
package com.craisinlord.antarchy.content.client.renderer;
|
package com.craisinlord.antarchy.content.client.renderer;
|
||||||
|
|
||||||
import com.craisinlord.antarchy.content.client.ContractionAfterimages;
|
import com.craisinlord.antarchy.content.client.ContractionAfterimages;
|
||||||
import com.craisinlord.antarchy.content.effect.RoyalEffectHooks;
|
|
||||||
import com.mojang.blaze3d.vertex.PoseStack;
|
import com.mojang.blaze3d.vertex.PoseStack;
|
||||||
import com.mojang.blaze3d.vertex.VertexConsumer;
|
import com.mojang.blaze3d.vertex.VertexConsumer;
|
||||||
import java.util.Deque;
|
import java.util.Deque;
|
||||||
@@ -32,8 +31,7 @@ public final class TemporalContractionGeoLayer<T extends GeoAnimatable> extends
|
|||||||
MultiBufferSource bufferSource, @Nullable VertexConsumer buffer, float partialTick,
|
MultiBufferSource bufferSource, @Nullable VertexConsumer buffer, float partialTick,
|
||||||
int packedLight, int packedOverlay) {
|
int packedLight, int packedOverlay) {
|
||||||
if (!(animatable instanceof Entity entity) || !(entity instanceof LivingEntity living)
|
if (!(animatable instanceof Entity entity) || !(entity instanceof LivingEntity living)
|
||||||
|| living.isInvisible() || RoyalEffectHooks.contractedHolder() == null
|
|| !ContractionAfterimages.isActive(living)) {
|
||||||
|| !living.hasEffect(RoyalEffectHooks.contractedHolder())) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Deque<ContractionAfterimages.Sample> samples = ContractionAfterimages.samples(living);
|
Deque<ContractionAfterimages.Sample> samples = ContractionAfterimages.samples(living);
|
||||||
|
|||||||
@@ -31,8 +31,16 @@ public final class ThoraxisUndersideSkyRenderer {
|
|||||||
Registries.DIMENSION,
|
Registries.DIMENSION,
|
||||||
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "thoraxis")
|
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "thoraxis")
|
||||||
);
|
);
|
||||||
private static final ResourceLocation SUN_TEXTURE = ResourceLocation.withDefaultNamespace("textures/environment/sun.png");
|
private static final ResourceLocation SUN_TEXTURE = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/environment/eye_moon.png");
|
||||||
private static final ResourceLocation MOON_TEXTURE = ResourceLocation.withDefaultNamespace("textures/environment/moon_phases.png");
|
private static final ResourceLocation MOON_TEXTURE = ResourceLocation.withDefaultNamespace("textures/environment/moon_phases.png");
|
||||||
|
private static final ResourceLocation[] EYE_STAR_TEXTURES = {
|
||||||
|
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/environment/eye_star1.png"),
|
||||||
|
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/environment/eye_star2.png"),
|
||||||
|
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/environment/eye_star3.png"),
|
||||||
|
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/environment/eye_star4.png"),
|
||||||
|
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "textures/environment/eye_star5.png")
|
||||||
|
};
|
||||||
|
private static final float[] EYE_STAR_SCALES = {1.0F, 0.86F, 0.72F, 0.58F, 0.46F};
|
||||||
private static final float SKY_RADIUS = 100.0F;
|
private static final float SKY_RADIUS = 100.0F;
|
||||||
private static final float BODY_SIZE = 32.0F;
|
private static final float BODY_SIZE = 32.0F;
|
||||||
private static final float SKY_RED = 0.015F;
|
private static final float SKY_RED = 0.015F;
|
||||||
@@ -40,7 +48,7 @@ public final class ThoraxisUndersideSkyRenderer {
|
|||||||
private static final float SKY_BLUE = 0.035F;
|
private static final float SKY_BLUE = 0.035F;
|
||||||
|
|
||||||
@org.jetbrains.annotations.Nullable
|
@org.jetbrains.annotations.Nullable
|
||||||
private static VertexBuffer redStarBuffer = null;
|
private static VertexBuffer[] eyeStarBuffers = null;
|
||||||
|
|
||||||
private ThoraxisUndersideSkyRenderer() {
|
private ThoraxisUndersideSkyRenderer() {
|
||||||
}
|
}
|
||||||
@@ -73,37 +81,57 @@ public final class ThoraxisUndersideSkyRenderer {
|
|||||||
|
|
||||||
float timeOfDay = 0.72F + partialTick * 0.0F;
|
float timeOfDay = 0.72F + partialTick * 0.0F;
|
||||||
renderCelestialBodies(poseStack.last().pose(), projectionMatrix, timeOfDay);
|
renderCelestialBodies(poseStack.last().pose(), projectionMatrix, timeOfDay);
|
||||||
renderRedStars(poseStack.last().pose(), projectionMatrix);
|
renderEyeStars(poseStack.last().pose(), projectionMatrix);
|
||||||
|
|
||||||
RenderSystem.depthMask(true);
|
RenderSystem.depthMask(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void renderRedStars(Matrix4f modelViewMatrix, Matrix4f projectionMatrix) {
|
private static void renderEyeStars(Matrix4f modelViewMatrix, Matrix4f projectionMatrix) {
|
||||||
if (redStarBuffer == null) {
|
if (eyeStarBuffers == null) {
|
||||||
redStarBuffer = buildRedStarBuffer();
|
eyeStarBuffers = buildEyeStarBuffers();
|
||||||
}
|
}
|
||||||
|
|
||||||
RenderSystem.enableBlend();
|
RenderSystem.enableBlend();
|
||||||
RenderSystem.defaultBlendFunc();
|
RenderSystem.blendFuncSeparate(
|
||||||
RenderSystem.setShaderColor(0.95F, 0.95F, 0.95F, 0.95F);
|
GlStateManager.SourceFactor.ONE,
|
||||||
redStarBuffer.bind();
|
GlStateManager.DestFactor.ONE,
|
||||||
redStarBuffer.drawWithShader(modelViewMatrix, projectionMatrix, GameRenderer.getPositionColorShader());
|
GlStateManager.SourceFactor.ONE,
|
||||||
|
GlStateManager.DestFactor.ZERO
|
||||||
|
);
|
||||||
|
RenderSystem.setShader(GameRenderer::getPositionTexShader);
|
||||||
|
RenderSystem.setShaderColor(1.0F, 0.015F, 0.02F, 1.0F);
|
||||||
|
RenderSystem.backupProjectionMatrix();
|
||||||
|
RenderSystem.setProjectionMatrix(projectionMatrix, VertexSorting.DISTANCE_TO_ORIGIN);
|
||||||
|
|
||||||
|
for (int i = 0; i < eyeStarBuffers.length; i++) {
|
||||||
|
RenderSystem.setShaderTexture(0, EYE_STAR_TEXTURES[i]);
|
||||||
|
eyeStarBuffers[i].bind();
|
||||||
|
eyeStarBuffers[i].drawWithShader(modelViewMatrix, projectionMatrix, GameRenderer.getPositionTexShader());
|
||||||
VertexBuffer.unbind();
|
VertexBuffer.unbind();
|
||||||
|
}
|
||||||
|
RenderSystem.restoreProjectionMatrix();
|
||||||
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
RenderSystem.setShaderColor(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
RenderSystem.defaultBlendFunc();
|
||||||
RenderSystem.disableBlend();
|
RenderSystem.disableBlend();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static VertexBuffer buildRedStarBuffer() {
|
private static VertexBuffer[] buildEyeStarBuffers() {
|
||||||
|
VertexBuffer[] buffers = new VertexBuffer[EYE_STAR_TEXTURES.length];
|
||||||
|
for (int textureIndex = 0; textureIndex < EYE_STAR_TEXTURES.length; textureIndex++) {
|
||||||
Random random = new Random(552031L);
|
Random random = new Random(552031L);
|
||||||
BufferBuilder builder = Tesselator.getInstance().begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_COLOR);
|
BufferBuilder builder = Tesselator.getInstance().begin(VertexFormat.Mode.QUADS, DefaultVertexFormat.POSITION_TEX);
|
||||||
|
|
||||||
for (int i = 0; i < 1800; i++) {
|
for (int i = 0; i < 1800; i++) {
|
||||||
double x = random.nextFloat() * 2.0F - 1.0F;
|
double x = random.nextFloat() * 2.0F - 1.0F;
|
||||||
double y = random.nextFloat() * 2.0F - 1.0F;
|
double y = random.nextFloat() * 2.0F - 1.0F;
|
||||||
double z = random.nextFloat() * 2.0F - 1.0F;
|
double z = random.nextFloat() * 2.0F - 1.0F;
|
||||||
double size = 0.13F + random.nextFloat() * 0.12F;
|
double size = (0.52F + random.nextFloat() * 0.36F) * EYE_STAR_SCALES[textureIndex];
|
||||||
|
double rot = random.nextDouble() * Math.PI * 2.0D;
|
||||||
double lenSq = x * x + y * y + z * z;
|
double lenSq = x * x + y * y + z * z;
|
||||||
if (lenSq < 1.0D && lenSq > 0.01D) {
|
if (i % EYE_STAR_TEXTURES.length != textureIndex || lenSq >= 1.0D || lenSq <= 0.01D) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
double len = 1.0D / Math.sqrt(lenSq);
|
double len = 1.0D / Math.sqrt(lenSq);
|
||||||
x *= len;
|
x *= len;
|
||||||
y *= len;
|
y *= len;
|
||||||
@@ -117,12 +145,8 @@ public final class ThoraxisUndersideSkyRenderer {
|
|||||||
double pitch = Math.atan2(Math.sqrt(x * x + z * z), y);
|
double pitch = Math.atan2(Math.sqrt(x * x + z * z), y);
|
||||||
double sinPitch = Math.sin(pitch);
|
double sinPitch = Math.sin(pitch);
|
||||||
double cosPitch = Math.cos(pitch);
|
double cosPitch = Math.cos(pitch);
|
||||||
double rot = random.nextDouble() * Math.PI * 2.0D;
|
|
||||||
double sinRot = Math.sin(rot);
|
double sinRot = Math.sin(rot);
|
||||||
double cosRot = Math.cos(rot);
|
double cosRot = Math.cos(rot);
|
||||||
float red = 0.75F + random.nextFloat() * 0.25F;
|
|
||||||
float green = 0.02F + random.nextFloat() * 0.05F;
|
|
||||||
float blue = 0.04F + random.nextFloat() * 0.08F;
|
|
||||||
|
|
||||||
for (int j = 0; j < 4; j++) {
|
for (int j = 0; j < 4; j++) {
|
||||||
double u = (j & 2) - 1;
|
double u = (j & 2) - 1;
|
||||||
@@ -133,24 +157,26 @@ public final class ThoraxisUndersideSkyRenderer {
|
|||||||
double qy = -px * cosPitch;
|
double qy = -px * cosPitch;
|
||||||
double rx = qy * sinYaw - py * cosYaw;
|
double rx = qy * sinYaw - py * cosYaw;
|
||||||
double ry = py * sinYaw + qy * cosYaw;
|
double ry = py * sinYaw + qy * cosYaw;
|
||||||
|
float quadU = (j == 0 || j == 1) ? 0.0F : 1.0F;
|
||||||
|
float quadV = (j == 0 || j == 3) ? 0.0F : 1.0F;
|
||||||
builder.addVertex((float) (sx + rx * size), (float) (sy + qx * size), (float) (sz + ry * size))
|
builder.addVertex((float) (sx + rx * size), (float) (sy + qx * size), (float) (sz + ry * size))
|
||||||
.setColor(red, green, blue, 1.0F);
|
.setUv(quadU, quadV);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MeshData mesh = builder.buildOrThrow();
|
MeshData mesh = builder.buildOrThrow();
|
||||||
VertexBuffer buffer = new VertexBuffer(VertexBuffer.Usage.STATIC);
|
buffers[textureIndex] = new VertexBuffer(VertexBuffer.Usage.STATIC);
|
||||||
buffer.bind();
|
buffers[textureIndex].bind();
|
||||||
buffer.upload(mesh);
|
buffers[textureIndex].upload(mesh);
|
||||||
VertexBuffer.unbind();
|
VertexBuffer.unbind();
|
||||||
return buffer;
|
}
|
||||||
|
return buffers;
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void renderCelestialBodies(Matrix4f modelViewMatrix, Matrix4f projectionMatrix, float timeOfDay) {
|
private static void renderCelestialBodies(Matrix4f modelViewMatrix, Matrix4f projectionMatrix, float timeOfDay) {
|
||||||
float t = timeOfDay * 360.0F;
|
float t = timeOfDay * 360.0F;
|
||||||
renderBodyGlow(modelViewMatrix, projectionMatrix, t, -10.0F, 0xFF1F18, 86.0F);
|
renderBodyGlow(modelViewMatrix, projectionMatrix, t, -10.0F, 0xFF1F18, 86.0F);
|
||||||
renderTexturedBody(modelViewMatrix, projectionMatrix, t, -10.0F, 42.0F, 0xFF1F18, SUN_TEXTURE, false, 0, t * 0.6F);
|
renderTexturedBody(modelViewMatrix, projectionMatrix, t, -10.0F, 42.0F, 0xFF1F18, SUN_TEXTURE, false, 0, t * 0.6F + 90.0F);
|
||||||
|
|
||||||
float moonOrbit = t + 180.0F;
|
float moonOrbit = t + 180.0F;
|
||||||
renderBodyGlow(modelViewMatrix, projectionMatrix, moonOrbit, 24.0F, 0x8F30FF, 76.0F);
|
renderBodyGlow(modelViewMatrix, projectionMatrix, moonOrbit, 24.0F, 0x8F30FF, 76.0F);
|
||||||
|
|||||||
@@ -0,0 +1,24 @@
|
|||||||
|
package com.craisinlord.antarchy.content.client.screen;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.content.menu.GiantFryingPanMenu;
|
||||||
|
import net.minecraft.client.gui.GuiGraphics;
|
||||||
|
import net.minecraft.client.gui.screens.inventory.AbstractContainerScreen;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.entity.player.Inventory;
|
||||||
|
|
||||||
|
public final class GiantFryingPanScreen extends AbstractContainerScreen<GiantFryingPanMenu> {
|
||||||
|
private static final ResourceLocation INVENTORY_TEXTURE = ResourceLocation.withDefaultNamespace("textures/gui/container/inventory.png");
|
||||||
|
|
||||||
|
public GiantFryingPanScreen(GiantFryingPanMenu menu, Inventory inventory, Component title) {
|
||||||
|
super(menu, inventory, title);
|
||||||
|
imageWidth = 176;
|
||||||
|
imageHeight = 132;
|
||||||
|
inventoryLabelY = 40;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void renderBg(GuiGraphics graphics, float partialTick, int mouseX, int mouseY) {
|
||||||
|
graphics.blit(INVENTORY_TEXTURE, leftPos, topPos, 0, 0, imageWidth, imageHeight);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -409,6 +409,7 @@ public final class CreativeTabContents {
|
|||||||
entry("ultimate_hoe", "tools_and_utilities"),
|
entry("ultimate_hoe", "tools_and_utilities"),
|
||||||
entry("battle_axe", "combat"),
|
entry("battle_axe", "combat"),
|
||||||
entry("big_bertha", "combat"),
|
entry("big_bertha", "combat"),
|
||||||
|
entry("giant_frying_pan", "combat"),
|
||||||
entry("basilisk_dagger", "combat"),
|
entry("basilisk_dagger", "combat"),
|
||||||
entry("ultimate_helmet", "combat"),
|
entry("ultimate_helmet", "combat"),
|
||||||
entry("ultimate_chestplate", "combat"),
|
entry("ultimate_chestplate", "combat"),
|
||||||
@@ -437,6 +438,7 @@ public final class CreativeTabContents {
|
|||||||
entry("nightmare_leggings", "combat"),
|
entry("nightmare_leggings", "combat"),
|
||||||
entry("nightmare_boots", "combat"),
|
entry("nightmare_boots", "combat"),
|
||||||
entry("nightmare_sword", "combat"),
|
entry("nightmare_sword", "combat"),
|
||||||
|
entry("blood_gods_blade", "combat"),
|
||||||
entry("blood_crystal_katana", "combat"),
|
entry("blood_crystal_katana", "combat"),
|
||||||
entry("blood_crystal_helmet", "combat"),
|
entry("blood_crystal_helmet", "combat"),
|
||||||
entry("blood_crystal_chestplate", "combat"),
|
entry("blood_crystal_chestplate", "combat"),
|
||||||
@@ -490,6 +492,7 @@ public final class CreativeTabContents {
|
|||||||
entry("mud_pie", "ingredients"),
|
entry("mud_pie", "ingredients"),
|
||||||
entry("lucid_eye", "ingredients"),
|
entry("lucid_eye", "ingredients"),
|
||||||
entry("blood_crystal_shard", "ingredients"),
|
entry("blood_crystal_shard", "ingredients"),
|
||||||
|
entry("temporal_tuner", "ingredients"),
|
||||||
entry("tigers_eye", "ingredients"),
|
entry("tigers_eye", "ingredients"),
|
||||||
entry("tigers_eye_block", "building_blocks"),
|
entry("tigers_eye_block", "building_blocks"),
|
||||||
entry("blood_crystal_apple", "ingredients"),
|
entry("blood_crystal_apple", "ingredients"),
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
package com.craisinlord.antarchy.content.effect;
|
||||||
|
|
||||||
|
import net.minecraft.world.effect.MobEffect;
|
||||||
|
import net.minecraft.world.effect.MobEffectCategory;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
|
||||||
|
public final class BleedingMobEffect extends MobEffect {
|
||||||
|
public BleedingMobEffect() {
|
||||||
|
super(MobEffectCategory.HARMFUL, 0x8F1020);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean applyEffectTick(LivingEntity entity, int amplifier) {
|
||||||
|
entity.hurt(entity.damageSources().magic(), 1.0F + amplifier);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean shouldApplyEffectTickThisTick(int duration, int amplifier) {
|
||||||
|
return duration % 20 == 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
package com.craisinlord.antarchy.content.effect;
|
||||||
|
|
||||||
|
import net.minecraft.world.effect.MobEffect;
|
||||||
|
import net.minecraft.world.effect.MobEffectCategory;
|
||||||
|
|
||||||
|
public final class BloodMoonMobEffect extends MobEffect {
|
||||||
|
public BloodMoonMobEffect() {
|
||||||
|
super(MobEffectCategory.BENEFICIAL, 0xB51B2D);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -93,6 +93,7 @@ public class DimensionalTearEntity extends Entity implements GeoEntity {
|
|||||||
private UUID staffOwnerId;
|
private UUID staffOwnerId;
|
||||||
private int staffManticoreCount;
|
private int staffManticoreCount;
|
||||||
private boolean staffManticoreSpawned;
|
private boolean staffManticoreSpawned;
|
||||||
|
private boolean gauntletVisualOnly;
|
||||||
|
|
||||||
public DimensionalTearEntity(EntityType<? extends DimensionalTearEntity> entityType, Level level) {
|
public DimensionalTearEntity(EntityType<? extends DimensionalTearEntity> entityType, Level level) {
|
||||||
super(entityType, level);
|
super(entityType, level);
|
||||||
@@ -109,6 +110,12 @@ public class DimensionalTearEntity extends Entity implements GeoEntity {
|
|||||||
return tear;
|
return tear;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static DimensionalTearEntity createGauntletVisual(ServerLevel level, Vec3 pos, float yaw, int lifetimeTicks) {
|
||||||
|
DimensionalTearEntity tear = create(level, pos, yaw, lifetimeTicks);
|
||||||
|
tear.gauntletVisualOnly = true;
|
||||||
|
return tear;
|
||||||
|
}
|
||||||
|
|
||||||
public static DimensionalTearEntity createQueenManticoreTear(ServerLevel level, Vec3 pos, float yaw,
|
public static DimensionalTearEntity createQueenManticoreTear(ServerLevel level, Vec3 pos, float yaw,
|
||||||
int lifetimeTicks, UUID queenId, int count) {
|
int lifetimeTicks, UUID queenId, int count) {
|
||||||
DimensionalTearEntity tear = create(level, pos, yaw, lifetimeTicks);
|
DimensionalTearEntity tear = create(level, pos, yaw, lifetimeTicks);
|
||||||
@@ -161,7 +168,15 @@ public class DimensionalTearEntity extends Entity implements GeoEntity {
|
|||||||
this.setTearState(TearState.NORMAL);
|
this.setTearState(TearState.NORMAL);
|
||||||
}
|
}
|
||||||
if (this.ageTicks >= this.lifetimeTicks) {
|
if (this.ageTicks >= this.lifetimeTicks) {
|
||||||
|
if (this.gauntletVisualOnly) {
|
||||||
|
this.discard();
|
||||||
|
} else {
|
||||||
this.removeLinkedPair();
|
this.removeLinkedPair();
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.gauntletVisualOnly) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -500,6 +515,7 @@ public class DimensionalTearEntity extends Entity implements GeoEntity {
|
|||||||
tag.putInt("EventTicks", this.eventTicks);
|
tag.putInt("EventTicks", this.eventTicks);
|
||||||
tag.putInt("NextEventTicks", this.nextEventTicks);
|
tag.putInt("NextEventTicks", this.nextEventTicks);
|
||||||
tag.putInt("PendingEvent", this.pendingEvent.ordinal());
|
tag.putInt("PendingEvent", this.pendingEvent.ordinal());
|
||||||
|
tag.putBoolean("GauntletVisualOnly", this.gauntletVisualOnly);
|
||||||
if (this.linkedTearId != null) {
|
if (this.linkedTearId != null) {
|
||||||
tag.putUUID("LinkedTearId", this.linkedTearId);
|
tag.putUUID("LinkedTearId", this.linkedTearId);
|
||||||
}
|
}
|
||||||
@@ -522,6 +538,7 @@ public class DimensionalTearEntity extends Entity implements GeoEntity {
|
|||||||
int event = tag.getInt("PendingEvent");
|
int event = tag.getInt("PendingEvent");
|
||||||
TearState[] states = TearState.values();
|
TearState[] states = TearState.values();
|
||||||
this.pendingEvent = event >= 0 && event < states.length ? states[event] : TearState.NORMAL;
|
this.pendingEvent = event >= 0 && event < states.length ? states[event] : TearState.NORMAL;
|
||||||
|
this.gauntletVisualOnly = tag.getBoolean("GauntletVisualOnly");
|
||||||
if (tag.hasUUID("LinkedTearId")) {
|
if (tag.hasUUID("LinkedTearId")) {
|
||||||
this.linkedTearId = tag.getUUID("LinkedTearId");
|
this.linkedTearId = tag.getUUID("LinkedTearId");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ import net.minecraft.world.entity.Entity;
|
|||||||
import net.minecraft.world.entity.EntitySelector;
|
import net.minecraft.world.entity.EntitySelector;
|
||||||
import net.minecraft.world.entity.LivingEntity;
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
import net.minecraft.world.entity.Mob;
|
import net.minecraft.world.entity.Mob;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
import net.minecraft.world.entity.ai.attributes.Attributes;
|
import net.minecraft.world.entity.ai.attributes.Attributes;
|
||||||
import net.minecraft.world.level.ClipContext;
|
import net.minecraft.world.level.ClipContext;
|
||||||
import net.minecraft.world.level.GameRules;
|
import net.minecraft.world.level.GameRules;
|
||||||
@@ -28,7 +29,7 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
|
|
||||||
public final class RoyalBeamController {
|
public final class RoyalBeamController {
|
||||||
private static final int INITIAL_TRACKING_DELAY_TICKS = 8;
|
private static final int INITIAL_TRACKING_DELAY_TICKS = 8;
|
||||||
private final Mob owner;
|
private final LivingEntity owner;
|
||||||
private Vec3 serverTarget;
|
private Vec3 serverTarget;
|
||||||
private Vec3 beamEndPosition;
|
private Vec3 beamEndPosition;
|
||||||
private int beamTicks;
|
private int beamTicks;
|
||||||
@@ -39,10 +40,14 @@ public final class RoyalBeamController {
|
|||||||
private static final int ICE_MUTATIONS_PER_TICK = 3;
|
private static final int ICE_MUTATIONS_PER_TICK = 3;
|
||||||
private static final float ICE_IMPACT_RADIUS = 2.0F;
|
private static final float ICE_IMPACT_RADIUS = 2.0F;
|
||||||
|
|
||||||
public RoyalBeamController(Mob owner) {
|
public RoyalBeamController(LivingEntity owner) {
|
||||||
this.owner = owner;
|
this.owner = owner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public RoyalBeamController(Mob owner) {
|
||||||
|
this((LivingEntity) owner);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isFiring() {
|
public boolean isFiring() {
|
||||||
return this.beamTicks > 0;
|
return this.beamTicks > 0;
|
||||||
}
|
}
|
||||||
@@ -164,7 +169,9 @@ public final class RoyalBeamController {
|
|||||||
) {
|
) {
|
||||||
Vec3 direction = beamEnd.subtract(shootFrom).normalize();
|
Vec3 direction = beamEnd.subtract(shootFrom).normalize();
|
||||||
double distance = shootFrom.distanceTo(beamEnd);
|
double distance = shootFrom.distanceTo(beamEnd);
|
||||||
DamageSource damageSource = this.owner.damageSources().mobAttack(this.owner);
|
DamageSource damageSource = this.owner instanceof Player player
|
||||||
|
? player.damageSources().playerAttack(player)
|
||||||
|
: this.owner.damageSources().mobAttack(this.owner);
|
||||||
this.damagedThisTick.clear();
|
this.damagedThisTick.clear();
|
||||||
boolean pathMutates = terrainMode == RoyalBeamTerrainMode.DESTROY;
|
boolean pathMutates = terrainMode == RoyalBeamTerrainMode.DESTROY;
|
||||||
for (double walked = settings.pathStep(); walked < Math.min(distance, settings.range()); walked += settings.pathStep()) {
|
for (double walked = settings.pathStep(); walked < Math.min(distance, settings.range()); walked += settings.pathStep()) {
|
||||||
@@ -224,7 +231,7 @@ public final class RoyalBeamController {
|
|||||||
for (LivingEntity living : entities) {
|
for (LivingEntity living : entities) {
|
||||||
if (living.is(this.owner)
|
if (living.is(this.owner)
|
||||||
|| this.owner.isAlliedTo(living)
|
|| this.owner.isAlliedTo(living)
|
||||||
|| living.getType() == this.owner.getType()
|
|| !(this.owner instanceof Player) && living.getType() == this.owner.getType()
|
||||||
|| this.owner instanceof RoyalBossEntity royalBoss && !royalBoss.canDamageWithRoyalAttack(living)
|
|| this.owner instanceof RoyalBossEntity royalBoss && !royalBoss.canDamageWithRoyalAttack(living)
|
||||||
|| living.distanceToSqr(center) > radius * radius
|
|| living.distanceToSqr(center) > radius * radius
|
||||||
|| damagedThisTick.contains(living.getId())
|
|| damagedThisTick.contains(living.getId())
|
||||||
|
|||||||
@@ -22,6 +22,16 @@ public record RoyalBeamSettings(
|
|||||||
boolean terrainEnabled,
|
boolean terrainEnabled,
|
||||||
boolean requireLineOfSightForDamage
|
boolean requireLineOfSightForDamage
|
||||||
) {
|
) {
|
||||||
|
public static RoyalBeamSettings gauntletPower() {
|
||||||
|
return new RoyalBeamSettings(64.0D, 0.0D, 2.0D, 18, 4, 50, 0.9F, 1.8F,
|
||||||
|
9.0F, 0.8F, 1, 64.0D, 0.8F, 1.8F, 6, 1.0F, 1.0F, 50.0F, true, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static RoyalBeamSettings gauntletInfinity() {
|
||||||
|
return new RoyalBeamSettings(64.0D, 0.0D, 1.5D, 24, 4, 1200, 1.25F, 2.5F,
|
||||||
|
28.0F, 1.8F, 1, 64.0D, 1.0F, 2.0F, 0, 0.0F, 0.0F, 0.0F, false, false);
|
||||||
|
}
|
||||||
|
|
||||||
public static RoyalBeamSettings tremorzillaLike(float damage, boolean terrainEnabled) {
|
public static RoyalBeamSettings tremorzillaLike(float damage, boolean terrainEnabled) {
|
||||||
return new RoyalBeamSettings(
|
return new RoyalBeamSettings(
|
||||||
100.0D,
|
100.0D,
|
||||||
|
|||||||
@@ -0,0 +1,93 @@
|
|||||||
|
package com.craisinlord.antarchy.content.item;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.content.AntarchyObjects;
|
||||||
|
import java.util.List;
|
||||||
|
import net.minecraft.ChatFormatting;
|
||||||
|
import net.minecraft.core.particles.DustParticleOptions;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraft.server.level.ServerLevel;
|
||||||
|
import net.minecraft.world.InteractionHand;
|
||||||
|
import net.minecraft.world.InteractionResultHolder;
|
||||||
|
import net.minecraft.world.effect.MobEffectInstance;
|
||||||
|
import net.minecraft.world.effect.MobEffects;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.SwordItem;
|
||||||
|
import net.minecraft.world.item.Tier;
|
||||||
|
import net.minecraft.world.item.TooltipFlag;
|
||||||
|
import net.minecraft.world.item.component.ItemAttributeModifiers;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.phys.AABB;
|
||||||
|
import org.joml.Vector3f;
|
||||||
|
|
||||||
|
public final class BloodGodsBladeItem extends SwordItem {
|
||||||
|
private static final int BLEEDING_TICKS = 100;
|
||||||
|
private static final int BLOOD_MOON_TICKS = 200;
|
||||||
|
private static final int BLOOD_MOON_MAX_TICKS = 300;
|
||||||
|
private static final int BLOOD_MOON_COOLDOWN_TICKS = 1200;
|
||||||
|
private static final double BLOOD_MOON_RADIUS = 12.0D;
|
||||||
|
private static final DustParticleOptions BLOOD_PARTICLES = new DustParticleOptions(new Vector3f(0.65F, 0.02F, 0.05F), 1.6F);
|
||||||
|
|
||||||
|
private final Tier tier;
|
||||||
|
private final int attackDamage;
|
||||||
|
private final float attackSpeed;
|
||||||
|
|
||||||
|
public BloodGodsBladeItem(Tier tier, Item.Properties properties, int attackDamage, float attackSpeed) {
|
||||||
|
super(tier, properties);
|
||||||
|
this.tier = tier;
|
||||||
|
this.attackDamage = attackDamage;
|
||||||
|
this.attackSpeed = attackSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemAttributeModifiers getDefaultAttributeModifiers() {
|
||||||
|
return SwordItem.createAttributes(this.tier, this.attackDamage, this.attackSpeed);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hurtEnemy(ItemStack stack, LivingEntity target, LivingEntity attacker) {
|
||||||
|
boolean result = super.hurtEnemy(stack, target, attacker);
|
||||||
|
if (!attacker.level().isClientSide()) {
|
||||||
|
target.addEffect(new MobEffectInstance(AntarchyObjects.BLEEDING_EFFECT.get(), BLEEDING_TICKS, 0, false, true, true));
|
||||||
|
if (attacker instanceof Player player && player.hasEffect(AntarchyObjects.BLOOD_MOON_EFFECT.get())) {
|
||||||
|
player.heal(1.0F);
|
||||||
|
if (target.isDeadOrDying()) {
|
||||||
|
MobEffectInstance bloodMoon = player.getEffect(AntarchyObjects.BLOOD_MOON_EFFECT.get());
|
||||||
|
if (bloodMoon != null) {
|
||||||
|
player.addEffect(new MobEffectInstance(AntarchyObjects.BLOOD_MOON_EFFECT.get(), Math.min(BLOOD_MOON_MAX_TICKS, bloodMoon.getDuration() + 20), bloodMoon.getAmplifier(), false, true, true));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) {
|
||||||
|
ItemStack stack = player.getItemInHand(hand);
|
||||||
|
if (player.getCooldowns().isOnCooldown(this)) {
|
||||||
|
return InteractionResultHolder.fail(stack);
|
||||||
|
}
|
||||||
|
if (!level.isClientSide() && level instanceof ServerLevel serverLevel) {
|
||||||
|
player.getCooldowns().addCooldown(this, BLOOD_MOON_COOLDOWN_TICKS);
|
||||||
|
player.addEffect(new MobEffectInstance(AntarchyObjects.BLOOD_MOON_EFFECT.get(), BLOOD_MOON_TICKS, 0, false, true, true));
|
||||||
|
player.addEffect(new MobEffectInstance(MobEffects.DAMAGE_BOOST, BLOOD_MOON_TICKS, 0, false, false, true));
|
||||||
|
for (LivingEntity entity : level.getEntitiesOfClass(LivingEntity.class, player.getBoundingBox().inflate(BLOOD_MOON_RADIUS), entity -> entity != player && entity.isAlive() && !player.isAlliedTo(entity))) {
|
||||||
|
entity.addEffect(new MobEffectInstance(MobEffects.GLOWING, BLOOD_MOON_TICKS, 0, false, true, true));
|
||||||
|
entity.addEffect(new MobEffectInstance(MobEffects.MOVEMENT_SLOWDOWN, BLOOD_MOON_TICKS, 0, false, true, true));
|
||||||
|
}
|
||||||
|
serverLevel.sendParticles(BLOOD_PARTICLES, player.getX(), player.getY() + 1.0D, player.getZ(), 160, 2.5D, 1.2D, 2.5D, 0.08D);
|
||||||
|
serverLevel.sendParticles(BLOOD_PARTICLES, player.getX(), player.getY() + 8.0D, player.getZ(), 80, 5.0D, 0.2D, 5.0D, 0.02D);
|
||||||
|
}
|
||||||
|
return InteractionResultHolder.sidedSuccess(stack, level.isClientSide());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<Component> tooltipComponents, TooltipFlag tooltipFlag) {
|
||||||
|
tooltipComponents.add(Component.translatable("tooltip.antarchy.blood_gods_blade.bleeding").withStyle(ChatFormatting.DARK_RED));
|
||||||
|
tooltipComponents.add(Component.translatable("tooltip.antarchy.blood_gods_blade.blood_moon").withStyle(ChatFormatting.RED));
|
||||||
|
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,150 @@
|
|||||||
|
package com.craisinlord.antarchy.content.item;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
|
import com.craisinlord.antarchy.content.client.model.ResourceBackedGeoItemModel;
|
||||||
|
import com.craisinlord.antarchy.content.client.renderer.AnimatedHeldItemRenderer;
|
||||||
|
import com.craisinlord.antarchy.content.client.renderer.GiantFryingPanRenderer;
|
||||||
|
import java.util.function.Consumer;
|
||||||
|
import java.util.List;
|
||||||
|
import net.minecraft.ChatFormatting;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.sounds.SoundEvents;
|
||||||
|
import net.minecraft.sounds.SoundSource;
|
||||||
|
import net.minecraft.world.entity.EquipmentSlotGroup;
|
||||||
|
import net.minecraft.world.entity.LivingEntity;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.entity.ai.attributes.AttributeModifier;
|
||||||
|
import net.minecraft.world.entity.ai.attributes.Attributes;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.SwordItem;
|
||||||
|
import net.minecraft.world.item.Tier;
|
||||||
|
import net.minecraft.world.item.TooltipFlag;
|
||||||
|
import net.minecraft.world.item.component.ItemAttributeModifiers;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraft.world.SimpleMenuProvider;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
import software.bernie.geckolib.animatable.GeoItem;
|
||||||
|
import software.bernie.geckolib.animatable.client.GeoRenderProvider;
|
||||||
|
import software.bernie.geckolib.animatable.instance.AnimatableInstanceCache;
|
||||||
|
import software.bernie.geckolib.animation.AnimatableManager;
|
||||||
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
|
public class GiantFryingPanItem extends SwordItem implements GeoItem {
|
||||||
|
private static final ResourceLocation MODEL_LOCATION = ResourceLocation.fromNamespaceAndPath("antarchy", "geo/giant_frying_pan.geo.json");
|
||||||
|
private static final ResourceLocation TEXTURE_LOCATION = ResourceLocation.fromNamespaceAndPath("antarchy", "textures/item/giant_frying_pan/giant_frying_pan_model.png");
|
||||||
|
private static final ResourceLocation ANIMATION_LOCATION = ResourceLocation.fromNamespaceAndPath("antarchy", "animations/static_item.animation.json");
|
||||||
|
private static final ResourceLocation REACH_MODIFIER_ID = ResourceLocation.fromNamespaceAndPath("antarchy", "giant_frying_pan_reach");
|
||||||
|
private static final ResourceLocation KNOCKBACK_MODIFIER_ID = ResourceLocation.fromNamespaceAndPath("antarchy", "giant_frying_pan_knockback");
|
||||||
|
private final Tier tier;
|
||||||
|
private final AnimatableInstanceCache geoCache = GeckoLibUtil.createInstanceCache(this);
|
||||||
|
|
||||||
|
public GiantFryingPanItem(Tier tier, Item.Properties properties) {
|
||||||
|
super(tier, properties);
|
||||||
|
this.tier = tier;
|
||||||
|
GeoItem.registerSyncedAnimatable(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void appendHoverText(ItemStack stack, Item.TooltipContext context, List<net.minecraft.network.chat.Component> tooltipComponents, TooltipFlag tooltipFlag) {
|
||||||
|
super.appendHoverText(stack, context, tooltipComponents, tooltipFlag);
|
||||||
|
tooltipComponents.add(Component.translatable("tooltip.antarchy.giant_frying_pan.insert").withStyle(ChatFormatting.GRAY));
|
||||||
|
tooltipComponents.add(Component.translatable("tooltip.antarchy.giant_frying_pan.gui").withStyle(ChatFormatting.GRAY));
|
||||||
|
tooltipComponents.add(Component.translatable("tooltip.antarchy.giant_frying_pan.campfire").withStyle(ChatFormatting.DARK_GRAY));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemAttributeModifiers getDefaultAttributeModifiers() {
|
||||||
|
return SwordItem.createAttributes(this.tier, (int) Math.round(AntarchySettings.giantFryingPanAttackDamage()), -3.8F)
|
||||||
|
.withModifierAdded(Attributes.ENTITY_INTERACTION_RANGE,
|
||||||
|
new AttributeModifier(REACH_MODIFIER_ID, 6.0D, AttributeModifier.Operation.ADD_VALUE),
|
||||||
|
EquipmentSlotGroup.MAINHAND)
|
||||||
|
.withModifierAdded(Attributes.ATTACK_KNOCKBACK,
|
||||||
|
new AttributeModifier(KNOCKBACK_MODIFIER_ID, 2.0D, AttributeModifier.Operation.ADD_VALUE),
|
||||||
|
EquipmentSlotGroup.MAINHAND);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean hurtEnemy(ItemStack stack, LivingEntity target, LivingEntity attacker) {
|
||||||
|
boolean hurt = super.hurtEnemy(stack, target, attacker);
|
||||||
|
if (!hurt || attacker.level().isClientSide) {
|
||||||
|
return hurt;
|
||||||
|
}
|
||||||
|
|
||||||
|
Vec3 direction = target.position().subtract(attacker.position()).multiply(1.0D, 0.0D, 1.0D);
|
||||||
|
if (direction.lengthSqr() < 1.0E-4D) {
|
||||||
|
direction = attacker.getLookAngle().multiply(1.0D, 0.0D, 1.0D);
|
||||||
|
}
|
||||||
|
if (direction.lengthSqr() >= 1.0E-4D) {
|
||||||
|
direction = direction.normalize();
|
||||||
|
Vec3 motion = target.getDeltaMovement();
|
||||||
|
double x = Math.max(-2.6D, Math.min(2.6D, motion.x + direction.x * 1.8D));
|
||||||
|
double z = Math.max(-2.6D, Math.min(2.6D, motion.z + direction.z * 1.8D));
|
||||||
|
target.setDeltaMovement(x, motion.y, z);
|
||||||
|
target.hurtMarked = true;
|
||||||
|
}
|
||||||
|
Level level = attacker.level();
|
||||||
|
level.playSound(null, target.blockPosition(), SoundEvents.ANVIL_LAND, SoundSource.PLAYERS, 0.8F, 1.25F);
|
||||||
|
return hurt;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void inventoryTick(ItemStack stack, Level level, net.minecraft.world.entity.Entity entity, int slotId, boolean isSelected) {
|
||||||
|
super.inventoryTick(stack, level, entity, slotId, isSelected);
|
||||||
|
if (entity instanceof Player player) GiantFryingPanStorage.tick(player, stack, level);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public net.minecraft.world.InteractionResultHolder<ItemStack> use(Level level, Player player, net.minecraft.world.InteractionHand hand) {
|
||||||
|
ItemStack pan = player.getItemInHand(hand);
|
||||||
|
if (player.isShiftKeyDown()) {
|
||||||
|
if (!level.isClientSide) {
|
||||||
|
player.openMenu(new SimpleMenuProvider(
|
||||||
|
(containerId, inventory, ignored) -> new com.craisinlord.antarchy.content.menu.GiantFryingPanMenu(containerId, inventory),
|
||||||
|
Component.translatable("item.antarchy.giant_frying_pan")));
|
||||||
|
}
|
||||||
|
return net.minecraft.world.InteractionResultHolder.sidedSuccess(pan, level.isClientSide);
|
||||||
|
}
|
||||||
|
net.minecraft.world.InteractionHand foodHand = hand == net.minecraft.world.InteractionHand.MAIN_HAND
|
||||||
|
? net.minecraft.world.InteractionHand.OFF_HAND : net.minecraft.world.InteractionHand.MAIN_HAND;
|
||||||
|
ItemStack food = player.getItemInHand(foodHand);
|
||||||
|
if (!GiantFryingPanStorage.isCampfireInput(player, food)) return net.minecraft.world.InteractionResultHolder.pass(pan);
|
||||||
|
GiantFryingPanStorage storage = new GiantFryingPanStorage(pan, player);
|
||||||
|
for (int slot = 0; slot < GiantFryingPanStorage.SLOT_COUNT; slot++) {
|
||||||
|
if (storage.getItem(slot).isEmpty()) {
|
||||||
|
if (!level.isClientSide) {
|
||||||
|
storage.setItem(slot, food.copyWithCount(1));
|
||||||
|
food.shrink(1);
|
||||||
|
level.playSound(null, player.blockPosition(), SoundEvents.CAMPFIRE_CRACKLE, SoundSource.PLAYERS, 0.8F, 1.0F);
|
||||||
|
}
|
||||||
|
return net.minecraft.world.InteractionResultHolder.sidedSuccess(pan, level.isClientSide);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return net.minecraft.world.InteractionResultHolder.fail(pan);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void registerControllers(AnimatableManager.ControllerRegistrar controllers) {
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public AnimatableInstanceCache getAnimatableInstanceCache() {
|
||||||
|
return this.geoCache;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void createGeoRenderer(Consumer<GeoRenderProvider> consumer) {
|
||||||
|
consumer.accept(new GeoRenderProvider() {
|
||||||
|
private GiantFryingPanRenderer renderer;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public net.minecraft.client.renderer.BlockEntityWithoutLevelRenderer getGeoItemRenderer() {
|
||||||
|
if (this.renderer == null) {
|
||||||
|
this.renderer = new GiantFryingPanRenderer(new ResourceBackedGeoItemModel<>(MODEL_LOCATION, TEXTURE_LOCATION, ANIMATION_LOCATION));
|
||||||
|
}
|
||||||
|
return this.renderer;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,174 @@
|
|||||||
|
package com.craisinlord.antarchy.content.item;
|
||||||
|
|
||||||
|
import java.util.Optional;
|
||||||
|
import net.minecraft.core.HolderLookup;
|
||||||
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
import net.minecraft.nbt.ListTag;
|
||||||
|
import net.minecraft.nbt.Tag;
|
||||||
|
import net.minecraft.world.Container;
|
||||||
|
import net.minecraft.world.SimpleContainer;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.crafting.CampfireCookingRecipe;
|
||||||
|
import net.minecraft.world.item.crafting.RecipeHolder;
|
||||||
|
import net.minecraft.world.item.crafting.RecipeType;
|
||||||
|
import net.minecraft.world.item.crafting.SingleRecipeInput;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
|
||||||
|
public final class GiantFryingPanStorage implements Container {
|
||||||
|
public static final int SLOT_COUNT = 9;
|
||||||
|
private static final String SLOTS = "antarchy.giant_frying_pan_slots";
|
||||||
|
private static final String SLOT = "Slot";
|
||||||
|
private static final String ITEM = "Item";
|
||||||
|
private static final String TIME = "Time";
|
||||||
|
private final ItemStack pan;
|
||||||
|
private final Player player;
|
||||||
|
|
||||||
|
public GiantFryingPanStorage(ItemStack pan, Player player) {
|
||||||
|
this.pan = pan;
|
||||||
|
this.player = player;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ItemStack findPan(Player player) {
|
||||||
|
ItemStack selected = player.getMainHandItem();
|
||||||
|
if (selected.getItem() instanceof GiantFryingPanItem) return selected;
|
||||||
|
ItemStack offhand = player.getOffhandItem();
|
||||||
|
if (offhand.getItem() instanceof GiantFryingPanItem) return offhand;
|
||||||
|
for (ItemStack stack : player.getInventory().items) {
|
||||||
|
if (stack.getItem() instanceof GiantFryingPanItem) return stack;
|
||||||
|
}
|
||||||
|
return ItemStack.EMPTY;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static int findPanSlot(Player player) {
|
||||||
|
if (player.getMainHandItem().getItem() instanceof GiantFryingPanItem) return player.getInventory().selected;
|
||||||
|
if (player.getOffhandItem().getItem() instanceof GiantFryingPanItem) return 40;
|
||||||
|
for (int i = 0; i < player.getInventory().items.size(); i++) {
|
||||||
|
if (player.getInventory().items.get(i).getItem() instanceof GiantFryingPanItem) return i;
|
||||||
|
}
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void tick(Player player, ItemStack pan, Level level) {
|
||||||
|
if (level.isClientSide || !(pan.getItem() instanceof GiantFryingPanItem)) return;
|
||||||
|
GiantFryingPanStorage storage = new GiantFryingPanStorage(pan, player);
|
||||||
|
for (int slot = 0; slot < SLOT_COUNT; slot++) {
|
||||||
|
ItemStack input = storage.getItem(slot);
|
||||||
|
if (input.isEmpty()) continue;
|
||||||
|
Optional<RecipeHolder<CampfireCookingRecipe>> recipe = level.getServer().getRecipeManager().getRecipeFor(
|
||||||
|
RecipeType.CAMPFIRE_COOKING, new SingleRecipeInput(input), level);
|
||||||
|
if (recipe.isEmpty()) {
|
||||||
|
storage.setCookTime(slot, 0);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
int time = storage.getCookTime(slot) + 1;
|
||||||
|
if (time < 600) {
|
||||||
|
storage.setCookTime(slot, time);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ItemStack cooked = recipe.get().value().assemble(new SingleRecipeInput(input), level.registryAccess());
|
||||||
|
input.shrink(1);
|
||||||
|
storage.setItem(slot, input);
|
||||||
|
storage.setCookTime(slot, 0);
|
||||||
|
if (!cooked.isEmpty()) {
|
||||||
|
var output = new net.minecraft.world.entity.item.ItemEntity(level, player.getX(), player.getY() + 1.2D, player.getZ(), cooked);
|
||||||
|
output.setDeltaMovement(player.getLookAngle().scale(0.35D).add(0.0D, 0.2D, 0.0D));
|
||||||
|
output.setPickUpDelay(10);
|
||||||
|
level.addFreshEntity(output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isCampfireInput(Player player, ItemStack stack) {
|
||||||
|
return !stack.isEmpty() && (player.getServer() == null || player.getServer().getRecipeManager().getRecipeFor(
|
||||||
|
RecipeType.CAMPFIRE_COOKING, new SingleRecipeInput(stack), player.level()).isPresent());
|
||||||
|
}
|
||||||
|
|
||||||
|
private ListTag slotList() {
|
||||||
|
return pan.getOrDefault(net.minecraft.core.component.DataComponents.CUSTOM_DATA, net.minecraft.world.item.component.CustomData.EMPTY)
|
||||||
|
.copyTag().getList(SLOTS, Tag.TAG_COMPOUND);
|
||||||
|
}
|
||||||
|
|
||||||
|
private CompoundTag slotTag(int slot) {
|
||||||
|
for (Tag raw : slotList()) {
|
||||||
|
CompoundTag tag = (CompoundTag) raw;
|
||||||
|
if (tag.getInt(SLOT) == slot) return tag;
|
||||||
|
}
|
||||||
|
CompoundTag tag = new CompoundTag();
|
||||||
|
tag.putInt(SLOT, slot);
|
||||||
|
return tag;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void writeSlot(int slot, ItemStack stack, int cookTime) {
|
||||||
|
HolderLookup.Provider registries = player.registryAccess();
|
||||||
|
net.minecraft.world.item.component.CustomData.update(net.minecraft.core.component.DataComponents.CUSTOM_DATA, pan, root -> {
|
||||||
|
ListTag list = root.getList(SLOTS, Tag.TAG_COMPOUND);
|
||||||
|
for (int i = list.size() - 1; i >= 0; i--) {
|
||||||
|
if (list.getCompound(i).getInt(SLOT) == slot) list.remove(i);
|
||||||
|
}
|
||||||
|
if (!stack.isEmpty()) {
|
||||||
|
CompoundTag tag = new CompoundTag();
|
||||||
|
tag.putInt(SLOT, slot);
|
||||||
|
tag.putInt(TIME, cookTime);
|
||||||
|
tag.put(ITEM, stack.save(registries));
|
||||||
|
list.add(tag);
|
||||||
|
}
|
||||||
|
root.put(SLOTS, list);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getCookTime(int slot) {
|
||||||
|
return slotTag(slot).getInt(TIME);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCookTime(int slot, int value) {
|
||||||
|
ItemStack stack = getItem(slot);
|
||||||
|
if (!stack.isEmpty()) writeSlot(slot, stack, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getContainerSize() { return SLOT_COUNT; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isEmpty() {
|
||||||
|
for (int i = 0; i < SLOT_COUNT; i++) if (!getItem(i).isEmpty()) return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack getItem(int slot) {
|
||||||
|
CompoundTag tag = slotTag(slot);
|
||||||
|
if (!tag.contains(ITEM, Tag.TAG_COMPOUND)) return ItemStack.EMPTY;
|
||||||
|
return ItemStack.parseOptional(player.registryAccess(), tag.getCompound(ITEM));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack removeItem(int slot, int amount) {
|
||||||
|
ItemStack stack = getItem(slot);
|
||||||
|
if (stack.isEmpty()) return ItemStack.EMPTY;
|
||||||
|
ItemStack result = stack.split(amount);
|
||||||
|
writeSlot(slot, stack, 0);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack removeItemNoUpdate(int slot) {
|
||||||
|
ItemStack result = getItem(slot);
|
||||||
|
writeSlot(slot, ItemStack.EMPTY, 0);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setItem(int slot, ItemStack stack) { writeSlot(slot, stack, 0); }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void setChanged() { }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean stillValid(Player player) { return player.isAlive(); }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void clearContent() {
|
||||||
|
for (int i = 0; i < SLOT_COUNT; i++) writeSlot(i, ItemStack.EMPTY, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -78,10 +78,15 @@ public final class RoyalGuardianSwordAbilities {
|
|||||||
|| !(swordStack.getItem() instanceof RoyalGuardianSwordItem)
|
|| !(swordStack.getItem() instanceof RoyalGuardianSwordItem)
|
||||||
|| !RoyalGuardianSwordItem.isDischargeReady(swordStack, level.getGameTime())) return;
|
|| !RoyalGuardianSwordItem.isDischargeReady(swordStack, level.getGameTime())) return;
|
||||||
|
|
||||||
switch (RoyalGuardianSwordItem.getMode(swordStack)) {
|
RoyalGuardianSwordItem.Mode mode = RoyalGuardianSwordItem.getMode(swordStack);
|
||||||
|
if (mode == RoyalGuardianSwordItem.Mode.NONE) return;
|
||||||
|
|
||||||
|
switch (mode) {
|
||||||
case FIRE -> fireImpact(level, owner, primary);
|
case FIRE -> fireImpact(level, owner, primary);
|
||||||
case FROST -> frostFan(level, owner, primary);
|
case FROST -> frostFan(level, owner, primary);
|
||||||
case STORM -> chainLightning(level, owner, primary);
|
case STORM -> chainLightning(level, owner, primary);
|
||||||
|
case NONE -> {
|
||||||
|
}
|
||||||
}
|
}
|
||||||
RoyalGuardianSwordItem.startDischargeCooldown(swordStack, level.getGameTime());
|
RoyalGuardianSwordItem.startDischargeCooldown(swordStack, level.getGameTime());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,8 +94,8 @@ public class RoyalGuardianSwordItem extends SwordItem implements GeoItem {
|
|||||||
|
|
||||||
private static void setMode(ItemStack stack, Mode mode) {
|
private static void setMode(ItemStack stack, Mode mode) {
|
||||||
CustomData.update(DataComponents.CUSTOM_DATA, stack, tag -> {
|
CustomData.update(DataComponents.CUSTOM_DATA, stack, tag -> {
|
||||||
if (mode == Mode.FIRE) tag.remove(MODE_TAG);
|
if (mode == Mode.NONE) tag.remove(MODE_TAG);
|
||||||
else tag.putInt(MODE_TAG, mode.ordinal());
|
else tag.putInt(MODE_TAG, mode.id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,8 +115,8 @@ public class RoyalGuardianSwordItem extends SwordItem implements GeoItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static Mode getMode(ItemStack stack) {
|
public static Mode getMode(ItemStack stack) {
|
||||||
int value = stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY).copyTag().getInt(MODE_TAG);
|
net.minecraft.nbt.CompoundTag tag = stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY).copyTag();
|
||||||
return Mode.values()[Math.floorMod(value, Mode.values().length)];
|
return tag.contains(MODE_TAG) ? Mode.fromId(tag.getInt(MODE_TAG)) : Mode.NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isDischargeReady(ItemStack stack, long gameTime) {
|
public static boolean isDischargeReady(ItemStack stack, long gameTime) {
|
||||||
@@ -130,20 +130,37 @@ public class RoyalGuardianSwordItem extends SwordItem implements GeoItem {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public enum Mode {
|
public enum Mode {
|
||||||
FIRE("tooltip.antarchy.royal_guardian_sword.mode.fire", "tooltip.antarchy.royal_guardian_sword.fire"),
|
NONE(-1, "tooltip.antarchy.royal_guardian_sword.mode.none", "tooltip.antarchy.royal_guardian_sword.none"),
|
||||||
FROST("tooltip.antarchy.royal_guardian_sword.mode.frost", "tooltip.antarchy.royal_guardian_sword.frost"),
|
FIRE(0, "tooltip.antarchy.royal_guardian_sword.mode.fire", "tooltip.antarchy.royal_guardian_sword.fire"),
|
||||||
STORM("tooltip.antarchy.royal_guardian_sword.mode.storm", "tooltip.antarchy.royal_guardian_sword.storm");
|
FROST(1, "tooltip.antarchy.royal_guardian_sword.mode.frost", "tooltip.antarchy.royal_guardian_sword.frost"),
|
||||||
|
STORM(2, "tooltip.antarchy.royal_guardian_sword.mode.storm", "tooltip.antarchy.royal_guardian_sword.storm");
|
||||||
|
|
||||||
|
private final int id;
|
||||||
private final String translationKey;
|
private final String translationKey;
|
||||||
private final String tooltipKey;
|
private final String tooltipKey;
|
||||||
|
|
||||||
Mode(String translationKey, String tooltipKey) {
|
Mode(int id, String translationKey, String tooltipKey) {
|
||||||
|
this.id = id;
|
||||||
this.translationKey = translationKey;
|
this.translationKey = translationKey;
|
||||||
this.tooltipKey = tooltipKey;
|
this.tooltipKey = tooltipKey;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Mode next() {
|
public Mode next() {
|
||||||
return values()[(this.ordinal() + 1) % values().length];
|
return switch (this) {
|
||||||
|
case NONE -> FIRE;
|
||||||
|
case FIRE -> FROST;
|
||||||
|
case FROST -> STORM;
|
||||||
|
case STORM -> NONE;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Mode fromId(int id) {
|
||||||
|
for (Mode mode : values()) {
|
||||||
|
if (mode.id == id) {
|
||||||
|
return mode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NONE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
package com.craisinlord.antarchy.content.item;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
|
import com.craisinlord.antarchy.content.time.TemporalTunerAccess;
|
||||||
|
import net.minecraft.ChatFormatting;
|
||||||
|
import net.minecraft.network.chat.Component;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import net.minecraft.world.item.TooltipFlag;
|
||||||
|
import net.minecraft.world.item.component.CustomData;
|
||||||
|
import net.minecraft.core.component.DataComponents;
|
||||||
|
import net.minecraft.sounds.SoundEvents;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public final class TemporalTunerItem extends Item {
|
||||||
|
public static final double STEP = 0.1D;
|
||||||
|
private static final String RATE_TAG = "TemporalTunerRate";
|
||||||
|
|
||||||
|
public TemporalTunerItem(Properties properties) {
|
||||||
|
super(properties.stacksTo(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean isAvailable(Player player) {
|
||||||
|
return player.getInventory().contains(stack -> stack.getItem() instanceof TemporalTunerItem)
|
||||||
|
&& (player.getMainHandItem().getItem() instanceof TemporalTunerItem
|
||||||
|
|| player.getOffhandItem().getItem() instanceof TemporalTunerItem
|
||||||
|
|| hasHotbarTuner(player));
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean hasHotbarTuner(Player player) {
|
||||||
|
for (int slot = 0; slot < 9; slot++) {
|
||||||
|
if (player.getInventory().getItem(slot).getItem() instanceof TemporalTunerItem) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double clampRate(double rate) {
|
||||||
|
return Math.max(AntarchySettings.temporalTunerMinRate(), Math.min(AntarchySettings.temporalTunerMaxRate(), rate));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void adjust(Player player, double delta) {
|
||||||
|
if (!(player instanceof TemporalTunerAccess access) || !isAvailable(player)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
double previousRate = getRate(player);
|
||||||
|
double updatedRate = clampRate(previousRate + delta);
|
||||||
|
access.antarchy$setTemporalTunerRate(updatedRate);
|
||||||
|
if (Math.abs(updatedRate - previousRate) >= 0.001D) {
|
||||||
|
player.playSound(SoundEvents.NOTE_BLOCK_HAT.value(), 0.6F, 1.0F);
|
||||||
|
}
|
||||||
|
syncTooltipRate(player, getRate(player));
|
||||||
|
}
|
||||||
|
|
||||||
|
public static double getRate(Player player) {
|
||||||
|
return player instanceof TemporalTunerAccess access ? clampRate(access.antarchy$getTemporalTunerRate()) : 1.0D;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void syncTooltipRate(Player player, double rate) {
|
||||||
|
for (int slot = 0; slot < 9; slot++) {
|
||||||
|
updateStackRate(player.getInventory().getItem(slot), rate);
|
||||||
|
}
|
||||||
|
updateStackRate(player.getOffhandItem(), rate);
|
||||||
|
}
|
||||||
|
|
||||||
|
private static void updateStackRate(ItemStack stack, double rate) {
|
||||||
|
if (stack.getItem() instanceof TemporalTunerItem) {
|
||||||
|
CustomData.update(DataComponents.CUSTOM_DATA, stack, tag -> tag.putDouble(RATE_TAG, rate));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void appendHoverText(ItemStack stack, TooltipContext context, List<Component> tooltip, TooltipFlag flag) {
|
||||||
|
tooltip.add(Component.translatable("tooltip.antarchy.temporal_tuner.description").withStyle(ChatFormatting.RED));
|
||||||
|
double rate = stack.getOrDefault(DataComponents.CUSTOM_DATA, CustomData.EMPTY).copyTag().getDouble(RATE_TAG);
|
||||||
|
if (rate <= 0.0D) {
|
||||||
|
rate = 1.0D;
|
||||||
|
}
|
||||||
|
tooltip.add(Component.translatable("tooltip.antarchy.temporal_tuner.speed", (int) Math.round(rate * 100.0D)).withStyle(ChatFormatting.GRAY));
|
||||||
|
tooltip.add(Component.translatable("tooltip.antarchy.temporal_tuner.controls", (int) (AntarchySettings.temporalTunerMinRate() * 100), (int) (AntarchySettings.temporalTunerMaxRate() * 100)).withStyle(ChatFormatting.GRAY));
|
||||||
|
tooltip.add(Component.translatable("tooltip.antarchy.temporal_tuner.availability").withStyle(ChatFormatting.RED));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
package com.craisinlord.antarchy.content.menu;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.content.AntarchyObjects;
|
||||||
|
import com.craisinlord.antarchy.content.item.GiantFryingPanItem;
|
||||||
|
import com.craisinlord.antarchy.content.item.GiantFryingPanStorage;
|
||||||
|
import net.minecraft.world.entity.player.Inventory;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import net.minecraft.world.inventory.AbstractContainerMenu;
|
||||||
|
import net.minecraft.world.inventory.Slot;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
|
||||||
|
public final class GiantFryingPanMenu extends AbstractContainerMenu {
|
||||||
|
private final GiantFryingPanStorage panStorage;
|
||||||
|
|
||||||
|
public GiantFryingPanMenu(int containerId, Inventory inventory) {
|
||||||
|
super(AntarchyObjects.GIANT_FRYING_PAN_MENU.get(), containerId);
|
||||||
|
ItemStack pan = GiantFryingPanStorage.findPan(inventory.player);
|
||||||
|
this.panStorage = new GiantFryingPanStorage(pan, inventory.player);
|
||||||
|
for (int slot = 0; slot < GiantFryingPanStorage.SLOT_COUNT; slot++) {
|
||||||
|
this.addSlot(new Slot(panStorage, slot, 8 + slot * 18, 18) {
|
||||||
|
@Override
|
||||||
|
public boolean mayPlace(ItemStack stack) {
|
||||||
|
return GiantFryingPanStorage.isCampfireInput(inventory.player, stack);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int getMaxStackSize() { return 1; }
|
||||||
|
});
|
||||||
|
}
|
||||||
|
for (int row = 0; row < 3; row++) {
|
||||||
|
for (int col = 0; col < 9; col++) {
|
||||||
|
this.addSlot(new Slot(inventory, col + row * 9 + 9, 8 + col * 18, 50 + row * 18));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (int col = 0; col < 9; col++) this.addSlot(new Slot(inventory, col, 8 + col * 18, 108));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean stillValid(Player player) { return player.isAlive() && !panStorage.isEmpty() || GiantFryingPanStorage.findPan(player).getItem() instanceof GiantFryingPanItem; }
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ItemStack quickMoveStack(Player player, int index) {
|
||||||
|
if (index < 0 || index >= slots.size()) return ItemStack.EMPTY;
|
||||||
|
Slot slot = slots.get(index);
|
||||||
|
if (!slot.hasItem()) return ItemStack.EMPTY;
|
||||||
|
ItemStack original = slot.getItem().copy();
|
||||||
|
if (index < GiantFryingPanStorage.SLOT_COUNT) {
|
||||||
|
if (!moveItemStackTo(slot.getItem(), GiantFryingPanStorage.SLOT_COUNT, slots.size(), true)) return ItemStack.EMPTY;
|
||||||
|
} else if (!moveItemStackTo(slot.getItem(), 0, GiantFryingPanStorage.SLOT_COUNT, false)) return ItemStack.EMPTY;
|
||||||
|
if (slot.getItem().isEmpty()) slot.setByPlayer(ItemStack.EMPTY);
|
||||||
|
else slot.setChanged();
|
||||||
|
return original;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
package com.craisinlord.antarchy.content.network;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.Antarchy;
|
||||||
|
import io.netty.buffer.ByteBuf;
|
||||||
|
import net.minecraft.network.codec.ByteBufCodecs;
|
||||||
|
import net.minecraft.network.codec.StreamCodec;
|
||||||
|
import net.minecraft.network.protocol.common.custom.CustomPacketPayload;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
|
||||||
|
public record TemporalTunerScrollPayload(double delta) implements CustomPacketPayload {
|
||||||
|
public static final Type<TemporalTunerScrollPayload> TYPE = new Type<>(ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "temporal_tuner_scroll"));
|
||||||
|
public static final StreamCodec<ByteBuf, TemporalTunerScrollPayload> STREAM_CODEC = StreamCodec.composite(
|
||||||
|
ByteBufCodecs.DOUBLE, TemporalTunerScrollPayload::delta, TemporalTunerScrollPayload::new);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Type<TemporalTunerScrollPayload> type() {
|
||||||
|
return TYPE;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,116 @@
|
|||||||
|
package com.craisinlord.antarchy.content.portal;
|
||||||
|
|
||||||
|
import java.util.LinkedHashSet;
|
||||||
|
import java.util.Set;
|
||||||
|
import net.minecraft.core.BlockPos;
|
||||||
|
import net.minecraft.core.Direction;
|
||||||
|
import net.minecraft.server.level.ServerLevel;
|
||||||
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
|
import net.minecraft.world.entity.Entity;
|
||||||
|
import net.minecraft.world.entity.vehicle.DismountHelper;
|
||||||
|
import net.minecraft.world.level.block.state.BlockState;
|
||||||
|
import net.minecraft.world.level.levelgen.Heightmap;
|
||||||
|
import net.minecraft.world.level.portal.DimensionTransition;
|
||||||
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
public final class CrossDimensionTravelApi {
|
||||||
|
private static final int HORIZONTAL_SEARCH_RADIUS = 8;
|
||||||
|
private static final int VERTICAL_SEARCH_RADIUS = 8;
|
||||||
|
|
||||||
|
private CrossDimensionTravelApi() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static boolean transferToSafePosition(Entity entity, ServerLevel destination, BlockPos preferred) {
|
||||||
|
if (!entity.isAlive() || !(entity.level() instanceof ServerLevel source)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
Vec3 arrival = findSafePosition(entity, destination, preferred);
|
||||||
|
if (arrival == null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (entity instanceof ServerPlayer player) {
|
||||||
|
player.teleportTo(destination, arrival.x, arrival.y, arrival.z, player.getYRot(), player.getXRot());
|
||||||
|
player.setPortalCooldown();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (source == destination) {
|
||||||
|
entity.teleportTo(arrival.x, arrival.y, arrival.z);
|
||||||
|
entity.setPortalCooldown();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
Entity moved = entity.changeDimension(new DimensionTransition(
|
||||||
|
destination,
|
||||||
|
arrival,
|
||||||
|
Vec3.ZERO,
|
||||||
|
entity.getYRot(),
|
||||||
|
entity.getXRot(),
|
||||||
|
DimensionTransition.PLAY_PORTAL_SOUND
|
||||||
|
));
|
||||||
|
if (moved != null) {
|
||||||
|
moved.setPortalCooldown();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
public static Vec3 findSafePosition(Entity entity, ServerLevel destination, BlockPos preferred) {
|
||||||
|
Set<BlockPos> candidates = new LinkedHashSet<>();
|
||||||
|
candidates.add(preferred);
|
||||||
|
for (int radius = 0; radius <= HORIZONTAL_SEARCH_RADIUS; radius++) {
|
||||||
|
for (int x = -radius; x <= radius; x++) {
|
||||||
|
for (int z = -radius; z <= radius; z++) {
|
||||||
|
if (radius > 0 && Math.abs(x) != radius && Math.abs(z) != radius) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
BlockPos column = preferred.offset(x, 0, z);
|
||||||
|
if (destination.hasChunkAt(column)) {
|
||||||
|
BlockPos surface = destination.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, column);
|
||||||
|
candidates.add(surface);
|
||||||
|
candidates.add(surface.above());
|
||||||
|
}
|
||||||
|
for (int y = 0; y <= VERTICAL_SEARCH_RADIUS; y++) {
|
||||||
|
candidates.add(column.above(y));
|
||||||
|
if (y > 0) {
|
||||||
|
candidates.add(column.below(y));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (BlockPos candidate : candidates) {
|
||||||
|
if (!isAreaLoaded(destination, candidate)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
Vec3 safe = DismountHelper.findSafeDismountLocation(entity.getType(), destination, candidate, true);
|
||||||
|
if (safe != null && isValidPosition(destination, safe)) {
|
||||||
|
return safe;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isAreaLoaded(ServerLevel level, BlockPos center) {
|
||||||
|
if (center.getY() <= level.getMinBuildHeight() || center.getY() >= level.getMaxBuildHeight() - 1
|
||||||
|
|| !level.getWorldBorder().isWithinBounds(center)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (Direction direction : Direction.values()) {
|
||||||
|
if (!level.hasChunkAt(center.relative(direction))) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return level.hasChunkAt(center) && level.hasChunkAt(center.above());
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isValidPosition(ServerLevel level, Vec3 position) {
|
||||||
|
BlockPos feet = BlockPos.containing(position);
|
||||||
|
BlockPos head = feet.above();
|
||||||
|
BlockState feetState = level.getBlockState(feet);
|
||||||
|
BlockState headState = level.getBlockState(head);
|
||||||
|
return feetState.getFluidState().isEmpty() && headState.getFluidState().isEmpty()
|
||||||
|
&& feetState.getCollisionShape(level, feet).isEmpty()
|
||||||
|
&& headState.getCollisionShape(level, head).isEmpty();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package com.craisinlord.antarchy.content.time;
|
||||||
|
|
||||||
|
public interface TemporalTunerAccess {
|
||||||
|
double antarchy$getTemporalTunerRate();
|
||||||
|
|
||||||
|
void antarchy$setTemporalTunerRate(double rate);
|
||||||
|
}
|
||||||
@@ -12,6 +12,8 @@ import net.minecraft.server.level.ServerLevel;
|
|||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
import net.minecraft.world.entity.Entity;
|
import net.minecraft.world.entity.Entity;
|
||||||
import net.minecraft.world.entity.projectile.Projectile;
|
import net.minecraft.world.entity.projectile.Projectile;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import com.craisinlord.antarchy.content.item.TemporalTunerItem;
|
||||||
import com.craisinlord.antarchy.content.effect.DilatedMobEffect;
|
import com.craisinlord.antarchy.content.effect.DilatedMobEffect;
|
||||||
import com.craisinlord.antarchy.content.effect.ContractedMobEffect;
|
import com.craisinlord.antarchy.content.effect.ContractedMobEffect;
|
||||||
import com.craisinlord.antarchy.content.effect.RoyalEffectEligibility;
|
import com.craisinlord.antarchy.content.effect.RoyalEffectEligibility;
|
||||||
@@ -35,6 +37,9 @@ public final class TimeDilationManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
TrackingState tracking = TRACKING.get(level);
|
TrackingState tracking = TRACKING.get(level);
|
||||||
|
for (ServerPlayer player : level.players()) {
|
||||||
|
trackPotentiallyAffected(player);
|
||||||
|
}
|
||||||
if (activeFields == null && (tracking == null || tracking.entities.isEmpty())) {
|
if (activeFields == null && (tracking == null || tracking.entities.isEmpty())) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -64,13 +69,15 @@ public final class TimeDilationManager {
|
|||||||
if (!(entity.level() instanceof ServerLevel level) || entity instanceof TimeDilationFieldEntity) {
|
if (!(entity.level() instanceof ServerLevel level) || entity instanceof TimeDilationFieldEntity) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
boolean hasTuner = entity instanceof Player player && TemporalTunerItem.isAvailable(player);
|
||||||
|
boolean hasEffect = entity instanceof net.minecraft.world.entity.LivingEntity living
|
||||||
|
&& ((RoyalEffectHooks.dilatedHolder() != null && living.hasEffect(RoyalEffectHooks.dilatedHolder()))
|
||||||
|
|| (RoyalEffectHooks.contractedHolder() != null && living.hasEffect(RoyalEffectHooks.contractedHolder())));
|
||||||
if (entity instanceof TimeDilationEntityAccess access
|
if (entity instanceof TimeDilationEntityAccess access
|
||||||
&& Math.abs(access.antarchy$getTimeDilationRate() - TimeDilationMath.NORMAL_RATE) < 0.001D
|
&& Math.abs(access.antarchy$getTimeDilationRate() - TimeDilationMath.NORMAL_RATE) < 0.001D
|
||||||
&& Math.abs(access.antarchy$getInheritedTimeDilationRate() - TimeDilationMath.NORMAL_RATE) < 0.001D
|
&& Math.abs(access.antarchy$getInheritedTimeDilationRate() - TimeDilationMath.NORMAL_RATE) < 0.001D
|
||||||
&& Math.abs(TimeDilationApi.getVehicleRate(entity) - TimeDilationMath.NORMAL_RATE) < 0.001D
|
&& Math.abs(TimeDilationApi.getVehicleRate(entity) - TimeDilationMath.NORMAL_RATE) < 0.001D
|
||||||
&& (!(entity instanceof net.minecraft.world.entity.LivingEntity living)
|
&& !hasTuner && !hasEffect) {
|
||||||
|| ((RoyalEffectHooks.dilatedHolder() == null || !living.hasEffect(RoyalEffectHooks.dilatedHolder()))
|
|
||||||
&& (RoyalEffectHooks.contractedHolder() == null || !living.hasEffect(RoyalEffectHooks.contractedHolder()))))) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
TRACKING.computeIfAbsent(level, ignored -> new TrackingState()).entities.add(entity);
|
TRACKING.computeIfAbsent(level, ignored -> new TrackingState()).entities.add(entity);
|
||||||
@@ -165,6 +172,15 @@ public final class TimeDilationManager {
|
|||||||
effectRate = Math.max(effectRate, ContractedMobEffect.rateForAmplifier(effect.getAmplifier()));
|
effectRate = Math.max(effectRate, ContractedMobEffect.rateForAmplifier(effect.getAmplifier()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
double tunerRate = TimeDilationMath.NORMAL_RATE;
|
||||||
|
if (entity instanceof Player player && player instanceof TemporalTunerAccess tunerAccess) {
|
||||||
|
if (TemporalTunerItem.isAvailable(player)) {
|
||||||
|
tunerRate = TemporalTunerItem.getRate(player);
|
||||||
|
} else {
|
||||||
|
tunerAccess.antarchy$setTemporalTunerRate(TimeDilationMath.NORMAL_RATE);
|
||||||
|
TemporalTunerItem.syncTooltipRate(player, TimeDilationMath.NORMAL_RATE);
|
||||||
|
}
|
||||||
|
}
|
||||||
double inheritedRate = access.antarchy$getInheritedTimeDilationRate();
|
double inheritedRate = access.antarchy$getInheritedTimeDilationRate();
|
||||||
double vehicleRate = TimeDilationApi.getVehicleRate(entity);
|
double vehicleRate = TimeDilationApi.getVehicleRate(entity);
|
||||||
if (vehicleRate < TimeDilationMath.NORMAL_RATE) {
|
if (vehicleRate < TimeDilationMath.NORMAL_RATE) {
|
||||||
@@ -190,6 +206,11 @@ public final class TimeDilationManager {
|
|||||||
} else {
|
} else {
|
||||||
fastRate = Math.max(fastRate, effectRate);
|
fastRate = Math.max(fastRate, effectRate);
|
||||||
}
|
}
|
||||||
|
if (tunerRate < TimeDilationMath.NORMAL_RATE) {
|
||||||
|
slowRate = Math.min(slowRate, tunerRate);
|
||||||
|
} else {
|
||||||
|
fastRate = Math.max(fastRate, tunerRate);
|
||||||
|
}
|
||||||
if (inheritedRate < TimeDilationMath.NORMAL_RATE) {
|
if (inheritedRate < TimeDilationMath.NORMAL_RATE) {
|
||||||
slowRate = Math.min(slowRate, inheritedRate);
|
slowRate = Math.min(slowRate, inheritedRate);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -16,7 +16,8 @@ public abstract class AlexsCavesDepthChargeMixin {
|
|||||||
@ModifyArg(
|
@ModifyArg(
|
||||||
method = "tick",
|
method = "tick",
|
||||||
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/phys/Vec3;add(DDD)Lnet/minecraft/world/phys/Vec3;"),
|
at = @At(value = "INVOKE", target = "Lnet/minecraft/world/phys/Vec3;add(DDD)Lnet/minecraft/world/phys/Vec3;"),
|
||||||
index = 1
|
index = 1,
|
||||||
|
require = 0
|
||||||
)
|
)
|
||||||
private double antarchy$invertManualGravity(double y) {
|
private double antarchy$invertManualGravity(double y) {
|
||||||
Projectile self = (Projectile) (Object) this;
|
Projectile self = (Projectile) (Object) this;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ public abstract class LivingEntityTimeDilationMixin {
|
|||||||
private void antarchy$trackTemporalEffects(CallbackInfo ci) {
|
private void antarchy$trackTemporalEffects(CallbackInfo ci) {
|
||||||
Entity entity = (Entity) (Object) this;
|
Entity entity = (Entity) (Object) this;
|
||||||
TimeDilationManager.trackPotentiallyAffected(entity);
|
TimeDilationManager.trackPotentiallyAffected(entity);
|
||||||
if (entity.level().isClientSide && RoyalEffectHooks.contractedHolder() != null) {
|
if (entity.level().isClientSide) {
|
||||||
ContractionAfterimages.observe((LivingEntity) entity);
|
ContractionAfterimages.observe((LivingEntity) entity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package com.craisinlord.antarchy.mixins.time;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.content.time.TimeDilationMath;
|
||||||
|
import com.craisinlord.antarchy.content.time.TemporalTunerAccess;
|
||||||
|
import net.minecraft.nbt.CompoundTag;
|
||||||
|
import net.minecraft.world.entity.player.Player;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.Unique;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.Inject;
|
||||||
|
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||||
|
|
||||||
|
@Mixin(Player.class)
|
||||||
|
public abstract class PlayerTemporalTunerMixin implements TemporalTunerAccess {
|
||||||
|
@Unique
|
||||||
|
private double antarchy$temporalTunerRate = TimeDilationMath.NORMAL_RATE;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double antarchy$getTemporalTunerRate() {
|
||||||
|
return antarchy$temporalTunerRate;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void antarchy$setTemporalTunerRate(double rate) {
|
||||||
|
antarchy$temporalTunerRate = TimeDilationMath.clampRate(rate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "addAdditionalSaveData", at = @At("TAIL"))
|
||||||
|
private void antarchy$saveTemporalTunerRate(CompoundTag tag, CallbackInfo ci) {
|
||||||
|
tag.putDouble("AntarchyTemporalTunerRate", antarchy$temporalTunerRate);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Inject(method = "readAdditionalSaveData", at = @At("TAIL"))
|
||||||
|
private void antarchy$loadTemporalTunerRate(CompoundTag tag, CallbackInfo ci) {
|
||||||
|
antarchy$temporalTunerRate = TimeDilationMath.clampRate(tag.getDouble("AntarchyTemporalTunerRate"));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -107,6 +107,7 @@
|
|||||||
"time.EntityDeltaMovementTimeDilationMixin",
|
"time.EntityDeltaMovementTimeDilationMixin",
|
||||||
"time.EntityMoveTimeDilationMixin",
|
"time.EntityMoveTimeDilationMixin",
|
||||||
"time.EntityTimeDilationStateMixin",
|
"time.EntityTimeDilationStateMixin",
|
||||||
|
"time.PlayerTemporalTunerMixin",
|
||||||
"time.EntityRotationTimeDilationMixin",
|
"time.EntityRotationTimeDilationMixin",
|
||||||
"time.EntityCrouchTimeDilationMixin",
|
"time.EntityCrouchTimeDilationMixin",
|
||||||
"time.LivingEntityKnockbackTimeDilationMixin",
|
"time.LivingEntityKnockbackTimeDilationMixin",
|
||||||
|
|||||||
@@ -0,0 +1,110 @@
|
|||||||
|
{
|
||||||
|
"format_version": "1.21.110",
|
||||||
|
"minecraft:geometry": [
|
||||||
|
{
|
||||||
|
"description": {
|
||||||
|
"identifier": "geometry.unknown",
|
||||||
|
"texture_width": 128,
|
||||||
|
"texture_height": 128,
|
||||||
|
"visible_bounds_width": 4,
|
||||||
|
"visible_bounds_height": 6,
|
||||||
|
"visible_bounds_offset": [0, 2, 0]
|
||||||
|
},
|
||||||
|
"bones": [
|
||||||
|
{
|
||||||
|
"name": "giant_frying_pan",
|
||||||
|
"pivot": [0, -2, 0],
|
||||||
|
"cubes": [
|
||||||
|
{"origin": [-1, 0, -1], "size": [2, 20, 2], "uv": [16, 0]}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "handle",
|
||||||
|
"parent": "giant_frying_pan",
|
||||||
|
"pivot": [0, -2, 0],
|
||||||
|
"cubes": [
|
||||||
|
{
|
||||||
|
"origin": [-2, -16, -2],
|
||||||
|
"size": [4, 16, 4],
|
||||||
|
"uv": {
|
||||||
|
"north": {"uv": [4, 4], "uv_size": [4, 16]},
|
||||||
|
"east": {"uv": [8, 4], "uv_size": [-4, 16]},
|
||||||
|
"south": {"uv": [4, 4], "uv_size": [4, 16]},
|
||||||
|
"west": {"uv": [8, 4], "uv_size": [-4, 16]},
|
||||||
|
"up": {"uv": [4, 0], "uv_size": [4, 4]},
|
||||||
|
"down": {"uv": [8, 4], "uv_size": [4, -4]}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pan_base",
|
||||||
|
"parent": "giant_frying_pan",
|
||||||
|
"pivot": [0, 38, 0],
|
||||||
|
"cubes": [
|
||||||
|
{
|
||||||
|
"origin": [-18, 22, 1],
|
||||||
|
"size": [36, 36, 2],
|
||||||
|
"uv": {
|
||||||
|
"north": {"uv": [0, 22], "uv_size": [36, 36]},
|
||||||
|
"east": {"uv": [26, 66], "uv_size": [2, 36]},
|
||||||
|
"south": {"uv": [36, 0], "uv_size": [36, 36]},
|
||||||
|
"west": {"uv": [28, 66], "uv_size": [2, 36]},
|
||||||
|
"up": {"uv": [102, 64], "uv_size": [-36, -2]},
|
||||||
|
"down": {"uv": [102, 66], "uv_size": [-36, -2]}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"origin": [18, 22, -3],
|
||||||
|
"size": [2, 36, 6],
|
||||||
|
"uv": {
|
||||||
|
"north": {"uv": [64, 62], "uv_size": [2, 36]},
|
||||||
|
"east": {"uv": [0, 58], "uv_size": [6, 36]},
|
||||||
|
"south": {"uv": [24, 66], "uv_size": [2, 36]},
|
||||||
|
"west": {"uv": [38, 54], "uv_size": [36, -6], "uv_rotation": 90},
|
||||||
|
"up": {"uv": [26, 10], "uv_size": [-2, -6]},
|
||||||
|
"down": {"uv": [26, 16], "uv_size": [-2, -6]}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"origin": [-20, 20, -3],
|
||||||
|
"size": [40, 2, 6],
|
||||||
|
"uv": {
|
||||||
|
"north": {"uv": [24, 60], "uv_size": [40, 2]},
|
||||||
|
"east": {"uv": [74, 48], "uv_size": [2, 6], "uv_rotation": 90},
|
||||||
|
"south": {"uv": [24, 62], "uv_size": [40, 2]},
|
||||||
|
"west": {"uv": [38, 54], "uv_size": [-2, -6], "uv_rotation": 90},
|
||||||
|
"up": {"uv": [76, 42], "uv_size": [-40, -6]},
|
||||||
|
"down": {"uv": [76, 48], "uv_size": [-40, 6]}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"origin": [-20, 22, -3],
|
||||||
|
"size": [2, 36, 6],
|
||||||
|
"uv": {
|
||||||
|
"north": {"uv": [30, 66], "uv_size": [2, 36]},
|
||||||
|
"east": {"uv": [38, 48], "uv_size": [36, 6], "uv_rotation": 90},
|
||||||
|
"south": {"uv": [32, 66], "uv_size": [2, 36]},
|
||||||
|
"west": {"uv": [18, 58], "uv_size": [6, 36]},
|
||||||
|
"up": {"uv": [26, 22], "uv_size": [-2, -6]},
|
||||||
|
"down": {"uv": [28, 10], "uv_size": [-2, -6]}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"origin": [-20, 58, -3],
|
||||||
|
"size": [40, 2, 6],
|
||||||
|
"uv": {
|
||||||
|
"north": {"uv": [24, 64], "uv_size": [40, 2]},
|
||||||
|
"east": {"uv": [36, 48], "uv_size": [2, 6], "uv_rotation": 90},
|
||||||
|
"south": {"uv": [64, 60], "uv_size": [40, 2]},
|
||||||
|
"west": {"uv": [36, 54], "uv_size": [2, -6], "uv_rotation": 90},
|
||||||
|
"up": {"uv": [76, 54], "uv_size": [-40, -6]},
|
||||||
|
"down": {"uv": [76, 60], "uv_size": [-40, -6]}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"model": {
|
||||||
|
"type": "minecraft:model",
|
||||||
|
"model": "antarchy:item/blood_gods_blade"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -321,6 +321,10 @@
|
|||||||
"subtitles.antarchy.mantis_attack": "Mantis snaps",
|
"subtitles.antarchy.mantis_attack": "Mantis snaps",
|
||||||
"subtitles.antarchy.mantis_fly_loop": "Mantis wings buzz",
|
"subtitles.antarchy.mantis_fly_loop": "Mantis wings buzz",
|
||||||
"item.antarchy.big_bertha": "Big Bertha",
|
"item.antarchy.big_bertha": "Big Bertha",
|
||||||
|
"item.antarchy.giant_frying_pan": "Giant Frying Pan",
|
||||||
|
"tooltip.antarchy.giant_frying_pan.insert": "Right-click with food to add it to the pan.",
|
||||||
|
"tooltip.antarchy.giant_frying_pan.gui": "Shift-right-click to open the cooking slots.",
|
||||||
|
"tooltip.antarchy.giant_frying_pan.campfire": "Cooks campfire recipes without fuel.",
|
||||||
"item.antarchy.bluestone": "Bluestone Dust",
|
"item.antarchy.bluestone": "Bluestone Dust",
|
||||||
"item.antarchy.wasp_nest": "Wasp Nest",
|
"item.antarchy.wasp_nest": "Wasp Nest",
|
||||||
"item.antarchy.stink_bug": "Stink Bug",
|
"item.antarchy.stink_bug": "Stink Bug",
|
||||||
@@ -528,6 +532,11 @@
|
|||||||
"item.antarchy.blood_crystal_shard": "Blood Crystal Shard",
|
"item.antarchy.blood_crystal_shard": "Blood Crystal Shard",
|
||||||
"item.antarchy.blood_crystal_apple": "Blood Crystal Apple",
|
"item.antarchy.blood_crystal_apple": "Blood Crystal Apple",
|
||||||
"item.antarchy.blood_crystal_katana": "Blood Crystal Katana",
|
"item.antarchy.blood_crystal_katana": "Blood Crystal Katana",
|
||||||
|
"item.antarchy.blood_gods_blade": "Blood God’s Blade",
|
||||||
|
"tooltip.antarchy.blood_gods_blade.bleeding": "Hits inflict Bleeding",
|
||||||
|
"tooltip.antarchy.blood_gods_blade.blood_moon": "Right-click: Summon Blood Moon",
|
||||||
|
"effect.antarchy.bleeding": "Bleeding",
|
||||||
|
"effect.antarchy.blood_moon": "Blood Moon",
|
||||||
"item.antarchy.blood_crystal_helmet": "Blood Crystal Helmet",
|
"item.antarchy.blood_crystal_helmet": "Blood Crystal Helmet",
|
||||||
"item.antarchy.blood_crystal_chestplate": "Blood Crystal Chestplate",
|
"item.antarchy.blood_crystal_chestplate": "Blood Crystal Chestplate",
|
||||||
"item.antarchy.blood_crystal_leggings": "Blood Crystal Leggings",
|
"item.antarchy.blood_crystal_leggings": "Blood Crystal Leggings",
|
||||||
@@ -548,9 +557,11 @@
|
|||||||
"item.antarchy.royal_guardian_sword": "Royal Guardian Sword",
|
"item.antarchy.royal_guardian_sword": "Royal Guardian Sword",
|
||||||
"item.antarchy.royal_guardian_shield": "Royal Guardian Shield",
|
"item.antarchy.royal_guardian_shield": "Royal Guardian Shield",
|
||||||
"tooltip.antarchy.royal_guardian_sword.mode": "Mode: %s",
|
"tooltip.antarchy.royal_guardian_sword.mode": "Mode: %s",
|
||||||
|
"tooltip.antarchy.royal_guardian_sword.mode.none": "None",
|
||||||
"tooltip.antarchy.royal_guardian_sword.mode.fire": "Fire",
|
"tooltip.antarchy.royal_guardian_sword.mode.fire": "Fire",
|
||||||
"tooltip.antarchy.royal_guardian_sword.mode.frost": "Frost",
|
"tooltip.antarchy.royal_guardian_sword.mode.frost": "Frost",
|
||||||
"tooltip.antarchy.royal_guardian_sword.mode.storm": "Storm",
|
"tooltip.antarchy.royal_guardian_sword.mode.storm": "Storm",
|
||||||
|
"tooltip.antarchy.royal_guardian_sword.none": "Fully charged hits use the sword's normal damage without an elemental discharge.",
|
||||||
"tooltip.antarchy.royal_guardian_sword.fire": "Fully charged hits erupt in royal flame, burning the target and nearby enemies.",
|
"tooltip.antarchy.royal_guardian_sword.fire": "Fully charged hits erupt in royal flame, burning the target and nearby enemies.",
|
||||||
"tooltip.antarchy.royal_guardian_sword.frost": "Fully charged hits freeze the target and raise a fan of royal ice spikes.",
|
"tooltip.antarchy.royal_guardian_sword.frost": "Fully charged hits freeze the target and raise a fan of royal ice spikes.",
|
||||||
"tooltip.antarchy.royal_guardian_sword.storm": "Fully charged hits call royal lightning that chains between nearby enemies.",
|
"tooltip.antarchy.royal_guardian_sword.storm": "Fully charged hits call royal lightning that chains between nearby enemies.",
|
||||||
@@ -577,6 +588,11 @@
|
|||||||
"tooltip.antarchy.mantis_claw.wall_cling": "Dual wield to cling to walls and jump upward.",
|
"tooltip.antarchy.mantis_claw.wall_cling": "Dual wield to cling to walls and jump upward.",
|
||||||
"item.antarchy.king_scale": "King Scale",
|
"item.antarchy.king_scale": "King Scale",
|
||||||
"item.antarchy.queen_scale": "Queen Scale",
|
"item.antarchy.queen_scale": "Queen Scale",
|
||||||
|
"item.antarchy.temporal_tuner": "Temporal Tuner",
|
||||||
|
"tooltip.antarchy.temporal_tuner.description": "Adjusts your personal time dilation.",
|
||||||
|
"tooltip.antarchy.temporal_tuner.speed": "Current speed: %s%%",
|
||||||
|
"tooltip.antarchy.temporal_tuner.controls": "Shift + scroll: %s%% to %s%% speed",
|
||||||
|
"tooltip.antarchy.temporal_tuner.availability": "Resets when removed from your hotbar and offhand.",
|
||||||
"item.antarchy.jerry_nucleus": "Jerry Nucleus",
|
"item.antarchy.jerry_nucleus": "Jerry Nucleus",
|
||||||
"tooltip.antarchy.jerry_nucleus.hatch": "While holding, interact with any bug egg or turtle egg to hatch it instantly.",
|
"tooltip.antarchy.jerry_nucleus.hatch": "While holding, interact with any bug egg or turtle egg to hatch it instantly.",
|
||||||
"key.antarchy.mount_special": "Mount: Special / Charge",
|
"key.antarchy.mount_special": "Mount: Special / Charge",
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:item/handheld",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "antarchy:item/blood_gods_blade"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"gui_light": "front",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "antarchy:item/giant_frying_pan/giant_frying_pan_in_hand"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,90 @@
|
|||||||
|
{
|
||||||
|
"credit": "Made with Blockbench",
|
||||||
|
"parent": "builtin/entity",
|
||||||
|
"texture_size": [
|
||||||
|
128,
|
||||||
|
128
|
||||||
|
],
|
||||||
|
"display": {
|
||||||
|
"thirdperson_righthand": {
|
||||||
|
"rotation": [
|
||||||
|
-25,
|
||||||
|
-180,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"translation": [
|
||||||
|
0,
|
||||||
|
-4,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
1.2,
|
||||||
|
1.2,
|
||||||
|
1.2
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"thirdperson_lefthand": {
|
||||||
|
"rotation": [
|
||||||
|
-25,
|
||||||
|
-180,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"translation": [
|
||||||
|
0,
|
||||||
|
-4,
|
||||||
|
3
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
1.2,
|
||||||
|
1.2,
|
||||||
|
1.2
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"firstperson_righthand": {
|
||||||
|
"rotation": [
|
||||||
|
-75,
|
||||||
|
-180,
|
||||||
|
15
|
||||||
|
],
|
||||||
|
"translation": [
|
||||||
|
10,
|
||||||
|
-5,
|
||||||
|
10
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0.68,
|
||||||
|
0.68,
|
||||||
|
0.68
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"firstperson_lefthand": {
|
||||||
|
"rotation": [
|
||||||
|
-75,
|
||||||
|
-180,
|
||||||
|
15
|
||||||
|
],
|
||||||
|
"translation": [
|
||||||
|
10,
|
||||||
|
-5,
|
||||||
|
10
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0.68,
|
||||||
|
0.68,
|
||||||
|
0.68
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"ground": {
|
||||||
|
"translation": [
|
||||||
|
0,
|
||||||
|
2,
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"scale": [
|
||||||
|
0.2,
|
||||||
|
0.2,
|
||||||
|
0.2
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "antarchy:item/temporal_tuner"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 8.8 KiB |
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"animation": {
|
||||||
|
"frametime": 5,
|
||||||
|
"interpolate": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 4.2 KiB |
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"animation": {
|
||||||
|
"frametime": 5,
|
||||||
|
"interpolate": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 1002 B |
|
After Width: | Height: | Size: 270 B |
|
After Width: | Height: | Size: 219 B |
|
After Width: | Height: | Size: 181 B |
|
After Width: | Height: | Size: 176 B |
|
After Width: | Height: | Size: 140 B |
|
After Width: | Height: | Size: 489 B |
|
Before Width: | Height: | Size: 335 B After Width: | Height: | Size: 509 B |
|
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 509 B |
|
After Width: | Height: | Size: 395 B |
|
After Width: | Height: | Size: 477 B |
|
After Width: | Height: | Size: 4.1 KiB |
|
After Width: | Height: | Size: 544 B |
|
Before Width: | Height: | Size: 312 B After Width: | Height: | Size: 369 B |
|
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 440 B |
|
Before Width: | Height: | Size: 227 B After Width: | Height: | Size: 447 B |
|
After Width: | Height: | Size: 192 B |
@@ -124,6 +124,11 @@
|
|||||||
"name": "antarchy:music_disc_verdance",
|
"name": "antarchy:music_disc_verdance",
|
||||||
"weight": 2
|
"weight": 2
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"type": "minecraft:item",
|
||||||
|
"name": "antarchy:blood_gods_blade",
|
||||||
|
"weight": 1
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "minecraft:item",
|
"type": "minecraft:item",
|
||||||
"name": "antos:floppy_disk",
|
"name": "antos:floppy_disk",
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"category": "equipment",
|
||||||
|
"pattern": [
|
||||||
|
"NNN",
|
||||||
|
"NNN",
|
||||||
|
" S "
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"N": {
|
||||||
|
"item": "minecraft:netherite_block"
|
||||||
|
},
|
||||||
|
"S": {
|
||||||
|
"item": "antarchy:ultimate_shovel"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"id": "antarchy:giant_frying_pan",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
"type": "minecraft:crafting_shaped",
|
||||||
|
"category": "misc",
|
||||||
|
"pattern": [
|
||||||
|
"QSQ",
|
||||||
|
"QCQ",
|
||||||
|
"QQQ"
|
||||||
|
],
|
||||||
|
"key": {
|
||||||
|
"S": {
|
||||||
|
"item": "antarchy:blood_crystal_shard"
|
||||||
|
},
|
||||||
|
"Q": {
|
||||||
|
"item": "antarchy:queen_scale"
|
||||||
|
},
|
||||||
|
"C": {
|
||||||
|
"item": "minecraft:compass"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"result": {
|
||||||
|
"id": "antarchy:temporal_tuner",
|
||||||
|
"count": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,6 +8,7 @@
|
|||||||
"antarchy:ultimate_sword",
|
"antarchy:ultimate_sword",
|
||||||
"antarchy:battle_axe",
|
"antarchy:battle_axe",
|
||||||
"antarchy:big_bertha",
|
"antarchy:big_bertha",
|
||||||
|
"antarchy:giant_frying_pan",
|
||||||
"antarchy:nightmare_sword",
|
"antarchy:nightmare_sword",
|
||||||
"antarchy:basilisk_dagger",
|
"antarchy:basilisk_dagger",
|
||||||
"antarchy:ultimate_bow",
|
"antarchy:ultimate_bow",
|
||||||
@@ -23,6 +24,7 @@
|
|||||||
"antarchy:nightmare_boots",
|
"antarchy:nightmare_boots",
|
||||||
"antarchy:moggles",
|
"antarchy:moggles",
|
||||||
"antarchy:blood_crystal_katana",
|
"antarchy:blood_crystal_katana",
|
||||||
|
"antarchy:blood_gods_blade",
|
||||||
"antarchy:mantis_claw",
|
"antarchy:mantis_claw",
|
||||||
"antarchy:krakens_grasp",
|
"antarchy:krakens_grasp",
|
||||||
"antarchy:blood_crystal_helmet",
|
"antarchy:blood_crystal_helmet",
|
||||||
|
|||||||
@@ -5,9 +5,11 @@
|
|||||||
"antarchy:ultimate_axe",
|
"antarchy:ultimate_axe",
|
||||||
"antarchy:ultimate_sword",
|
"antarchy:ultimate_sword",
|
||||||
"antarchy:big_bertha",
|
"antarchy:big_bertha",
|
||||||
|
"antarchy:giant_frying_pan",
|
||||||
"antarchy:nightmare_sword",
|
"antarchy:nightmare_sword",
|
||||||
"antarchy:basilisk_dagger",
|
"antarchy:basilisk_dagger",
|
||||||
"antarchy:blood_crystal_katana",
|
"antarchy:blood_crystal_katana",
|
||||||
|
"antarchy:blood_gods_blade",
|
||||||
"antarchy:mantis_claw",
|
"antarchy:mantis_claw",
|
||||||
"antarchy:royal_guardian_sword",
|
"antarchy:royal_guardian_sword",
|
||||||
"antarchy:royal_assailant_battleaxe"
|
"antarchy:royal_assailant_battleaxe"
|
||||||
|
|||||||
@@ -5,7 +5,9 @@
|
|||||||
"antarchy:nightmare_sword",
|
"antarchy:nightmare_sword",
|
||||||
"antarchy:basilisk_dagger",
|
"antarchy:basilisk_dagger",
|
||||||
"antarchy:big_bertha",
|
"antarchy:big_bertha",
|
||||||
|
"antarchy:giant_frying_pan",
|
||||||
"antarchy:blood_crystal_katana",
|
"antarchy:blood_crystal_katana",
|
||||||
|
"antarchy:blood_gods_blade",
|
||||||
"antarchy:mantis_claw",
|
"antarchy:mantis_claw",
|
||||||
"antarchy:royal_guardian_sword"
|
"antarchy:royal_guardian_sword"
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -397,6 +397,8 @@ public final class AntarchyFabricContent {
|
|||||||
AntarchyObjects.setSpiritApple(() -> AntarchyFabricItems.SPIRIT_APPLE.get());
|
AntarchyObjects.setSpiritApple(() -> AntarchyFabricItems.SPIRIT_APPLE.get());
|
||||||
AntarchyObjects.setGlimmeringEffect(() -> AntarchyFabricMisc.mobEffectHolder(AntarchyFabricMisc.GLIMMERING));
|
AntarchyObjects.setGlimmeringEffect(() -> AntarchyFabricMisc.mobEffectHolder(AntarchyFabricMisc.GLIMMERING));
|
||||||
AntarchyObjects.setRoyalVitalityPenaltyEffect(() -> AntarchyFabricMisc.mobEffectHolder(AntarchyFabricMisc.ROYAL_VITALITY_PENALTY));
|
AntarchyObjects.setRoyalVitalityPenaltyEffect(() -> AntarchyFabricMisc.mobEffectHolder(AntarchyFabricMisc.ROYAL_VITALITY_PENALTY));
|
||||||
|
AntarchyObjects.setBleedingEffect(() -> AntarchyFabricMisc.mobEffectHolder(AntarchyFabricMisc.BLEEDING));
|
||||||
|
AntarchyObjects.setBloodMoonEffect(() -> AntarchyFabricMisc.mobEffectHolder(AntarchyFabricMisc.BLOOD_MOON));
|
||||||
AntarchyObjects.setElka(AntarchyFabricEntities.ELKA);
|
AntarchyObjects.setElka(AntarchyFabricEntities.ELKA);
|
||||||
AntarchyObjects.setPeach(() -> AntarchyFabricItems.PEACH.get());
|
AntarchyObjects.setPeach(() -> AntarchyFabricItems.PEACH.get());
|
||||||
AntarchyObjects.setCorn(() -> AntarchyFabricItems.CORN.get());
|
AntarchyObjects.setCorn(() -> AntarchyFabricItems.CORN.get());
|
||||||
@@ -423,6 +425,7 @@ public final class AntarchyFabricContent {
|
|||||||
AntarchyObjects.setLucidBoltImpactLarge(() -> AntarchyFabricMisc.LUCID_BOLT_IMPACT_LARGE.get());
|
AntarchyObjects.setLucidBoltImpactLarge(() -> AntarchyFabricMisc.LUCID_BOLT_IMPACT_LARGE.get());
|
||||||
AntarchyObjects.setDorrieInventoryMenu(AntarchyFabricMisc.DORRIE_INVENTORY_MENU);
|
AntarchyObjects.setDorrieInventoryMenu(AntarchyFabricMisc.DORRIE_INVENTORY_MENU);
|
||||||
AntarchyObjects.setRoyalJudgmentMenu(AntarchyFabricMisc.ROYAL_JUDGMENT_MENU);
|
AntarchyObjects.setRoyalJudgmentMenu(AntarchyFabricMisc.ROYAL_JUDGMENT_MENU);
|
||||||
|
AntarchyObjects.setGiantFryingPanMenu(AntarchyFabricMisc.GIANT_FRYING_PAN_MENU);
|
||||||
AntarchyObjects.setCritterCage(() -> AntarchyFabricItems.CRITTER_CAGE.get());
|
AntarchyObjects.setCritterCage(() -> AntarchyFabricItems.CRITTER_CAGE.get());
|
||||||
AntarchyObjects.setCritterCageBlock(() -> AntarchyFabricBlocks.CRITTER_CAGE_BLOCK.get());
|
AntarchyObjects.setCritterCageBlock(() -> AntarchyFabricBlocks.CRITTER_CAGE_BLOCK.get());
|
||||||
AntarchyObjects.setLucidAnchor(() -> AntarchyFabricBlocks.LUCID_ANCHOR.get());
|
AntarchyObjects.setLucidAnchor(() -> AntarchyFabricBlocks.LUCID_ANCHOR.get());
|
||||||
|
|||||||
@@ -4,8 +4,10 @@ import com.craisinlord.antarchy.Antarchy;
|
|||||||
import com.craisinlord.antarchy.content.client.QueenMusicHandler;
|
import com.craisinlord.antarchy.content.client.QueenMusicHandler;
|
||||||
import com.craisinlord.antarchy.content.client.game.AntarchyComputerGames;
|
import com.craisinlord.antarchy.content.client.game.AntarchyComputerGames;
|
||||||
import com.craisinlord.antarchy.fabric.network.AntarchyFabricClientNetworking;
|
import com.craisinlord.antarchy.fabric.network.AntarchyFabricClientNetworking;
|
||||||
|
import com.craisinlord.antarchy.fabric.client.SeparateLargeItemModels;
|
||||||
import com.craisinlord.antarchy.fabric.registry.AntarchyFabricSounds;
|
import com.craisinlord.antarchy.fabric.registry.AntarchyFabricSounds;
|
||||||
import net.fabricmc.api.ClientModInitializer;
|
import net.fabricmc.api.ClientModInitializer;
|
||||||
|
import net.fabricmc.fabric.api.client.model.loading.v1.ModelLoadingPlugin;
|
||||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
|
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
|
||||||
import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener;
|
import net.fabricmc.fabric.api.resource.IdentifiableResourceReloadListener;
|
||||||
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
|
import net.fabricmc.fabric.api.resource.ResourceManagerHelper;
|
||||||
@@ -21,6 +23,7 @@ import java.util.concurrent.Executor;
|
|||||||
public final class AntarchyFabricClient implements ClientModInitializer {
|
public final class AntarchyFabricClient implements ClientModInitializer {
|
||||||
@Override
|
@Override
|
||||||
public void onInitializeClient() {
|
public void onInitializeClient() {
|
||||||
|
ModelLoadingPlugin.register(plugin -> plugin.addModels(SeparateLargeItemModels.all()));
|
||||||
ClientTickEvents.END_CLIENT_TICK.register(client -> QueenMusicHandler.tick(client, AntarchyFabricSounds.THE_QUEEN.get()));
|
ClientTickEvents.END_CLIENT_TICK.register(client -> QueenMusicHandler.tick(client, AntarchyFabricSounds.THE_QUEEN.get()));
|
||||||
AntarchyFabricClientNetworking.register();
|
AntarchyFabricClientNetworking.register();
|
||||||
AntarchyFabricClientNetworking.bootstrapMultipartClient();
|
AntarchyFabricClientNetworking.bootstrapMultipartClient();
|
||||||
|
|||||||
@@ -70,6 +70,7 @@ public final class AntarchyFabricClientBootstrap {
|
|||||||
AntarchyKeyBindings.register();
|
AntarchyKeyBindings.register();
|
||||||
MenuScreens.register(AntarchyFabricMisc.DORRIE_INVENTORY_MENU.get(), com.craisinlord.antarchy.content.client.screen.DorrieInventoryScreen::new);
|
MenuScreens.register(AntarchyFabricMisc.DORRIE_INVENTORY_MENU.get(), com.craisinlord.antarchy.content.client.screen.DorrieInventoryScreen::new);
|
||||||
MenuScreens.register(AntarchyFabricMisc.ROYAL_JUDGMENT_MENU.get(), com.craisinlord.antarchy.content.client.screen.RoyalJudgmentScreen::new);
|
MenuScreens.register(AntarchyFabricMisc.ROYAL_JUDGMENT_MENU.get(), com.craisinlord.antarchy.content.client.screen.RoyalJudgmentScreen::new);
|
||||||
|
MenuScreens.register(AntarchyFabricMisc.GIANT_FRYING_PAN_MENU.get(), com.craisinlord.antarchy.content.client.screen.GiantFryingPanScreen::new);
|
||||||
registerRenderers();
|
registerRenderers();
|
||||||
registerEntityLayers();
|
registerEntityLayers();
|
||||||
registerColors();
|
registerColors();
|
||||||
@@ -275,8 +276,8 @@ public final class AntarchyFabricClientBootstrap {
|
|||||||
AntarchyFabricMisc.ICHOR.get(),
|
AntarchyFabricMisc.ICHOR.get(),
|
||||||
AntarchyFabricMisc.FLOWING_ICHOR.get(),
|
AntarchyFabricMisc.FLOWING_ICHOR.get(),
|
||||||
new SimpleFluidRenderHandler(
|
new SimpleFluidRenderHandler(
|
||||||
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/bile/bile_still"),
|
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/ichor/ichor_still"),
|
||||||
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/bile/bile_flowing"),
|
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/ichor/ichor_flowing"),
|
||||||
ResourceLocation.withDefaultNamespace("block/water_overlay"),
|
ResourceLocation.withDefaultNamespace("block/water_overlay"),
|
||||||
0xFF3D0408
|
0xFF3D0408
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -2,8 +2,10 @@ package com.craisinlord.antarchy.fabric.client;
|
|||||||
|
|
||||||
import com.craisinlord.antarchy.config.AntarchySettings;
|
import com.craisinlord.antarchy.config.AntarchySettings;
|
||||||
import com.craisinlord.antarchy.content.item.GravityGunItem;
|
import com.craisinlord.antarchy.content.item.GravityGunItem;
|
||||||
|
import com.craisinlord.antarchy.content.item.TemporalTunerItem;
|
||||||
import com.craisinlord.antarchy.content.network.GravityGunPrimaryPayload;
|
import com.craisinlord.antarchy.content.network.GravityGunPrimaryPayload;
|
||||||
import com.craisinlord.antarchy.content.network.GravityGunScrollPayload;
|
import com.craisinlord.antarchy.content.network.GravityGunScrollPayload;
|
||||||
|
import com.craisinlord.antarchy.content.network.TemporalTunerScrollPayload;
|
||||||
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
|
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
|
||||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
@@ -42,7 +44,19 @@ public final class GravityGunClientHandler {
|
|||||||
|
|
||||||
public static boolean onScroll(double verticalAmount) {
|
public static boolean onScroll(double verticalAmount) {
|
||||||
Minecraft mc = Minecraft.getInstance();
|
Minecraft mc = Minecraft.getInstance();
|
||||||
if (mc.player == null || mc.level == null || mc.screen != null || !Screen.hasControlDown() || !AntarchySettings.gravityGunEnabled()) {
|
if (mc.player == null || mc.level == null || mc.screen != null) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Screen.hasShiftDown() && TemporalTunerItem.isAvailable(mc.player)) {
|
||||||
|
double scrollAmount = Mth.clamp(verticalAmount, -1.0D, 1.0D);
|
||||||
|
if (Math.abs(scrollAmount) >= 1.0E-4D) {
|
||||||
|
ClientPlayNetworking.send(new TemporalTunerScrollPayload(scrollAmount * TemporalTunerItem.STEP));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Screen.hasControlDown() || !AntarchySettings.gravityGunEnabled()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package com.craisinlord.antarchy.fabric.client;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.Antarchy;
|
||||||
|
import com.craisinlord.antarchy.fabric.registry.AntarchyFabricItems;
|
||||||
|
import net.minecraft.client.resources.model.ModelResourceLocation;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.item.Item;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public final class SeparateLargeItemModels {
|
||||||
|
private static final Map<Item, ModelResourceLocation> GUI_MODELS = Map.ofEntries(
|
||||||
|
entry(AntarchyFabricItems.ATTITUDE_ADJUSTER.get(), "attitude_adjuster_gui"),
|
||||||
|
entry(AntarchyFabricItems.BATTLE_AXE.get(), "battle_axe_gui"),
|
||||||
|
entry(AntarchyFabricItems.BIG_BERTHA.get(), "big_bertha_gui"),
|
||||||
|
entry(AntarchyFabricItems.EYE_OF_THE_STORM.get(), "eye_of_the_storm_gui"),
|
||||||
|
entry(AntarchyFabricItems.GIANT_FRYING_PAN.get(), "giant_frying_pan_gui"),
|
||||||
|
entry(AntarchyFabricItems.GRAVITY_GUN.get(), "gravity_gun_gui"),
|
||||||
|
entry(AntarchyFabricItems.GROWTH_RAY.get(), "grow_ray_gui"),
|
||||||
|
entry(AntarchyFabricItems.KRAKENS_GRASP.get(), "krakens_grasp_gui"),
|
||||||
|
entry(AntarchyFabricItems.PORTAL_GUN.get(), "portal_gun_gui"),
|
||||||
|
entry(AntarchyFabricItems.ROYAL_ASSAILANT_BATTLEAXE.get(), "royal_assailant_battleaxe_gui"),
|
||||||
|
entry(AntarchyFabricItems.ROYAL_ASSAILANT_STAFF.get(), "royal_assailant_staff_gui"),
|
||||||
|
entry(AntarchyFabricItems.ROYAL_GUARDIAN_SWORD.get(), "royal_guardian_sword_gui"),
|
||||||
|
entry(AntarchyFabricItems.RPO_LAUNCHER.get(), "rpo_launcher_gui"),
|
||||||
|
entry(AntarchyFabricItems.SHRINK_RAY.get(), "shrink_ray_gui"),
|
||||||
|
entry(AntarchyFabricItems.SQUIDZOOKA.get(), "squidzooka_gui"),
|
||||||
|
entry(AntarchyFabricItems.WATER_CANNON.get(), "water_cannon_gui")
|
||||||
|
);
|
||||||
|
|
||||||
|
private SeparateLargeItemModels() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static ModelResourceLocation modelFor(ItemStack stack) {
|
||||||
|
return GUI_MODELS.get(stack.getItem());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static Collection<ModelResourceLocation> all() {
|
||||||
|
return GUI_MODELS.values();
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Map.Entry<Item, ModelResourceLocation> entry(Item item, String modelPath) {
|
||||||
|
return Map.entry(item, ModelResourceLocation.inventory(
|
||||||
|
ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, modelPath)
|
||||||
|
));
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
package com.craisinlord.antarchy.fabric.mixin.client;
|
||||||
|
|
||||||
|
import com.craisinlord.antarchy.fabric.client.SeparateLargeItemModels;
|
||||||
|
import com.llamalad7.mixinextras.sugar.Local;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
import net.minecraft.client.renderer.entity.ItemRenderer;
|
||||||
|
import net.minecraft.client.resources.model.BakedModel;
|
||||||
|
import net.minecraft.world.item.ItemDisplayContext;
|
||||||
|
import net.minecraft.world.item.ItemStack;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.injection.At;
|
||||||
|
import org.spongepowered.asm.mixin.injection.ModifyVariable;
|
||||||
|
|
||||||
|
@Mixin(ItemRenderer.class)
|
||||||
|
public abstract class SeparateLargeItemModelsMixin {
|
||||||
|
@ModifyVariable(method = "render", at = @At("HEAD"), argsOnly = true, ordinal = 0)
|
||||||
|
private BakedModel antarchy$selectGuiModel(BakedModel original,
|
||||||
|
@Local(argsOnly = true) ItemStack stack,
|
||||||
|
@Local(argsOnly = true) ItemDisplayContext displayContext) {
|
||||||
|
var guiModel = SeparateLargeItemModels.modelFor(stack);
|
||||||
|
if (guiModel != null && isGuiContext(displayContext)) {
|
||||||
|
return Minecraft.getInstance().getModelManager().getModel(guiModel);
|
||||||
|
}
|
||||||
|
return original;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static boolean isGuiContext(ItemDisplayContext displayContext) {
|
||||||
|
return displayContext == ItemDisplayContext.GUI
|
||||||
|
|| displayContext == ItemDisplayContext.GROUND
|
||||||
|
|| displayContext == ItemDisplayContext.FIXED;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,6 +2,8 @@ package com.craisinlord.antarchy.fabric.network;
|
|||||||
|
|
||||||
import com.craisinlord.antarchy.content.client.BloodglassClientState;
|
import com.craisinlord.antarchy.content.client.BloodglassClientState;
|
||||||
import com.craisinlord.antarchy.content.client.BrutalflyElytraClientState;
|
import com.craisinlord.antarchy.content.client.BrutalflyElytraClientState;
|
||||||
|
import com.craisinlord.antarchy.content.client.CameraShakeClientState;
|
||||||
|
import com.craisinlord.antarchy.content.client.HerculesBeetleImpactShakeClientState;
|
||||||
import com.craisinlord.antarchy.content.client.HordeClientState;
|
import com.craisinlord.antarchy.content.client.HordeClientState;
|
||||||
import com.craisinlord.antarchy.content.client.ScorpionWhipTetherClientState;
|
import com.craisinlord.antarchy.content.client.ScorpionWhipTetherClientState;
|
||||||
import com.craisinlord.antarchy.content.client.WormHookTetherClientState;
|
import com.craisinlord.antarchy.content.client.WormHookTetherClientState;
|
||||||
@@ -13,6 +15,7 @@ import com.craisinlord.antarchy.content.network.*;
|
|||||||
import com.craisinlord.antarchy.fabric.client.BloodCrystalKatanaTrailClientState;
|
import com.craisinlord.antarchy.fabric.client.BloodCrystalKatanaTrailClientState;
|
||||||
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
import net.fabricmc.fabric.api.client.networking.v1.ClientPlayNetworking;
|
||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.world.phys.Vec3;
|
||||||
|
|
||||||
public final class AntarchyFabricClientNetworking {
|
public final class AntarchyFabricClientNetworking {
|
||||||
private AntarchyFabricClientNetworking() {
|
private AntarchyFabricClientNetworking() {
|
||||||
@@ -54,11 +57,15 @@ public final class AntarchyFabricClientNetworking {
|
|||||||
ClientPlayNetworking.registerGlobalReceiver(BrutalflyElytraAnimationPayload.TYPE, (payload, context) ->
|
ClientPlayNetworking.registerGlobalReceiver(BrutalflyElytraAnimationPayload.TYPE, (payload, context) ->
|
||||||
context.client().execute(() -> BrutalflyElytraClientState.trigger(payload.entityId(), payload.durationTicks(), payload.strength())));
|
context.client().execute(() -> BrutalflyElytraClientState.trigger(payload.entityId(), payload.durationTicks(), payload.strength())));
|
||||||
ClientPlayNetworking.registerGlobalReceiver(HerculesBeetleImpactShakePayload.TYPE, (payload, context) ->
|
ClientPlayNetworking.registerGlobalReceiver(HerculesBeetleImpactShakePayload.TYPE, (payload, context) ->
|
||||||
context.client().execute(() -> AntarchyFabricNetworking.triggerHerculesBeetleImpactShake(payload.durationTicks())));
|
context.client().execute(() -> HerculesBeetleImpactShakeClientState.trigger(payload.durationTicks())));
|
||||||
ClientPlayNetworking.registerGlobalReceiver(KingJudgmentFlashPayload.TYPE, (payload, context) ->
|
ClientPlayNetworking.registerGlobalReceiver(KingJudgmentFlashPayload.TYPE, (payload, context) ->
|
||||||
context.client().execute(() -> com.craisinlord.antarchy.content.client.KingJudgmentFlashClientState.trigger(payload.durationTicks())));
|
context.client().execute(() -> com.craisinlord.antarchy.content.client.KingJudgmentFlashClientState.trigger(payload.durationTicks())));
|
||||||
ClientPlayNetworking.registerGlobalReceiver(ImpactShakePayload.TYPE, (payload, context) ->
|
ClientPlayNetworking.registerGlobalReceiver(ImpactShakePayload.TYPE, (payload, context) ->
|
||||||
context.client().execute(() -> AntarchyFabricNetworking.triggerImpactShake(payload)));
|
context.client().execute(() -> CameraShakeClientState.triggerImpact(
|
||||||
|
new Vec3(payload.x(), payload.y(), payload.z()),
|
||||||
|
payload.intensity(),
|
||||||
|
payload.durationTicks(),
|
||||||
|
payload.radius())));
|
||||||
ClientPlayNetworking.registerGlobalReceiver(HordeIntensityPayload.TYPE, (payload, context) ->
|
ClientPlayNetworking.registerGlobalReceiver(HordeIntensityPayload.TYPE, (payload, context) ->
|
||||||
context.client().execute(() -> HordeClientState.update(payload.intensity())));
|
context.client().execute(() -> HordeClientState.update(payload.intensity())));
|
||||||
AntarchyFabricTimeDilationNetworking.registerClientReceiver();
|
AntarchyFabricTimeDilationNetworking.registerClientReceiver();
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ package com.craisinlord.antarchy.fabric.network;
|
|||||||
import com.craisinlord.antarchy.fabric.registry.AntarchyFabricEntities;
|
import com.craisinlord.antarchy.fabric.registry.AntarchyFabricEntities;
|
||||||
|
|
||||||
import com.craisinlord.antarchy.content.entity.DiamondMinecartEntity;
|
import com.craisinlord.antarchy.content.entity.DiamondMinecartEntity;
|
||||||
import com.craisinlord.antarchy.content.client.CameraShakeClientState;
|
|
||||||
import com.craisinlord.antarchy.content.client.HerculesBeetleImpactShakeClientState;
|
|
||||||
import com.craisinlord.antarchy.content.entity.multipart.MultipartEntityOwner;
|
import com.craisinlord.antarchy.content.entity.multipart.MultipartEntityOwner;
|
||||||
import com.craisinlord.antarchy.content.entity.multipart.MultipartFramework;
|
import com.craisinlord.antarchy.content.entity.multipart.MultipartFramework;
|
||||||
import com.craisinlord.antarchy.content.entity.multipart.network.MultipartAttackPayload;
|
import com.craisinlord.antarchy.content.entity.multipart.network.MultipartAttackPayload;
|
||||||
@@ -18,6 +16,7 @@ import com.craisinlord.antarchy.fabric.util.SpringyBootsFabricHelper;
|
|||||||
import com.craisinlord.antarchy.content.item.SpringyBootsItem;
|
import com.craisinlord.antarchy.content.item.SpringyBootsItem;
|
||||||
import com.craisinlord.antarchy.content.item.EyeOfTheStormItem;
|
import com.craisinlord.antarchy.content.item.EyeOfTheStormItem;
|
||||||
import com.craisinlord.antarchy.content.item.GravityGunItem;
|
import com.craisinlord.antarchy.content.item.GravityGunItem;
|
||||||
|
import com.craisinlord.antarchy.content.item.TemporalTunerItem;
|
||||||
import com.craisinlord.antarchy.content.item.PortalGunItem;
|
import com.craisinlord.antarchy.content.item.PortalGunItem;
|
||||||
import com.craisinlord.antarchy.content.item.TigerEyeArmorUtil;
|
import com.craisinlord.antarchy.content.item.TigerEyeArmorUtil;
|
||||||
import com.craisinlord.antarchy.content.network.*;
|
import com.craisinlord.antarchy.content.network.*;
|
||||||
@@ -93,6 +92,7 @@ public final class AntarchyFabricNetworking {
|
|||||||
PayloadTypeRegistry.playC2S().register(RoyalMountActionPayload.TYPE, RoyalMountActionPayload.STREAM_CODEC);
|
PayloadTypeRegistry.playC2S().register(RoyalMountActionPayload.TYPE, RoyalMountActionPayload.STREAM_CODEC);
|
||||||
PayloadTypeRegistry.playC2S().register(RoyalMountVerticalPayload.TYPE, RoyalMountVerticalPayload.STREAM_CODEC);
|
PayloadTypeRegistry.playC2S().register(RoyalMountVerticalPayload.TYPE, RoyalMountVerticalPayload.STREAM_CODEC);
|
||||||
PayloadTypeRegistry.playC2S().register(GravityGunScrollPayload.TYPE, GravityGunScrollPayload.STREAM_CODEC);
|
PayloadTypeRegistry.playC2S().register(GravityGunScrollPayload.TYPE, GravityGunScrollPayload.STREAM_CODEC);
|
||||||
|
PayloadTypeRegistry.playC2S().register(TemporalTunerScrollPayload.TYPE, TemporalTunerScrollPayload.STREAM_CODEC);
|
||||||
PayloadTypeRegistry.playC2S().register(BigBerthaModeCyclePayload.TYPE, BigBerthaModeCyclePayload.STREAM_CODEC);
|
PayloadTypeRegistry.playC2S().register(BigBerthaModeCyclePayload.TYPE, BigBerthaModeCyclePayload.STREAM_CODEC);
|
||||||
PayloadTypeRegistry.playC2S().register(com.craisinlord.antarchy.content.network.RoyalGuardianSwordModeCyclePayload.TYPE,
|
PayloadTypeRegistry.playC2S().register(com.craisinlord.antarchy.content.network.RoyalGuardianSwordModeCyclePayload.TYPE,
|
||||||
com.craisinlord.antarchy.content.network.RoyalGuardianSwordModeCyclePayload.STREAM_CODEC);
|
com.craisinlord.antarchy.content.network.RoyalGuardianSwordModeCyclePayload.STREAM_CODEC);
|
||||||
@@ -128,6 +128,8 @@ public final class AntarchyFabricNetworking {
|
|||||||
context.server().execute(() -> handleRoyalMountVertical(context.player(), payload)));
|
context.server().execute(() -> handleRoyalMountVertical(context.player(), payload)));
|
||||||
ServerPlayNetworking.registerGlobalReceiver(GravityGunScrollPayload.TYPE, (payload, context) ->
|
ServerPlayNetworking.registerGlobalReceiver(GravityGunScrollPayload.TYPE, (payload, context) ->
|
||||||
context.server().execute(() -> handleGravityGunScroll(context.player(), payload)));
|
context.server().execute(() -> handleGravityGunScroll(context.player(), payload)));
|
||||||
|
ServerPlayNetworking.registerGlobalReceiver(TemporalTunerScrollPayload.TYPE, (payload, context) ->
|
||||||
|
context.server().execute(() -> handleTemporalTunerScroll(context.player(), payload)));
|
||||||
ServerPlayNetworking.registerGlobalReceiver(BigBerthaModeCyclePayload.TYPE, (payload, context) ->
|
ServerPlayNetworking.registerGlobalReceiver(BigBerthaModeCyclePayload.TYPE, (payload, context) ->
|
||||||
context.server().execute(() -> handleBigBerthaModeCycle(context.player(), payload)));
|
context.server().execute(() -> handleBigBerthaModeCycle(context.player(), payload)));
|
||||||
ServerPlayNetworking.registerGlobalReceiver(com.craisinlord.antarchy.content.network.RoyalGuardianSwordModeCyclePayload.TYPE,
|
ServerPlayNetworking.registerGlobalReceiver(com.craisinlord.antarchy.content.network.RoyalGuardianSwordModeCyclePayload.TYPE,
|
||||||
@@ -302,6 +304,12 @@ public final class AntarchyFabricNetworking {
|
|||||||
bigBerthaItem.tryCycleModeFromInput(player.serverLevel(), player, player.getMainHandItem());
|
bigBerthaItem.tryCycleModeFromInput(player.serverLevel(), player, player.getMainHandItem());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void handleTemporalTunerScroll(ServerPlayer player, TemporalTunerScrollPayload payload) {
|
||||||
|
if (TemporalTunerItem.isAvailable(player)) {
|
||||||
|
TemporalTunerItem.adjust(player, payload.delta());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private static void handleRoyalGuardianSwordModeCycle(ServerPlayer player) {
|
private static void handleRoyalGuardianSwordModeCycle(ServerPlayer player) {
|
||||||
if (!(player.getMainHandItem().getItem() instanceof com.craisinlord.antarchy.content.item.RoyalGuardianSwordItem sword)) {
|
if (!(player.getMainHandItem().getItem() instanceof com.craisinlord.antarchy.content.item.RoyalGuardianSwordItem sword)) {
|
||||||
return;
|
return;
|
||||||
@@ -488,19 +496,6 @@ public final class AntarchyFabricNetworking {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void triggerHerculesBeetleImpactShake(int durationTicks) {
|
|
||||||
HerculesBeetleImpactShakeClientState.trigger(durationTicks);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void triggerImpactShake(ImpactShakePayload payload) {
|
|
||||||
CameraShakeClientState.triggerImpact(
|
|
||||||
new Vec3(payload.x(), payload.y(), payload.z()),
|
|
||||||
payload.intensity(),
|
|
||||||
payload.durationTicks(),
|
|
||||||
payload.radius()
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void handleTigerEyeCamouflageToggle(ServerPlayer player) {
|
private static void handleTigerEyeCamouflageToggle(ServerPlayer player) {
|
||||||
TigerEyeCamouflageController.ToggleResult result = TigerEyeCamouflageController.toggle(player);
|
TigerEyeCamouflageController.ToggleResult result = TigerEyeCamouflageController.toggle(player);
|
||||||
if (result != TigerEyeCamouflageController.ToggleResult.NO_CHANGE) {
|
if (result != TigerEyeCamouflageController.ToggleResult.NO_CHANGE) {
|
||||||
|
|||||||
@@ -1044,6 +1044,9 @@ public final class AntarchyFabricItems {
|
|||||||
AntarchySettings.bloodCrystalKatanaAttackDamage(),
|
AntarchySettings.bloodCrystalKatanaAttackDamage(),
|
||||||
-2.2F
|
-2.2F
|
||||||
));
|
));
|
||||||
|
public static final DeferredItem<BloodGodsBladeItem> BLOOD_GODS_BLADE = ITEMS.register("blood_gods_blade",
|
||||||
|
() -> new BloodGodsBladeItem(ULTIMATE_TIER,
|
||||||
|
new Item.Properties().stacksTo(1).durability(4096).rarity(Rarity.EPIC).fireResistant(), 80, -2.4F));
|
||||||
|
|
||||||
|
|
||||||
public static final DeferredItem<MantisClawItem> MANTIS_CLAW = ITEMS.register("mantis_claw",
|
public static final DeferredItem<MantisClawItem> MANTIS_CLAW = ITEMS.register("mantis_claw",
|
||||||
@@ -1055,6 +1058,8 @@ public final class AntarchyFabricItems {
|
|||||||
|
|
||||||
|
|
||||||
public static final DeferredItem<Item> QUEEN_SCALE = ITEMS.registerSimpleItem("queen_scale", new Item.Properties().rarity(Rarity.RARE).fireResistant());
|
public static final DeferredItem<Item> QUEEN_SCALE = ITEMS.registerSimpleItem("queen_scale", new Item.Properties().rarity(Rarity.RARE).fireResistant());
|
||||||
|
public static final DeferredItem<com.craisinlord.antarchy.content.item.TemporalTunerItem> TEMPORAL_TUNER = ITEMS.register("temporal_tuner",
|
||||||
|
() -> new com.craisinlord.antarchy.content.item.TemporalTunerItem(new Item.Properties().rarity(Rarity.RARE).fireResistant()));
|
||||||
|
|
||||||
|
|
||||||
public static final DeferredItem<Item> CHITIN = ITEMS.registerSimpleItem("chitin", new Item.Properties().rarity(Rarity.UNCOMMON));
|
public static final DeferredItem<Item> CHITIN = ITEMS.registerSimpleItem("chitin", new Item.Properties().rarity(Rarity.UNCOMMON));
|
||||||
@@ -1510,6 +1515,9 @@ public final class AntarchyFabricItems {
|
|||||||
public static final DeferredItem<RoyalGuardianSwordItem> ROYAL_GUARDIAN_SWORD = ITEMS.register("royal_guardian_sword",
|
public static final DeferredItem<RoyalGuardianSwordItem> ROYAL_GUARDIAN_SWORD = ITEMS.register("royal_guardian_sword",
|
||||||
() -> new RoyalGuardianSwordItem(ROYAL_GUARDIAN_TIER,
|
() -> new RoyalGuardianSwordItem(ROYAL_GUARDIAN_TIER,
|
||||||
new Item.Properties().stacksTo(1).rarity(Rarity.EPIC).fireResistant()));
|
new Item.Properties().stacksTo(1).rarity(Rarity.EPIC).fireResistant()));
|
||||||
|
public static final DeferredItem<GiantFryingPanItem> GIANT_FRYING_PAN = ITEMS.register("giant_frying_pan",
|
||||||
|
() -> new GiantFryingPanItem(ROYAL_GUARDIAN_TIER,
|
||||||
|
new Item.Properties().stacksTo(1).rarity(Rarity.EPIC).fireResistant()));
|
||||||
public static final DeferredItem<RoyalAssailantBattleAxeItem> ROYAL_ASSAILANT_BATTLEAXE = ITEMS.register("royal_assailant_battleaxe",
|
public static final DeferredItem<RoyalAssailantBattleAxeItem> ROYAL_ASSAILANT_BATTLEAXE = ITEMS.register("royal_assailant_battleaxe",
|
||||||
() -> new RoyalAssailantBattleAxeItem(ROYAL_ASSAILANT_TIER,
|
() -> new RoyalAssailantBattleAxeItem(ROYAL_ASSAILANT_TIER,
|
||||||
new Item.Properties().stacksTo(1).rarity(Rarity.EPIC).fireResistant()));
|
new Item.Properties().stacksTo(1).rarity(Rarity.EPIC).fireResistant()));
|
||||||
|
|||||||
@@ -27,6 +27,8 @@ import com.craisinlord.antarchy.content.worldgen.thoraxis.QueenHavocTrailFeature
|
|||||||
import com.craisinlord.antarchy.content.worldgen.thoraxis.ThoraxisIchorLakeFeature;
|
import com.craisinlord.antarchy.content.worldgen.thoraxis.ThoraxisIchorLakeFeature;
|
||||||
import com.craisinlord.antarchy.fabric.content.fluid.AntiwaterFluid;
|
import com.craisinlord.antarchy.fabric.content.fluid.AntiwaterFluid;
|
||||||
import com.craisinlord.antarchy.content.effect.DreadMobEffect;
|
import com.craisinlord.antarchy.content.effect.DreadMobEffect;
|
||||||
|
import com.craisinlord.antarchy.content.effect.BleedingMobEffect;
|
||||||
|
import com.craisinlord.antarchy.content.effect.BloodMoonMobEffect;
|
||||||
import com.craisinlord.antarchy.content.effect.GoopedMobEffect;
|
import com.craisinlord.antarchy.content.effect.GoopedMobEffect;
|
||||||
import com.craisinlord.antarchy.content.effect.GrowthMobEffect;
|
import com.craisinlord.antarchy.content.effect.GrowthMobEffect;
|
||||||
import com.craisinlord.antarchy.content.effect.InvertedMobEffect;
|
import com.craisinlord.antarchy.content.effect.InvertedMobEffect;
|
||||||
@@ -207,6 +209,8 @@ public final class AntarchyFabricMisc {
|
|||||||
MENUS.register("dorrie_inventory", () -> new net.minecraft.world.inventory.MenuType<>(com.craisinlord.antarchy.content.menu.DorrieInventoryMenu::new, FeatureFlags.DEFAULT_FLAGS));
|
MENUS.register("dorrie_inventory", () -> new net.minecraft.world.inventory.MenuType<>(com.craisinlord.antarchy.content.menu.DorrieInventoryMenu::new, FeatureFlags.DEFAULT_FLAGS));
|
||||||
public static final DeferredHolder<net.minecraft.world.inventory.MenuType<?>, net.minecraft.world.inventory.MenuType<com.craisinlord.antarchy.content.menu.RoyalJudgmentMenu>> ROYAL_JUDGMENT_MENU =
|
public static final DeferredHolder<net.minecraft.world.inventory.MenuType<?>, net.minecraft.world.inventory.MenuType<com.craisinlord.antarchy.content.menu.RoyalJudgmentMenu>> ROYAL_JUDGMENT_MENU =
|
||||||
MENUS.register("royal_judgment", () -> new net.minecraft.world.inventory.MenuType<>(com.craisinlord.antarchy.content.menu.RoyalJudgmentMenu::new, FeatureFlags.DEFAULT_FLAGS));
|
MENUS.register("royal_judgment", () -> new net.minecraft.world.inventory.MenuType<>(com.craisinlord.antarchy.content.menu.RoyalJudgmentMenu::new, FeatureFlags.DEFAULT_FLAGS));
|
||||||
|
public static final DeferredHolder<net.minecraft.world.inventory.MenuType<?>, net.minecraft.world.inventory.MenuType<com.craisinlord.antarchy.content.menu.GiantFryingPanMenu>> GIANT_FRYING_PAN_MENU =
|
||||||
|
MENUS.register("giant_frying_pan", () -> new net.minecraft.world.inventory.MenuType<>(com.craisinlord.antarchy.content.menu.GiantFryingPanMenu::new, FeatureFlags.DEFAULT_FLAGS));
|
||||||
|
|
||||||
|
|
||||||
public static final DeferredRegister<net.minecraft.core.component.DataComponentType<?>> DATA_COMPONENT_TYPES =
|
public static final DeferredRegister<net.minecraft.core.component.DataComponentType<?>> DATA_COMPONENT_TYPES =
|
||||||
@@ -435,6 +439,8 @@ public final class AntarchyFabricMisc {
|
|||||||
|
|
||||||
|
|
||||||
public static final DeferredHolder<MobEffect, DreadMobEffect> DREAD = MOB_EFFECTS.register("dread", DreadMobEffect::new);
|
public static final DeferredHolder<MobEffect, DreadMobEffect> DREAD = MOB_EFFECTS.register("dread", DreadMobEffect::new);
|
||||||
|
public static final DeferredHolder<MobEffect, BleedingMobEffect> BLEEDING = MOB_EFFECTS.register("bleeding", BleedingMobEffect::new);
|
||||||
|
public static final DeferredHolder<MobEffect, BloodMoonMobEffect> BLOOD_MOON = MOB_EFFECTS.register("blood_moon", BloodMoonMobEffect::new);
|
||||||
|
|
||||||
|
|
||||||
public static final DeferredHolder<MobEffect, ParalyzedMobEffect> PARALYZED = MOB_EFFECTS.register("paralyzed", ParalyzedMobEffect::new);
|
public static final DeferredHolder<MobEffect, ParalyzedMobEffect> PARALYZED = MOB_EFFECTS.register("paralyzed", ParalyzedMobEffect::new);
|
||||||
|
|||||||
@@ -27,6 +27,7 @@
|
|||||||
"infinity.AmendmentRareOresMixin"
|
"infinity.AmendmentRareOresMixin"
|
||||||
],
|
],
|
||||||
"client": [
|
"client": [
|
||||||
|
"client.SeparateLargeItemModelsMixin",
|
||||||
"client.CameraShakeMixin",
|
"client.CameraShakeMixin",
|
||||||
"client.BrutalflyElytraExperienceBarMixin",
|
"client.BrutalflyElytraExperienceBarMixin",
|
||||||
"client.BloodglassChatOrderMixin",
|
"client.BloodglassChatOrderMixin",
|
||||||
|
|||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"parent": "antarchy:item/giant_frying_pan_held"
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"parent": "minecraft:item/generated",
|
||||||
|
"gui_light": "front",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "antarchy:item/royal_assailant_staff_item"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@ org.gradle.configureondemand=true
|
|||||||
minecraft_version_1_21_1=1.21.1
|
minecraft_version_1_21_1=1.21.1
|
||||||
modid=antarchy
|
modid=antarchy
|
||||||
mod_id=antarchy
|
mod_id=antarchy
|
||||||
mod_version=2.0.2
|
mod_version=2.1.0
|
||||||
maven_group=com.craisinlord
|
maven_group=com.craisinlord
|
||||||
mixin_version=0.15.4+mixin.0.8.7
|
mixin_version=0.15.4+mixin.0.8.7
|
||||||
|
|
||||||
|
|||||||
@@ -494,6 +494,7 @@ public final class AntarchyConfigModuleNeoforge {
|
|||||||
AntarchySettings.setRoyalAssailantLeggingsDoubleDamageChance(AntarchyToolsConfig.royalAssailantLeggingsDoubleDamageChance());
|
AntarchySettings.setRoyalAssailantLeggingsDoubleDamageChance(AntarchyToolsConfig.royalAssailantLeggingsDoubleDamageChance());
|
||||||
AntarchySettings.setRoyalAssailantBootsDoubleDamageChance(AntarchyToolsConfig.royalAssailantBootsDoubleDamageChance());
|
AntarchySettings.setRoyalAssailantBootsDoubleDamageChance(AntarchyToolsConfig.royalAssailantBootsDoubleDamageChance());
|
||||||
AntarchySettings.setRoyalGuardianSwordAttackDamage(AntarchyToolsConfig.royalGuardianSwordAttackDamage());
|
AntarchySettings.setRoyalGuardianSwordAttackDamage(AntarchyToolsConfig.royalGuardianSwordAttackDamage());
|
||||||
|
AntarchySettings.setGiantFryingPanAttackDamage(AntarchyToolsConfig.giantFryingPanAttackDamage());
|
||||||
AntarchySettings.setRoyalGuardianSwordAttackSpeed(AntarchyToolsConfig.royalGuardianSwordAttackSpeed());
|
AntarchySettings.setRoyalGuardianSwordAttackSpeed(AntarchyToolsConfig.royalGuardianSwordAttackSpeed());
|
||||||
AntarchySettings.setRoyalGuardianSwordElementalCooldownTicks(AntarchyToolsConfig.royalGuardianSwordElementalCooldownTicks());
|
AntarchySettings.setRoyalGuardianSwordElementalCooldownTicks(AntarchyToolsConfig.royalGuardianSwordElementalCooldownTicks());
|
||||||
AntarchySettings.setRoyalGuardianSwordFirePrimaryDamage(AntarchyToolsConfig.royalGuardianSwordFirePrimaryDamage());
|
AntarchySettings.setRoyalGuardianSwordFirePrimaryDamage(AntarchyToolsConfig.royalGuardianSwordFirePrimaryDamage());
|
||||||
|
|||||||
@@ -470,6 +470,8 @@ public class AntarchyNeoforge {
|
|||||||
AntarchyObjects.setSpiritApple(() -> AntarchyNeoforgeItems.SPIRIT_APPLE.get());
|
AntarchyObjects.setSpiritApple(() -> AntarchyNeoforgeItems.SPIRIT_APPLE.get());
|
||||||
AntarchyObjects.setGlimmeringEffect(() -> AntarchyNeoforgeMisc.GLIMMERING);
|
AntarchyObjects.setGlimmeringEffect(() -> AntarchyNeoforgeMisc.GLIMMERING);
|
||||||
AntarchyObjects.setRoyalVitalityPenaltyEffect(() -> AntarchyNeoforgeMisc.ROYAL_VITALITY_PENALTY);
|
AntarchyObjects.setRoyalVitalityPenaltyEffect(() -> AntarchyNeoforgeMisc.ROYAL_VITALITY_PENALTY);
|
||||||
|
AntarchyObjects.setBleedingEffect(() -> AntarchyNeoforgeMisc.BLEEDING);
|
||||||
|
AntarchyObjects.setBloodMoonEffect(() -> AntarchyNeoforgeMisc.BLOOD_MOON);
|
||||||
AntarchyObjects.setElka(AntarchyNeoforgeEntites.ELKA);
|
AntarchyObjects.setElka(AntarchyNeoforgeEntites.ELKA);
|
||||||
AntarchyObjects.setPeach(() -> AntarchyNeoforgeItems.PEACH.get());
|
AntarchyObjects.setPeach(() -> AntarchyNeoforgeItems.PEACH.get());
|
||||||
AntarchyObjects.setCorn(() -> AntarchyNeoforgeItems.CORN.get());
|
AntarchyObjects.setCorn(() -> AntarchyNeoforgeItems.CORN.get());
|
||||||
@@ -495,6 +497,7 @@ public class AntarchyNeoforge {
|
|||||||
AntarchyObjects.setLucidBoltImpactLarge(() -> AntarchyNeoforgeMisc.LUCID_BOLT_IMPACT_LARGE.get());
|
AntarchyObjects.setLucidBoltImpactLarge(() -> AntarchyNeoforgeMisc.LUCID_BOLT_IMPACT_LARGE.get());
|
||||||
AntarchyObjects.setDorrieInventoryMenu(AntarchyNeoforgeMisc.DORRIE_INVENTORY_MENU);
|
AntarchyObjects.setDorrieInventoryMenu(AntarchyNeoforgeMisc.DORRIE_INVENTORY_MENU);
|
||||||
AntarchyObjects.setRoyalJudgmentMenu(AntarchyNeoforgeMisc.ROYAL_JUDGMENT_MENU);
|
AntarchyObjects.setRoyalJudgmentMenu(AntarchyNeoforgeMisc.ROYAL_JUDGMENT_MENU);
|
||||||
|
AntarchyObjects.setGiantFryingPanMenu(AntarchyNeoforgeMisc.GIANT_FRYING_PAN_MENU);
|
||||||
AntarchyObjects.setCritterCage(() -> AntarchyNeoforgeItems.CRITTER_CAGE.get());
|
AntarchyObjects.setCritterCage(() -> AntarchyNeoforgeItems.CRITTER_CAGE.get());
|
||||||
AntarchyObjects.setCritterCageBlock(() -> AntarchyNeoforgeBlocks.CRITTER_CAGE_BLOCK.get());
|
AntarchyObjects.setCritterCageBlock(() -> AntarchyNeoforgeBlocks.CRITTER_CAGE_BLOCK.get());
|
||||||
AntarchyObjects.setCritterCageBlockEntity(() -> AntarchyNeoforgeBlocks.CRITTER_CAGE_BLOCK_ENTITY.get());
|
AntarchyObjects.setCritterCageBlockEntity(() -> AntarchyNeoforgeBlocks.CRITTER_CAGE_BLOCK_ENTITY.get());
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ public final class AntarchyToolsConfig {
|
|||||||
private static final ModConfigSpec.DoubleValue ROYAL_ASSAILANT_LEGGINGS_DOUBLE_DAMAGE_CHANCE;
|
private static final ModConfigSpec.DoubleValue ROYAL_ASSAILANT_LEGGINGS_DOUBLE_DAMAGE_CHANCE;
|
||||||
private static final ModConfigSpec.DoubleValue ROYAL_ASSAILANT_BOOTS_DOUBLE_DAMAGE_CHANCE;
|
private static final ModConfigSpec.DoubleValue ROYAL_ASSAILANT_BOOTS_DOUBLE_DAMAGE_CHANCE;
|
||||||
private static final ModConfigSpec.DoubleValue ROYAL_GUARDIAN_SWORD_ATTACK_DAMAGE;
|
private static final ModConfigSpec.DoubleValue ROYAL_GUARDIAN_SWORD_ATTACK_DAMAGE;
|
||||||
|
private static final ModConfigSpec.DoubleValue GIANT_FRYING_PAN_ATTACK_DAMAGE;
|
||||||
private static final ModConfigSpec.DoubleValue ROYAL_GUARDIAN_SWORD_ATTACK_SPEED;
|
private static final ModConfigSpec.DoubleValue ROYAL_GUARDIAN_SWORD_ATTACK_SPEED;
|
||||||
private static final ModConfigSpec.IntValue ROYAL_GUARDIAN_SWORD_ELEMENTAL_COOLDOWN_TICKS, ROYAL_GUARDIAN_SWORD_STORM_MAX_JUMPS;
|
private static final ModConfigSpec.IntValue ROYAL_GUARDIAN_SWORD_ELEMENTAL_COOLDOWN_TICKS, ROYAL_GUARDIAN_SWORD_STORM_MAX_JUMPS;
|
||||||
private static final ModConfigSpec.DoubleValue ROYAL_GUARDIAN_SWORD_FIRE_PRIMARY_DAMAGE, ROYAL_GUARDIAN_SWORD_FIRE_SPLASH_DAMAGE,
|
private static final ModConfigSpec.DoubleValue ROYAL_GUARDIAN_SWORD_FIRE_PRIMARY_DAMAGE, ROYAL_GUARDIAN_SWORD_FIRE_SPLASH_DAMAGE,
|
||||||
@@ -390,6 +391,7 @@ public final class AntarchyToolsConfig {
|
|||||||
ROYAL_ASSAILANT_LEGGINGS_DOUBLE_DAMAGE_CHANCE = b.defineInRange("assailantLeggingsDoubleDamageChance", 0.07D, 0.0D, 1.0D);
|
ROYAL_ASSAILANT_LEGGINGS_DOUBLE_DAMAGE_CHANCE = b.defineInRange("assailantLeggingsDoubleDamageChance", 0.07D, 0.0D, 1.0D);
|
||||||
ROYAL_ASSAILANT_BOOTS_DOUBLE_DAMAGE_CHANCE = b.defineInRange("assailantBootsDoubleDamageChance", 0.05D, 0.0D, 1.0D);
|
ROYAL_ASSAILANT_BOOTS_DOUBLE_DAMAGE_CHANCE = b.defineInRange("assailantBootsDoubleDamageChance", 0.05D, 0.0D, 1.0D);
|
||||||
ROYAL_GUARDIAN_SWORD_ATTACK_DAMAGE = b.defineInRange("guardianSwordAttackDamage", 111.0D, 0.0D, 4096.0D);
|
ROYAL_GUARDIAN_SWORD_ATTACK_DAMAGE = b.defineInRange("guardianSwordAttackDamage", 111.0D, 0.0D, 4096.0D);
|
||||||
|
GIANT_FRYING_PAN_ATTACK_DAMAGE = b.defineInRange("giantFryingPanAttackDamage", 80.0D, 0.0D, 4096.0D);
|
||||||
ROYAL_GUARDIAN_SWORD_ATTACK_SPEED = b.defineInRange("guardianSwordAttackSpeed", -2.5D, -10.0D, 10.0D);
|
ROYAL_GUARDIAN_SWORD_ATTACK_SPEED = b.defineInRange("guardianSwordAttackSpeed", -2.5D, -10.0D, 10.0D);
|
||||||
ROYAL_GUARDIAN_SWORD_ELEMENTAL_COOLDOWN_TICKS = b.defineInRange("guardianSwordElementalCooldownTicks", 120, 0, 72000);
|
ROYAL_GUARDIAN_SWORD_ELEMENTAL_COOLDOWN_TICKS = b.defineInRange("guardianSwordElementalCooldownTicks", 120, 0, 72000);
|
||||||
ROYAL_GUARDIAN_SWORD_FIRE_PRIMARY_DAMAGE = b.defineInRange("guardianSwordFirePrimaryDamage", 22.0D, 0.0D, 4096.0D);
|
ROYAL_GUARDIAN_SWORD_FIRE_PRIMARY_DAMAGE = b.defineInRange("guardianSwordFirePrimaryDamage", 22.0D, 0.0D, 4096.0D);
|
||||||
@@ -886,6 +888,7 @@ public final class AntarchyToolsConfig {
|
|||||||
static double royalAssailantLeggingsDoubleDamageChance() { return ROYAL_ASSAILANT_LEGGINGS_DOUBLE_DAMAGE_CHANCE.get(); }
|
static double royalAssailantLeggingsDoubleDamageChance() { return ROYAL_ASSAILANT_LEGGINGS_DOUBLE_DAMAGE_CHANCE.get(); }
|
||||||
static double royalAssailantBootsDoubleDamageChance() { return ROYAL_ASSAILANT_BOOTS_DOUBLE_DAMAGE_CHANCE.get(); }
|
static double royalAssailantBootsDoubleDamageChance() { return ROYAL_ASSAILANT_BOOTS_DOUBLE_DAMAGE_CHANCE.get(); }
|
||||||
static double royalGuardianSwordAttackDamage() { return ROYAL_GUARDIAN_SWORD_ATTACK_DAMAGE.get(); }
|
static double royalGuardianSwordAttackDamage() { return ROYAL_GUARDIAN_SWORD_ATTACK_DAMAGE.get(); }
|
||||||
|
static double giantFryingPanAttackDamage() { return GIANT_FRYING_PAN_ATTACK_DAMAGE.get(); }
|
||||||
static double royalGuardianSwordAttackSpeed() { return ROYAL_GUARDIAN_SWORD_ATTACK_SPEED.get(); }
|
static double royalGuardianSwordAttackSpeed() { return ROYAL_GUARDIAN_SWORD_ATTACK_SPEED.get(); }
|
||||||
static int royalGuardianSwordElementalCooldownTicks() { return ROYAL_GUARDIAN_SWORD_ELEMENTAL_COOLDOWN_TICKS.get(); }
|
static int royalGuardianSwordElementalCooldownTicks() { return ROYAL_GUARDIAN_SWORD_ELEMENTAL_COOLDOWN_TICKS.get(); }
|
||||||
static double royalGuardianSwordFirePrimaryDamage() { return ROYAL_GUARDIAN_SWORD_FIRE_PRIMARY_DAMAGE.get(); }
|
static double royalGuardianSwordFirePrimaryDamage() { return ROYAL_GUARDIAN_SWORD_FIRE_PRIMARY_DAMAGE.get(); }
|
||||||
|
|||||||
@@ -11,6 +11,12 @@ import net.minecraft.core.BlockPos;
|
|||||||
import net.minecraft.resources.ResourceLocation;
|
import net.minecraft.resources.ResourceLocation;
|
||||||
import net.minecraft.server.level.ServerLevel;
|
import net.minecraft.server.level.ServerLevel;
|
||||||
import net.minecraft.server.level.ServerPlayer;
|
import net.minecraft.server.level.ServerPlayer;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import net.minecraft.core.registries.Registries;
|
||||||
|
import net.minecraft.resources.ResourceKey;
|
||||||
|
import net.minecraft.world.level.Level;
|
||||||
|
import net.lerariemann.infinity.access.MinecraftServerAccess;
|
||||||
|
import com.craisinlord.antarchy.neoforge.mixins.infinity.PortalCreatorInvoker;
|
||||||
import net.minecraft.util.RandomSource;
|
import net.minecraft.util.RandomSource;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -82,6 +88,30 @@ public final class NeoForgeInfinityCompat implements InfinityCompatBridge {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public InfinityWarpResult requestDimensionCreation(MinecraftServer server, ResourceLocation dimensionId) {
|
||||||
|
if (!isAvailable() || server == null || dimensionId == null || !"infinity".equals(dimensionId.getNamespace())) {
|
||||||
|
return InfinityWarpResult.REJECTED;
|
||||||
|
}
|
||||||
|
ResourceKey<Level> key = ResourceKey.create(Registries.DIMENSION, dimensionId);
|
||||||
|
if (server.getLevel(key) != null) {
|
||||||
|
return InfinityWarpResult.READY;
|
||||||
|
}
|
||||||
|
if (!(server instanceof MinecraftServerAccess access)) {
|
||||||
|
return InfinityWarpResult.REJECTED;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
if (access.infinity$hasToAdd(key)) {
|
||||||
|
return InfinityWarpResult.PENDING;
|
||||||
|
}
|
||||||
|
return PortalCreatorInvoker.antarchy$invokeTryAddInfinityDimension(server, dimensionId)
|
||||||
|
? InfinityWarpResult.PENDING : InfinityWarpResult.REJECTED;
|
||||||
|
} catch (Throwable throwable) {
|
||||||
|
Antarchy.LOGGER.error("[Antarchy] Failed to request creation of Infinity dimension {}", dimensionId, throwable);
|
||||||
|
return InfinityWarpResult.FAILED_GENERATION;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean createPhysicalPortal(ServerLevel level, BlockPos anyPortalBlockPos, ResourceLocation dimensionId) {
|
public boolean createPhysicalPortal(ServerLevel level, BlockPos anyPortalBlockPos, ResourceLocation dimensionId) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -93,6 +93,8 @@ public final class AntarchyNeoForgeClient {
|
|||||||
private static final ResourceLocation ANTIWATER_FLOW = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/antiwater_flow");
|
private static final ResourceLocation ANTIWATER_FLOW = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/antiwater_flow");
|
||||||
private static final ResourceLocation BILE_STILL = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/bile/bile_still");
|
private static final ResourceLocation BILE_STILL = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/bile/bile_still");
|
||||||
private static final ResourceLocation BILE_FLOW = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/bile/bile_flowing");
|
private static final ResourceLocation BILE_FLOW = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/bile/bile_flowing");
|
||||||
|
private static final ResourceLocation ICHOR_STILL = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/ichor/ichor_still");
|
||||||
|
private static final ResourceLocation ICHOR_FLOW = ResourceLocation.fromNamespaceAndPath(Antarchy.MODID, "block/ichor/ichor_flowing");
|
||||||
private AntarchyNeoForgeClient() {
|
private AntarchyNeoForgeClient() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -360,6 +362,7 @@ public final class AntarchyNeoForgeClient {
|
|||||||
public static void registerMenuScreens(RegisterMenuScreensEvent event) {
|
public static void registerMenuScreens(RegisterMenuScreensEvent event) {
|
||||||
event.register(AntarchyNeoforgeMisc.DORRIE_INVENTORY_MENU.get(), com.craisinlord.antarchy.content.client.screen.DorrieInventoryScreen::new);
|
event.register(AntarchyNeoforgeMisc.DORRIE_INVENTORY_MENU.get(), com.craisinlord.antarchy.content.client.screen.DorrieInventoryScreen::new);
|
||||||
event.register(AntarchyNeoforgeMisc.ROYAL_JUDGMENT_MENU.get(), com.craisinlord.antarchy.content.client.screen.RoyalJudgmentScreen::new);
|
event.register(AntarchyNeoforgeMisc.ROYAL_JUDGMENT_MENU.get(), com.craisinlord.antarchy.content.client.screen.RoyalJudgmentScreen::new);
|
||||||
|
event.register(AntarchyNeoforgeMisc.GIANT_FRYING_PAN_MENU.get(), com.craisinlord.antarchy.content.client.screen.GiantFryingPanScreen::new);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
@@ -465,12 +468,12 @@ public final class AntarchyNeoForgeClient {
|
|||||||
event.registerFluidType(new IClientFluidTypeExtensions() {
|
event.registerFluidType(new IClientFluidTypeExtensions() {
|
||||||
@Override
|
@Override
|
||||||
public ResourceLocation getStillTexture() {
|
public ResourceLocation getStillTexture() {
|
||||||
return ANTIWATER_STILL;
|
return ICHOR_STILL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResourceLocation getFlowingTexture() {
|
public ResourceLocation getFlowingTexture() {
|
||||||
return ANTIWATER_FLOW;
|
return ICHOR_FLOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -612,6 +615,7 @@ public final class AntarchyNeoForgeClient {
|
|||||||
registerGeoItemExtension(event, AntarchyNeoforgeItems.BATTLE_AXE.get());
|
registerGeoItemExtension(event, AntarchyNeoforgeItems.BATTLE_AXE.get());
|
||||||
registerGeoItemExtension(event, AntarchyNeoforgeItems.BIG_BERTHA.get());
|
registerGeoItemExtension(event, AntarchyNeoforgeItems.BIG_BERTHA.get());
|
||||||
registerGeoItemExtension(event, AntarchyNeoforgeItems.ROYAL_GUARDIAN_SWORD.get());
|
registerGeoItemExtension(event, AntarchyNeoforgeItems.ROYAL_GUARDIAN_SWORD.get());
|
||||||
|
registerGeoItemExtension(event, AntarchyNeoforgeItems.GIANT_FRYING_PAN.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
|
|||||||
@@ -5,6 +5,8 @@ import com.craisinlord.antarchy.config.AntarchySettings;
|
|||||||
import com.craisinlord.antarchy.content.item.GravityGunItem;
|
import com.craisinlord.antarchy.content.item.GravityGunItem;
|
||||||
import com.craisinlord.antarchy.content.network.GravityGunPrimaryPayload;
|
import com.craisinlord.antarchy.content.network.GravityGunPrimaryPayload;
|
||||||
import com.craisinlord.antarchy.content.network.GravityGunScrollPayload;
|
import com.craisinlord.antarchy.content.network.GravityGunScrollPayload;
|
||||||
|
import com.craisinlord.antarchy.content.network.TemporalTunerScrollPayload;
|
||||||
|
import com.craisinlord.antarchy.content.item.TemporalTunerItem;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.screens.Screen;
|
import net.minecraft.client.gui.screens.Screen;
|
||||||
import net.minecraft.util.Mth;
|
import net.minecraft.util.Mth;
|
||||||
@@ -46,7 +48,20 @@ public final class GravityGunClientHandler {
|
|||||||
@SubscribeEvent
|
@SubscribeEvent
|
||||||
public static void onMouseScroll(InputEvent.MouseScrollingEvent event) {
|
public static void onMouseScroll(InputEvent.MouseScrollingEvent event) {
|
||||||
Minecraft mc = Minecraft.getInstance();
|
Minecraft mc = Minecraft.getInstance();
|
||||||
if (mc.player == null || mc.level == null || mc.screen != null || !Screen.hasControlDown() || !AntarchySettings.gravityGunEnabled()) {
|
if (mc.player == null || mc.level == null || mc.screen != null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Screen.hasShiftDown() && TemporalTunerItem.isAvailable(mc.player)) {
|
||||||
|
double scrollAmount = Mth.clamp(event.getScrollDeltaY(), -1.0D, 1.0D);
|
||||||
|
if (Math.abs(scrollAmount) >= 1.0E-4D) {
|
||||||
|
PacketDistributor.sendToServer(new TemporalTunerScrollPayload(scrollAmount * TemporalTunerItem.STEP));
|
||||||
|
event.setCanceled(true);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!Screen.hasControlDown() || !AntarchySettings.gravityGunEnabled()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
package com.craisinlord.antarchy.neoforge.mixins.infinity;
|
||||||
|
|
||||||
|
import net.lerariemann.infinity.util.teleport.PortalCreator;
|
||||||
|
import net.minecraft.resources.ResourceLocation;
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
import org.spongepowered.asm.mixin.Mixin;
|
||||||
|
import org.spongepowered.asm.mixin.gen.Invoker;
|
||||||
|
|
||||||
|
@Mixin(value = PortalCreator.class, remap = false)
|
||||||
|
public interface PortalCreatorInvoker {
|
||||||
|
@Invoker(value = "tryAddInfinityDimension", remap = false)
|
||||||
|
static boolean antarchy$invokeTryAddInfinityDimension(MinecraftServer server, ResourceLocation dimensionId) {
|
||||||
|
throw new AssertionError();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,6 +11,8 @@ import com.craisinlord.antarchy.content.network.RoyalGuardianSwordModeCyclePaylo
|
|||||||
import com.craisinlord.antarchy.content.network.EyeOfStormPrimaryPayload;
|
import com.craisinlord.antarchy.content.network.EyeOfStormPrimaryPayload;
|
||||||
import com.craisinlord.antarchy.content.network.GravityGunPrimaryPayload;
|
import com.craisinlord.antarchy.content.network.GravityGunPrimaryPayload;
|
||||||
import com.craisinlord.antarchy.content.network.GravityGunScrollPayload;
|
import com.craisinlord.antarchy.content.network.GravityGunScrollPayload;
|
||||||
|
import com.craisinlord.antarchy.content.network.TemporalTunerScrollPayload;
|
||||||
|
import com.craisinlord.antarchy.content.item.TemporalTunerItem;
|
||||||
import com.craisinlord.antarchy.content.network.GravityStatePayload;
|
import com.craisinlord.antarchy.content.network.GravityStatePayload;
|
||||||
import com.craisinlord.antarchy.content.network.ImpactShakePayload;
|
import com.craisinlord.antarchy.content.network.ImpactShakePayload;
|
||||||
import com.craisinlord.antarchy.content.network.PortalGunPrimaryPayload;
|
import com.craisinlord.antarchy.content.network.PortalGunPrimaryPayload;
|
||||||
@@ -51,6 +53,10 @@ public final class AntarchyGravityNetworking {
|
|||||||
GravityGunScrollPayload.TYPE,
|
GravityGunScrollPayload.TYPE,
|
||||||
GravityGunScrollPayload.STREAM_CODEC,
|
GravityGunScrollPayload.STREAM_CODEC,
|
||||||
AntarchyGravityNetworking::handleGravityGunScroll
|
AntarchyGravityNetworking::handleGravityGunScroll
|
||||||
|
).playToServer(
|
||||||
|
TemporalTunerScrollPayload.TYPE,
|
||||||
|
TemporalTunerScrollPayload.STREAM_CODEC,
|
||||||
|
AntarchyGravityNetworking::handleTemporalTunerScroll
|
||||||
).playToServer(
|
).playToServer(
|
||||||
BigBerthaModeCyclePayload.TYPE,
|
BigBerthaModeCyclePayload.TYPE,
|
||||||
BigBerthaModeCyclePayload.STREAM_CODEC,
|
BigBerthaModeCyclePayload.STREAM_CODEC,
|
||||||
@@ -158,6 +164,15 @@ public final class AntarchyGravityNetworking {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void handleTemporalTunerScroll(TemporalTunerScrollPayload payload, IPayloadContext context) {
|
||||||
|
context.enqueueWork(() -> {
|
||||||
|
if (context.player() instanceof ServerPlayer serverPlayer
|
||||||
|
&& TemporalTunerItem.isAvailable(serverPlayer)) {
|
||||||
|
TemporalTunerItem.adjust(serverPlayer, payload.delta());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
private static void handleRoyalGuardianSwordModeCycle(RoyalGuardianSwordModeCyclePayload payload, IPayloadContext context) {
|
private static void handleRoyalGuardianSwordModeCycle(RoyalGuardianSwordModeCyclePayload payload, IPayloadContext context) {
|
||||||
context.enqueueWork(() -> {
|
context.enqueueWork(() -> {
|
||||||
if (!(context.player() instanceof ServerPlayer serverPlayer)
|
if (!(context.player() instanceof ServerPlayer serverPlayer)
|
||||||
|
|||||||
@@ -697,6 +697,8 @@ public final class AntarchyNeoforgeItems {
|
|||||||
() -> new com.craisinlord.antarchy.content.item.CloudBucketItem(AntarchyNeoforgeBlocks.CLOUD_BLOCK.get(), new Item.Properties().craftRemainder(Items.BUCKET)));
|
() -> new com.craisinlord.antarchy.content.item.CloudBucketItem(AntarchyNeoforgeBlocks.CLOUD_BLOCK.get(), new Item.Properties().craftRemainder(Items.BUCKET)));
|
||||||
public static final DeferredItem<BloodCrystalShardItem> BLOOD_CRYSTAL_SHARD = ITEMS.register("blood_crystal_shard",
|
public static final DeferredItem<BloodCrystalShardItem> BLOOD_CRYSTAL_SHARD = ITEMS.register("blood_crystal_shard",
|
||||||
() -> new BloodCrystalShardItem(new Item.Properties()));
|
() -> new BloodCrystalShardItem(new Item.Properties()));
|
||||||
|
public static final DeferredItem<TemporalTunerItem> TEMPORAL_TUNER = ITEMS.register("temporal_tuner",
|
||||||
|
() -> new TemporalTunerItem(new Item.Properties().rarity(Rarity.RARE).fireResistant()));
|
||||||
public static final DeferredItem<Item> BLOOD_CRYSTAL_APPLE = ITEMS.register("blood_crystal_apple",
|
public static final DeferredItem<Item> BLOOD_CRYSTAL_APPLE = ITEMS.register("blood_crystal_apple",
|
||||||
() -> new BloodCrystalAppleItem(new Item.Properties()
|
() -> new BloodCrystalAppleItem(new Item.Properties()
|
||||||
.rarity(Rarity.RARE)
|
.rarity(Rarity.RARE)
|
||||||
@@ -730,6 +732,13 @@ public final class AntarchyNeoforgeItems {
|
|||||||
AntarchySettings.bloodCrystalKatanaAttackDamage(),
|
AntarchySettings.bloodCrystalKatanaAttackDamage(),
|
||||||
-2.2F
|
-2.2F
|
||||||
));
|
));
|
||||||
|
public static final DeferredItem<BloodGodsBladeItem> BLOOD_GODS_BLADE = ITEMS.register("blood_gods_blade",
|
||||||
|
() -> new BloodGodsBladeItem(
|
||||||
|
ULTIMATE_TIER,
|
||||||
|
new Item.Properties().stacksTo(1).durability(4096).rarity(Rarity.EPIC).fireResistant(),
|
||||||
|
80,
|
||||||
|
-2.4F
|
||||||
|
));
|
||||||
public static final DeferredItem<MantisClawItem> MANTIS_CLAW = ITEMS.register("mantis_claw",
|
public static final DeferredItem<MantisClawItem> MANTIS_CLAW = ITEMS.register("mantis_claw",
|
||||||
() -> new MantisClawItem(Tiers.IRON, new Item.Properties().stacksTo(1).durability(50).rarity(Rarity.UNCOMMON)));
|
() -> new MantisClawItem(Tiers.IRON, new Item.Properties().stacksTo(1).durability(50).rarity(Rarity.UNCOMMON)));
|
||||||
public static final DeferredItem<Item> HERCULES_HORN = ITEMS.registerSimpleItem("hercules_horn", new Item.Properties().rarity(Rarity.UNCOMMON));
|
public static final DeferredItem<Item> HERCULES_HORN = ITEMS.registerSimpleItem("hercules_horn", new Item.Properties().rarity(Rarity.UNCOMMON));
|
||||||
@@ -993,6 +1002,8 @@ public final class AntarchyNeoforgeItems {
|
|||||||
|
|
||||||
public static final DeferredItem<RoyalGuardianSwordItem> ROYAL_GUARDIAN_SWORD = ITEMS.register("royal_guardian_sword",
|
public static final DeferredItem<RoyalGuardianSwordItem> ROYAL_GUARDIAN_SWORD = ITEMS.register("royal_guardian_sword",
|
||||||
() -> new RoyalGuardianSwordItem(ROYAL_GUARDIAN_TIER, new Item.Properties().stacksTo(1).rarity(Rarity.EPIC).fireResistant()));
|
() -> new RoyalGuardianSwordItem(ROYAL_GUARDIAN_TIER, new Item.Properties().stacksTo(1).rarity(Rarity.EPIC).fireResistant()));
|
||||||
|
public static final DeferredItem<GiantFryingPanItem> GIANT_FRYING_PAN = ITEMS.register("giant_frying_pan",
|
||||||
|
() -> new GiantFryingPanItem(ROYAL_GUARDIAN_TIER, new Item.Properties().stacksTo(1).rarity(Rarity.EPIC).fireResistant()));
|
||||||
public static final DeferredItem<RoyalAssailantBattleAxeItem> ROYAL_ASSAILANT_BATTLEAXE = ITEMS.register("royal_assailant_battleaxe",
|
public static final DeferredItem<RoyalAssailantBattleAxeItem> ROYAL_ASSAILANT_BATTLEAXE = ITEMS.register("royal_assailant_battleaxe",
|
||||||
() -> new RoyalAssailantBattleAxeItem(ROYAL_ASSAILANT_TIER, new Item.Properties().stacksTo(1).rarity(Rarity.EPIC).fireResistant()));
|
() -> new RoyalAssailantBattleAxeItem(ROYAL_ASSAILANT_TIER, new Item.Properties().stacksTo(1).rarity(Rarity.EPIC).fireResistant()));
|
||||||
public static final DeferredItem<RoyalGuardianShieldItem> ROYAL_GUARDIAN_SHIELD = ITEMS.register("royal_guardian_shield",
|
public static final DeferredItem<RoyalGuardianShieldItem> ROYAL_GUARDIAN_SHIELD = ITEMS.register("royal_guardian_shield",
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import com.craisinlord.antarchy.Antarchy;
|
|||||||
import com.craisinlord.antarchy.content.client.particle.InvertedGeyserBaseParticleOptions;
|
import com.craisinlord.antarchy.content.client.particle.InvertedGeyserBaseParticleOptions;
|
||||||
import com.craisinlord.antarchy.content.client.particle.InvertedGeyserParticleOptions;
|
import com.craisinlord.antarchy.content.client.particle.InvertedGeyserParticleOptions;
|
||||||
import com.craisinlord.antarchy.content.effect.DreadMobEffect;
|
import com.craisinlord.antarchy.content.effect.DreadMobEffect;
|
||||||
|
import com.craisinlord.antarchy.content.effect.BleedingMobEffect;
|
||||||
|
import com.craisinlord.antarchy.content.effect.BloodMoonMobEffect;
|
||||||
import com.craisinlord.antarchy.content.effect.GoopedMobEffect;
|
import com.craisinlord.antarchy.content.effect.GoopedMobEffect;
|
||||||
import com.craisinlord.antarchy.content.effect.GrowthMobEffect;
|
import com.craisinlord.antarchy.content.effect.GrowthMobEffect;
|
||||||
import com.craisinlord.antarchy.content.effect.InvertedMobEffect;
|
import com.craisinlord.antarchy.content.effect.InvertedMobEffect;
|
||||||
@@ -155,9 +157,15 @@ public final class AntarchyNeoforgeMisc {
|
|||||||
"royal_judgment",
|
"royal_judgment",
|
||||||
() -> new MenuType<>(com.craisinlord.antarchy.content.menu.RoyalJudgmentMenu::new, FeatureFlags.DEFAULT_FLAGS)
|
() -> new MenuType<>(com.craisinlord.antarchy.content.menu.RoyalJudgmentMenu::new, FeatureFlags.DEFAULT_FLAGS)
|
||||||
);
|
);
|
||||||
|
public static final DeferredHolder<MenuType<?>, MenuType<com.craisinlord.antarchy.content.menu.GiantFryingPanMenu>> GIANT_FRYING_PAN_MENU = MENU_TYPES.register(
|
||||||
|
"giant_frying_pan",
|
||||||
|
() -> new MenuType<>(com.craisinlord.antarchy.content.menu.GiantFryingPanMenu::new, FeatureFlags.DEFAULT_FLAGS)
|
||||||
|
);
|
||||||
|
|
||||||
// Mob effects
|
// Mob effects
|
||||||
public static final DeferredHolder<MobEffect, DreadMobEffect> DREAD = MOB_EFFECTS.register("dread", DreadMobEffect::new);
|
public static final DeferredHolder<MobEffect, DreadMobEffect> DREAD = MOB_EFFECTS.register("dread", DreadMobEffect::new);
|
||||||
|
public static final DeferredHolder<MobEffect, BleedingMobEffect> BLEEDING = MOB_EFFECTS.register("bleeding", BleedingMobEffect::new);
|
||||||
|
public static final DeferredHolder<MobEffect, BloodMoonMobEffect> BLOOD_MOON = MOB_EFFECTS.register("blood_moon", BloodMoonMobEffect::new);
|
||||||
public static final DeferredHolder<MobEffect, ParalyzedMobEffect> PARALYZED = MOB_EFFECTS.register("paralyzed", ParalyzedMobEffect::new);
|
public static final DeferredHolder<MobEffect, ParalyzedMobEffect> PARALYZED = MOB_EFFECTS.register("paralyzed", ParalyzedMobEffect::new);
|
||||||
public static final DeferredHolder<MobEffect, InvertedMobEffect> INVERTED = MOB_EFFECTS.register("inverted", InvertedMobEffect::new);
|
public static final DeferredHolder<MobEffect, InvertedMobEffect> INVERTED = MOB_EFFECTS.register("inverted", InvertedMobEffect::new);
|
||||||
public static final DeferredHolder<MobEffect, CommandedMobEffect> COMMANDED = MOB_EFFECTS.register("commanded", CommandedMobEffect::new);
|
public static final DeferredHolder<MobEffect, CommandedMobEffect> COMMANDED = MOB_EFFECTS.register("commanded", CommandedMobEffect::new);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@
|
|||||||
"infinity.AmendmentRareOresMixin",
|
"infinity.AmendmentRareOresMixin",
|
||||||
"infinity.ConfigGenInvocationMixin",
|
"infinity.ConfigGenInvocationMixin",
|
||||||
"infinity.PortalCreatorMixin",
|
"infinity.PortalCreatorMixin",
|
||||||
|
"infinity.PortalCreatorInvoker",
|
||||||
"infinity.WarpLogicMixin",
|
"infinity.WarpLogicMixin",
|
||||||
"level.ClientLevelPartEntitiesAccessor",
|
"level.ClientLevelPartEntitiesAccessor",
|
||||||
"level.ServerLevelPartEntitiesAccessor"
|
"level.ServerLevelPartEntitiesAccessor"
|
||||||
|
|||||||
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"loader": "neoforge:separate_transforms",
|
||||||
|
"gui_light": "front",
|
||||||
|
"textures": {
|
||||||
|
"layer0": "antarchy:item/giant_frying_pan/giant_frying_pan_in_hand"
|
||||||
|
},
|
||||||
|
"base": {
|
||||||
|
"parent": "antarchy:item/giant_frying_pan_held"
|
||||||
|
},
|
||||||
|
"texture_size": [
|
||||||
|
128,
|
||||||
|
128
|
||||||
|
],
|
||||||
|
"perspectives": {
|
||||||
|
"gui": {
|
||||||
|
"parent": "antarchy:item/giant_frying_pan_gui"
|
||||||
|
},
|
||||||
|
"ground": {
|
||||||
|
"parent": "antarchy:item/giant_frying_pan_gui"
|
||||||
|
},
|
||||||
|
"fixed": {
|
||||||
|
"parent": "antarchy:item/giant_frying_pan_gui"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||