-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from AIDA64S/rewrite
add build.bat; add useWithoutResult
- Loading branch information
Showing
15 changed files
with
309 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
@echo Scan Minecraft classes | ||
call gradlew test -x common:test --continue -Pgenerate=dryRun | ||
@echo Generate holders | ||
call gradlew test -x common:test --continue -Pgenerate=normal | ||
@echo Search for mapped methods | ||
call gradlew test -x common:test | ||
@echo Analyze test results | ||
call gradlew common:test | ||
@echo Build common | ||
call gradlew common:build -x test | ||
@echo Build Fabric 1.16.5 | ||
call gradlew fabric:1.16.5-mapping:build -x test | ||
@echo Build Fabric 1.17.1 | ||
call gradlew fabric:1.17.1-mapping:build -x test | ||
@echo Build Fabric 1.18.2 | ||
call gradlew fabric:1.18.2-mapping:build -x test | ||
@echo Build Fabric 1.19.2 | ||
call gradlew fabric:1.19.2-mapping:build -x test | ||
@echo Build Fabric 1.19.4 | ||
call gradlew fabric:1.19.4-mapping:build -x test | ||
@echo Build Fabric 1.20.1 | ||
call gradlew fabric:1.20.1-mapping:build -x test | ||
@echo Build Fabric 1.20.4 | ||
call gradlew fabric:1.20.4-mapping:build -x test | ||
@echo Build Forge 1.16.5 | ||
call gradlew forge:1.16.5-mapping:build -x test | ||
@echo Build Forge 1.17.1 | ||
call gradlew forge:1.17.1-mapping:build -x test | ||
@echo Build Forge 1.18.2 | ||
call gradlew forge:1.18.2-mapping:build -x test | ||
@echo Build Forge 1.19.2 | ||
call gradlew forge:1.19.2-mapping:build -x test | ||
@echo Build Forge 1.19.4 | ||
call gradlew forge:1.19.4-mapping:build -x test | ||
@echo Build Forge 1.20.1 | ||
call gradlew forge:1.20.1-mapping:build -x test | ||
@echo Build Forge 1.20.4 | ||
call gradlew forge:1.20.4-mapping:build -x test | ||
pause |
25 changes: 18 additions & 7 deletions
25
fabric/1.16.5-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
package org.mtr.mapping.mapper; | ||
|
||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.TypedActionResult; | ||
import org.mtr.mapping.annotation.MappedMethod; | ||
import org.mtr.mapping.holder.Block; | ||
import org.mtr.mapping.holder.BlockItemAbstractMapping; | ||
import org.mtr.mapping.holder.ItemSettings; | ||
import org.mtr.mapping.holder.*; | ||
|
||
public class BlockItemExtension extends BlockItemAbstractMapping { | ||
|
||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
|
||
@Deprecated | ||
@Override | ||
public final TypedActionResult<ItemStack> use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { | ||
useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); | ||
return super.use(world, user, hand); | ||
} | ||
|
||
@MappedMethod | ||
public void useWithoutResult(World world, PlayerEntity user, Hand hand) { | ||
} | ||
} |
25 changes: 18 additions & 7 deletions
25
fabric/1.17.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
package org.mtr.mapping.mapper; | ||
|
||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.TypedActionResult; | ||
import org.mtr.mapping.annotation.MappedMethod; | ||
import org.mtr.mapping.holder.Block; | ||
import org.mtr.mapping.holder.BlockItemAbstractMapping; | ||
import org.mtr.mapping.holder.ItemSettings; | ||
import org.mtr.mapping.holder.*; | ||
|
||
public class BlockItemExtension extends BlockItemAbstractMapping { | ||
|
||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
|
||
@Deprecated | ||
@Override | ||
public final TypedActionResult<ItemStack> use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { | ||
useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); | ||
return super.use(world, user, hand); | ||
} | ||
|
||
@MappedMethod | ||
public void useWithoutResult(World world, PlayerEntity user, Hand hand) { | ||
} | ||
} |
25 changes: 18 additions & 7 deletions
25
fabric/1.18.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
package org.mtr.mapping.mapper; | ||
|
||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.TypedActionResult; | ||
import org.mtr.mapping.annotation.MappedMethod; | ||
import org.mtr.mapping.holder.Block; | ||
import org.mtr.mapping.holder.BlockItemAbstractMapping; | ||
import org.mtr.mapping.holder.ItemSettings; | ||
import org.mtr.mapping.holder.*; | ||
|
||
public class BlockItemExtension extends BlockItemAbstractMapping { | ||
|
||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
|
||
@Deprecated | ||
@Override | ||
public final TypedActionResult<ItemStack> use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { | ||
useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); | ||
return super.use(world, user, hand); | ||
} | ||
|
||
@MappedMethod | ||
public void useWithoutResult(World world, PlayerEntity user, Hand hand) { | ||
} | ||
} |
25 changes: 18 additions & 7 deletions
25
fabric/1.19.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
package org.mtr.mapping.mapper; | ||
|
||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.TypedActionResult; | ||
import org.mtr.mapping.annotation.MappedMethod; | ||
import org.mtr.mapping.holder.Block; | ||
import org.mtr.mapping.holder.BlockItemAbstractMapping; | ||
import org.mtr.mapping.holder.ItemSettings; | ||
import org.mtr.mapping.holder.*; | ||
|
||
public class BlockItemExtension extends BlockItemAbstractMapping { | ||
|
||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
|
||
@Deprecated | ||
@Override | ||
public final TypedActionResult<ItemStack> use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { | ||
useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); | ||
return super.use(world, user, hand); | ||
} | ||
|
||
@MappedMethod | ||
public void useWithoutResult(World world, PlayerEntity user, Hand hand) { | ||
} | ||
} |
25 changes: 18 additions & 7 deletions
25
fabric/1.19.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
package org.mtr.mapping.mapper; | ||
|
||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.TypedActionResult; | ||
import org.mtr.mapping.annotation.MappedMethod; | ||
import org.mtr.mapping.holder.Block; | ||
import org.mtr.mapping.holder.BlockItemAbstractMapping; | ||
import org.mtr.mapping.holder.ItemSettings; | ||
import org.mtr.mapping.holder.*; | ||
|
||
public class BlockItemExtension extends BlockItemAbstractMapping { | ||
|
||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
|
||
@Deprecated | ||
@Override | ||
public final TypedActionResult<ItemStack> use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { | ||
useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); | ||
return super.use(world, user, hand); | ||
} | ||
|
||
@MappedMethod | ||
public void useWithoutResult(World world, PlayerEntity user, Hand hand) { | ||
} | ||
} |
25 changes: 18 additions & 7 deletions
25
fabric/1.20.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
package org.mtr.mapping.mapper; | ||
|
||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.TypedActionResult; | ||
import org.mtr.mapping.annotation.MappedMethod; | ||
import org.mtr.mapping.holder.Block; | ||
import org.mtr.mapping.holder.BlockItemAbstractMapping; | ||
import org.mtr.mapping.holder.ItemSettings; | ||
import org.mtr.mapping.holder.*; | ||
|
||
public class BlockItemExtension extends BlockItemAbstractMapping { | ||
|
||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
|
||
@Deprecated | ||
@Override | ||
public final TypedActionResult<ItemStack> use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { | ||
useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); | ||
return super.use(world, user, hand); | ||
} | ||
|
||
@MappedMethod | ||
public void useWithoutResult(World world, PlayerEntity user, Hand hand) { | ||
} | ||
} |
25 changes: 18 additions & 7 deletions
25
fabric/1.20.4-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
package org.mtr.mapping.mapper; | ||
|
||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.TypedActionResult; | ||
import org.mtr.mapping.annotation.MappedMethod; | ||
import org.mtr.mapping.holder.Block; | ||
import org.mtr.mapping.holder.BlockItemAbstractMapping; | ||
import org.mtr.mapping.holder.ItemSettings; | ||
import org.mtr.mapping.holder.*; | ||
|
||
public class BlockItemExtension extends BlockItemAbstractMapping { | ||
|
||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
|
||
@Deprecated | ||
@Override | ||
public final TypedActionResult<ItemStack> use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { | ||
useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); | ||
return super.use(world, user, hand); | ||
} | ||
|
||
@MappedMethod | ||
public void useWithoutResult(World world, PlayerEntity user, Hand hand) { | ||
} | ||
} |
25 changes: 18 additions & 7 deletions
25
forge/1.16.5-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,25 @@ | ||
package org.mtr.mapping.mapper; | ||
|
||
import net.minecraft.item.ItemStack; | ||
import net.minecraft.util.ActionResult; | ||
import org.mtr.mapping.annotation.MappedMethod; | ||
import org.mtr.mapping.holder.Block; | ||
import org.mtr.mapping.holder.BlockItemAbstractMapping; | ||
import org.mtr.mapping.holder.ItemSettings; | ||
import org.mtr.mapping.holder.*; | ||
|
||
public class BlockItemExtension extends BlockItemAbstractMapping { | ||
|
||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
|
||
@Deprecated | ||
@Override | ||
public final ActionResult<ItemStack> use(net.minecraft.world.World world, net.minecraft.entity.player.PlayerEntity user, net.minecraft.util.Hand hand) { | ||
useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); | ||
return super.use(world, user, hand); | ||
} | ||
|
||
@MappedMethod | ||
public void useWithoutResult(World world, PlayerEntity user, Hand hand) { | ||
} | ||
} |
28 changes: 21 additions & 7 deletions
28
forge/1.17.1-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,28 @@ | ||
package org.mtr.mapping.mapper; | ||
|
||
import net.minecraft.world.InteractionHand; | ||
import net.minecraft.world.InteractionResultHolder; | ||
import net.minecraft.world.entity.player.Player; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.level.Level; | ||
import org.mtr.mapping.annotation.MappedMethod; | ||
import org.mtr.mapping.holder.Block; | ||
import org.mtr.mapping.holder.BlockItemAbstractMapping; | ||
import org.mtr.mapping.holder.ItemSettings; | ||
import org.mtr.mapping.holder.*; | ||
|
||
public class BlockItemExtension extends BlockItemAbstractMapping { | ||
|
||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
|
||
@Deprecated | ||
@Override | ||
public final InteractionResultHolder<ItemStack> use(Level world, Player user, InteractionHand hand) { | ||
useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); | ||
return super.use(world, user, hand); | ||
} | ||
|
||
@MappedMethod | ||
public void useWithoutResult(World world, PlayerEntity user, Hand hand) { | ||
} | ||
} |
28 changes: 21 additions & 7 deletions
28
forge/1.18.2-mapping/src/main/java/org/mtr/mapping/mapper/BlockItemExtension.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,28 @@ | ||
package org.mtr.mapping.mapper; | ||
|
||
import net.minecraft.world.InteractionHand; | ||
import net.minecraft.world.InteractionResultHolder; | ||
import net.minecraft.world.entity.player.Player; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.level.Level; | ||
import org.mtr.mapping.annotation.MappedMethod; | ||
import org.mtr.mapping.holder.Block; | ||
import org.mtr.mapping.holder.BlockItemAbstractMapping; | ||
import org.mtr.mapping.holder.ItemSettings; | ||
import org.mtr.mapping.holder.*; | ||
|
||
public class BlockItemExtension extends BlockItemAbstractMapping { | ||
|
||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
@MappedMethod | ||
public BlockItemExtension(Block block, ItemSettings itemSettings) { | ||
super(block, itemSettings); | ||
} | ||
|
||
@Deprecated | ||
@Override | ||
public final InteractionResultHolder<ItemStack> use(Level world, Player user, InteractionHand hand) { | ||
useWithoutResult(new World(world), new PlayerEntity(user), Hand.convert(hand)); | ||
return super.use(world, user, hand); | ||
} | ||
|
||
@MappedMethod | ||
public void useWithoutResult(World world, PlayerEntity user, Hand hand) { | ||
} | ||
} |
Oops, something went wrong.