diff --git a/build.gradle b/build.gradle index 3a309fc..277c952 100644 --- a/build.gradle +++ b/build.gradle @@ -19,22 +19,30 @@ archivesBaseName = 'enderports' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' minecraft { - mappings channel: 'snapshot', version: '20191215-1.14.3' + mappings channel: 'snapshot', version: '20200225-1.15.1' runs { client { workingDirectory = project.file('run').canonicalPath - source sourceSets.main + mods { + enderports { + source sourceSets.main + } + } } server { workingDirectory = project.file('run').canonicalPath - source sourceSets.main + mods { + enderports { + source sourceSets.main + } + } } } } dependencies { - minecraft 'net.minecraftforge:forge:1.14.4-28.1.0' + minecraft 'net.minecraftforge:forge:1.15.2-31.1.77' } jar { @@ -44,7 +52,7 @@ jar { "Specification-Vendor": "ManApart", "Specification-Version": "1", // We are version 1 of ourselves "Implementation-Title": project.name, - "Implementation-Version": "${version}", + "Implementation-Version": "1.0", "Implementation-Vendor" :"ManApart", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) diff --git a/src/main/java/org/manapart/enderports/Teleporter.java b/src/main/java/org/manapart/enderports/Teleporter.java index b8a3bf9..1619e15 100644 --- a/src/main/java/org/manapart/enderports/Teleporter.java +++ b/src/main/java/org/manapart/enderports/Teleporter.java @@ -10,10 +10,7 @@ import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.ServerPlayerEntity; import net.minecraft.item.ItemStack; -import net.minecraft.util.Hand; -import net.minecraft.util.ResourceLocation; -import net.minecraft.util.SoundCategory; -import net.minecraft.util.SoundEvents; +import net.minecraft.util.*; import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.BlockRayTraceResult; import net.minecraft.world.World; @@ -45,9 +42,7 @@ public ResourceLocation getLootTable() { } @Override - public boolean onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult rayTraceResult) { - boolean result = super.onBlockActivated(state, world, pos, player, hand, rayTraceResult); -// System.out.println("On block clicked"); + public ActionResultType onBlockActivated(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockRayTraceResult rayTraceResult) { if (world instanceof ServerWorld) { ServerWorld serverWorld = (ServerWorld) world; BlockPos nextPos = TeleporterNetwork.getNetwork(serverWorld).getNextTeleporter(pos); @@ -58,7 +53,7 @@ public boolean onBlockActivated(BlockState state, World world, BlockPos pos, Pla } } - return result; + return ActionResultType.PASS; } @Override diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 3166698..670f335 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -14,7 +14,7 @@ issueTrackerURL="http://my.issue.tracker/" #optional # The modid of the mod modId="enderports" #mandatory # The version number of the mod - there's a few well known ${} variables useable here or just hardcode it -version="${file.jarVersion}" #mandatory +version="1.0" #mandatory # A display name for the mod displayName="Enderports" #mandatory # A URL to query for updates for this mod. See the JSON update specification @@ -29,7 +29,7 @@ credits="Simple teleporter mods" #optional authors="ManApart" #optional # The description text for the mod (multi line!) (#mandatory) description=''' -Simple teleporter mods +Simple teleporters ''' # A dependency - use the . to indicate dependency for a specific modid. Dependencies are optional. [[dependencies.examplemod]] #optional