Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

Commit

Permalink
Bump common for config/tracker cleanup/fixes. See common changelog.
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Sanders <[email protected]>
  • Loading branch information
Zidane committed Jun 8, 2019
1 parent 2ce47dd commit 6d0ee2e
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion SpongeCommon
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,9 @@
*/
package org.spongepowered.mod.mixin.core.fml.common;

import net.minecraftforge.common.ForgeVersion;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.ModContainer;
import net.minecraftforge.fml.common.discovery.ModDiscoverer;
import net.minecraftforge.fml.common.versioning.ArtifactVersion;
import net.minecraftforge.fml.common.versioning.DefaultArtifactVersion;
import net.minecraftforge.fml.common.versioning.VersionRange;
Expand All @@ -46,7 +44,6 @@
import java.io.FilenameFilter;
import java.math.BigInteger;
import java.util.List;
import java.util.Objects;

/**
* MixinLoader adds support for a second, user-defined, mods search directory.
Expand Down Expand Up @@ -91,7 +88,7 @@ private List<File> discoverAndAddPluginsBeforeIterator(File mcDir) {

@Unique
private File getPluginsDir() {
return new File(PathTokens.replace(SpongeImpl.getGlobalConfig().getConfig().getGeneral().pluginsDir()));
return new File(PathTokens.replace(SpongeImpl.getGlobalConfigAdapter().getConfig().getGeneral().pluginsDir()));
}

@Redirect(method = "sortModList", at = @At(value = "INVOKE", target = "Lnet/minecraftforge/fml/common/ModContainer;getDependencies"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ public void readPacketData(PacketBuffer buf, CallbackInfo callbackInfo) throws I
// Sponge start
this.protocolVersion = buf.readVarInt();

if (!SpongeImpl.getGlobalConfig().getConfig().getModules().usePluginBungeeCord()
|| !SpongeImpl.getGlobalConfig().getConfig().getBungeeCord().getIpForwarding()) {
if (!SpongeImpl.getGlobalConfigAdapter().getConfig().getModules().usePluginBungeeCord()
|| !SpongeImpl.getGlobalConfigAdapter().getConfig().getBungeeCord().getIpForwarding()) {
this.ip = buf.readString(255);
} else {
this.ip = buf.readString(Short.MAX_VALUE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ public void stopServer()
if (worldserver1 != null)
{
// Turn off Async Lighting
if (SpongeImpl.getGlobalConfig().getConfig().getModules().useOptimizations() &&
SpongeImpl.getGlobalConfig().getConfig().getOptimizations().useAsyncLighting()) {
if (SpongeImpl.getGlobalConfigAdapter().getConfig().getModules().useOptimizations() &&
SpongeImpl.getGlobalConfigAdapter().getConfig().getOptimizations().useAsyncLighting()) {
((IMixinWorldServer) worldserver1).getLightingExecutor().shutdown();

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
import org.spongepowered.api.util.annotation.NonnullByDefault;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Shadow;
import org.spongepowered.common.interfaces.world.IMixinWorldInfo;
import org.spongepowered.common.interfaces.world.IMixinWorldServer;
import org.spongepowered.common.mixin.entityactivation.MixinEntity_Activation;

Expand All @@ -49,7 +50,7 @@ public void inactiveTick() {
}

if (!this.world.isRemote && this.lifespan == 6000) {
if (this.age >= ((IMixinWorldServer) this.world).getWorldConfig().getConfig().getEntity().getItemDespawnRate()) {
if (this.age >= ((IMixinWorldInfo) this.world.getWorldInfo()).getConfigAdapter().getConfig().getEntity().getItemDespawnRate()) {
this.setDead();
}
} else if (!this.world.isRemote && this.age >= this.lifespan) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public String getRefMapperConfig() {

@Override
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
return SpongeImpl.getGlobalConfig().getConfig().getModules().useBrokenMods();
return SpongeImpl.getGlobalConfigAdapter().getConfig().getModules().useBrokenMods();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public String getRefMapperConfig() {

@Override
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
if (!SpongeImpl.getGlobalConfig().getConfig().getModules().usePluginBungeeCord()
if (!SpongeImpl.getGlobalConfigAdapter().getConfig().getModules().usePluginBungeeCord()
&& mixinClassName.contains("mixin.bungee")) {
return false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public String getRefMapperConfig() {

@Override
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
return SpongeImpl.getGlobalConfig().getConfig().getOptimizations().useFastThreadChecks();
return SpongeImpl.getGlobalConfigAdapter().getConfig().getOptimizations().useFastThreadChecks();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
package org.spongepowered.mod.util;

import com.google.common.collect.Lists;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLivingBase;
Expand Down Expand Up @@ -387,6 +386,6 @@ public static boolean shouldTakeOverModNetworking(ModContainer mod) {
if (mod == null) {
return false;
}
return SpongeImpl.getGlobalConfig().getConfig().getBrokenMods().getBrokenNetworkHandlerMods().contains(mod.getModId());
return SpongeImpl.getGlobalConfigAdapter().getConfig().getBrokenMods().getBrokenNetworkHandlerMods().contains(mod.getModId());
}
}

0 comments on commit 6d0ee2e

Please sign in to comment.