Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
IThundxr committed Nov 8, 2023
1 parent 79c679b commit fe6a42d
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ public void onKeyInput(ZInput.Key event) {
acceptInput(event.getKey());
}

//fixme Needs splitting up
@PlayEvent
public void hudHeathPre(ZRenderGuiOverlay.PlayerHealth.Pre event) {
float shift = -getRealHeight(event.getPartialTick()) + 22;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import net.minecraft.world.entity.LivingEntity;

//fixme Move this into a lifelong home & make other interfaces use this more
public interface LivingGetter {
LivingEntity getEntity();
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.entity.player.Player;

//fixme Move this into a lifelong home & make other interfaces use this more
public interface PlayerGetter extends LivingGetter {
default Player getPlayer() {
LivingEntity living = getEntity();
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/org/violetmoon/zeta/event/bus/helpers/README.md

This file was deleted.

31 changes: 31 additions & 0 deletions src/main/java/org/violetmoon/zeta/temp/EnvType.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package org.violetmoon.zeta.temp;

/**
* Represents a type of environment.
*
* <p>A type of environment is a jar file in a <i>Minecraft</i> version's json file's {@code download}
* subsection, including the {@code client.jar} and the {@code server.jar}.</p>
*
* @see Environment
*/
public enum EnvType {
/**
* Represents the client environment type, in which the {@code client.jar} for a
* <i>Minecraft</i> version is the main game jar.
*
* <p>A client environment type has all client logic (client rendering and integrated
* server logic), the data generator logic, and dedicated server logic. It encompasses
* everything that is available on the {@linkplain #SERVER server environment type}.</p>
*/
CLIENT,
/**
* Represents the server environment type, in which the {@code server.jar} for a
* <i>Minecraft</i> version is the main game jar.
*
* <p>A server environment type has the dedicated server logic and data generator
* logic, which are all included in the {@linkplain #CLIENT client environment type}.
* However, the server environment type has its libraries embedded compared to the
* client.</p>
*/
SERVER
}
27 changes: 27 additions & 0 deletions src/main/java/org/violetmoon/zeta/temp/Environment.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.violetmoon.zeta.temp;

import java.lang.annotation.*;

/**
* Applied to declare that the annotated element is present only in the specified environment.
*
* <p>Use with caution, as Fabric-loader will remove the annotated element in a mismatched environment!</p>
*
* <p>When the annotated element is removed, bytecode associated with the element will not be removed.
* For example, if a field is removed, its initializer code will not, and will cause an error on execution.</p>
*
* <p>If an overriding method has this annotation and its overridden method doesn't,
* unexpected behavior may happen. If an overridden method has this annotation
* while the overriding method doesn't, it is safe, but the method can be used from
* the overridden class only in the specified environment.</p>
*/
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PACKAGE})
@Documented
public @interface Environment {
/**
* Returns the environment type that the annotated element is only present in.
*/
EnvType value();
}

0 comments on commit fe6a42d

Please sign in to comment.