Skip to content

Commit

Permalink
Updates forge version
Browse files Browse the repository at this point in the history
these changes will make the 1.16 update much smoother, as are also things changed there
  • Loading branch information
Thutmose committed Jun 26, 2020
1 parent 197f333 commit 3cae4d0
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 34 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
org.gradle.jvmargs=-Xmx3G
org.gradle.daemon=false

version_forge=31.2.0
version_forge=31.2.27
version_minecraft=1.15.2
version_mcsupport=[1.15.2]
version_mappings=20200514-1.15.1
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/pokecube/adventures/PokecubeAdv.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,8 @@ private static void init()

public static final String TRAINERTEXTUREPATH = PokecubeAdv.MODID + ":textures/trainer/";

public final static CommonProxy proxy = DistExecutor.runForDist(() -> () -> new ClientProxy(),
() -> () -> new CommonProxy());
public final static CommonProxy proxy = DistExecutor.safeRunForDist(
() -> ClientProxy::new, () -> CommonProxy::new);

private static final String NETVERSION = "1.0.1";
// Handler for network stuff.
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/pokecube/core/PokecubeCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,8 @@ public static void textureStitch(final TextureStitchEvent.Pre event)
private static final Config config = new Config();

// Sided proxy for handling server/client only stuff.
public final static CommonProxy proxy = DistExecutor.runForDist(() -> () -> new ClientProxy(),
() -> () -> new CommonProxy());
public final static CommonProxy proxy = DistExecutor.safeRunForDist(
() -> ClientProxy::new, () -> CommonProxy::new);

// Spawner for world spawning of pokemobs.
public static SpawnHandler spawner = new SpawnHandler();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ public void render(final int i, final int j, final float f)
GL11.glPopMatrix();
}

@SuppressWarnings("deprecation")
public void renderItem(final double x, final double y, final double z)
{
final ItemStack item = PokecubeItems.POKECUBE_CUBES;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@ public static void renderHealthBar(final LivingEntity passedEntity, final Matrix
mat.pop();
}

@SuppressWarnings("deprecation")
public static void renderIcon(final LivingEntity mob, final MatrixStack mat, final IRenderTypeBuffer buf,
final int vertexX, final int vertexY, final ItemStack stack, final int intU, final int intV, final int br)
{
Expand Down
13 changes: 7 additions & 6 deletions src/main/java/pokecube/legends/PokecubeLegends.java
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ public class PokecubeLegends
{
public static final Logger LOGGER = LogManager.getLogger();

public static final DeferredRegister<Block> BLOCKS = new DeferredRegister<>(ForgeRegistries.BLOCKS, Reference.ID);
public static final DeferredRegister<Item> ITEMS = new DeferredRegister<>(ForgeRegistries.ITEMS, Reference.ID);
public static final DeferredRegister<Block> BLOCKS = DeferredRegister.create(ForgeRegistries.BLOCKS, Reference.ID);
public static final DeferredRegister<Item> ITEMS = DeferredRegister.create(ForgeRegistries.ITEMS, Reference.ID);

@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.MOD, modid = Reference.ID)
public static class RegistryHandler
Expand Down Expand Up @@ -109,8 +109,9 @@ public static void registerFeatures(final RegistryEvent.Register<Feature<?>> eve
.getDefaultState(), 5)).withPlacement(Placement.COUNT_RANGE.configure(
new CountRangeConfig(2, 0, 0, 32))));
b.addFeature(GenerationStage.Decoration.UNDERGROUND_ORES, Feature.ORE.withConfiguration(
new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, BlockInit.SAPPHIRE_ORE.get()
.getDefaultState(), 5)).withPlacement(Placement.COUNT_RANGE.configure(
new OreFeatureConfig(OreFeatureConfig.FillerBlockType.NATURAL_STONE, BlockInit.SAPPHIRE_ORE
.get().getDefaultState(), 5)).withPlacement(Placement.COUNT_RANGE
.configure(
new CountRangeConfig(2, 0, 0, 32))));
}

Expand All @@ -137,8 +138,8 @@ public static void registerModDimensions(final RegistryEvent.Register<ModDimensi
}
}

public static CommonProxy proxy = DistExecutor.runForDist(() -> () -> new ClientProxy(),
() -> () -> new CommonProxy());
public static CommonProxy proxy = DistExecutor.safeRunForDist(
() -> ClientProxy::new, () -> CommonProxy::new);

public static final Config config = new Config();

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/pokecube/mobs/PokecubeMobs.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ public static void registerFeatures(final RegistryEvent.Register<Feature<?>> eve
}

public static final String MODID = "pokecube_mobs";
public static CommonProxy proxy = DistExecutor.runForDist(() -> () -> new ClientProxy(),
() -> () -> new CommonProxy());
public static CommonProxy proxy = DistExecutor.safeRunForDist(
() -> ClientProxy::new, () -> CommonProxy::new);

Map<PokedexEntry, Integer> genMap = Maps.newHashMap();

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/pokecube/nbtedit/NBTEdit.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ public void onUpdated()

public static boolean opOnly = true;

public final static CommonProxy proxy = DistExecutor.runForDist(() -> () -> new ClientProxy(),
() -> () -> new CommonProxy());
public final static CommonProxy proxy = DistExecutor.safeRunForDist(
() -> ClientProxy::new, () -> CommonProxy::new);

public static final ConfigHolder config = new ConfigHolder();

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/thut/bling/ThutBling.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import com.mojang.blaze3d.matrix.MatrixStack;

import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.client.gui.ScreenManager;
import net.minecraft.client.gui.screen.inventory.ChestScreen;
import net.minecraft.client.renderer.IRenderTypeBuffer;
import net.minecraft.entity.LivingEntity;
import net.minecraft.inventory.container.ContainerType;
import net.minecraft.item.Item;
Expand Down Expand Up @@ -37,8 +37,8 @@
public class ThutBling
{
public static final String MODID = "thut_bling";
public static final CommonProxy PROXY = DistExecutor.runForDist(() -> () -> new ClientProxy(),
() -> () -> new CommonProxy());
public static final CommonProxy PROXY = DistExecutor.safeRunForDist(
() -> ClientProxy::new, () -> CommonProxy::new);

public static class ClientProxy extends CommonProxy
{
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/thut/core/common/ThutCore.java
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,8 @@ public static void registerParticles(final RegistryEvent.Register<ParticleType<?

public static ThutCore instance;

public static final Proxy proxy = DistExecutor.runForDist(() -> () -> new ClientProxy(),
() -> () -> new CommonProxy());
public static final Proxy proxy = DistExecutor.safeRunForDist(
() -> ClientProxy::new, () -> CommonProxy::new);

public static final ConfigHandler conf = new ConfigHandler();

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/thut/crafts/ThutCrafts.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,8 @@ public static void registerItems(final RegistryEvent.Register<Item> event)
public final static PacketHandler packets = new PacketHandler(new ResourceLocation(Reference.MODID, "comms"),
Reference.NETVERSION);

public static Proxy proxy = DistExecutor.runForDist(() -> () -> new ClientProxy(),
() -> () -> new CommonProxy());
public static Proxy proxy = DistExecutor.safeRunForDist(
() -> ClientProxy::new, () -> CommonProxy::new);

public static Item CRAFTMAKER;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/thut/wearables/ThutWearables.java
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ public static void textureStitch(final TextureStitchEvent.Pre event)
public final static PacketHandler packets = new PacketHandler(new ResourceLocation(Reference.MODID, "comms"),
Reference.NETVERSION);

public final static CommonProxy proxy = DistExecutor.runForDist(() -> () -> new ClientProxy(),
() -> () -> new CommonProxy());
public final static CommonProxy proxy = DistExecutor.safeRunForDist(
() -> ClientProxy::new, () -> CommonProxy::new);
// Holder for our config options
public static final Config config = new Config();

Expand Down
7 changes: 0 additions & 7 deletions src/main/java/thut/wearables/client/gui/GuiEvents.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,6 @@ public GuiEvents()
{
}

@OnlyIn(value = Dist.CLIENT)
@SubscribeEvent
public void guiPostAction(final GuiScreenEvent.ActionPerformedEvent.Post event)
{
System.out.println("test");
}

@OnlyIn(value = Dist.CLIENT)
@SubscribeEvent
public void guiPostInit(final GuiScreenEvent.InitGuiEvent.Post event)
Expand Down
1 change: 0 additions & 1 deletion src/main/java/thut/wearables/impl/ConfigWearable.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public EnumWearable getSlot(final ItemStack stack)
return this.slot;
}

@SuppressWarnings("deprecation")
@OnlyIn(value = Dist.CLIENT)
@Override
public void renderWearable(final MatrixStack mat, final IRenderTypeBuffer buff, final EnumWearable slot,
Expand Down

0 comments on commit 3cae4d0

Please sign in to comment.