generated from KessokuTeaTime/Example-Mod
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
60 changed files
with
325 additions
and
206 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 1 addition & 2 deletions
3
...dges/core/animation/InterpolatedText.java → ...nowledges/animation/InterpolatedText.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
.../net/krlite/knowledges/api/Knowledge.java → ...e/knowledges/api/component/Knowledge.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ore/config/WithIndependentConfigPage.java → ...ore/config/WithIndependentConfigPage.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...es/core/localization/EnumLocalizable.java → ...pi/core/localization/EnumLocalizable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ledges/core/localization/Localizable.java → ...es/api/core/localization/Localizable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...knowledges/core/path/WithPartialPath.java → ...ledges/api/core/path/WithPartialPath.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...krlite/knowledges/core/path/WithPath.java → ...te/knowledges/api/core/path/WithPath.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
.../java/net/krlite/knowledges/api/Data.java → .../net/krlite/knowledges/api/data/Data.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ite/knowledges/core/data/DataInvoker.java → ...lite/knowledges/api/data/DataInvoker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...te/knowledges/core/data/DataProtocol.java → ...ite/knowledges/api/data/DataProtocol.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/main/java/net/krlite/knowledges/api/entrypoint/ComponentProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package net.krlite.knowledges.api.entrypoint; | ||
|
||
import net.krlite.knowledges.api.component.Knowledge; | ||
|
||
public interface ComponentProvider extends Provider<Knowledge> { | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/java/net/krlite/knowledges/api/entrypoint/DataProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package net.krlite.knowledges.api.entrypoint; | ||
|
||
import net.krlite.knowledges.api.data.Data; | ||
|
||
public interface DataProvider extends Provider<Data<?>> { | ||
} |
6 changes: 0 additions & 6 deletions
6
src/main/java/net/krlite/knowledges/api/entrypoint/KnowledgesComponentProvider.java
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
src/main/java/net/krlite/knowledges/api/entrypoint/KnowledgesDataProvider.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/main/java/net/krlite/knowledges/api/proxy/KnowledgeProxy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
package net.krlite.knowledges.api.proxy; | ||
|
||
public class KnowledgeProxy { | ||
} |
2 changes: 1 addition & 1 deletion
2
...te/knowledges/core/proxy/RenderProxy.java → ...ite/knowledges/api/proxy/RenderProxy.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/main/java/net/krlite/knowledges/api/representable/BlockRepresentable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package net.krlite.knowledges.api.representable; | ||
|
||
import net.minecraft.block.Block; | ||
import net.minecraft.block.BlockState; | ||
import net.minecraft.block.entity.BlockEntity; | ||
import net.minecraft.util.hit.BlockHitResult; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.util.math.Direction; | ||
|
||
public interface BlockRepresentable extends Representable<BlockHitResult> { | ||
Block block(); | ||
|
||
BlockState blockState(); | ||
|
||
BlockEntity blockEntity(); | ||
|
||
BlockPos blockPos(); | ||
|
||
Direction direction(); | ||
|
||
@Override | ||
default Class<? extends Representable<BlockHitResult>> type() { | ||
return BlockRepresentable.class; | ||
} | ||
|
||
interface Builder extends Representable.Builder<BlockHitResult, BlockRepresentable> { | ||
Builder block(Block block); | ||
|
||
Builder blockState(BlockState blockState); | ||
|
||
Builder blockEntity(BlockEntity blockEntity); | ||
|
||
Builder blockPos(BlockPos blockPos); | ||
|
||
Builder direction(Direction direction); | ||
|
||
@Override | ||
Builder create(); | ||
|
||
@Override | ||
BlockRepresentable build(); | ||
|
||
@Override | ||
default Builder from(BlockRepresentable representable) { | ||
return ((Builder) Representable.Builder.super.from(representable)) | ||
.block(representable.block()) | ||
.blockState(representable.blockState()) | ||
.blockEntity(representable.blockEntity()) | ||
.blockPos(representable.blockPos()) | ||
.direction(representable.direction()); | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
src/main/java/net/krlite/knowledges/api/representable/EntityRepresentable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package net.krlite.knowledges.api.representable; | ||
|
||
import net.minecraft.entity.Entity; | ||
import net.minecraft.util.hit.EntityHitResult; | ||
|
||
public interface EntityRepresentable extends Representable<EntityHitResult> { | ||
Entity entity(); | ||
|
||
@Override | ||
default Class<? extends Representable<EntityHitResult>> type() { | ||
return EntityRepresentable.class; | ||
} | ||
|
||
interface Builder extends Representable.Builder<EntityHitResult, EntityRepresentable> { | ||
Builder entity(Entity entity); | ||
|
||
@Override | ||
Builder create(); | ||
|
||
@Override | ||
EntityRepresentable build(); | ||
|
||
@Override | ||
default Builder from(EntityRepresentable representable) { | ||
return ((Builder) Representable.Builder.super.from(representable)) | ||
.entity(representable.entity()); | ||
} | ||
} | ||
} |
48 changes: 48 additions & 0 deletions
48
src/main/java/net/krlite/knowledges/api/representable/Representable.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package net.krlite.knowledges.api.representable; | ||
|
||
import net.minecraft.entity.player.PlayerEntity; | ||
import net.minecraft.nbt.NbtCompound; | ||
import net.minecraft.util.hit.HitResult; | ||
import net.minecraft.world.World; | ||
|
||
public interface Representable<H extends HitResult> { | ||
H hitResult(); | ||
|
||
World world(); | ||
|
||
PlayerEntity player(); | ||
|
||
NbtCompound data(); | ||
|
||
/** | ||
* @return {@code true} if the server has <b>Knowledges</b> installed. | ||
*/ | ||
boolean hasServer(); | ||
|
||
Class<? extends Representable<H>> type(); | ||
|
||
interface Builder<H extends HitResult, R extends Representable<H>> { | ||
Builder<H, R> hitResult(H hitResult); | ||
|
||
Builder<H, R> world(World world); | ||
|
||
Builder<H, R> player(PlayerEntity player); | ||
|
||
Builder<H, R> data(NbtCompound data); | ||
|
||
Builder<H, R> hasServer(boolean connected); | ||
|
||
Builder<H, R> create(); | ||
|
||
Representable<H> build(); | ||
|
||
default Builder<H, R> from(R representable) { | ||
return create() | ||
.hitResult(representable.hitResult()) | ||
.world(representable.world()) | ||
.player(representable.player()) | ||
.data(representable.data()) | ||
.hasServer(representable.hasServer()); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.