Browse Source

Fix 1.16 name changes

master
Martmists 2 years ago
parent
commit
c7481988ff
  1. 36
      compat/1.16/build.gradle
  2. 5
      compat/1.16/gradle.properties
  3. 10
      compat/1.16/src/main/java/spinnery/common/BaseContainer.java
  4. 12
      compat/1.16/src/main/java/spinnery/common/BaseContainerScreen.java
  5. 5
      settings.gradle
  6. 4
      src/main/java/com/martmists/ynet/screens/ControllerScreen.java
  7. 5
      versions/common.gradle

36
compat/1.16/build.gradle

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
buildscript {
dependencies {
classpath "net.fabricmc:fabric-loom:0.2.7-SNAPSHOT"
}
repositories {
maven {
name = 'Fabric'
url = 'https://maven.fabricmc.net/'
}
gradlePluginPortal()
}
}
apply plugin: 'fabric-loom'
apply plugin: 'java'
apply plugin: "idea"
setBuildDir("../../build")
dependencies {
minecraft "com.mojang:minecraft:${project.minecraft_version}"
mappings "net.fabricmc:yarn:${project.yarn_mappings}:v2"
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modImplementation "com.github.vini2003:spinnery:${project.spinnery_version}"
}
repositories {
maven {
name = "Spinnery"
url "https://dl.bintray.com/spinnery/Spinnery"
}
mavenCentral()
maven {
url 'https://jitpack.io'
}
}

5
compat/1.16/gradle.properties

@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
minecraft_version=20w11a
yarn_mappings=20w11a+build.6
loader_version=0.7.8+build.187
fabric_version=0.5.3+build.308-1.16
spinnery_version=2.0.19+fabric-20w11a

10
compat/1.16/src/main/java/spinnery/common/BaseContainer.java

@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
package spinnery.common;
import net.minecraft.entity.player.PlayerInventory;
import spinnery.common.BaseScreenHandler;
public class BaseContainer extends BaseScreenHandler {
public BaseContainer(int synchronizationID, PlayerInventory linkedPlayerInventory) {
super(synchronizationID, linkedPlayerInventory);
}
}

12
compat/1.16/src/main/java/spinnery/common/BaseContainerScreen.java

@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
package spinnery.common;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.text.Text;
import spinnery.common.BaseContainer;
import spinnery.common.BaseHandledScreen;
public class BaseContainerScreen<T extends BaseContainer> extends BaseHandledScreen<T> {
public BaseContainerScreen(Text name, T linkedContainer, PlayerEntity player) {
super(name, linkedContainer, player);
}
}

5
settings.gradle

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
include "versions:1.15.2"
include "versions:1.16"
include ":versions:1.15.2"
include ":versions:1.16"
include ":compat:1.16"
rootProject.name = 'ynet'

4
src/main/java/com/martmists/ynet/screens/ControllerScreen.java

@ -199,14 +199,14 @@ public class ControllerScreen extends BaseContainerScreen<ControllerContainer> { @@ -199,14 +199,14 @@ public class ControllerScreen extends BaseContainerScreen<ControllerContainer> {
i++;
WCustomTooltipItem item = row.createChild(
WCustomTooltipItem.class,
Position.of(row, 4, 4),
Position.of(row, 4, 4, 2),
Size.of(16, 16)
);
item.setStack(new ItemStack(player.world.getBlockState(p).getBlock().asItem()));
String t = String.format("%d %d %d", p.getX(), p.getY(), p.getZ());
item.updateWidgets();
item.updateHidden(true);
item.tooltipText.setText(t);
item.setText(t);
for (int j = 0; j < 9; j++) {
int k = j;

5
versions/common.gradle

@ -12,6 +12,11 @@ dependencies { @@ -12,6 +12,11 @@ dependencies {
modImplementation "net.fabricmc:fabric-loader:${project.loader_version}"
modCompile "net.fabricmc.fabric-api:fabric-api:${project.fabric_version}"
modCompileOnly "TechReborn:${project.tr_slug}"
if (project.name == "1.16") {
implementation project(":compat:1.16")
}
modImplementation "com.github.vini2003:spinnery:${project.spinnery_version}"
}

Loading…
Cancel
Save