Skip to content

Commit

Permalink
build 1.0.1
Browse files Browse the repository at this point in the history
-fixed #50
  • Loading branch information
KidsDontPlay committed Oct 9, 2019
1 parent 11be5ce commit 86bf760
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ apply plugin: 'idea'
Properties props = new Properties()
props.load(new BufferedReader(new FileReader(file('../gradle.properties'))))

version = "${props.get('mc_version')}-1.0.0"
version = "${props.get('mc_version')}-1.0.1"
group = 'kdp.blockdrops'
archivesBaseName = 'blockdrops'

Expand Down
10 changes: 4 additions & 6 deletions src/main/java/kdp/blockdrops/BlockDrops.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.JsonToNBT;
import net.minecraft.nbt.ListNBT;
import net.minecraft.server.dedicated.DedicatedServer;
import net.minecraft.server.integrated.IntegratedServer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.NonNullList;
import net.minecraft.util.ResourceLocation;
Expand Down Expand Up @@ -187,7 +185,7 @@ private static List<Drop> getDrops(BlockState state, FMLServerStartingEvent even
ItemStack show;
try {
show = getItemForBlock(state, world);
} catch (RuntimeException e) {
} catch (RuntimeException | NoSuchMethodError e) {
return result;
}
if (show.isEmpty()) {
Expand Down Expand Up @@ -309,15 +307,15 @@ public void serverStart(FMLServerStartingEvent event) throws IOException, Comman
}
}
recipes = allRecipes;
if (event.getServer() instanceof IntegratedServer) {
if (event.getServer().isSinglePlayer()) {
Plugin.recipes = recipes;
}
}

@SubscribeEvent
public void construct(PlayerEvent.PlayerLoggedInEvent event) {
if (event.getEntity() instanceof ServerPlayerEntity && ((ServerPlayerEntity) event
.getEntity()).server instanceof DedicatedServer) {
if (event.getEntity() instanceof ServerPlayerEntity && !((ServerPlayerEntity) event.getEntity()).server
.isSinglePlayer()) {
simpleChannel.send(PacketDistributor.PLAYER.with(() -> (ServerPlayerEntity) event.getEntity()),
new SyncMessage(recipes));
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/mods.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ issueTrackerURL="http://my.issue.tracker/"

[[mods]]
modId="blockdrops"
version="1.0.0"
version="1.0.1"
displayName="Block Drops"
displayURL="https://www.curseforge.com/minecraft/mc-mods/blockdrops"
credits="Thanks for this example mod goes to Java"
Expand Down

0 comments on commit 86bf760

Please sign in to comment.