Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small Fixes #11

Merged
merged 6 commits into from
Feb 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dependencies.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Add your dependencies here

dependencies {
compileOnly('com.github.GTNewHorizons:waila:1.6.5:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-309-GTNH:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:waila:1.7.0:dev') {transitive = false}
compileOnly('com.github.GTNewHorizons:Applied-Energistics-2-Unofficial:rv3-beta-319-GTNH:dev') {transitive = false}

compileOnly('thaumcraft:Thaumcraft:1.7.10-4.2.3.5:dev') {transitive = false}
compileOnly('net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev') {transitive = false}
Expand Down
21 changes: 11 additions & 10 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -33,41 +33,44 @@ channel = stable
mappingsVersion = 12

# Defines other MCP mappings for dependency deobfuscation.
remoteMappings = https://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/
remoteMappings = https\://raw.githubusercontent.com/MinecraftForge/FML/1.7.10/conf/

# Select a default username for testing your mod. You can always override this per-run by running
# `./gradlew runClient --username=AnotherPlayer`, or configuring this command in your IDE.
developmentEnvironmentUserName = "Developer"

# Enables using modern Java syntax (up to version 17) via Jabel, while still targeting JVM 8.
# See https://github.com/bsideup/jabel for details on how this works.
enableModernJavaSyntax = false
enableModernJavaSyntax = true

# Enables injecting missing generics into the decompiled source code for a better coding experience.
# Turns most publicly visible List, Map, etc. into proper List<E>, Map<K, V> types.
enableGenericInjection = false
enableGenericInjection = true

# Generate a class with a String field for the mod version named as defined below.
# If generateGradleTokenClass is empty or not missing, no such class will be generated.
# If gradleTokenVersion is empty or missing, the field will not be present in the class.
generateGradleTokenClass =
generateGradleTokenClass = remoteio.Tags

# Name of the token containing the project's current version to generate/replace.
gradleTokenVersion = GRADLETOKEN_VERSION
gradleTokenVersion = VERSION

# [DEPRECATED] Mod ID replacement token.
gradleTokenModId =

# [DEPRECATED] Mod name replacement token.
gradleTokenModName =

# [DEPRECATED] Mod Group replacement token.
gradleTokenGroupName =

# [DEPRECATED]
# Multiple source files can be defined here by providing a comma-separated list: Class1.java,Class2.java,Class3.java
# public static final String VERSION = "GRADLETOKEN_VERSION";
# The string's content will be replaced with your mod's version when compiled. You should use this to specify your mod's
# version in @Mod([...], version = VERSION, [...]).
# Leave these properties empty to skip individual token replacements.
replaceGradleTokenInFile = ModInfo.java
replaceGradleTokenInFile =

# In case your mod provides an API for other mods to implement you may declare its package here. Otherwise, you can
# leave this property empty.
Expand All @@ -77,7 +80,7 @@ apiPackage = api
# Specify the configuration file for Forge's access transformers here. It must be placed into /src/main/resources/META-INF/
# There can be multiple files in a space-separated list.
# Example value: mymodid_at.cfg nei_at.cfg
accessTransformersFile =
accessTransformersFile = RIO_at.cfg

# Provides setup for Mixins if enabled. If you don't know what mixins are: Keep it disabled!
usesMixins = false
Expand Down Expand Up @@ -123,7 +126,7 @@ includeWellKnownRepositories = true
usesMavenPublishing = true

# Maven repository to publish the mod to.
# mavenPublishUrl = https://nexus.gtnewhorizons.com/repository/releases/
# mavenPublishUrl = https\://nexus.gtnewhorizons.com/repository/releases/

# Publishing to Modrinth requires you to set the MODRINTH_TOKEN environment variable to your current Modrinth API token.
#
Expand Down Expand Up @@ -187,5 +190,3 @@ customArchiveBaseName = RemoteIO
# This is meant to be set in $HOME/.gradle/gradle.properties.
# ideaCheckSpotlessOnBuild = true

# Non-GTNH properties
gradleTokenGroupName =
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pluginManagement {
}

plugins {
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.8'
id 'com.gtnewhorizons.gtnhsettingsconvention' version '1.0.14'
}


5 changes: 5 additions & 0 deletions src/main/java/remoteio/api/package-info.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@API(apiVersion = Tags.VERSION, owner = "RIO", provides = "RemoteIO|API")
package remoteio.api;

import cpw.mods.fml.common.API;
import remoteio.Tags;
3 changes: 0 additions & 3 deletions src/main/java/remoteio/client/gui/GuiDocumentation.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ public class GuiDocumentation extends GuiScreen {
private List<DocumentationEntry> categoryCache = null;
private DocumentationEntry currentEntry = null;
private IDocumentationPage currentPage = null;
private int currentPageIndex = 0;

private List<IDocumentationPage> entryCache;

private int guiLeft;
private int guiTop;
Expand Down
4 changes: 0 additions & 4 deletions src/main/java/remoteio/client/gui/GuiRemoteInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.inventory.GuiContainer;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.client.resources.I18n;
import net.minecraft.entity.player.InventoryPlayer;
Expand All @@ -28,8 +27,6 @@ public class GuiRemoteInterface extends GuiContainer {

private final TileRemoteInterface tile;

private RenderBlocks renderBlocks;

private Matrix4f initialMatrix;

public GuiRemoteInterface(InventoryPlayer inventoryPlayer, TileRemoteInterface tile) {
Expand All @@ -39,7 +36,6 @@ public GuiRemoteInterface(InventoryPlayer inventoryPlayer, TileRemoteInterface t
this.ySize = 243;

this.tile = tile;
this.renderBlocks = new RenderBlocks(tile.getWorldObj());
this.initialMatrix = MatrixHelper.getRotationMatrix(Minecraft.getMinecraft().renderViewEntity);
}

Expand Down
4 changes: 0 additions & 4 deletions src/main/java/remoteio/client/gui/GuiRemoteInventory.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,11 @@ public class GuiRemoteInventory extends GuiContainer {
public static final ResourceLocation TEXTURE = new ResourceLocation(
ModInfo.RESOURCE_PREFIX + "textures/gui/upgrade.png");

private final TileRemoteInventory tile;

public GuiRemoteInventory(InventoryPlayer inventoryPlayer, TileRemoteInventory tile) {
super(new ContainerRemoteInventory(inventoryPlayer, tile));

this.xSize = 196;
this.ySize = 243;

this.tile = tile;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.RenderBlocks;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.IIcon;
import net.minecraft.world.World;

import org.lwjgl.opengl.GL11;

Expand All @@ -18,20 +16,13 @@
import remoteio.client.helper.IORenderHelper;
import remoteio.common.block.core.BlockIOCore;
import remoteio.common.lib.DimensionalCoords;
import remoteio.common.lib.VisualState;
import remoteio.common.tile.TileRemoteInterface;

/**
* @author dmillerw
*/
public class RenderTileRemoteInterface extends TileEntitySpecialRenderer {

private RenderBlocks renderBlocks;

private static boolean shouldRender(VisualState visualState) {
return visualState == VisualState.CAMOUFLAGE_REMOTE || visualState == VisualState.CAMOUFLAGE_BOTH;
}

public void renderRemoteInterfaceAt(TileRemoteInterface tile, double x, double y, double z, float partial) {
if (tile.remotePosition != null && tile.remotePosition.inWorld(tile.getWorldObj())
&& tile.visualState.isCamouflage()) {
Expand Down Expand Up @@ -95,9 +86,4 @@ public void renderRemoteInterfaceAt(TileRemoteInterface tile, double x, double y
public void renderTileEntityAt(TileEntity var1, double var2, double var4, double var6, float var8) {
renderRemoteInterfaceAt((TileRemoteInterface) var1, var2, var4, var6, var8);
}

@Override
public void func_147496_a(World world) {
renderBlocks = new RenderBlocks(world);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public void renderTileEntityAt(TileEntity tileEntity, double x, double y, double
GL11.glTranslated(0.5, -0.5, 0);
break;
}
default:
break;
}

GL11.glDisable(GL11.GL_TEXTURE_2D);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/remoteio/common/block/BlockMachine.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public int damageDropped(int damage) {
}

@Override
public void getSubBlocks(Item item, CreativeTabs tab, List list) {
public void getSubBlocks(Item item, CreativeTabs tab, List<ItemStack> list) {
list.add(new ItemStack(this, 1, 0));
list.add(new ItemStack(this, 1, 1));
}
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/remoteio/common/block/BlockRemoteInterface.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public void onNeighborBlockChange(World world, int x, int y, int z, Block block)
}
}

@SuppressWarnings("deprecation")
@Override
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z) {
TileRemoteInterface tile = (TileRemoteInterface) world.getTileEntity(x, y, z);
Expand Down Expand Up @@ -275,7 +276,7 @@ public AxisAlignedBB getSelectedBoundingBoxFromPool(World world, int x, int y, i
}

@Override
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB aabb, List list,
public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAlignedBB aabb, List<AxisAlignedBB> list,
Entity entity) {
TileRemoteInterface tile = (TileRemoteInterface) world.getTileEntity(x, y, z);

Expand All @@ -290,7 +291,7 @@ public void addCollisionBoxesToList(World world, int x, int y, int z, AxisAligne
AxisAlignedBB newAABB = AxisAlignedBB
.getBoundingBox(aabb.minX, aabb.minY, aabb.minZ, aabb.maxX, aabb.maxY, aabb.maxZ)
.offset(offsetX, offsetY, offsetZ);
List newList = new ArrayList();
List<AxisAlignedBB> newList = new ArrayList<>();

remote.addCollisionBoxesToList(world, there.x, there.y, there.z, newAABB, newList, entity);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public ItemBlockRemoteInventory(Block block) {
}

@Override
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List list, boolean debug) {
public void addInformation(ItemStack itemStack, EntityPlayer entityPlayer, List<String> list, boolean debug) {
if (itemStack.hasTagCompound() && itemStack.getTagCompound().hasKey("targetPlayer")) {
list.add(
String.format(
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/remoteio/common/core/TransferType.java
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class TransferType {
registerType(NETWORK_AE, AE2.IGRIDHOST, AE2.IGRIDBLOCK);
}

public static void registerType(int type, Class... classes) {
public static void registerType(int type, Class<?>... classes) {
String[] names = new String[classes.length];
for (int i = 0; i < classes.length; i++) {
names[i] = classes[i].getName();
Expand All @@ -66,7 +66,7 @@ public static void registerType(int type, String... classes) {
typeToInterfaceMap.put(type, classes);
}

public static int getTypeForInterface(Class cls) {
public static int getTypeForInterface(Class<?> cls) {
for (Map.Entry<String[], Integer> entry : typeToInterfaceMap.inverse().entrySet()) {
for (String clz : entry.getKey()) {
if (cls.getName().equals(clz)) {
Expand Down
Loading