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
SkullData data = Sponge.getGame().getDataManager().getManipulatorBuilder(SkullData.class).get().create(); | |
data.set(Keys.SKULL_TYPE, SkullTypes.PLAYER); | |
ItemStack stack = Sponge.getGame().getRegistry().createBuilder(ItemStack.Builder.class).itemType(ItemTypes.SKULL).itemData(data).build(); | |
RepresentedPlayerData skinData = Sponge.getGame().getDataManager().getManipulatorBuilder(RepresentedPlayerData.class).get().create(); | |
skinData.set(Keys.REPRESENTED_PLAYER, GameProfile.of(UUID.fromString("4c38ed11-596a-4fd4-ab1d-26f386c1cbac"), "MHF_Blaze")); | |
stack.offer(skinData); |
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
$ ./gradlew setupDecompWorkspace --refresh-dependencies | |
FAILURE: Build failed with an exception. | |
* What went wrong: | |
A problem occurred configuring root project 'SpongeVanilla'. | |
> Could not resolve all dependencies for configuration ':classpath'. | |
> Could not resolve net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT. | |
Required by: | |
project : |
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
[16:38:48] [Server thread/ERROR] [Sponge]: Error occurred while executing command 'ssg start demo' for source EntityPlayerMP['m0pt0pmatt'/438, l='world', x=-364.77, y=64.00, z=198.05]: null | |
java.lang.StackOverflowError | |
at org.spongepowered.common.item.inventory.lens.impl.fabric.DefaultInventoryFabric.clear(DefaultInventoryFabric.java:81) ~[DefaultInventoryFabric.class:?] | |
at net.minecraft.tileentity.TileEntityChest.clear(TileEntityChest.java:632) ~[TileEntityChest.class:?] | |
at org.spongepowered.common.item.inventory.lens.impl.fabric.DefaultInventoryFabric.clear(DefaultInventoryFabric.java:81) ~[DefaultInventoryFabric.class:?] | |
at net.minecraft.tileentity.TileEntityChest.clear(TileEntityChest.java:632) ~[TileEntityChest.class:?] | |
at org.spongepowered.common.item.inventory.lens.impl.fabric.DefaultInventoryFabric.clear(DefaultInventoryFabric.java:81) ~[DefaultInventoryFabric.class:?] | |
at net.minecraft.tileentity.TileEntityChest.clear(TileEntityChest.java:632) ~[TileEntityChest.class:?] | |
at org.spongepowered.com |
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
"C:\Program Files\Java\jdk1.8.0_101\bin\java" -ea -Didea.launcher.port=7532 "-Didea.launcher.bin.path=C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.2.3\bin" -Didea.junit.sm_runner -Dfile.encoding=UTF-8 -classpath "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.2.3\lib\idea_rt.jar;C:\Program Files (x86)\JetBrains\IntelliJ IDEA 2016.2.3\plugins\junit\lib\junit-rt.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\sunjce_pr |
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
Inventory inventory = player.getInventory(); | |
ItemStack item; | |
while((item = inventory.poll().orElse(null)) != null) { | |
Entity entity = world.createEntity(EntityTypes.ITEM, player.getLocation().getPosition()); | |
entity.offer(Sponge.getDataManager() | |
.getBuilder(RepresentedItemData.class).get() | |
.build(item.toContainer()).get()); | |
} |
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
while (!player.getInventory().isEmpty()) { | |
player.getInventory().poll() | |
.map(DataSerializable::toContainer) | |
.ifPresent(world::createEntity); | |
} |
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
//CommandBlock commandBlock; | |
commandBlock.execute(); | |
RedstonePoweredData data = Sponge.getDataManager(). | |
getManipulatorBuilder(RedstonePoweredData.class).get().create(); | |
data.power().set(16); | |
commandBlock.getLocation().getBlock().with(data.asImmutable()).ifPresent(b -> | |
commandBlock.getLocation().setBlock(b, | |
Cause.of(NamedCause.of("Fired Command Block", SpongeSurvivalGamesPlugin.PLUGIN_CONTAINER)))); |
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
"C:\Program Files\Java\jdk1.8.0_101\bin\java" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:59894,suspend=y,server=n -Dfml.coreMods.load=org.spongepowered.mod.SpongeCoremod -javaagent:C:\Users\m0pt0\.IntelliJIdea2016.2\system\groovyHotSwap\gragent.jar -Dfile.encoding=UTF-8 -classpath "C:\Program Files\Java\jdk1.8.0_101\jre\lib\charsets.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\deploy.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\access-bridge-64.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\cldrdata.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\dnsns.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\jaccess.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\jfxrt.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\localedata.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\nashorn.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\sunec.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\sunjce_provider.jar;C:\Program Files\Java\jdk1.8.0_101\jre\lib\ext\sunmscapi.jar;C:\Program Fil |
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
package io.github.m0pt0pmatt.testplugin; | |
import org.spongepowered.api.Sponge; | |
import org.spongepowered.api.block.BlockTypes; | |
import org.spongepowered.api.command.CommandResult; | |
import org.spongepowered.api.command.args.GenericArguments; | |
import org.spongepowered.api.command.spec.CommandSpec; | |
import org.spongepowered.api.entity.living.player.Player; | |
import org.spongepowered.api.event.Listener; | |
import org.spongepowered.api.event.game.state.GameStartedServerEvent; |
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
m0pt0pmatt@m0pt0pmatt-desktop:~/Workspace/SpongeVanilla$ gradle build | |
################################################# | |
ForgeGradle 2.2-SNAPSHOT-unknown | |
https://github.com/MinecraftForge/ForgeGradle | |
################################################# | |
Powered by MCP unknown | |
http://modcoderpack.com | |
by: Searge, ProfMobius, Fesh0r, | |
R4wk, ZeuX, IngisKahn, bspkrs | |
################################################# |