First pass computer prototype

This commit is contained in:
craisinlord committed 2026-09-13 12:57:36 -05:00
1 parent 8b86021a04
commit c27e68c16a
46 files changed
+1242 -11

No files matched your search

@@ -988,9 +988,9 @@ public final class AntarchyMobsConfig {
MANTICORE_HEALTH = b.comment("Base max health.").defineInRange("health", 40.0D, 1.0D, 32768.0D);
MANTICORE_ATTACK_DAMAGE = b.comment("Base attack damage for bites and stings.").defineInRange("attackDamage", 7.0D, 0.0D, 1024.0D);
MANTICORE_STING_POISON_TICKS = b.comment("Poison duration in ticks applied by a Manticore sting.").defineInRange("stingPoisonTicks", 100, 0, 12000);
QUEEN_MANTICORE_CAP = b.comment("Maximum number of living Manticores a single Queen may keep summoned.").defineInRange("queenSummonCap", 15, 1, 200);
QUEEN_MANTICORE_SUMMON_COOLDOWN_TICKS = b.comment("Ticks between Queen Manticore summon attempts.").defineInRange("queenSummonCooldownTicks", 600, 20, 200000);
QUEEN_MANTICORE_SUMMON_COUNT = b.comment("Maximum Manticores created by one Queen summon attempt.").defineInRange("queenSummonCount", 3, 1, 32);
QUEEN_MANTICORE_CAP = b.comment("Maximum number of living Manticores a single Queen may keep summoned.").defineInRange("queenSummonCap", 6, 1, 200);
QUEEN_MANTICORE_SUMMON_COOLDOWN_TICKS = b.comment("Ticks between Queen Manticore summon attempts.").defineInRange("queenSummonCooldownTicks", 800, 20, 200000);
QUEEN_MANTICORE_SUMMON_COUNT = b.comment("Maximum Manticores created by one Queen summon attempt.").defineInRange("queenSummonCount", 2, 1, 32);
QUEEN_MANTICORE_SUMMON_RANGE = b.comment("Maximum horizontal distance from the Queen used for Manticore spawn positions.").defineInRange("queenSummonRange", 24.0D, 4.0D, 128.0D);
b.pop();
@@ -473,6 +473,10 @@ public class AntarchyNeoforge {
AntarchyObjects.setCookedCorndog(() -> AntarchyNeoforgeItems.COOKED_CORNDOG.get());
AntarchyObjects.setGlimmerBottle(() -> AntarchyNeoforgeItems.GLIMMER_BOTTLE.get());
AntarchyObjects.setGlimmerVariantComponent(() -> AntarchyNeoforgeMisc.GLIMMER_VARIANT.get());
AntarchyObjects.setFloppyDiskComponent(() -> AntarchyNeoforgeMisc.FLOPPY_DISK_COMPONENT.get());
AntarchyObjects.setFloppyDisk(() -> AntarchyNeoforgeItems.FLOPPY_DISK.get());
AntarchyObjects.setComputer(() -> AntarchyNeoforgeBlocks.COMPUTER.get());
AntarchyObjects.setComputerBlockEntity(() -> AntarchyNeoforgeBlocks.COMPUTER_BLOCK_ENTITY.get());
AntarchyObjects.setAmericanComponent(() -> AntarchyNeoforgeMisc.AMERICAN.get());
AntarchyObjects.setLumen(() -> AntarchyNeoforgeMisc.LUMEN.get());
AntarchyObjects.setFlowingLumen(() -> AntarchyNeoforgeMisc.FLOWING_LUMEN.get());
@@ -2,6 +2,8 @@ package com.craisinlord.antarchy.neoforge.client;
import com.craisinlord.antarchy.Antarchy;
import com.craisinlord.antarchy.content.client.GoopedHudRenderer;
import com.craisinlord.antarchy.content.client.AntarchyClientHooks;
import com.craisinlord.antarchy.content.client.screen.ComputerScreen;
import com.craisinlord.antarchy.content.client.HordeHudRenderer;
import com.craisinlord.antarchy.content.client.TigerEyeClientHooks;
import com.craisinlord.antarchy.content.client.hud.BloodglassHudRenderer;
@@ -99,6 +101,7 @@ public final class AntarchyNeoForgeClient {
event.registerBlockEntityRenderer(AntarchyNeoforgeBlocks.CRITTER_CAGE_BLOCK_ENTITY.get(), CritterCageRenderer::new);
event.registerBlockEntityRenderer(AntarchyNeoforgeBlocks.UNDERTRIAL_SPAWNER_BLOCK_ENTITY.get(), UndertrialSpawnerRenderer::new);
event.registerBlockEntityRenderer(AntarchyNeoforgeBlocks.UNDERVAULT_BLOCK_ENTITY.get(), UnderVaultRenderer::new);
event.registerBlockEntityRenderer(AntarchyNeoforgeBlocks.COMPUTER_BLOCK_ENTITY.get(), ComputerRenderer::new);
event.registerEntityRenderer(AntarchyNeoforgeEntites.EASTER_BUNNY.get(), context -> withParalyzedGeoLayer(new EasterBunnyRenderer(context)));
event.registerEntityRenderer(AntarchyNeoforgeEntites.FLYING_SQUIRREL.get(), context -> withParalyzedGeoLayer(new FlyingSquirrelRenderer(context)));
event.registerEntityRenderer(AntarchyNeoforgeEntites.CATERPILLAR.get(), context -> withParalyzedGeoLayer(new CaterpillarRenderer(context)));
@@ -595,6 +598,7 @@ public final class AntarchyNeoForgeClient {
@SubscribeEvent
public static void onClientSetup(FMLClientSetupEvent event) {
event.enqueueWork(() -> {
AntarchyClientHooks.setComputerOpener(pos -> Minecraft.getInstance().setScreen(new ComputerScreen(pos)));
TigerEyeClientHooks.setCamouflageKeyTextSupplier(() -> AntarchyKeyBindings.TIGERS_EYE_CAMOUFLAGE.getTranslatedKeyMessage());
ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.UNDERTRIAL_SPAWNER.get(), RenderType.cutout());
ItemBlockRenderTypes.setRenderLayer(AntarchyNeoforgeBlocks.UNDERVAULT.get(), RenderType.cutout());
@@ -709,6 +713,7 @@ public final class AntarchyNeoForgeClient {
@SubscribeEvent
public static void registerClientReloadListeners(RegisterClientReloadListenersEvent event) {
event.registerReloadListener(com.craisinlord.antarchy.content.guide.ComputerGuideData.instance());
event.registerReloadListener(new net.minecraft.server.packs.resources.SimplePreparableReloadListener<Void>() {
@Override
protected Void prepare(net.minecraft.server.packs.resources.ResourceManager resourceManager, net.minecraft.util.profiling.ProfilerFiller profiler) {
@@ -381,6 +381,7 @@ public final class AntarchyNeoForgeEvents {
static void registerReloadListeners(AddReloadListenerEvent event) {
event.addListener(new DrTrayaurusTradeManager());
event.addListener(com.craisinlord.antarchy.content.guide.ComputerGuideData.instance());
}
static void handleStartTracking(PlayerEvent.StartTracking event) {
if (event.getTarget().level().isClientSide()) {
@@ -6,6 +6,7 @@ import com.craisinlord.antarchy.content.AntarchyObjects;
import com.craisinlord.antarchy.content.block.*;
import com.craisinlord.antarchy.content.block.entity.AntNestBlockEntity;
import com.craisinlord.antarchy.content.block.entity.CritterCageBlockEntity;
import com.craisinlord.antarchy.content.block.entity.ComputerBlockEntity;
import com.craisinlord.antarchy.content.block.entity.DimensionalTearMarkerBlockEntity;
import com.craisinlord.antarchy.content.block.entity.DreamCampfireBlockEntity;
import com.craisinlord.antarchy.content.block.entity.HushweedBlockEntity;
@@ -716,6 +717,8 @@ public final class AntarchyNeoforgeBlocks {
() -> new com.craisinlord.antarchy.content.block.AntimetalRailBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.RAIL)));
public static final DeferredBlock<UpperBlock> UPPER = BLOCKS.register("upper",
() -> new UpperBlock(AntarchyNeoforgeBlocks::upperBlockEntityType, BlockBehaviour.Properties.ofFullCopy(Blocks.HOPPER)));
public static final DeferredBlock<com.craisinlord.antarchy.content.block.ComputerBlock> COMPUTER = BLOCKS.register("computer",
() -> new com.craisinlord.antarchy.content.block.ComputerBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.IRON_BLOCK).noOcclusion()));
public static final DeferredBlock<com.craisinlord.antarchy.content.block.AntimetalPoweredRailBlock> ANTIMETAL_POWERED_RAIL = BLOCKS.register("antimetal_powered_rail",
() -> new com.craisinlord.antarchy.content.block.AntimetalPoweredRailBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.POWERED_RAIL)));
public static final DeferredBlock<com.craisinlord.antarchy.content.block.AntimetalDetectorRailBlock> ANTIMETAL_DETECTOR_RAIL = BLOCKS.register("antimetal_detector_rail",
@@ -948,6 +951,11 @@ public final class AntarchyNeoforgeBlocks {
(pos, state) -> new DimensionalTearMarkerBlockEntity(pos, state, AntarchyNeoforgeBlocks::dimensionalTearMarkerBlockEntityType),
DIMENSIONAL_TEAR_MARKER.get()
).build(null));
public static final DeferredHolder<BlockEntityType<?>, BlockEntityType<ComputerBlockEntity>> COMPUTER_BLOCK_ENTITY = BLOCK_ENTITY_TYPES.register("computer",
() -> BlockEntityType.Builder.of(
(pos, state) -> new ComputerBlockEntity(pos, state, AntarchyNeoforgeBlocks::computerBlockEntityType),
COMPUTER.get()
).build(null));
public static final DeferredHolder<BlockEntityType<?>, BlockEntityType<QueenTrailSpawnMarkerBlockEntity>> QUEEN_TRAIL_SPAWN_MARKER_BLOCK_ENTITY = BLOCK_ENTITY_TYPES.register("queen_trail_spawn_marker",
() -> BlockEntityType.Builder.of(
(pos, state) -> new QueenTrailSpawnMarkerBlockEntity(pos, state, AntarchyNeoforgeBlocks::queenTrailSpawnMarkerBlockEntityType),
@@ -1046,6 +1054,10 @@ public final class AntarchyNeoforgeBlocks {
return UPPER_BLOCK_ENTITY.get();
}
private static BlockEntityType<ComputerBlockEntity> computerBlockEntityType() {
return COMPUTER_BLOCK_ENTITY.get();
}
private static BlockEntityType<VortexLensBlockEntity> vortexLensBlockEntityType() {
return VORTEX_LENS_BLOCK_ENTITY.get();
}
@@ -92,6 +92,8 @@ public final class AntarchyNeoforgeItems {
() -> Ingredient.of(AntarchyNeoforgeItems.QUEEN_SCALE.get())
);
public static final DeferredItem<Item> FLOPPY_DISK = ITEMS.register("floppy_disk", () -> new com.craisinlord.antarchy.content.item.FloppyDiskItem(new Item.Properties()));
public static final DeferredItem<Item> NIGHTMARE_SCALE = ITEMS.registerSimpleItem("nightmare_scale", new Item.Properties().rarity(Rarity.RARE).fireResistant());
public static final DeferredItem<Item> MUSIC_DISC_UNDERSIDE = ITEMS.registerSimpleItem("music_disc_underside",
@@ -204,6 +206,7 @@ public final class AntarchyNeoforgeItems {
// Block items
public static final DeferredItem<net.minecraft.world.item.BlockItem> DUPLICATOR_LOG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.DUPLICATOR_LOG);
public static final DeferredItem<net.minecraft.world.item.BlockItem> COMPUTER_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.COMPUTER);
public static final DeferredItem<net.minecraft.world.item.BlockItem> OURANWOOD_LOG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.OURANWOOD_LOG);
public static final DeferredItem<net.minecraft.world.item.BlockItem> OURANWOOD_WOOD_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.OURANWOOD_WOOD);
public static final DeferredItem<net.minecraft.world.item.BlockItem> MOSSY_OURANWOOD_LOG_ITEM = ITEMS.registerSimpleBlockItem(AntarchyNeoforgeBlocks.MOSSY_OURANWOOD_LOG);
@@ -86,6 +86,12 @@ public final class AntarchyNeoforgeMisc {
.persistent(com.craisinlord.antarchy.content.entity.glimmer.GlimmerVariant.CODEC)
.networkSynchronized(com.craisinlord.antarchy.content.entity.glimmer.GlimmerVariant.STREAM_CODEC)
.build());
public static final DeferredHolder<net.minecraft.core.component.DataComponentType<?>, net.minecraft.core.component.DataComponentType<net.minecraft.resources.ResourceLocation>> FLOPPY_DISK_COMPONENT =
DATA_COMPONENT_TYPES.register("floppy_disk",
() -> net.minecraft.core.component.DataComponentType.<net.minecraft.resources.ResourceLocation>builder()
.persistent(net.minecraft.resources.ResourceLocation.CODEC)
.networkSynchronized(net.minecraft.resources.ResourceLocation.STREAM_CODEC)
.build());
public static final DeferredHolder<net.minecraft.core.component.DataComponentType<?>, net.minecraft.core.component.DataComponentType<net.minecraft.util.Unit>> AMERICAN =
DATA_COMPONENT_TYPES.register("american",
() -> net.minecraft.core.component.DataComponentType.<net.minecraft.util.Unit>builder()