Skip to content

Commit

Permalink
Merge pull request #165 from forgetmenot13579/v6
Browse files Browse the repository at this point in the history
Migrate all packages from `dev.onyxstudios` to `org.ladysnake`
  • Loading branch information
Pyrofab authored Feb 4, 2024
2 parents a534f05 + bd05aad commit e95fc4a
Show file tree
Hide file tree
Showing 271 changed files with 1,296 additions and 1,328 deletions.
4 changes: 2 additions & 2 deletions .idea/copyright/CCA.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 0 additions & 7 deletions .idea/copyright/profiles_settings.xml

This file was deleted.

49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ this open source project. In return, they should reciprocate that respect in add
## TLDR;

- Creating an Issue or Pull Request requires a [GitHub](http://github.com) account.
- Issue reports should be **clear**, **concise** and **reproducible**. Check to see if your issue has already been resolved in the [master](https://github.com/OnyxStudios/Cardinal-Components-API/tree/master) branch or already reported in Cardinal Components' [GitHub Issue Tracker](https://github.com/OnyxStudios/Cardinal-Components-API/issues).
- Pull Requests must adhere to the project's [coding style guidelines](https://github.com/OnyxStudios/Cardinal-Components-API/blob/master/style.md).
- Issue reports should be **clear**, **concise** and **reproducible**. Check to see if your issue has already been resolved in the [current](https://github.com/Ladysnake/Cardinal-Components-API) branch or already reported in Cardinal Components' [GitHub Issue Tracker](https://github.com/Ladysnake/Cardinal-Components-API/issues).
- Pull Requests must adhere to the project's [coding style guidelines](style.md).
- **IMPORTANT**: By submitting a patch, you agree to allow the project owner to license your work under the same license as that used by the project.


Expand All @@ -37,7 +37,7 @@ The issue tracker is the preferred channel for [bug reports](#bugs),
requests](#pull-requests), but please respect the following restrictions:

* Please **do not** use the issue tracker for personal support requests (you
can ask well-formed questions in adequate channels on the [Fabric Discord](https://discord.gg/v6v4pMv) or on the [OnyxStudios Discord](https://discord.gg/vKV9EgH)).
can ask well-formed questions in adequate channels on the [Fabric Discord](https://discord.gg/v6v4pMv) or on the [Ladysnake Discord](https://discord.ladysnake.org)).
* Please **do not** derail or troll issues. Keep the discussion on topic and
respect the opinions of others

Expand Down Expand Up @@ -94,7 +94,7 @@ Good pull requests - patches, improvements, new features - are a fantastic help.
**Please ask first** before embarking on any significant pull request (e.g. implementing features, refactoring code),
otherwise you risk spending a lot of time working on something that the project's developers might not want to merge into the project.
Please adhere to the coding conventions used throughout a project (indentation, accurate comments, etc.) and any other requirements (such as test coverage). Please review the [Cardinal Components Coding Style Guide](https://github.com/OnyxStudios/Cardinal-Components-API/blob/master/style.md).
Please adhere to the coding conventions used throughout a project (indentation, accurate comments, etc.) and any other requirements (such as test coverage). Please review the [Cardinal Components Coding Style Guide](style.md).
Follow this process if you'd like your work considered for inclusion in the project:
Expand Down Expand Up @@ -151,7 +151,7 @@ git push origin <topic-branch-name>
Anyone who is a core contributor can publish a release:
1. Go to the [Releases page on Github](https://github.com/OnyxStudios/Cardinal-Components-API/releases)
1. Go to the [Releases page on Github](https://github.com/Ladysnake/Cardinal-Components-API/releases)
2. Hit "Draft a new release" (if you can't see this, you're not a core contributor!)
3. Write human-friendly Release Notes based on changelog.
- The release title is "x.x.x" (where x.x.x is the version number)
Expand All @@ -167,7 +167,7 @@ Anyone who is a core contributor can publish a release:
<a name="resources"></a>
### Resources
For most of the documentation you are going to want to look at the [README](https://github.com/OnyxStudios/Cardinal-Components-API/blob/master/README.md).
For most of the documentation you are going to want to look at the [README](README.md).
<a name="contributors"></a>
### Core Contributors
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 OnyxStudios
Copyright (c) 2019 Ladysnake

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
42 changes: 21 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ If you have questions or need help with this library, you can also join the [Lad

## Adding the API to your buildscript:

**Upgrade information: versions 4.1.0 onwards of Cardinal Components API use the `dev.onyxstudios.cardinal-components-api` (lowercase) maven group instead of `io.github.onyxstudios.Cardinal-Components-API`**
**Upgrade information: versions 4.1.0 onwards of Cardinal Components API use the `org.ladysnake.cardinal-components-api` (lowercase) maven group instead of `io.github.onyxstudios.Cardinal-Components-API`**

Latest versions of Cardinal Components API are available on the Ladysnake maven:
```gradle
Expand All @@ -62,33 +62,33 @@ repositories {
dependencies {
// Adds a dependency on the base cardinal components module (required by every other module)
// Replace modImplementation with modApi if you expose components in your own API
modImplementation "dev.onyxstudios.cardinal-components-api:cardinal-components-base:<VERSION>"
modImplementation "org.ladysnake.cardinal-components-api:cardinal-components-base:<VERSION>"
// Adds a dependency on a specific module
modImplementation "dev.onyxstudios.cardinal-components-api:<MODULE>:<VERSION>"
modImplementation "org.ladysnake.cardinal-components-api:<MODULE>:<VERSION>"
// Includes Cardinal Components API as a Jar-in-Jar dependency (optional)
include "dev.onyxstudios.cardinal-components-api:cardinal-components-base:<VERSION>"
include "dev.onyxstudios.cardinal-components-api:<MODULE>:<VERSION>"
include "org.ladysnake.cardinal-components-api:cardinal-components-base:<VERSION>"
include "org.ladysnake.cardinal-components-api:<MODULE>:<VERSION>"
}
```

Check out **https://ladysnake.org/wiki/cardinal-components-api/dev-install** for up-to-date buildscript samples
with `build.gradle`, `build.gradle.kts`, and `libs.versions.toml`.

You can find the current version of the API in the [**releases**](https://github.com/OnyxStudios/Cardinal-Components-API/releases) tab of the repository on Github.
You can find the current version of the API in the [**releases**](https://github.com/Ladysnake/Cardinal-Components-API/releases) tab of the repository on Github.

Cardinal Components API is split into several modules. To depend on the all-encompassing master jar, use the dependency string
`dev.onyxstudios.cardinal-components-api:cardinal-components-api:<VERSION>`.
`org.ladysnake.cardinal-components-api:cardinal-components-api:<VERSION>`.
That artifact brings every module to your dev env, but you often do not need all of them for a project.
Also note that the maven version of the fat jar is actually empty, so you will have to require users to install it from curseforge or modrinth if you do not bundle all required modules.

**[[List of individual module names and descriptions]](https://github.com/OnyxStudios/Cardinal-Components-API/wiki#modules)**
**[[List of individual module names and descriptions]](https://ladysnake.org/wiki/cardinal-components-api/landing#modules)**

Example:
```gradle
// Adds an API dependency on the base cardinal components module (required by every other module)
modApi "dev.onyxstudios.cardinal-components-api:cardinal-components-base:<VERSION>"
modApi "org.ladysnake.cardinal-components-api:cardinal-components-base:<VERSION>"
// Adds an implementation dependency on the entity module
modImplementation "dev.onyxstudios.cardinal-components-api:cardinal-components-entity:<VERSION>"
modImplementation "org.ladysnake.cardinal-components-api:cardinal-components-entity:<VERSION>"
```

## Basic Usage
Expand All @@ -114,7 +114,7 @@ class RandomIntComponent implements IntComponent {
*Note: a component class can be reused for several component types*

If you want your component to be **automatically synchronized with watching clients**,
you can also add the [`AutoSyncedComponent`](./cardinal-components-base/src/main/java/dev/onyxstudios/cca/api/v3/component/sync/AutoSyncedComponent.java)
you can also add the [`AutoSyncedComponent`](./cardinal-components-base/src/main/java/org/ladysnake/cca/api/v3/component/sync/AutoSyncedComponent.java)
interface to your implementation:

```java
Expand All @@ -132,11 +132,11 @@ class SyncedIntComponent implements IntComponent, AutoSyncedComponent {
}
```

**[[More information on component synchronization]](https://github.com/OnyxStudios/Cardinal-Components-API/wiki/Synchronizing-components)**
**[[More information on component synchronization]](https://ladysnake.org/wiki/cardinal-components-api/synchronization)**

If you want your component to **tick alongside its provider**, you can add the
[`ServerTickingComponent`](./cardinal-components-base/src/main/java/dev/onyxstudios/cca/api/v3/component/tick/ServerTickingComponent.java)
or [`ClientTickingComponent`](./cardinal-components-base/src/main/java/dev/onyxstudios/cca/api/v3/component/tick/ClientTickingComponent.java)
[`ServerTickingComponent`](./cardinal-components-base/src/main/java/org/ladysnake/cca/api/v3/component/tick/ServerTickingComponent.java)
or [`ClientTickingComponent`](./cardinal-components-base/src/main/java/org/ladysnake/cca/api/v3/component/tick/ClientTickingComponent.java)
(or both) to your *component interface* (here, `IntComponent`). If you'd rather add the ticking interface to a single
component subclass, **you have to use one of the specific methods provided in the individual modules**
(here something of the form `registry.beginRegistration(IntComponent.KEY).impl(IncrementingIntComponent.class).end(IncrementingIntComponent::new)`).
Expand All @@ -153,8 +153,8 @@ class IncrementingIntComponent implements IntComponent, ServerTickingComponent {
Clientside ticking is only implemented for entities, block entities, and worlds.*

If you want your component to **be notified of its provider being loaded and unloaded**, typically for advanced setup or cleanup,
you can add the [`ServerLoadAwareComponent`](./cardinal-components-base/src/main/java/dev/onyxstudios/cca/api/v3/component/load/ServerLoadAwareComponent.java)
or [`ClientLoadAwareComponent`](./cardinal-components-base/src/main/java/dev/onyxstudios/cca/api/v3/component/load/ClientLoadAwareComponent.java)
you can add the [`ServerLoadAwareComponent`](./cardinal-components-base/src/main/java/org/ladysnake/cca/api/v3/component/load/ServerLoadAwareComponent.java)
or [`ClientLoadAwareComponent`](./cardinal-components-base/src/main/java/org/ladysnake/cca/api/v3/component/load/ClientLoadAwareComponent.java)
(or both) and their "Unload" variants to your *component interface* (here, `IntComponent`). Just like with ticking,
if you'd rather add the (un)load-aware interface to a single component subclass,
**you have to use one of the specific methods provided in the individual modules**.
Expand Down Expand Up @@ -201,10 +201,10 @@ The next step is to choose an identifier for your component, and to declare it a
```

Components can be provided by objects of various classes, depending on which modules you installed.
The most common providers are [entities](https://github.com/OnyxStudios/Cardinal-Components-API/wiki/Cardinal-Components-Entity),
[item stacks](https://github.com/OnyxStudios/Cardinal-Components-API/wiki/Cardinal-Components-Item),
[worlds](https://github.com/OnyxStudios/Cardinal-Components-API/wiki/Cardinal-Components-World)
and [chunks](https://github.com/OnyxStudios/Cardinal-Components-API/wiki/Cardinal-Components-Chunk),
The most common providers are [entities](https://ladysnake.org/wiki/cardinal-components-api/modules/entity),
[item stacks](https://ladysnake.org/wiki/cardinal-components-api/modules/entity),
[worlds](https://ladysnake.org/wiki/cardinal-components-api/modules/world)
and [chunks](https://ladysnake.org/wiki/cardinal-components-api/modules/chunk),
but more are available.
To interact with them, you need to **register a component key**, using `ComponentRegistryV3#getOrCreate`;
the resulting `ComponentKey` instance has the query methods you need. You will also need to **attach your
Expand Down Expand Up @@ -254,7 +254,7 @@ Do not forget to declare your component initializer as an entrypoint in your mod
}
```

**[[More information on component registration]](https://github.com/OnyxStudios/Cardinal-Components-API/wiki/Registering-and-using-a-component)**
**[[More information on component registration]](https://ladysnake.org/wiki/cardinal-components-api/registration)**

Now, all that is left is to actually use that component. You can access individual instances of your component by using the dedicated getters on your `ComponentKey`:

Expand Down
20 changes: 17 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ allprojects {
owners = providers.gradleProperty("owners").get()
}

group = "dev.onyxstudios.cardinal-components-api"
group = "org.ladysnake.cardinal-components-api"
version = providers.gradleProperty("mod_version").get()

repositories {
Expand Down Expand Up @@ -148,15 +148,29 @@ subprojects {

extensions.configure(PublishingExtension::class.java) {
publications {
create("relocation", MavenPublication::class.java) {
create("relocation1", MavenPublication::class.java) {
pom {
// Old artifact coordinates
groupId = "io.github.onyxstudios.Cardinal-Components-API"

distributionManagement {
relocation {
// New artifact coordinates
groupId = "dev.onyxstudios.cardinal-components-api"
groupId = "org.ladysnake.cardinal-components-api"
message = "groupId has been changed"
}
}
}
}
create("relocation2", MavenPublication::class.java) {
pom {
// Old artifact coordinates
groupId = "dev.onyxstudios.cardinal-components-api"

distributionManagement {
relocation {
// New artifact coordinates
groupId = "org.ladysnake.cardinal-components-api"
message = "groupId has been changed"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
* OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
* OR OTHER DEALINGS IN THE SOFTWARE.
*/
package dev.onyxstudios.cca.api.v3.component;
package org.ladysnake.cca.api.v3.component;

import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NbtCompound;
Expand Down
Loading

0 comments on commit e95fc4a

Please sign in to comment.