Skip to content

Commit

Permalink
Refactored code for hosting menus from items.
Browse files Browse the repository at this point in the history
  • Loading branch information
shartte committed Nov 18, 2021
1 parent 736c951 commit 368bbda
Show file tree
Hide file tree
Showing 85 changed files with 466 additions and 921 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ sourceSets {

configurations {
portaforgyImplementation.extendsFrom(compileClasspath)
datagenImplementation.extendsFrom(compileClasspath)
datagenCompileOnly.extendsFrom(compileClasspath)
datagenRuntimeOnly.extendsFrom(runtimeClasspath)
}

Expand Down Expand Up @@ -297,7 +297,7 @@ publishing {
}
maven {
credentials {
username System.getenv("MODMAVEN_USER")
username System.getenv("MODMaAVEN_USER")
password System.getenv("MODMAVEN_PASSWORD")
}
name = "modmaven"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ yarn_version=build.1
# Provided APIs #
#########################################################
fabric_version=0.42.4+1.18
rei_version=6.0.296-alpha
rei_version=6.1.330
wthit_version=4.1.2
tr_energy_version=2.0.0-beta1

Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-all.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
72 changes: 0 additions & 72 deletions src/main/java/appeng/api/features/IWirelessTerminalHandler.java

This file was deleted.

97 changes: 0 additions & 97 deletions src/main/java/appeng/api/features/WirelessTerminals.java

This file was deleted.

91 changes: 0 additions & 91 deletions src/main/java/appeng/api/features/WirelessTerminalsInternal.java

This file was deleted.

32 changes: 8 additions & 24 deletions src/main/java/appeng/api/implementations/guiobjects/IGuiItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,40 +23,24 @@

package appeng.api.implementations.guiobjects;

import javax.annotation.Nullable;

import net.minecraft.core.BlockPos;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.level.Level;

import javax.annotation.Nullable;

/**
* Implemented on Item objects, to return objects used to manage, and interact with the contents.
*/
public interface IGuiItem {
/**
*
* @param is The item used to open the menu.
* @param playerInventorySlot The slot in the player's inventory the item is in.
* @param level The level the player is in.
* @param pos If the item was used on a block in the world, has that block's position. Null if no
* block was targeted.
* @return Null if no GUI object is available.
*/
@Nullable
IGuiItemObject getGuiObject(ItemStack is, int playerInventorySlot, Level level, @Nullable BlockPos pos);

/**
*
* @param is The item used to open the menu.
* @param playerInventorySlot The slot in the player's inventory the item is in.
* @param player The player opening the menu.
* @param pos If the item was used on a block in the world, has that block's position. Null if no
* block was targeted.
* @param player The player opening the menu.
* @param inventorySlot The slot in the player's inventory the item is in.
* @param stack The item used to open the menu.
* @param pos If the item was used on a block in the world, has that block's position. Null if no
* block was targeted.
* @return Null if no GUI object is available.
*/
@Nullable
default IGuiItemObject getGuiObject(ItemStack is, int playerInventorySlot, Player player, @Nullable BlockPos pos) {
return getGuiObject(is, playerInventorySlot, player.level, pos);
}
ItemMenuHost getGuiObject(Player player, int inventorySlot, ItemStack stack, @Nullable BlockPos pos);
}

This file was deleted.

Loading

0 comments on commit 368bbda

Please sign in to comment.