Skip to content

Commit

Permalink
correct capitalization of "GCYR"
Browse files Browse the repository at this point in the history
  • Loading branch information
screret committed Aug 26, 2024
1 parent 4c5ee5f commit 626707d
Show file tree
Hide file tree
Showing 103 changed files with 811 additions and 871 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package argent_matter.gcyr;

import argent_matter.gcyr.api.gui.factory.EntityUIFactory;
import argent_matter.gcyr.api.registries.GCyRRegistries;
import argent_matter.gcyr.api.registries.GCYRRegistries;
import argent_matter.gcyr.common.data.*;
import argent_matter.gcyr.common.gui.EntityOxygenHUD;
import argent_matter.gcyr.config.GCyRConfig;
import argent_matter.gcyr.data.GCyRDatagen;
import argent_matter.gcyr.config.GCYRConfig;
import argent_matter.gcyr.data.GCYRDatagen;
import argent_matter.gcyr.data.loader.PlanetResources;
import com.gregtechceu.gtceu.api.GTCEuAPI;
import com.gregtechceu.gtceu.api.data.DimensionMarker;
Expand All @@ -28,48 +28,48 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Mod(GCyR.MOD_ID)
public class GCyR {
@Mod(GCYR.MOD_ID)
public class GCYR {
public static final String
MOD_ID = "gcyr",
NAME = "Gregicality Rocketry";
public static final Logger LOGGER = LoggerFactory.getLogger(NAME);
public static MaterialRegistry MATERIAL_REGISTRY;

public GCyR() {
GCyR.init();
public GCYR() {
GCYR.init();
var bus = FMLJavaModLoadingContext.get().getModEventBus();
bus.register(this);

bus.addGenericListener(GTRecipeType.class, this::registerRecipeTypes);
bus.addGenericListener(Class.class, this::registerRecipeConditions);
bus.addGenericListener(MachineDefinition.class, this::registerMachines);
bus.addGenericListener(DimensionMarker.class, this::registerDimensionMarkers);
GCyRDimensionTypes.register(bus);
GCYRDimensionTypes.register(bus);

GCyRVanillaRecipeTypes.RECIPE_TYPE_DEFERRED_REGISTER.register(bus);
GCYRVanillaRecipeTypes.RECIPE_TYPE_DEFERRED_REGISTER.register(bus);

DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> GCyRClient::init);
DistExecutor.unsafeRunWhenOn(Dist.CLIENT, () -> GCYRClient::init);
}

public static void init() {
GCyRConfig.init();
GCyRNetworking.init();
GCYRConfig.init();
GCYRNetworking.init();
UIFactory.register(EntityUIFactory.INSTANCE);

GCyRSatellites.init();
GCyREntityDataSerializers.init();
GCyRCreativeModeTabs.init();
GCyREntities.init();
GCyRBlocks.init();
GCyRItems.init();
GCyRMenus.init();
GCYRSatellites.init();
GCYREntityDataSerializers.init();
GCYRCreativeModeTabs.init();
GCYREntities.init();
GCYRBlocks.init();
GCYRItems.init();
GCYRMenus.init();

GCyRDatagen.init();
GCYRDatagen.init();

GCyRRegistries.REGISTRATE.registerRegistrate();
GCyRDimensionTypes.init();
GCyRParticles.init();
GCYRRegistries.REGISTRATE.registerRegistrate();
GCYRDimensionTypes.init();
GCYRParticles.init();
}

public static ResourceLocation id(String path) {
Expand All @@ -89,29 +89,29 @@ public void registerClientReloadListeners(RegisterClientReloadListenersEvent eve

@SubscribeEvent
public void registerMaterialRegistry(MaterialRegistryEvent event) {
MATERIAL_REGISTRY = GTCEuAPI.materialManager.createRegistry(GCyR.MOD_ID);
MATERIAL_REGISTRY = GTCEuAPI.materialManager.createRegistry(GCYR.MOD_ID);
}

@SubscribeEvent
public void registerMaterials(MaterialEvent event) {
GCyRMaterials.init();
GCYRMaterials.init();
}

@SubscribeEvent
public void modifyMaterials(PostMaterialEvent event) {
GCyRMaterials.modifyMaterials();
GCYRMaterials.modifyMaterials();
}

public void registerRecipeTypes(GTCEuAPI.RegisterEvent<ResourceLocation, GTRecipeType> event) {
GCyRRecipeTypes.init();
GCYRRecipeTypes.init();
}

public void registerRecipeConditions(GTCEuAPI.RegisterEvent<String, Class<? extends RecipeCondition>> event) {
GCyRRecipeConditions.init();
GCYRRecipeConditions.init();
}

public void registerMachines(GTCEuAPI.RegisterEvent<ResourceLocation, MachineDefinition> event) {
GCyRMachines.init();
GCYRMachines.init();
}

public void registerDimensionMarkers(GTCEuAPI.RegisterEvent<ResourceLocation, DimensionMarker> event) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import java.util.ArrayList;
import java.util.List;

public class GCyRClient {
public class GCYRClient {

public static boolean isDysonSphereActive = false;

Expand All @@ -19,6 +19,6 @@ public class GCyRClient {
public static List<Galaxy> galaxies = new ArrayList<>();

public static void init() {
//GCyRKeyMappings.init();
//GCYRKeyMappings.init();
}
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package argent_matter.gcyr;

import argent_matter.gcyr.api.registries.GCyRRegistries;
import argent_matter.gcyr.common.data.GCyRBlocks;
import argent_matter.gcyr.common.data.GCyRMaterials;
import argent_matter.gcyr.common.data.GCyRRecipes;
import argent_matter.gcyr.common.data.GCyRSoundEntries;
import argent_matter.gcyr.common.worldgen.GCyROres;
import argent_matter.gcyr.common.worldgen.GCyRWorldGenLayers;
import argent_matter.gcyr.api.registries.GCYRRegistries;
import argent_matter.gcyr.common.data.GCYRBlocks;
import argent_matter.gcyr.common.data.GCYRMaterials;
import argent_matter.gcyr.common.data.GCYRRecipes;
import argent_matter.gcyr.common.data.GCYRSoundEntries;
import argent_matter.gcyr.common.worldgen.GCYROres;
import argent_matter.gcyr.common.worldgen.GCYRWorldGenLayers;
import com.gregtechceu.gtceu.api.addon.GTAddon;
import com.gregtechceu.gtceu.api.addon.IGTAddon;
import com.gregtechceu.gtceu.api.addon.events.MaterialCasingCollectionEvent;
Expand All @@ -21,10 +21,10 @@
import java.util.function.Consumer;

@GTAddon
public class GCyRGTAddon implements IGTAddon {
public class GCYRGTAddon implements IGTAddon {
@Override
public GTRegistrate getRegistrate() {
return GCyRRegistries.REGISTRATE;
return GCYRRegistries.REGISTRATE;
}

@Override
Expand All @@ -34,23 +34,23 @@ public void initializeAddon() {

@Override
public String addonModId() {
return GCyR.MOD_ID;
return GCYR.MOD_ID;
}

@Override
public void registerTagPrefixes() {
TagPrefix.oreTagPrefix("moon", BlockTags.MINEABLE_WITH_PICKAXE)
.langValue("Moon %s Ore")
.registerOre(() -> GCyRBlocks.MOON_STONE.orElse(Blocks.STONE).defaultBlockState(), null, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_LIGHT_GRAY).requiresCorrectToolForDrops().strength(3.0F, 3.0F), GCyR.id("block/moon_stone"));
.registerOre(() -> GCYRBlocks.MOON_STONE.orElse(Blocks.STONE).defaultBlockState(), null, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_LIGHT_GRAY).requiresCorrectToolForDrops().strength(3.0F, 3.0F), GCYR.id("block/moon_stone"));
TagPrefix.oreTagPrefix("mars", BlockTags.MINEABLE_WITH_PICKAXE)
.langValue("Mars %s Ore")
.registerOre(() -> GCyRBlocks.MARTIAN_ROCK.orElse(Blocks.DEEPSLATE).defaultBlockState(), () -> GCyRMaterials.MartianRockDust, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED).requiresCorrectToolForDrops().strength(3.0F, 3.0F), GCyR.id("block/martian_rock"));
.registerOre(() -> GCYRBlocks.MARTIAN_ROCK.orElse(Blocks.DEEPSLATE).defaultBlockState(), () -> GCYRMaterials.MartianRockDust, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_RED).requiresCorrectToolForDrops().strength(3.0F, 3.0F), GCYR.id("block/martian_rock"));
TagPrefix.oreTagPrefix("venus", BlockTags.MINEABLE_WITH_PICKAXE)
.langValue("Venus %s Ore")
.registerOre(() -> GCyRBlocks.VENUS_ROCK.orElse(Blocks.DEEPSLATE).defaultBlockState(), null, BlockBehaviour.Properties.of().mapColor(MapColor.TERRACOTTA_ORANGE).requiresCorrectToolForDrops().strength(3.0F, 3.0F), GCyR.id("block/venus_rock"));
.registerOre(() -> GCYRBlocks.VENUS_ROCK.orElse(Blocks.DEEPSLATE).defaultBlockState(), null, BlockBehaviour.Properties.of().mapColor(MapColor.TERRACOTTA_ORANGE).requiresCorrectToolForDrops().strength(3.0F, 3.0F), GCYR.id("block/venus_rock"));
TagPrefix.oreTagPrefix("mercury", BlockTags.MINEABLE_WITH_PICKAXE)
.langValue("Mercury %s Ore")
.registerOre(() -> GCyRBlocks.MERCURY_ROCK.orElse(Blocks.STONE).defaultBlockState(), null, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_GRAY).requiresCorrectToolForDrops().strength(3.0F, 3.0F), GCyR.id("block/moon_stone"));
.registerOre(() -> GCYRBlocks.MERCURY_ROCK.orElse(Blocks.STONE).defaultBlockState(), null, BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_GRAY).requiresCorrectToolForDrops().strength(3.0F, 3.0F), GCYR.id("block/moon_stone"));
}

@Override
Expand All @@ -60,7 +60,7 @@ public void registerElements() {

@Override
public void registerSounds() {
GCyRSoundEntries.init();
GCYRSoundEntries.init();
}

@Override
Expand All @@ -70,7 +70,7 @@ public void registerCovers() {

@Override
public void registerWorldgenLayers() {
GCyRWorldGenLayers.init();
GCYRWorldGenLayers.init();
}

@Override
Expand All @@ -85,7 +85,7 @@ public void registerVeinGenerators() {

@Override
public void registerOreVeins() {
GCyROres.init();
GCYROres.init();
}

@Override
Expand All @@ -95,6 +95,6 @@ public void collectMaterialCasings(MaterialCasingCollectionEvent event) {

@Override
public void addRecipes(Consumer<FinishedRecipe> provider) {
GCyRRecipes.init(provider);
GCYRRecipes.init(provider);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import javax.annotation.Nullable;

public class GCyRCapabilityHelper {
public class GCYRCapabilityHelper {
@Nullable
public static ISpaceStationHolder getSpaceStations(@Nullable ServerLevel level) {
return StationWorldSavedData.getOrCreate(level);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package argent_matter.gcyr.api.data.tag;

import argent_matter.gcyr.GCyR;
import com.lowdragmc.lowdraglib.Platform;
import argent_matter.gcyr.GCYR;
import net.minecraft.core.Registry;
import net.minecraft.core.registries.BuiltInRegistries;
import net.minecraft.core.registries.Registries;
import net.minecraft.resources.ResourceKey;
import net.minecraft.resources.ResourceLocation;
Expand All @@ -12,7 +10,7 @@
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.material.Fluid;

public class GCyRTagUtil {
public class GCYRTagUtil {
public static <T> TagKey<T> optionalTag(ResourceKey<? extends Registry<T>> registry, ResourceLocation id) {
return TagKey.create(registry, id);
}
Expand All @@ -23,7 +21,7 @@ public static <T> TagKey<T> createTag(ResourceKey<? extends Registry<T>> registr
}

public static <T> TagKey<T> createModTag(ResourceKey<? extends Registry<T>> registry, String path) {
return optionalTag(registry, GCyR.id(path));
return optionalTag(registry, GCYR.id(path));
}

public static TagKey<Block> createBlockTag(String path) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package argent_matter.gcyr.api.gui.factory;

import argent_matter.gcyr.GCyR;
import argent_matter.gcyr.GCYR;
import com.lowdragmc.lowdraglib.gui.factory.UIFactory;
import com.lowdragmc.lowdraglib.gui.modular.IUIHolder;
import com.lowdragmc.lowdraglib.gui.modular.ModularUI;
Expand All @@ -16,7 +16,7 @@ public class EntityUIFactory extends UIFactory<Entity> {
public static final EntityUIFactory INSTANCE = new EntityUIFactory();

private EntityUIFactory() {
super(GCyR.id("entity"));
super(GCYR.id("entity"));
}

@Override
Expand All @@ -38,4 +38,4 @@ protected Entity readHolderFromSyncData(FriendlyByteBuf syncData) {
protected void writeHolderToSyncData(FriendlyByteBuf syncData, Entity holder) {
syncData.writeVarLong(holder.getId());
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.lowdragmc.lowdraglib.gui.texture.ResourceTexture;

public class GCyRGuiTextures {
public class GCYRGuiTextures {

public static final ResourceTexture BUTTON_LAUNCH_ROCKET = new ResourceTexture("gcyr:textures/gui/widget/button_launch_rocket.png");
public static final ResourceTexture BUTTON_ENABLED = new ResourceTexture("gcyr:textures/gui/widget/button_enabled.png");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package argent_matter.gcyr.api.registries;

import argent_matter.gcyr.GCyR;
import argent_matter.gcyr.GCYR;
import argent_matter.gcyr.api.space.satellite.SatelliteType;
import com.gregtechceu.gtceu.api.registry.GTRegistry;
import com.gregtechceu.gtceu.api.registry.registrate.GTRegistrate;

public class GCyRRegistries {
public static final GTRegistrate REGISTRATE = GTRegistrate.create(GCyR.MOD_ID);
public class GCYRRegistries {
public static final GTRegistrate REGISTRATE = GTRegistrate.create(GCYR.MOD_ID);

public static final GTRegistry.RL<SatelliteType<?>> SATELLITES = new GTRegistry.RL<>(GCyR.id("satellite"));
public static final GTRegistry.RL<SatelliteType<?>> SATELLITES = new GTRegistry.RL<>(GCYR.id("satellite"));
}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package argent_matter.gcyr.api.space.dyson;

import argent_matter.gcyr.GCyR;
import argent_matter.gcyr.GCYR;
import argent_matter.gcyr.api.capability.IDysonSystem;
import argent_matter.gcyr.api.space.planet.Planet;
import argent_matter.gcyr.common.data.GCyRNetworking;
import argent_matter.gcyr.common.data.GCyRSatellites;
import argent_matter.gcyr.common.data.GCYRNetworking;
import argent_matter.gcyr.common.data.GCYRSatellites;
import argent_matter.gcyr.common.networking.s2c.PacketSyncDysonSphereStatus;
import argent_matter.gcyr.common.satellite.DysonSwarmSatellite;
import argent_matter.gcyr.data.loader.PlanetData;
Expand Down Expand Up @@ -44,7 +44,7 @@ public static DysonSystemSavedData getOrCreate(ServerLevel originLevel) {
}

private static DysonSystemSavedData internalGetOrCreate(ServerLevel serverLevel) {
return serverLevel.getDataStorage().computeIfAbsent(tag -> new DysonSystemSavedData(serverLevel, tag), () -> new DysonSystemSavedData(serverLevel), GCyR.MOD_ID + "_dyson_systems");
return serverLevel.getDataStorage().computeIfAbsent(tag -> new DysonSystemSavedData(serverLevel, tag), () -> new DysonSystemSavedData(serverLevel), GCYR.MOD_ID + "_dyson_systems");
}

@Nullable
Expand Down Expand Up @@ -89,7 +89,7 @@ public void addDysonSphere(BlockPos controllerPos) {
Planet thisPlanet = PlanetData.getPlanetFromLevel(this.level.dimension()).orElse(null);
if (playerPlanet == null || thisPlanet == null) continue;
if (playerPlanet.solarSystem().equals(thisPlanet.solarSystem())) {
GCyRNetworking.NETWORK.sendToPlayer(new PacketSyncDysonSphereStatus(false), player);
GCYRNetworking.NETWORK.sendToPlayer(new PacketSyncDysonSphereStatus(false), player);
}
}
}
Expand All @@ -105,7 +105,7 @@ public void disableDysonSphere(BlockPos controllerPos) {
Planet thisPlanet = PlanetData.getPlanetFromLevel(this.level.dimension()).orElse(null);
if (playerPlanet == null || thisPlanet == null) continue;
if (playerPlanet.solarSystem().equals(thisPlanet.solarSystem())) {
GCyRNetworking.NETWORK.sendToPlayer(new PacketSyncDysonSphereStatus(false), player);
GCYRNetworking.NETWORK.sendToPlayer(new PacketSyncDysonSphereStatus(false), player);
}
}
}
Expand Down Expand Up @@ -139,15 +139,15 @@ public void load(CompoundTag arg) {
if (arg.contains("dysonSphere", Tag.TAG_COMPOUND)) {
this.currentActiveSunBlock = DysonSphere.load(arg.getCompound("dysonSphere"), this);
for (ServerPlayer player : this.level.players()) {
GCyRNetworking.NETWORK.sendToPlayer(new PacketSyncDysonSphereStatus(true), player);
GCYRNetworking.NETWORK.sendToPlayer(new PacketSyncDysonSphereStatus(true), player);
}
}
CompoundTag stationsTag = arg.getCompound("satellites");
for (String name : stationsTag.getAllKeys()) {
ListTag tag = stationsTag.getList(name, Tag.TAG_COMPOUND);
long pos = Long.parseLong(name);
for (int i = 0; i < tag.size(); ++i) {
DysonSwarmSatellite satellite = GCyRSatellites.DYSON_SWARM.getCodec().parse(NbtOps.INSTANCE, tag.getCompound(i)).getOrThrow(false, GCyR.LOGGER::error);
DysonSwarmSatellite satellite = GCYRSatellites.DYSON_SWARM.getCodec().parse(NbtOps.INSTANCE, tag.getCompound(i)).getOrThrow(false, GCYR.LOGGER::error);
swarmSatellites.computeIfAbsent(pos, $ -> new HashSet<>()).add(satellite);
}
}
Expand All @@ -164,7 +164,7 @@ public CompoundTag save(CompoundTag compoundTag) {
for (Long2ObjectMap.Entry<Set<DysonSwarmSatellite>> entry : swarmSatellites.long2ObjectEntrySet()) {
ListTag pos = new ListTag();
for (DysonSwarmSatellite satellite : entry.getValue()) {
Tag station = GCyRSatellites.DYSON_SWARM.getCodec().encodeStart(NbtOps.INSTANCE, satellite).result().orElseThrow();
Tag station = GCYRSatellites.DYSON_SWARM.getCodec().encodeStart(NbtOps.INSTANCE, satellite).result().orElseThrow();
pos.add(station);
}
tag.put(Long.toString(entry.getLongKey()), pos);
Expand Down
Loading

0 comments on commit 626707d

Please sign in to comment.