Skip to content

Commit

Permalink
Merge pull request #26 from PssbleTrngle/develop
Browse files Browse the repository at this point in the history
Another server related bug fix
  • Loading branch information
PssbleTrngle authored Sep 4, 2020
2 parents fa121f0 + 48f0b64 commit a5c2e9f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/release-mod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@ jobs:
uses: DamianReeves/write-file-action@v1.0
with:
path: CHANGELOG.md
contents: |+
contents: |
.
## [${{ steps.version.outputs.next }}] - ${{ steps.date.outputs.date }}
${{ github.event.pull_request.body }}
write-mode: append

- name: Upload to CurseForge
Expand Down Expand Up @@ -85,8 +86,8 @@ jobs:
message: Update Changelog
add: build.properties CHANGELOG.md
ref: master
author_name: PssbleTrngle
author_email: nik@somethingcatchy.net
author_name: GitHub Actions
author_email: 41898282+github-actions[bot]@users.noreply.github.com
force: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12 changes: 9 additions & 3 deletions src/main/java/com/possible_triangle/brazier/Brazier.java
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
package com.possible_triangle.brazier;

import com.possible_triangle.brazier.config.BrazierConfig;
import com.possible_triangle.brazier.item.BrazierIndicator;
import com.possible_triangle.brazier.network.BrazierNetwork;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.DeferredWorkQueue;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.ModLoadingContext;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.config.ModConfig;
import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

// The value here should match an entry in the META-INF/mods.toml file
@Mod(Brazier.MODID)
@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE)
public class Brazier {

public static final String MODID = "brazier";
Expand All @@ -40,4 +41,9 @@ private void doClientStuff(final FMLClientSetupEvent event) {
Content.clientSetup(event.getMinecraftSupplier().get());
}

@SubscribeEvent
static void playerTick(TickEvent.PlayerTickEvent event) {
BrazierIndicator.playerTick(event);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,16 @@

import com.possible_triangle.brazier.Content;
import com.possible_triangle.brazier.block.tile.BrazierTile;
import net.minecraft.entity.Entity;
import net.minecraft.inventory.EquipmentSlotType;
import net.minecraft.item.*;
import net.minecraft.item.ItemStack;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.math.vector.Vector3d;
import net.minecraft.world.World;
import net.minecraft.world.server.ServerWorld;
import net.minecraftforge.event.TickEvent;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.LogicalSide;
import net.minecraftforge.fml.common.Mod;

import java.util.stream.Stream;

@Mod.EventBusSubscriber(bus = Mod.EventBusSubscriber.Bus.FORGE)
public interface BrazierIndicator {

@SubscribeEvent
static void playerTick(TickEvent.PlayerTickEvent event) {
if (event.player.world.isRemote || event.player.ticksExisted % 2 != 0) return;
ServerWorld world = (ServerWorld) event.player.world;
Expand Down

0 comments on commit a5c2e9f

Please sign in to comment.