repo_name stringlengths 7 104 | file_path stringlengths 13 198 | context stringlengths 67 7.15k | import_statement stringlengths 16 4.43k | code stringlengths 40 6.98k | prompt stringlengths 227 8.27k | next_line stringlengths 8 795 |
|---|---|---|---|---|---|---|
Cazsius/Spice-of-Life-Carrot-Edition | src/main/java/com/cazsius/solcarrot/client/gui/PageFlipButton.java | // Path: src/main/java/com/cazsius/solcarrot/SOLCarrot.java
// @Mod(SOLCarrot.MOD_ID)
// @Mod.EventBusSubscriber(modid = SOLCarrot.MOD_ID, bus = MOD)
// public final class SOLCarrot {
// public static final String MOD_ID = "solcarrot";
//
// public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
//
// ... | import com.cazsius.solcarrot.SOLCarrot;
import com.mojang.blaze3d.platform.GlStateManager;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.widget.button.Button;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.Only... | package com.cazsius.solcarrot.client.gui;
@OnlyIn(Dist.CLIENT)
final class PageFlipButton extends Button { | // Path: src/main/java/com/cazsius/solcarrot/SOLCarrot.java
// @Mod(SOLCarrot.MOD_ID)
// @Mod.EventBusSubscriber(modid = SOLCarrot.MOD_ID, bus = MOD)
// public final class SOLCarrot {
// public static final String MOD_ID = "solcarrot";
//
// public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
//
// ... | private static final ResourceLocation texture = SOLCarrot.resourceLocation("textures/gui/food_book.png"); |
Cazsius/Spice-of-Life-Carrot-Edition | src/main/java/com/cazsius/solcarrot/communication/FoodListMessage.java | // Path: src/main/java/com/cazsius/solcarrot/tracking/FoodList.java
// @ParametersAreNonnullByDefault
// public final class FoodList implements FoodCapability {
// private static final String NBT_KEY_FOOD_LIST = "foodList";
//
// public static FoodList get(PlayerEntity player) {
// return (FoodList) player.getCap... | import com.cazsius.solcarrot.tracking.FoodList;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.nbt.CompoundNBT;
import net.minecraft.network.PacketBuffer;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.DistExecutor;
import net.m... | package com.cazsius.solcarrot.communication;
public final class FoodListMessage {
private CompoundNBT capabilityNBT;
| // Path: src/main/java/com/cazsius/solcarrot/tracking/FoodList.java
// @ParametersAreNonnullByDefault
// public final class FoodList implements FoodCapability {
// private static final String NBT_KEY_FOOD_LIST = "foodList";
//
// public static FoodList get(PlayerEntity player) {
// return (FoodList) player.getCap... | public FoodListMessage(FoodList foodList) { |
Cazsius/Spice-of-Life-Carrot-Edition | src/main/java/com/cazsius/solcarrot/item/FoodBookItem.java | // Path: src/main/java/com/cazsius/solcarrot/client/gui/FoodBookScreen.java
// @OnlyIn(Dist.CLIENT)
// public final class FoodBookScreen extends Screen implements PageFlipButton.Pageable {
// private static final ResourceLocation texture = SOLCarrot.resourceLocation("textures/gui/food_book.png");
// private static fi... | import com.cazsius.solcarrot.client.gui.FoodBookScreen;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.item.*;
import net.minecraft.util.*;
import net.minecraft.world.World;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.fml.DistExecutor; | package com.cazsius.solcarrot.item;
public final class FoodBookItem extends Item {
public FoodBookItem() {
super(new Properties().group(ItemGroup.MISC));
}
@Override
public ActionResult<ItemStack> onItemRightClick(World world, PlayerEntity player, Hand hand) {
if (player.isUser()) { | // Path: src/main/java/com/cazsius/solcarrot/client/gui/FoodBookScreen.java
// @OnlyIn(Dist.CLIENT)
// public final class FoodBookScreen extends Screen implements PageFlipButton.Pageable {
// private static final ResourceLocation texture = SOLCarrot.resourceLocation("textures/gui/food_book.png");
// private static fi... | DistExecutor.runWhenOn(Dist.CLIENT, () -> () -> FoodBookScreen.open(player)); |
Cazsius/Spice-of-Life-Carrot-Edition | src/main/java/com/cazsius/solcarrot/tracking/FoodInstance.java | // Path: src/main/java/com/cazsius/solcarrot/SOLCarrot.java
// @Mod(SOLCarrot.MOD_ID)
// @Mod.EventBusSubscriber(modid = SOLCarrot.MOD_ID, bus = MOD)
// public final class SOLCarrot {
// public static final String MOD_ID = "solcarrot";
//
// public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
//
// ... | import com.cazsius.solcarrot.SOLCarrot;
import net.minecraft.item.*;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.registries.ForgeRegistries;
import javax.annotation.Nullable;
import java.util.Objects;
import java.util.Optional; | package com.cazsius.solcarrot.tracking;
public final class FoodInstance {
public final Item item;
public FoodInstance(Item item) {
this.item = item;
if (!item.isFood()) throw new RuntimeException("Attempting to construct FoodInstance from non-food item.");
}
@Nullable
public static FoodInstance decode(S... | // Path: src/main/java/com/cazsius/solcarrot/SOLCarrot.java
// @Mod(SOLCarrot.MOD_ID)
// @Mod.EventBusSubscriber(modid = SOLCarrot.MOD_ID, bus = MOD)
// public final class SOLCarrot {
// public static final String MOD_ID = "solcarrot";
//
// public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
//
// ... | SOLCarrot.LOGGER.warn("attempting to load item into food list that is no longer registered: " + encoded + " (removing from list)"); |
Cazsius/Spice-of-Life-Carrot-Edition | src/main/java/com/cazsius/solcarrot/client/gui/Page.java | // Path: src/main/java/com/cazsius/solcarrot/lib/Localization.java
// @OnlyIn(Dist.CLIENT)
// public static String localized(String domain, IForgeRegistryEntry entry, String path, Object... args) {
// return I18n.format(keyString(domain, entry, path), args);
// }
| import com.cazsius.solcarrot.client.gui.elements.*;
import java.awt.*;
import static com.cazsius.solcarrot.lib.Localization.localized; | package com.cazsius.solcarrot.client.gui;
abstract class Page extends UIElement {
final UIStack mainStack;
final int spacing = 6;
Page(Rectangle frame, String header) {
super(frame);
mainStack = new UIStack();
mainStack.axis = UIStack.Axis.VERTICAL;
mainStack.spacing = spacing;
UILabel headerLa... | // Path: src/main/java/com/cazsius/solcarrot/lib/Localization.java
// @OnlyIn(Dist.CLIENT)
// public static String localized(String domain, IForgeRegistryEntry entry, String path, Object... args) {
// return I18n.format(keyString(domain, entry, path), args);
// }
// Path: src/main/java/com/cazsius/solcarrot/client/g... | return localized("gui", "food_book.fraction", |
Cazsius/Spice-of-Life-Carrot-Edition | src/main/java/com/cazsius/solcarrot/SOLCarrot.java | // Path: src/main/java/com/cazsius/solcarrot/communication/FoodListMessage.java
// public final class FoodListMessage {
// private CompoundNBT capabilityNBT;
//
// public FoodListMessage(FoodList foodList) {
// this.capabilityNBT = foodList.serializeNBT();
// }
//
// public FoodListMessage(PacketBuffer buffer... | import com.cazsius.solcarrot.communication.FoodListMessage;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.event.lifecycle.FMLCommonSetupEvent;
import net.minecraftforge.fml.event.lifecycle.FMLFin... | package com.cazsius.solcarrot;
@Mod(SOLCarrot.MOD_ID)
@Mod.EventBusSubscriber(modid = SOLCarrot.MOD_ID, bus = MOD)
public final class SOLCarrot {
public static final String MOD_ID = "solcarrot";
public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
private static final String PROTOCOL_VERSION = "1... | // Path: src/main/java/com/cazsius/solcarrot/communication/FoodListMessage.java
// public final class FoodListMessage {
// private CompoundNBT capabilityNBT;
//
// public FoodListMessage(FoodList foodList) {
// this.capabilityNBT = foodList.serializeNBT();
// }
//
// public FoodListMessage(PacketBuffer buffer... | channel.messageBuilder(FoodListMessage.class, 0) |
Cazsius/Spice-of-Life-Carrot-Edition | src/main/java/com/cazsius/solcarrot/lib/Localization.java | // Path: src/main/java/com/cazsius/solcarrot/SOLCarrot.java
// @Mod(SOLCarrot.MOD_ID)
// @Mod.EventBusSubscriber(modid = SOLCarrot.MOD_ID, bus = MOD)
// public final class SOLCarrot {
// public static final String MOD_ID = "solcarrot";
//
// public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
//
// ... | import com.cazsius.solcarrot.SOLCarrot;
import net.minecraft.client.resources.I18n;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.text.ITextComponent;
import net.minecraft.util.text.TranslationTextComponent;
import net.minecraftforge.api.distmarker.Dist;
import net.minecraftforge.api.distmarker.... | package com.cazsius.solcarrot.lib;
public final class Localization {
public static String keyString(String domain, IForgeRegistryEntry entry, String path) {
final ResourceLocation location = entry.getRegistryName();
assert location != null;
return keyString(domain, location.getPath() + "." + path);
}
/** e... | // Path: src/main/java/com/cazsius/solcarrot/SOLCarrot.java
// @Mod(SOLCarrot.MOD_ID)
// @Mod.EventBusSubscriber(modid = SOLCarrot.MOD_ID, bus = MOD)
// public final class SOLCarrot {
// public static final String MOD_ID = "solcarrot";
//
// public static final Logger LOGGER = LogManager.getLogger(MOD_ID);
//
// ... | return domain + "." + SOLCarrot.MOD_ID + "." + path; |
Cazsius/Spice-of-Life-Carrot-Edition | src/main/java/com/cazsius/solcarrot/client/gui/ItemListPage.java | // Path: src/main/java/com/cazsius/solcarrot/client/gui/elements/UIItemStack.java
// public class UIItemStack extends UIElement {
// public static final int size = 16;
//
// public ItemStack itemStack;
//
// public UIItemStack(ItemStack itemStack) {
// super(new Rectangle(size, size));
//
// this.itemStac... | import com.cazsius.solcarrot.client.gui.elements.UIItemStack;
import net.minecraft.item.ItemStack;
import java.awt.*;
import java.util.ArrayList;
import java.util.List; | package com.cazsius.solcarrot.client.gui;
final class ItemListPage extends Page {
private static final int itemsPerRow = 5;
private static final int rowsPerPage = 6;
private static final int itemsPerPage = itemsPerRow * rowsPerPage; | // Path: src/main/java/com/cazsius/solcarrot/client/gui/elements/UIItemStack.java
// public class UIItemStack extends UIElement {
// public static final int size = 16;
//
// public ItemStack itemStack;
//
// public UIItemStack(ItemStack itemStack) {
// super(new Rectangle(size, size));
//
// this.itemStac... | private static final int itemSpacing = UIItemStack.size + 4; |
Arello-Mobile/MoxySample | app/src/main/java/com/arellomobile/github/di/modules/BusModule.java | // Path: app/src/main/java/com/arellomobile/github/app/GithubApi.java
// public interface GithubApi {
// Integer PAGE_SIZE = 50;
//
// @GET("/user")
// Call<User> signIn(@Header("Authorization") String token);
//
// @GET("/search/repositories?sort=stars&order=desc")
// Call<SearchResult> search(@Query("q") Strin... | import com.arellomobile.github.app.GithubApi;
import com.squareup.otto.Bus;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides; | package com.arellomobile.github.di.modules;
/**
* Date: 20.09.2016
* Time: 20:22
*
* @author Yuri Shmakov
*/
@Module
public class BusModule {
@Provides
@Singleton | // Path: app/src/main/java/com/arellomobile/github/app/GithubApi.java
// public interface GithubApi {
// Integer PAGE_SIZE = 50;
//
// @GET("/user")
// Call<User> signIn(@Header("Authorization") String token);
//
// @GET("/search/repositories?sort=stars&order=desc")
// Call<SearchResult> search(@Query("q") Strin... | public Bus provideBus(GithubApi authApi) { |
Arello-Mobile/MoxySample | app/src/main/java/com/arellomobile/github/di/modules/ApiModule.java | // Path: app/src/main/java/com/arellomobile/github/app/GithubApi.java
// public interface GithubApi {
// Integer PAGE_SIZE = 50;
//
// @GET("/user")
// Call<User> signIn(@Header("Authorization") String token);
//
// @GET("/search/repositories?sort=stars&order=desc")
// Call<SearchResult> search(@Query("q") Strin... | import com.arellomobile.github.app.GithubApi;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
import retrofit2.Retrofit; | package com.arellomobile.github.di.modules;
/**
* Date: 9/2/2016
* Time: 18:54
*
* @author Artur Artikov
*/
@Module(includes = {RetrofitModule.class})
public class ApiModule {
@Provides
@Singleton | // Path: app/src/main/java/com/arellomobile/github/app/GithubApi.java
// public interface GithubApi {
// Integer PAGE_SIZE = 50;
//
// @GET("/user")
// Call<User> signIn(@Header("Authorization") String token);
//
// @GET("/search/repositories?sort=stars&order=desc")
// Call<SearchResult> search(@Query("q") Strin... | public GithubApi provideAuthApi(Retrofit retrofit) { |
Arello-Mobile/MoxySample | app/src/main/java/com/arellomobile/github/mvp/common/RxUtils.java | // Path: app/src/main/java/com/arellomobile/github/app/GithubError.java
// public class GithubError extends Throwable {
// public GithubError(ResponseBody responseBody) {
// super(getMessage(responseBody));
// }
//
// private static String getMessage(ResponseBody responseBody) {
// try {
// return new JSONOb... | import java.io.IOException;
import com.arellomobile.github.app.GithubError;
import retrofit2.Call;
import retrofit2.Response;
import rx.Observable;
import rx.Scheduler;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers; | package com.arellomobile.github.mvp.common;
/**
* Date: 18.01.2016
* Time: 14:37
*
* @author Yuri Shmakov
*/
public class RxUtils {
public static <T> Observable<T> wrapRetrofitCall(final Call<T> call) {
return Observable.create(subscriber ->
{
final Response<T> execute;
try {
execute = call.exec... | // Path: app/src/main/java/com/arellomobile/github/app/GithubError.java
// public class GithubError extends Throwable {
// public GithubError(ResponseBody responseBody) {
// super(getMessage(responseBody));
// }
//
// private static String getMessage(ResponseBody responseBody) {
// try {
// return new JSONOb... | subscriber.onError(new GithubError(execute.errorBody())); |
Arello-Mobile/MoxySample | app/src/main/java/com/arellomobile/github/mvp/presenters/RepositoryLikesPresenter.java | // Path: app/src/main/java/com/arellomobile/github/app/GithubApp.java
// public class GithubApp extends Application {
// private static AppComponent sAppComponent;
//
// @Override
// public void onCreate() {
// super.onCreate();
//
// sAppComponent = DaggerAppComponent.builder()
// .contextModule(new Conte... | import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import com.arellomobile.github.app.GithubApp;
import com.arellomobile.github.mvp.common.RxUtils;
import com.arellomobile.github.mvp.views.RepositoryLikesView;
import com.arellomobile.mvp.InjectViewState;
import com.arellomobile.mvp... | package com.arellomobile.github.mvp.presenters;
/**
* Date: 26.01.2016
* Time: 16:32
*
* @author Yuri Shmakov
*/
@InjectViewState
public class RepositoryLikesPresenter extends MvpPresenter<RepositoryLikesView> {
public static final String TAG = "RepositoryLikesPresenter";
@Inject
Bus mBus;
private List<... | // Path: app/src/main/java/com/arellomobile/github/app/GithubApp.java
// public class GithubApp extends Application {
// private static AppComponent sAppComponent;
//
// @Override
// public void onCreate() {
// super.onCreate();
//
// sAppComponent = DaggerAppComponent.builder()
// .contextModule(new Conte... | GithubApp.getAppComponent().inject(this); |
Arello-Mobile/MoxySample | app/src/main/java/com/arellomobile/github/mvp/presenters/RepositoryLikesPresenter.java | // Path: app/src/main/java/com/arellomobile/github/app/GithubApp.java
// public class GithubApp extends Application {
// private static AppComponent sAppComponent;
//
// @Override
// public void onCreate() {
// super.onCreate();
//
// sAppComponent = DaggerAppComponent.builder()
// .contextModule(new Conte... | import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.TimeUnit;
import com.arellomobile.github.app.GithubApp;
import com.arellomobile.github.mvp.common.RxUtils;
import com.arellomobile.github.mvp.views.RepositoryLikesView;
import com.arellomobile.mvp.InjectViewState;
import com.arellomobile.mvp... | package com.arellomobile.github.mvp.presenters;
/**
* Date: 26.01.2016
* Time: 16:32
*
* @author Yuri Shmakov
*/
@InjectViewState
public class RepositoryLikesPresenter extends MvpPresenter<RepositoryLikesView> {
public static final String TAG = "RepositoryLikesPresenter";
@Inject
Bus mBus;
private List<... | // Path: app/src/main/java/com/arellomobile/github/app/GithubApp.java
// public class GithubApp extends Application {
// private static AppComponent sAppComponent;
//
// @Override
// public void onCreate() {
// super.onCreate();
//
// sAppComponent = DaggerAppComponent.builder()
// .contextModule(new Conte... | RxUtils.wrapAsync(toggleObservable) |
Arello-Mobile/MoxySample | app/src/main/java/com/arellomobile/github/mvp/presenters/SignOutPresenter.java | // Path: app/src/main/java/com/arellomobile/github/mvp/common/AuthUtils.java
// public class AuthUtils {
// private static final String TOKEN = "token";
//
// public static String getToken() {
// return PrefUtils.getPrefs().getString(TOKEN, "");
// }
//
// public static void setToken(String token) {
// PrefUt... | import com.arellomobile.github.mvp.common.AuthUtils;
import com.arellomobile.github.mvp.views.SignOutView;
import com.arellomobile.mvp.InjectViewState;
import com.arellomobile.mvp.MvpPresenter; | package com.arellomobile.github.mvp.presenters;
/**
* Date: 18.01.2016
* Time: 16:03
*
* @author Yuri Shmakov
*/
@InjectViewState
public class SignOutPresenter extends MvpPresenter<SignOutView> {
public void signOut() { | // Path: app/src/main/java/com/arellomobile/github/mvp/common/AuthUtils.java
// public class AuthUtils {
// private static final String TOKEN = "token";
//
// public static String getToken() {
// return PrefUtils.getPrefs().getString(TOKEN, "");
// }
//
// public static void setToken(String token) {
// PrefUt... | AuthUtils.setToken(""); |
Arello-Mobile/MoxySample | app/src/main/java/com/arellomobile/github/di/modules/GithubModule.java | // Path: app/src/main/java/com/arellomobile/github/app/GithubApi.java
// public interface GithubApi {
// Integer PAGE_SIZE = 50;
//
// @GET("/user")
// Call<User> signIn(@Header("Authorization") String token);
//
// @GET("/search/repositories?sort=stars&order=desc")
// Call<SearchResult> search(@Query("q") Strin... | import com.arellomobile.github.app.GithubApi;
import com.arellomobile.github.mvp.GithubService;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides; | package com.arellomobile.github.di.modules;
/**
* Date: 8/26/2016
* Time: 11:58
*
* @author Artur Artikov
*/
@Module(includes = {ApiModule.class})
public class GithubModule {
@Provides
@Singleton | // Path: app/src/main/java/com/arellomobile/github/app/GithubApi.java
// public interface GithubApi {
// Integer PAGE_SIZE = 50;
//
// @GET("/user")
// Call<User> signIn(@Header("Authorization") String token);
//
// @GET("/search/repositories?sort=stars&order=desc")
// Call<SearchResult> search(@Query("q") Strin... | public GithubService provideGithubService(GithubApi authApi) { |
Arello-Mobile/MoxySample | app/src/main/java/com/arellomobile/github/di/modules/GithubModule.java | // Path: app/src/main/java/com/arellomobile/github/app/GithubApi.java
// public interface GithubApi {
// Integer PAGE_SIZE = 50;
//
// @GET("/user")
// Call<User> signIn(@Header("Authorization") String token);
//
// @GET("/search/repositories?sort=stars&order=desc")
// Call<SearchResult> search(@Query("q") Strin... | import com.arellomobile.github.app.GithubApi;
import com.arellomobile.github.mvp.GithubService;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides; | package com.arellomobile.github.di.modules;
/**
* Date: 8/26/2016
* Time: 11:58
*
* @author Artur Artikov
*/
@Module(includes = {ApiModule.class})
public class GithubModule {
@Provides
@Singleton | // Path: app/src/main/java/com/arellomobile/github/app/GithubApi.java
// public interface GithubApi {
// Integer PAGE_SIZE = 50;
//
// @GET("/user")
// Call<User> signIn(@Header("Authorization") String token);
//
// @GET("/search/repositories?sort=stars&order=desc")
// Call<SearchResult> search(@Query("q") Strin... | public GithubService provideGithubService(GithubApi authApi) { |
Arello-Mobile/MoxySample | app/src/main/java/com/arellomobile/github/mvp/presenters/SplashPresenter.java | // Path: app/src/main/java/com/arellomobile/github/mvp/common/AuthUtils.java
// public class AuthUtils {
// private static final String TOKEN = "token";
//
// public static String getToken() {
// return PrefUtils.getPrefs().getString(TOKEN, "");
// }
//
// public static void setToken(String token) {
// PrefUt... | import android.text.TextUtils;
import com.arellomobile.github.mvp.common.AuthUtils;
import com.arellomobile.github.mvp.views.SplashView;
import com.arellomobile.mvp.MvpPresenter;
import rx.Observable; | package com.arellomobile.github.mvp.presenters;
/**
* Date: 18.01.2016
* Time: 15:38
*
* @author Yuri Shmakov
*/
public class SplashPresenter extends MvpPresenter<SplashView> {
public void checkAuthorized() { | // Path: app/src/main/java/com/arellomobile/github/mvp/common/AuthUtils.java
// public class AuthUtils {
// private static final String TOKEN = "token";
//
// public static String getToken() {
// return PrefUtils.getPrefs().getString(TOKEN, "");
// }
//
// public static void setToken(String token) {
// PrefUt... | final Observable<String> getTokenObservable = Observable.create(subscriber -> subscriber.onNext(AuthUtils.getToken())); |
Arello-Mobile/MoxySample | app/src/main/java/com/arellomobile/github/ui/activities/SignInActivity.java | // Path: app/src/main/java/com/arellomobile/github/mvp/presenters/SignInPresenter.java
// @InjectViewState
// public class SignInPresenter extends MvpPresenter<SignInView> {
//
// @Inject
// Context mContext;
// @Inject
// GithubService mGithubService;
//
// public SignInPresenter() {
// GithubApp.getAppCompon... | import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.AutoCompleteTextView;
import android.widget.Button;
import android.widget.EditText;
import android.... | package com.arellomobile.github.ui.activities;
/**
* A login screen that offers login via email/password.
*/
public class SignInActivity extends MvpAppCompatActivity implements SignInView, DialogInterface.OnCancelListener {
@InjectPresenter | // Path: app/src/main/java/com/arellomobile/github/mvp/presenters/SignInPresenter.java
// @InjectViewState
// public class SignInPresenter extends MvpPresenter<SignInView> {
//
// @Inject
// Context mContext;
// @Inject
// GithubService mGithubService;
//
// public SignInPresenter() {
// GithubApp.getAppCompon... | SignInPresenter mSignInPresenter; |
Arello-Mobile/MoxySample | app/src/main/java/com/arellomobile/github/ui/activities/SplashActivity.java | // Path: app/src/main/java/com/arellomobile/github/mvp/presenters/SplashPresenter.java
// public class SplashPresenter extends MvpPresenter<SplashView> {
// public void checkAuthorized() {
// final Observable<String> getTokenObservable = Observable.create(subscriber -> subscriber.onNext(AuthUtils.getToken()));
//
/... | import android.content.Intent;
import android.os.Bundle;
import com.arellomobile.github.mvp.presenters.SplashPresenter;
import com.arellomobile.github.mvp.views.SplashView;
import com.arellomobile.mvp.MvpAppCompatActivity;
import com.arellomobile.mvp.presenter.InjectPresenter; | package com.arellomobile.github.ui.activities;
public class SplashActivity extends MvpAppCompatActivity implements SplashView {
@InjectPresenter | // Path: app/src/main/java/com/arellomobile/github/mvp/presenters/SplashPresenter.java
// public class SplashPresenter extends MvpPresenter<SplashView> {
// public void checkAuthorized() {
// final Observable<String> getTokenObservable = Observable.create(subscriber -> subscriber.onNext(AuthUtils.getToken()));
//
/... | SplashPresenter mSplashPresenter; |
Arello-Mobile/MoxySample | app/src/main/java/com/arellomobile/github/app/GithubApp.java | // Path: app/src/main/java/com/arellomobile/github/di/AppComponent.java
// @Singleton
// @Component(modules = {ContextModule.class, BusModule.class, GithubModule.class})
// public interface AppComponent {
// Context getContext();
// GithubService getAuthService();
// Bus getBus();
//
// void inject(SignInPresenter... | import android.app.Application;
import com.arellomobile.github.di.AppComponent;
import com.arellomobile.github.di.DaggerAppComponent;
import com.arellomobile.github.di.modules.ContextModule; | package com.arellomobile.github.app;
/**
* Date: 18.01.2016
* Time: 11:22
*
* @author Yuri Shmakov
*/
public class GithubApp extends Application {
private static AppComponent sAppComponent;
@Override
public void onCreate() {
super.onCreate();
sAppComponent = DaggerAppComponent.builder() | // Path: app/src/main/java/com/arellomobile/github/di/AppComponent.java
// @Singleton
// @Component(modules = {ContextModule.class, BusModule.class, GithubModule.class})
// public interface AppComponent {
// Context getContext();
// GithubService getAuthService();
// Bus getBus();
//
// void inject(SignInPresenter... | .contextModule(new ContextModule(this)) |
Arello-Mobile/MoxySample | app/src/main/java/com/arellomobile/github/mvp/common/PrefUtils.java | // Path: app/src/main/java/com/arellomobile/github/app/GithubApp.java
// public class GithubApp extends Application {
// private static AppComponent sAppComponent;
//
// @Override
// public void onCreate() {
// super.onCreate();
//
// sAppComponent = DaggerAppComponent.builder()
// .contextModule(new Conte... | import android.content.Context;
import android.content.SharedPreferences;
import com.arellomobile.github.app.GithubApp; | package com.arellomobile.github.mvp.common;
/**
* Date: 18.01.2016
* Time: 15:01
*
* @author Yuri Shmakov
*/
public class PrefUtils {
private static final String PREF_NAME = "github";
public static SharedPreferences getPrefs() { | // Path: app/src/main/java/com/arellomobile/github/app/GithubApp.java
// public class GithubApp extends Application {
// private static AppComponent sAppComponent;
//
// @Override
// public void onCreate() {
// super.onCreate();
//
// sAppComponent = DaggerAppComponent.builder()
// .contextModule(new Conte... | return GithubApp.getAppComponent().getContext().getSharedPreferences(PREF_NAME, Context.MODE_PRIVATE); |
operator1/op1 | op1/src/main/java/com/op1/aiff/InstrumentChunk.java | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | import com.op1.iff.Chunk;
import com.op1.iff.IffReader;
import com.op1.iff.types.*;
import com.op1.util.Check;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException; | ", beginLoop=" + beginLoop +
", endLoop=" + endLoop +
'}';
}
}
@Override
public int getPhysicalSize() {
return chunkId.getSize()
+ chunkSize.getSize()
+ baseNote.getSize()
+ detune.ge... | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | Check.notNull(instance.chunkSize, "Missing chunkSize"); |
operator1/op1 | op1/src/main/java/com/op1/aiff/InstrumentChunk.java | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | import com.op1.iff.Chunk;
import com.op1.iff.IffReader;
import com.op1.iff.types.*;
import com.op1.util.Check;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException; | instance.highNote = highNote;
return this;
}
public Builder withLowVelocity(SignedChar lowVelocity) {
instance.lowVelocity = lowVelocity;
return this;
}
public Builder withHighVelocity(SignedChar highVelocity) {
instance.highV... | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | public static InstrumentChunk readInstrumentChunk(IffReader reader) throws IOException { |
operator1/op1 | op1/src/main/java/com/op1/iff/types/DataType.java | // Path: op1/src/main/java/com/op1/util/Check.java
// public class Check {
//
// public static <T> T notNull(T t, String message) {
// if (t == null) {
// throw new IllegalArgumentException(message);
// }
// return t;
// }
//
// public static void that(boolean b, String... | import com.op1.util.Check;
import java.util.Arrays; | package com.op1.iff.types;
public abstract class DataType {
protected final byte[] bytes;
public DataType(byte[] bytes) {
this.bytes = Arrays.copyOf(bytes, bytes.length);
}
public DataType(byte[] bytes, int expectedNumBytes) { | // Path: op1/src/main/java/com/op1/util/Check.java
// public class Check {
//
// public static <T> T notNull(T t, String message) {
// if (t == null) {
// throw new IllegalArgumentException(message);
// }
// return t;
// }
//
// public static void that(boolean b, String... | Check.that(bytes.length == expectedNumBytes, "Unexpected number of bytes: " + bytes.length); |
operator1/op1 | op1/src/main/java/com/op1/aiff/MarkerChunk.java | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | import com.op1.iff.Chunk;
import com.op1.iff.IffReader;
import com.op1.iff.types.*;
import com.op1.util.Check;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List; | }
return size;
}
@Override
public ID getChunkID() {
return chunkId;
}
@Override
public SignedLong getChunkSize() {
return chunkSize;
}
public UnsignedShort getNumMarkers() {
return numMarkers;
}
public Marker[] getMarkers() {
r... | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | Check.notNull(markerId, "Missing markerId"); |
operator1/op1 | op1/src/main/java/com/op1/aiff/MarkerChunk.java | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | import com.op1.iff.Chunk;
import com.op1.iff.IffReader;
import com.op1.iff.types.*;
import com.op1.util.Check;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List; |
private final MarkerChunk instance;
public Builder() {
instance = new MarkerChunk();
}
public MarkerChunk build() {
Check.notNull(instance.chunkSize, "Missing chunkSize");
Check.notNull(instance.numMarkers, "Missing numMarkers");
Check.t... | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | public static MarkerChunk readMarkerChunk(IffReader iffReader) throws IOException { |
operator1/op1 | op1/src/main/java/com/op1/pack/Item.java | // Path: op1/src/main/java/com/op1/util/Check.java
// public class Check {
//
// public static <T> T notNull(T t, String message) {
// if (t == null) {
// throw new IllegalArgumentException(message);
// }
// return t;
// }
//
// public static void that(boolean b, String... | import com.op1.util.Check; | package com.op1.pack;
/**
* An immutable holder of a name and a size. Size must be non-zero and positive.
*/
public class Item {
private final String name;
private final Double size;
public Item(String name, Double size) { | // Path: op1/src/main/java/com/op1/util/Check.java
// public class Check {
//
// public static <T> T notNull(T t, String message) {
// if (t == null) {
// throw new IllegalArgumentException(message);
// }
// return t;
// }
//
// public static void that(boolean b, String... | Check.that(name != null && name.trim().length() > 0, "Must have a name"); |
operator1/op1 | op1/src/main/java/com/op1/iff/Chunk.java | // Path: op1/src/main/java/com/op1/iff/types/ID.java
// public class ID extends DataType {
//
// private final String name;
//
// public ID(byte[] bytes) {
// // TODO: ahem, validation?
// super(bytes, 4);
// this.name = new String(bytes);
// }
//
// public static ID valueOf(S... | import com.op1.iff.types.ID;
import com.op1.iff.types.SignedLong; | package com.op1.iff;
/**
* Represents a chunk in an iff.
*/
public interface Chunk {
/**
* Returns the ID of this chunk.
*/
ID getChunkID();
/**
* Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
* chunk ID and chunk siz... | // Path: op1/src/main/java/com/op1/iff/types/ID.java
// public class ID extends DataType {
//
// private final String name;
//
// public ID(byte[] bytes) {
// // TODO: ahem, validation?
// super(bytes, 4);
// this.name = new String(bytes);
// }
//
// public static ID valueOf(S... | SignedLong getChunkSize(); |
operator1/op1 | op1/src/main/java/com/op1/util/Op1Constants.java | // Path: op1/src/main/java/com/op1/aiff/FormatVersionChunk.java
// public class FormatVersionChunk implements Chunk {
//
// private final ID chunkId = ChunkType.FORMAT_VERSION.getChunkId(); // 4 bytes
// private SignedLong chunkSize; // 4 bytes
// private UnsignedLong ... | import com.op1.aiff.FormatVersionChunk;
import com.op1.iff.types.*; | package com.op1.util;
public class Op1Constants {
public static final Extended SAMPLE_RATE_44100 = new Extended(new byte[]{
64, 14, -84, 68, 0, 0, 0, 0, 0, 0
});
public static final byte[] COMMON_CHUNK_DESCRIPTION = ")Signed integer (little-endian) linear PCM".getBytes();
public static f... | // Path: op1/src/main/java/com/op1/aiff/FormatVersionChunk.java
// public class FormatVersionChunk implements Chunk {
//
// private final ID chunkId = ChunkType.FORMAT_VERSION.getChunkId(); // 4 bytes
// private SignedLong chunkSize; // 4 bytes
// private UnsignedLong ... | public static final FormatVersionChunk FORMAT_VERSION_CHUNK = new FormatVersionChunk.Builder() |
operator1/op1 | op1/src/main/java/com/op1/pack/Bin.java | // Path: op1/src/main/java/com/op1/util/Check.java
// public class Check {
//
// public static <T> T notNull(T t, String message) {
// if (t == null) {
// throw new IllegalArgumentException(message);
// }
// return t;
// }
//
// public static void that(boolean b, String... | import com.op1.util.Check;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List; | package com.op1.pack;
/**
* A Bin represents a container with a capacity. You can fill the bin with Items. You can also check whether there is
* space for an item before putting it in. A Bin can contain more items than its capacity. When this is the case, the
* isOverflowing() method returns true.
*
* This clas... | // Path: op1/src/main/java/com/op1/util/Check.java
// public class Check {
//
// public static <T> T notNull(T t, String message) {
// if (t == null) {
// throw new IllegalArgumentException(message);
// }
// return t;
// }
//
// public static void that(boolean b, String... | Check.that(capacity > 0, "Capacity must be non-zero and positive"); |
operator1/op1 | op1/src/test/java/com/op1/aiff/AiffTest.java | // Path: op1/src/main/java/com/op1/iff/types/ID.java
// public class ID extends DataType {
//
// private final String name;
//
// public ID(byte[] bytes) {
// // TODO: ahem, validation?
// super(bytes, 4);
// this.name = new String(bytes);
// }
//
// public static ID valueOf(S... | import com.op1.iff.types.ID;
import com.op1.iff.types.SignedLong;
import org.junit.Test;
import static com.op1.aiff.ChunkType.COMMON;
import static com.op1.aiff.ChunkType.SOUND_DATA;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.ass... | package com.op1.aiff;
public class AiffTest {
@Test
public void canAddMultipleApplicationChunks() throws Exception {
// given
CommonChunk commonChunk = TestChunks.commonChunkOneSampleFrame16BitMono();
SoundDataChunk soundDataChunk = TestChunks.soundDataChunkOneSampleFrame16BitMono()... | // Path: op1/src/main/java/com/op1/iff/types/ID.java
// public class ID extends DataType {
//
// private final String name;
//
// public ID(byte[] bytes) {
// // TODO: ahem, validation?
// super(bytes, 4);
// this.name = new String(bytes);
// }
//
// public static ID valueOf(S... | .withChunkId(new ID("FORM".getBytes())) |
operator1/op1 | op1/src/test/java/com/op1/aiff/AiffTest.java | // Path: op1/src/main/java/com/op1/iff/types/ID.java
// public class ID extends DataType {
//
// private final String name;
//
// public ID(byte[] bytes) {
// // TODO: ahem, validation?
// super(bytes, 4);
// this.name = new String(bytes);
// }
//
// public static ID valueOf(S... | import com.op1.iff.types.ID;
import com.op1.iff.types.SignedLong;
import org.junit.Test;
import static com.op1.aiff.ChunkType.COMMON;
import static com.op1.aiff.ChunkType.SOUND_DATA;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.ass... | package com.op1.aiff;
public class AiffTest {
@Test
public void canAddMultipleApplicationChunks() throws Exception {
// given
CommonChunk commonChunk = TestChunks.commonChunkOneSampleFrame16BitMono();
SoundDataChunk soundDataChunk = TestChunks.soundDataChunkOneSampleFrame16BitMono()... | // Path: op1/src/main/java/com/op1/iff/types/ID.java
// public class ID extends DataType {
//
// private final String name;
//
// public ID(byte[] bytes) {
// // TODO: ahem, validation?
// super(bytes, 4);
// this.name = new String(bytes);
// }
//
// public static ID valueOf(S... | .withChunkSize(SignedLong.fromInt(42)) |
operator1/op1 | op1/src/main/java/com/op1/aiff/AiffReader.java | // Path: op1/src/main/java/com/op1/iff/IffReader.java
// public class IffReader implements Closeable {
//
// private final DataInputStream dataInputStream;
//
// public IffReader(DataInputStream dataInputStream) {
// this.dataInputStream = dataInputStream;
// }
//
// public SignedChar readSig... | import com.op1.iff.IffReader;
import com.op1.iff.types.ID;
import com.op1.iff.types.SignedLong;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*; | package com.op1.aiff;
public class AiffReader implements Closeable {
private final IffReader iffReader;
private static final Logger LOGGER = LoggerFactory.getLogger(AiffReader.class);
public AiffReader(IffReader iffReader) {
this.iffReader = iffReader;
}
public static AiffReader newAi... | // Path: op1/src/main/java/com/op1/iff/IffReader.java
// public class IffReader implements Closeable {
//
// private final DataInputStream dataInputStream;
//
// public IffReader(DataInputStream dataInputStream) {
// this.dataInputStream = dataInputStream;
// }
//
// public SignedChar readSig... | final ID chunkId = iffReader.readID(); |
operator1/op1 | op1/src/main/java/com/op1/aiff/AiffReader.java | // Path: op1/src/main/java/com/op1/iff/IffReader.java
// public class IffReader implements Closeable {
//
// private final DataInputStream dataInputStream;
//
// public IffReader(DataInputStream dataInputStream) {
// this.dataInputStream = dataInputStream;
// }
//
// public SignedChar readSig... | import com.op1.iff.IffReader;
import com.op1.iff.types.ID;
import com.op1.iff.types.SignedLong;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*; | package com.op1.aiff;
public class AiffReader implements Closeable {
private final IffReader iffReader;
private static final Logger LOGGER = LoggerFactory.getLogger(AiffReader.class);
public AiffReader(IffReader iffReader) {
this.iffReader = iffReader;
}
public static AiffReader newAi... | // Path: op1/src/main/java/com/op1/iff/IffReader.java
// public class IffReader implements Closeable {
//
// private final DataInputStream dataInputStream;
//
// public IffReader(DataInputStream dataInputStream) {
// this.dataInputStream = dataInputStream;
// }
//
// public SignedChar readSig... | final SignedLong chunkSize = iffReader.readSignedLong(); |
operator1/op1 | op1/src/main/java/com/op1/aiff/CommonChunk.java | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | import com.op1.iff.Chunk;
import com.op1.iff.IffReader;
import com.op1.iff.types.*;
import com.op1.util.Check;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional; | if (!sampleSize.equals(that.sampleSize)) return false;
if (!sampleRate.equals(that.sampleRate)) return false;
if (!codec.equals(that.codec)) return false;
return description.equals(that.description);
}
@Override
public int hashCode() {
int result = chunkId.hashCode(... | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | Check.notNull(instance.chunkId, "Missing chunkId"); |
operator1/op1 | op1/src/main/java/com/op1/aiff/CommonChunk.java | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | import com.op1.iff.Chunk;
import com.op1.iff.IffReader;
import com.op1.iff.types.*;
import com.op1.util.Check;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional; | instance.sampleSize = sampleSize;
return this;
}
public Builder withSampleRate(Extended sampleRate) {
instance.sampleRate = sampleRate;
return this;
}
public Builder withCodec(ID codec) {
instance.codec = Optional.ofNullable(c... | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | public static CommonChunk readCommonChunk(IffReader reader) throws IOException { |
operator1/op1 | op1/src/main/java/com/op1/aiff/ChunkType.java | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | import com.op1.iff.Chunk;
import com.op1.iff.IffReader;
import com.op1.iff.types.ID;
import com.op1.util.Check;
import java.io.IOException; | package com.op1.aiff;
public enum ChunkType {
COMMON("COMM", new CommonChunk.CommonChunkReader()),
SOUND_DATA("SSND", new SoundDataChunk.SoundDataChunkReader()),
MARKER("MARK", new MarkerChunk.MarkerChunkReader()),
INSTRUMENT("INST", new InstrumentChunk.InstrumentChunkReader()),
APPLICATION("APP... | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | private final ID id; |
operator1/op1 | op1/src/main/java/com/op1/aiff/ChunkType.java | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | import com.op1.iff.Chunk;
import com.op1.iff.IffReader;
import com.op1.iff.types.ID;
import com.op1.util.Check;
import java.io.IOException; | this.chunkReader = chunkReader;
}
public ID getChunkId() {
return id;
}
public Chunk readChunk(IffReader reader) throws IOException {
return chunkReader.readChunk(reader);
}
public static ChunkType fromName(String name) {
for (ChunkType chunkType : ChunkType.va... | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | Check.notNull(chunk, "Chunk is null"); |
operator1/op1 | op1/src/test/java/com/op1/aiff/AiffReaderTest.java | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | import com.op1.iff.Chunk;
import com.op1.iff.types.SignedLong;
import org.junit.Test;
import java.io.File;
import java.util.List;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat; | package com.op1.aiff;
public class AiffReaderTest {
@Test
public void canReadDrumKitFile() throws Exception {
doReadFileTest(ExampleFile.DRUM_UTILITY.getFile());
}
@Test
public void canReadAlbumFile() throws Exception {
doReadFileTest(ExampleFile.ALBUM.getFile());
}
pr... | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | final List<Chunk> applicationChunks = aiff.getChunks(ChunkType.APPLICATION.getChunkId()); |
operator1/op1 | op1/src/test/java/com/op1/aiff/AiffReaderTest.java | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | import com.op1.iff.Chunk;
import com.op1.iff.types.SignedLong;
import org.junit.Test;
import java.io.File;
import java.util.List;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertThat; | package com.op1.aiff;
public class AiffReaderTest {
@Test
public void canReadDrumKitFile() throws Exception {
doReadFileTest(ExampleFile.DRUM_UTILITY.getFile());
}
@Test
public void canReadAlbumFile() throws Exception {
doReadFileTest(ExampleFile.ALBUM.getFile());
}
pr... | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | assertThat(applicationChunk.getChunkSize(), equalTo(SignedLong.fromInt(1248))); |
operator1/op1 | op1/src/main/java/com/op1/util/cmd/Args.java | // Path: op1/src/main/java/com/op1/util/Check.java
// public class Check {
//
// public static <T> T notNull(T t, String message) {
// if (t == null) {
// throw new IllegalArgumentException(message);
// }
// return t;
// }
//
// public static void that(boolean b, String... | import com.op1.util.Check; | package com.op1.util.cmd;
/**
* Represents the arguments passed in on the command line.
*/
public class Args {
private final String[] args;
private int index = 0;
public Args(String[] args) { | // Path: op1/src/main/java/com/op1/util/Check.java
// public class Check {
//
// public static <T> T notNull(T t, String message) {
// if (t == null) {
// throw new IllegalArgumentException(message);
// }
// return t;
// }
//
// public static void that(boolean b, String... | this.args = Check.notNull(args, "args cannot be null"); |
operator1/op1 | op1/src/main/java/com/op1/util/ComplianceCheck.java | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | import com.op1.aiff.*;
import com.op1.iff.Chunk;
import com.op1.iff.types.ID;
import com.op1.iff.types.SignedLong;
import java.util.ArrayList;
import java.util.List;
import static com.op1.aiff.ChunkType.APPLICATION;
import static java.lang.String.format; | package com.op1.util;
public class ComplianceCheck {
private final Aiff aiff;
private final List<String> problems;
public ComplianceCheck(Aiff aiff) {
this.aiff = Check.notNull(aiff, "aiff cannot be null");
this.problems = new ArrayList<>();
}
/**
* @deprecated please use... | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | for (List<Chunk> chunksById : aiff.getChunksMap().values()) { |
operator1/op1 | op1/src/main/java/com/op1/util/ComplianceCheck.java | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | import com.op1.aiff.*;
import com.op1.iff.Chunk;
import com.op1.iff.types.ID;
import com.op1.iff.types.SignedLong;
import java.util.ArrayList;
import java.util.List;
import static com.op1.aiff.ChunkType.APPLICATION;
import static java.lang.String.format; | private void checkComplianceOfCommonChunk() {
final CommonChunk chunk = aiff.getCommonChunk();
int physicalSizeOfDataPortion = 0;
physicalSizeOfDataPortion += chunk.getNumChannels().getSize();
physicalSizeOfDataPortion += chunk.getNumSampleFrames().getSize();
physicalSizeO... | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | check(chunk.getChunkSize().equals(SignedLong.fromInt(expectedChunkSize)), message); |
operator1/op1 | op1/src/main/java/com/op1/util/ComplianceCheck.java | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | import com.op1.aiff.*;
import com.op1.iff.Chunk;
import com.op1.iff.types.ID;
import com.op1.iff.types.SignedLong;
import java.util.ArrayList;
import java.util.List;
import static com.op1.aiff.ChunkType.APPLICATION;
import static java.lang.String.format; | if (codecAndDescriptionArePresent(chunk.getCodec(), chunk.getDescription())) {
physicalSizeOfDataPortion += chunk.getCodec().getSize();
physicalSizeOfDataPortion += chunk.getDescription().length;
}
int expectedChunkSize = physicalSizeOfDataPortion % 2 == 0 ? physicalSize... | // Path: op1/src/main/java/com/op1/iff/Chunk.java
// public interface Chunk {
//
// /**
// * Returns the ID of this chunk.
// */
// ID getChunkID();
//
// /**
// * Returns the size in bytes of the data portion of the chunk. The count does not include the 8 bytes used by the
// * chunk ... | private boolean codecAndDescriptionArePresent(ID codec, byte[] description) { |
nextgis/android_maplib | src/main/java/com/nextgis/maplib/util/AccountUtil.java | // Path: src/main/java/com/nextgis/maplib/api/IGISApplication.java
// public interface IGISApplication
// {
// /**
// * @return A MapBase or any inherited classes or null if not created in application
// */
// MapBase getMap();
//
// /**
// * @return A authority for sync purposes or empty st... | import android.accounts.Account;
import android.annotation.TargetApi;
import android.content.ContentResolver;
import android.content.Context;
import android.content.SyncInfo;
import android.os.Build;
import android.util.Base64;
import com.nextgis.maplib.api.IGISApplication;
import org.json.JSONException;
import org.jso... | "06z5a0sd3NDbS++GMCJstcKxkzk5KLQljAJ85Jciiuy2vv14WU621ves8S9cMISO\n" + "HwIDAQAB";
byte[] keyBytes = Base64.decode(key.getBytes("UTF-8"), Base64.DEFAULT);
X509EncodedKeySpec spec = new X509EncodedKeySpec(keyBytes);
PublicKey publicKey = keyFactory.generatePublic(s... | // Path: src/main/java/com/nextgis/maplib/api/IGISApplication.java
// public interface IGISApplication
// {
// /**
// * @return A MapBase or any inherited classes or null if not created in application
// */
// MapBase getMap();
//
// /**
// * @return A authority for sync purposes or empty st... | IGISApplication app = (IGISApplication) context.getApplicationContext(); |
nextgis/android_maplib | src/main/java/com/nextgis/maplib/display/RuleFeatureRenderer.java | // Path: src/main/java/com/nextgis/maplib/api/IJSONStore.java
// public interface IJSONStore
// {
// /**
// * Store object in json
// * @return json object with stored data
// * @throws JSONException
// */
// JSONObject toJSON()
// throws JSONException;
//
// /**
// * R... | import static com.nextgis.maplib.util.Constants.JSON_STYLE_RULE_KEY;
import com.nextgis.maplib.api.IJSONStore;
import com.nextgis.maplib.api.IStyleRule;
import com.nextgis.maplib.map.Layer;
import org.json.JSONException;
import org.json.JSONObject;
import static com.nextgis.maplib.util.Constants.JSON_NAME_KEY; | Style styleClone = mStyle.clone();
mStyleRule.setStyleParams(styleClone, featureId);
applyField(styleClone, featureId);
return styleClone;
} catch (CloneNotSupportedException e) {
e.printStackTrace();
return super.getStyle(featureId);
... | // Path: src/main/java/com/nextgis/maplib/api/IJSONStore.java
// public interface IJSONStore
// {
// /**
// * Store object in json
// * @return json object with stored data
// * @throws JSONException
// */
// JSONObject toJSON()
// throws JSONException;
//
// /**
// * R... | if (mStyleRule instanceof IJSONStore) |
nextgis/android_maplib | src/main/java/com/nextgis/maplib/datasource/Geo.java | // Path: src/main/java/com/nextgis/maplib/util/GeoConstants.java
// public interface GeoConstants
// {
//
// /**
// * Mercator projection constants
// */
// double MERCATOR_MAX = 20037508.34;
// double WGS_LONG_MAX = 180;
// double WGS_LAT_MAX = 90;
//
// /**
// * TMS type
// ... | import com.nextgis.maplib.util.GeoConstants; | retPt.mX = wgs84ToMercatorSphereX(point.mX);
retPt.mY = wgs84ToMercatorSphereY(point.mY);
return retPt;
}
public static double wgs84ToMercatorSphereX(final double x)
{
return mEarthMajorRadius * Math.toRadians(x);
}
public static double wgs84ToMercatorSphereY(fina... | // Path: src/main/java/com/nextgis/maplib/util/GeoConstants.java
// public interface GeoConstants
// {
//
// /**
// * Mercator projection constants
// */
// double MERCATOR_MAX = 20037508.34;
// double WGS_LONG_MAX = 180;
// double WGS_LAT_MAX = 90;
//
// /**
// * TMS type
// ... | (type1 <= GeoConstants.GTMultiPolygon && type2 <= GeoConstants.GTMultiPolygon && |
nextgis/android_maplib | src/main/java/com/nextgis/maplib/api/IStyleRule.java | // Path: src/main/java/com/nextgis/maplib/display/Style.java
// public abstract class Style implements IJSONStore, Cloneable {
// protected float mWidth;
// protected int mColor;
// protected int mOutColor;
// protected int mOuterAlpha = 255;
// protected int mInnerAlpha = 255;
//
// public Sty... | import com.nextgis.maplib.display.Style; | /*
* Project: NextGIS Mobile
* Purpose: Mobile GIS for Android.
* Author: Dmitry Baryshnikov (aka Bishop), bishop.dev@gmail.com
* Author: NikitaFeodonit, nfeodonit@yandex.com
* Author: Stanislav Petriakov, becomeglory@gmail.com
* ****************************************************************************... | // Path: src/main/java/com/nextgis/maplib/display/Style.java
// public abstract class Style implements IJSONStore, Cloneable {
// protected float mWidth;
// protected int mColor;
// protected int mOutColor;
// protected int mOuterAlpha = 255;
// protected int mInnerAlpha = 255;
//
// public Sty... | Style style, |
nextgis/android_maplib | src/main/java/com/nextgis/maplib/datasource/GeoPoint.java | // Path: src/main/java/com/nextgis/maplib/util/GeoConstants.java
// public interface GeoConstants
// {
//
// /**
// * Mercator projection constants
// */
// double MERCATOR_MAX = 20037508.34;
// double WGS_LONG_MAX = 180;
// double WGS_LAT_MAX = 90;
//
// /**
// * TMS type
// ... | import java.io.DataOutputStream;
import java.io.IOException;
import java.util.Locale;
import static com.nextgis.maplib.util.GeoConstants.CRS_WEB_MERCATOR;
import static com.nextgis.maplib.util.GeoConstants.CRS_WGS84;
import static com.nextgis.maplib.util.GeoConstants.GTPoint;
import static com.nextgis.maplib.util.GeoCo... | Geo.mercatorToWgs84Sphere(this);
return super.rawProject(toCrs);
default:
return false;
}
}
@Override
public GeoEnvelope getEnvelope()
{
return new GeoEnvelope(mX, mX, mY, mY);
}
@Override
public JSONArray coordi... | // Path: src/main/java/com/nextgis/maplib/util/GeoConstants.java
// public interface GeoConstants
// {
//
// /**
// * Mercator projection constants
// */
// double MERCATOR_MAX = 20037508.34;
// double WGS_LONG_MAX = 180;
// double WGS_LAT_MAX = 90;
//
// /**
// * TMS type
// ... | return GeoConstants.GTPoint; |
nextgis/android_maplib | src/main/java/com/nextgis/maplib/datasource/GeometryPlainList.java | // Path: src/main/java/com/nextgis/maplib/api/IGeometryCache.java
// public interface IGeometryCache {
//
// /**
// * Check if item with specified id is exist in cache
// * @param featureId Feature id
// * @return true if item is exist or false
// */
// boolean isItemExist(long featureId);
... | import com.nextgis.maplib.api.IGeometryCache;
import com.nextgis.maplib.api.IGeometryCacheItem;
import java.io.File;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List; | /*
* Project: Forest violations
* Purpose: Mobile application for registering facts of the forest violations.
* Author: Dmitry Baryshnikov (aka Bishop), bishop.dev@gmail.com
* *****************************************************************************
* Copyright (c) 2015-2015. NextGIS, info@nextgis.com
*
* T... | // Path: src/main/java/com/nextgis/maplib/api/IGeometryCache.java
// public interface IGeometryCache {
//
// /**
// * Check if item with specified id is exist in cache
// * @param featureId Feature id
// * @return true if item is exist or false
// */
// boolean isItemExist(long featureId);
... | public IGeometryCacheItem addItem(long id, GeoEnvelope envelope) { |
nextgis/android_maplib | src/main/java/com/nextgis/maplib/datasource/DatabaseHelper.java | // Path: src/main/java/com/nextgis/maplib/map/MapBase.java
// public class MapBase
// extends LayerGroup
// {
// protected int mNewId;
// protected static MapBase mInstance = null;
// protected String mFileName;
// private boolean mDirty;
//
// public MapBase(
// Context context... | import com.nextgis.maplib.map.MapBase;
import com.nextgis.maplib.util.DatabaseContext;
import java.io.File;
import android.annotation.TargetApi;
import android.content.Context;
import android.database.DatabaseErrorHandler;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
i... | SQLiteDatabase.CursorFactory factory,
int version,
DatabaseErrorHandler errorHandler)
{
super(
new DatabaseContext(context, dbFullName.getParentFile()), dbFullName.getName(),
factory, version, errorHandler);
}
/**
* is called... | // Path: src/main/java/com/nextgis/maplib/map/MapBase.java
// public class MapBase
// extends LayerGroup
// {
// protected int mNewId;
// protected static MapBase mInstance = null;
// protected String mFileName;
// private boolean mDirty;
//
// public MapBase(
// Context context... | MapBase map = MapBase.getInstance(); |
nextgis/android_maplib | src/main/java/com/nextgis/maplib/datasource/GeoGeometryCollection.java | // Path: src/main/java/com/nextgis/maplib/util/GeoConstants.java
// public interface GeoConstants
// {
//
// /**
// * Mercator projection constants
// */
// double MERCATOR_MAX = 20037508.34;
// double WGS_LONG_MAX = 180;
// double WGS_LAT_MAX = 90;
//
// /**
// * TMS type
// ... | import org.json.JSONObject;
import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
import static com.nextgis.maplib.util.GeoConstants.GEOJSON_GEOMETRIES;
import static com.nextgis.maplib.util.GeoConstants.GEOJSON_TYPE;
import stat... | if (geometry == null) {
throw new IllegalArgumentException("GeoGeometryCollection: geometry == null.");
}
if(index >= mGeometries.size())
mGeometries.add(geometry);
else
mGeometries.set(index, geometry);
}
public GeoGeometry remove(int index)
... | // Path: src/main/java/com/nextgis/maplib/util/GeoConstants.java
// public interface GeoConstants
// {
//
// /**
// * Mercator projection constants
// */
// double MERCATOR_MAX = 20037508.34;
// double WGS_LONG_MAX = 180;
// double WGS_LAT_MAX = 90;
//
// /**
// * TMS type
// ... | return GeoConstants.GTGeometryCollection; |
nextgis/android_maplib | src/main/java/com/nextgis/maplib/display/Style.java | // Path: src/main/java/com/nextgis/maplib/api/IJSONStore.java
// public interface IJSONStore
// {
// /**
// * Store object in json
// * @return json object with stored data
// * @throws JSONException
// */
// JSONObject toJSON()
// throws JSONException;
//
// /**
// * R... | import static com.nextgis.maplib.util.Constants.JSON_COLOR_KEY;
import static com.nextgis.maplib.util.Constants.JSON_OUTALPHA_KEY;
import static com.nextgis.maplib.util.Constants.JSON_OUTCOLOR_KEY;
import static com.nextgis.maplib.util.Constants.JSON_WIDTH_KEY;
import com.nextgis.maplib.api.IJSONStore;
import com.nextg... | public int getColor() {
return mColor;
}
public void setColor(int color) {
mColor = color;
}
public int getOutColor() {
return mOutColor;
}
public void setOutColor(int outColor) {
mOutColor = outColor;
}
public float getWidth() {
return mWi... | // Path: src/main/java/com/nextgis/maplib/api/IJSONStore.java
// public interface IJSONStore
// {
// /**
// * Store object in json
// * @return json object with stored data
// * @throws JSONException
// */
// JSONObject toJSON()
// throws JSONException;
//
// /**
// * R... | public abstract void onDraw(GeoGeometry geoGeometry, GISDisplay display); |
nextgis/android_maplib | src/main/java/com/nextgis/maplib/datasource/GeoMultiPoint.java | // Path: src/main/java/com/nextgis/maplib/util/GeoConstants.java
// public interface GeoConstants
// {
//
// /**
// * Mercator projection constants
// */
// double MERCATOR_MAX = 20037508.34;
// double WGS_LONG_MAX = 180;
// double WGS_LAT_MAX = 90;
//
// /**
// * TMS type
// ... | import java.io.IOException;
import android.annotation.TargetApi;
import android.os.Build;
import android.util.JsonReader;
import com.nextgis.maplib.util.GeoConstants;
import org.json.JSONArray;
import org.json.JSONException; | /*
* Project: NextGIS Mobile
* Purpose: Mobile GIS for Android.
* Author: Dmitry Baryshnikov (aka Bishop), bishop.dev@gmail.com
* Author: NikitaFeodonit, nfeodonit@yandex.com
* Author: Stanislav Petriakov, becomeglory@gmail.com
* ****************************************************************************... | // Path: src/main/java/com/nextgis/maplib/util/GeoConstants.java
// public interface GeoConstants
// {
//
// /**
// * Mercator projection constants
// */
// double MERCATOR_MAX = 20037508.34;
// double WGS_LONG_MAX = 180;
// double WGS_LAT_MAX = 90;
//
// /**
// * TMS type
// ... | return GeoConstants.GTMultiPoint; |
nextgis/android_maplib | src/main/java/com/nextgis/maplib/display/Renderer.java | // Path: src/main/java/com/nextgis/maplib/api/IJSONStore.java
// public interface IJSONStore
// {
// /**
// * Store object in json
// * @return json object with stored data
// * @throws JSONException
// */
// JSONObject toJSON()
// throws JSONException;
//
// /**
// * R... | import com.nextgis.maplib.api.IJSONStore;
import com.nextgis.maplib.api.ILayer;
import com.nextgis.maplib.api.IRenderer;
import java.lang.ref.WeakReference; | /*
* Project: NextGIS Mobile
* Purpose: Mobile GIS for Android.
* Author: Dmitry Baryshnikov (aka Bishop), bishop.dev@gmail.com
* Author: NikitaFeodonit, nfeodonit@yandex.com
* Author: Stanislav Petriakov, becomeglory@gmail.com
* ****************************************************************************... | // Path: src/main/java/com/nextgis/maplib/api/IJSONStore.java
// public interface IJSONStore
// {
// /**
// * Store object in json
// * @return json object with stored data
// * @throws JSONException
// */
// JSONObject toJSON()
// throws JSONException;
//
// /**
// * R... | IRenderer |
nextgis/android_maplib | src/main/java/com/nextgis/maplib/display/Renderer.java | // Path: src/main/java/com/nextgis/maplib/api/IJSONStore.java
// public interface IJSONStore
// {
// /**
// * Store object in json
// * @return json object with stored data
// * @throws JSONException
// */
// JSONObject toJSON()
// throws JSONException;
//
// /**
// * R... | import com.nextgis.maplib.api.IJSONStore;
import com.nextgis.maplib.api.ILayer;
import com.nextgis.maplib.api.IRenderer;
import java.lang.ref.WeakReference; | /*
* Project: NextGIS Mobile
* Purpose: Mobile GIS for Android.
* Author: Dmitry Baryshnikov (aka Bishop), bishop.dev@gmail.com
* Author: NikitaFeodonit, nfeodonit@yandex.com
* Author: Stanislav Petriakov, becomeglory@gmail.com
* ****************************************************************************... | // Path: src/main/java/com/nextgis/maplib/api/IJSONStore.java
// public interface IJSONStore
// {
// /**
// * Store object in json
// * @return json object with stored data
// * @throws JSONException
// */
// JSONObject toJSON()
// throws JSONException;
//
// /**
// * R... | protected final WeakReference<ILayer> mLayerRef; |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/ConfigFileJoL.java | // Path: Journey of Legends/aginsun/journey/universal/blocks/InitBlocks.java
// public class InitBlocks
// {
// public static Block BlockSell;
// public static Block BlockKingdom;
// public static Block BlockReader;
//
// public static int BlockSellID;
// public static int BlockKingdomID;
//
// public static... | import net.minecraftforge.common.Configuration;
import aginsun.journey.universal.blocks.InitBlocks;
import aginsun.journey.universal.items.InitItems;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; | package aginsun.journey.universal;
public class ConfigFileJoL
{
public static boolean GuildSpawning;
public static int xLocation;
public static int yLocation;
public static int zLocation;
public static void config(FMLPreInitializationEvent event)
{
Configuration config = new Configuration(event.getSuggeste... | // Path: Journey of Legends/aginsun/journey/universal/blocks/InitBlocks.java
// public class InitBlocks
// {
// public static Block BlockSell;
// public static Block BlockKingdom;
// public static Block BlockReader;
//
// public static int BlockSellID;
// public static int BlockKingdomID;
//
// public static... | InitBlocks.BlockSellID = config.getBlock("SellBlock", 1750).getInt(); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/ConfigFileJoL.java | // Path: Journey of Legends/aginsun/journey/universal/blocks/InitBlocks.java
// public class InitBlocks
// {
// public static Block BlockSell;
// public static Block BlockKingdom;
// public static Block BlockReader;
//
// public static int BlockSellID;
// public static int BlockKingdomID;
//
// public static... | import net.minecraftforge.common.Configuration;
import aginsun.journey.universal.blocks.InitBlocks;
import aginsun.journey.universal.items.InitItems;
import cpw.mods.fml.common.event.FMLPreInitializationEvent; | package aginsun.journey.universal;
public class ConfigFileJoL
{
public static boolean GuildSpawning;
public static int xLocation;
public static int yLocation;
public static int zLocation;
public static void config(FMLPreInitializationEvent event)
{
Configuration config = new Configuration(event.getSuggeste... | // Path: Journey of Legends/aginsun/journey/universal/blocks/InitBlocks.java
// public class InitBlocks
// {
// public static Block BlockSell;
// public static Block BlockKingdom;
// public static Block BlockReader;
//
// public static int BlockSellID;
// public static int BlockKingdomID;
//
// public static... | InitItems.ItemCoinsID = config.getItem("Coins", 22125).getInt(); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/packets/PacketGold.java | // Path: Journey of Legends/aginsun/journey/server/api/GoldKeeper.java
// public class GoldKeeper
// {
// private static HashMap<String, Integer> GoldValues = new HashMap<String, Integer>();
//
// public static int getGoldTotal(EntityPlayer player)
// {
// if(!GoldValues.containsKey(player.username))
// {
// ... | import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import aginsun.journey.server.api.GoldKeeper;
import cpw.mods.fml.common.network.Player; | package aginsun.journey.universal.packets;
public class PacketGold extends PacketJoL
{
private String username;
private int GoldValue;
public PacketGold()
{
super(PacketType.GOLD, false);
}
public PacketGold(String username, int GoldValue)
{
super(PacketType.GOLD, false);
this.username = username;
... | // Path: Journey of Legends/aginsun/journey/server/api/GoldKeeper.java
// public class GoldKeeper
// {
// private static HashMap<String, Integer> GoldValues = new HashMap<String, Integer>();
//
// public static int getGoldTotal(EntityPlayer player)
// {
// if(!GoldValues.containsKey(player.username))
// {
// ... | GoldKeeper.setGold(thePlayer, GoldValue); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/handlers/GoldValueHandler.java | // Path: Journey of Legends/aginsun/journey/JourneyofLegends.java
// @Mod(modid = Utils.modID, version = Utils.Version, name = Utils.Name)
// @NetworkMod(channels = { Utils.modID },clientSideRequired = true, serverSideRequired = true, packetHandler = PacketHandler.class)
// public class JourneyofLegends
// {
// @Inst... | import java.io.BufferedReader;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.HashMap;
import aginsun.journey.JourneyofLegends; | package aginsun.journey.universal.handlers;
/**sets all the gold values for the vanilla items
* and also any mod items that I want to be added.
*
* note: Evydder did the old system!
* @author Aginsun, Evydder
*
*/
public class GoldValueHandler
{
public static HashMap<String, Integer> goldValues = new Has... | // Path: Journey of Legends/aginsun/journey/JourneyofLegends.java
// @Mod(modid = Utils.modID, version = Utils.Version, name = Utils.Name)
// @NetworkMod(channels = { Utils.modID },clientSideRequired = true, serverSideRequired = true, packetHandler = PacketHandler.class)
// public class JourneyofLegends
// {
// @Inst... | InputStream input = JourneyofLegends.class.getResourceAsStream("/assets/journeyoflegends/textures/utils/GoldValues.txt"); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/packets/PacketQuestData.java | // Path: Journey of Legends/aginsun/journey/server/api/QuestHandler.java
// public class QuestHandler
// {
// private HashMap<String, NBTTagCompound> questList = new HashMap<String, NBTTagCompound>();
// private HashMap<String, HashMap<String, Integer>> questProgress = new HashMap<String, HashMap<String, Integer>>();... | import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import aginsun.journey.server.api.QuestHandler;
import cpw.mods.fml.common.network.Player; | {
super(PacketType.QUESTDATA, false);
}
public PacketQuestData(String username, String questName, int questStatus)
{
super(PacketType.QUESTDATA, false);
this.username = username;
this.questName = questName;
this.questStatus = questStatus;
}
public void readData(DataInputStream data) throws IOExcepti... | // Path: Journey of Legends/aginsun/journey/server/api/QuestHandler.java
// public class QuestHandler
// {
// private HashMap<String, NBTTagCompound> questList = new HashMap<String, NBTTagCompound>();
// private HashMap<String, HashMap<String, Integer>> questProgress = new HashMap<String, HashMap<String, Integer>>();... | QuestHandler.instance().setQuestStatus(thePlayer, questName, questStatus); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/handlers/EntityLivingHandler.java | // Path: Journey of Legends/aginsun/journey/universal/utils/ItemDropHelper.java
// public class ItemDropHelper
// {
// public static World world = FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(0);
// public static boolean isHostileEntity(EntityLivingBase entity)
// {
// ... | import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import aginsun.journey.universal.utils.ItemDropHelper; | package aginsun.journey.universal.handlers;
public class EntityLivingHandler
{
@ForgeSubscribe
public void onEntityLivingDeath(LivingDeathEvent event)
{
if (event.source.getDamageType().equals("player"))
{ | // Path: Journey of Legends/aginsun/journey/universal/utils/ItemDropHelper.java
// public class ItemDropHelper
// {
// public static World world = FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(0);
// public static boolean isHostileEntity(EntityLivingBase entity)
// {
// ... | ItemDropHelper.dropCoins(event.entityLiving); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/handlers/PacketHandler.java | // Path: Journey of Legends/aginsun/journey/universal/packets/PacketJoL.java
// public abstract class PacketJoL
// {
// public PacketType packetType;
// public boolean isChunkDataPacket;
//
// public PacketJoL(PacketType packetType, boolean isChunkDataPacket)
// {
// this.packetType = packetType;
// this.isC... | import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import aginsun.journey.universal.packets.PacketJoL;
import aginsun.journey.universal.packets.PacketType;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player; | package aginsun.journey.universal.handlers;
public class PacketHandler implements IPacketHandler
{
@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player)
{ | // Path: Journey of Legends/aginsun/journey/universal/packets/PacketJoL.java
// public abstract class PacketJoL
// {
// public PacketType packetType;
// public boolean isChunkDataPacket;
//
// public PacketJoL(PacketType packetType, boolean isChunkDataPacket)
// {
// this.packetType = packetType;
// this.isC... | PacketJoL packetToK = PacketType.buildPacket(packet.data); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/handlers/PacketHandler.java | // Path: Journey of Legends/aginsun/journey/universal/packets/PacketJoL.java
// public abstract class PacketJoL
// {
// public PacketType packetType;
// public boolean isChunkDataPacket;
//
// public PacketJoL(PacketType packetType, boolean isChunkDataPacket)
// {
// this.packetType = packetType;
// this.isC... | import net.minecraft.network.INetworkManager;
import net.minecraft.network.packet.Packet250CustomPayload;
import aginsun.journey.universal.packets.PacketJoL;
import aginsun.journey.universal.packets.PacketType;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player; | package aginsun.journey.universal.handlers;
public class PacketHandler implements IPacketHandler
{
@Override
public void onPacketData(INetworkManager manager, Packet250CustomPayload packet, Player player)
{ | // Path: Journey of Legends/aginsun/journey/universal/packets/PacketJoL.java
// public abstract class PacketJoL
// {
// public PacketType packetType;
// public boolean isChunkDataPacket;
//
// public PacketJoL(PacketType packetType, boolean isChunkDataPacket)
// {
// this.packetType = packetType;
// this.isC... | PacketJoL packetToK = PacketType.buildPacket(packet.data); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/packets/PacketType.java | // Path: Journey of Legends/aginsun/journey/universal/utils/Utils.java
// public final class Utils
// {
// public static final String modID = "journeyoflegends";
// public static final String Version = "0.0.2A";
// public static final String Name = "Journey of Legends: The Start";
// }
| import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import net.minecraft.network.packet.Packet;
import net.minecraft.network.packet.Packet250CustomPayload;
import aginsun.journey.universal.utils.Utils; | packet = values()[selector].clazz.newInstance();
}
catch (Exception e) {
e.printStackTrace(System.err);
}
packet.readPopulate(dis);
return packet;
}
public static PacketJoL buildPacket(PacketType type) {
PacketJoL packet = null;
... | // Path: Journey of Legends/aginsun/journey/universal/utils/Utils.java
// public final class Utils
// {
// public static final String modID = "journeyoflegends";
// public static final String Version = "0.0.2A";
// public static final String Name = "Journey of Legends: The Start";
// }
// Path: Journey of Legend... | packet250.channel = Utils.modID; |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/items/ItemRedClaw.java | // Path: Journey of Legends/aginsun/journey/universal/entities/EntityShuricken.java
// public class EntityShuricken extends EntityThrowable
// {
// public EntityShuricken(World par1World)
// {
// super(par1World);
// }
//
// public EntityShuricken(World par1World, EntityLivingBase par2EntityLi... | import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import aginsun.journey.universal.entities.EntityShuricken; | package aginsun.journey.universal.items;
public class ItemRedClaw extends ItemClaw
{
public ItemRedClaw(int par1)
{
super(par1);
this.maxStackSize = 1;
this.setMaxDamage(-1);
this.setCreativeTab(CreativeTabs.tabCombat);
}
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, Ent... | // Path: Journey of Legends/aginsun/journey/universal/entities/EntityShuricken.java
// public class EntityShuricken extends EntityThrowable
// {
// public EntityShuricken(World par1World)
// {
// super(par1World);
// }
//
// public EntityShuricken(World par1World, EntityLivingBase par2EntityLi... | par2World.spawnEntityInWorld(new EntityShuricken(par2World, par3EntityPlayer)); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/utils/ItemDropHelper.java | // Path: Journey of Legends/aginsun/journey/universal/items/InitItems.java
// public class InitItems
// {
// public static String ModID = Utils.modID;
//
// public static Item ItemCoins;
// public static int ItemCoinsID;
//
// public static Item ItemExcalibur;
// public static int ItemExcaliburID;
//
// pu... | import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.monster.EntitySlime;
import net.minecraft.entity.monster.IMob;
import net.minecraft.world.World;
import aginsun.journey.universal.items.InitItems;
import cpw.mods.fml.common.FMLCommonHandler; | package aginsun.journey.universal.utils;
public class ItemDropHelper
{
public static World world = FMLCommonHandler.instance().getMinecraftServerInstance().worldServerForDimension(0);
public static boolean isHostileEntity(EntityLivingBase entity)
{
if ((entity instanceof IMob))
{
... | // Path: Journey of Legends/aginsun/journey/universal/items/InitItems.java
// public class InitItems
// {
// public static String ModID = Utils.modID;
//
// public static Item ItemCoins;
// public static int ItemCoinsID;
//
// public static Item ItemExcalibur;
// public static int ItemExcaliburID;
//
// pu... | entity.dropItem(InitItems.ItemCoins.itemID, 1); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/items/ItemJourneySword.java | // Path: Journey of Legends/aginsun/journey/server/api/LevelKeeper.java
// public class LevelKeeper
// {
// private static HashMap<String, Integer> LevelMap = new HashMap<String, Integer>();
// private static HashMap<String, Integer> StatPointsMap = new HashMap<String, Integer>();
//
// public static void setLeve... | import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraftforge.common.EnumHelper;
import aginsun.journey.server.api.LevelKeeper;
import aginsun.journey.server.api.RaceKeeper; | package aginsun.journey.universal.items;
public class ItemJourneySword extends ItemSword
{
private static String name;
private static int harvestLevel = 0;
private static int maxUses;
private static int efficiency = 0;
private static int damage;
private static int enchantability = 22;
private String[] classes;... | // Path: Journey of Legends/aginsun/journey/server/api/LevelKeeper.java
// public class LevelKeeper
// {
// private static HashMap<String, Integer> LevelMap = new HashMap<String, Integer>();
// private static HashMap<String, Integer> StatPointsMap = new HashMap<String, Integer>();
//
// public static void setLeve... | if(string.equals(RaceKeeper.getClass(player))) |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/items/ItemJourneySword.java | // Path: Journey of Legends/aginsun/journey/server/api/LevelKeeper.java
// public class LevelKeeper
// {
// private static HashMap<String, Integer> LevelMap = new HashMap<String, Integer>();
// private static HashMap<String, Integer> StatPointsMap = new HashMap<String, Integer>();
//
// public static void setLeve... | import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraftforge.common.EnumHelper;
import aginsun.journey.server.api.LevelKeeper;
import aginsun.journey.server.api.RaceKeeper; | package aginsun.journey.universal.items;
public class ItemJourneySword extends ItemSword
{
private static String name;
private static int harvestLevel = 0;
private static int maxUses;
private static int efficiency = 0;
private static int damage;
private static int enchantability = 22;
private String[] classes;... | // Path: Journey of Legends/aginsun/journey/server/api/LevelKeeper.java
// public class LevelKeeper
// {
// private static HashMap<String, Integer> LevelMap = new HashMap<String, Integer>();
// private static HashMap<String, Integer> StatPointsMap = new HashMap<String, Integer>();
//
// public static void setLeve... | if(level <= LevelKeeper.getLevel(player)) |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/client/guis/GuiQuestProgress.java | // Path: Journey of Legends/aginsun/journey/universal/utils/Quest.java
// public abstract class Quest
// {
// private EntityPlayer player;
//
// private int QuestNumber;
// private int index;
// private String[] StartLines;
// private String[] EndLines;
// private String[] ProgressLines;
// private String[] Qu... | import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import aginsun.journey.universal.utils.Quest; | package aginsun.journey.client.guis;
public class GuiQuestProgress extends GuiScreen
{ | // Path: Journey of Legends/aginsun/journey/universal/utils/Quest.java
// public abstract class Quest
// {
// private EntityPlayer player;
//
// private int QuestNumber;
// private int index;
// private String[] StartLines;
// private String[] EndLines;
// private String[] ProgressLines;
// private String[] Qu... | private Quest quest; |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/entities/EntityFarmerKeeper.java | // Path: Journey of Legends/aginsun/journey/server/api/GoldKeeper.java
// public class GoldKeeper
// {
// private static HashMap<String, Integer> GoldValues = new HashMap<String, Integer>();
//
// public static int getGoldTotal(EntityPlayer player)
// {
// if(!GoldValues.containsKey(player.username))
// {
// ... | import net.minecraft.entity.EntityCreature;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import aginsun.journey.server.api.GoldKeeper; | package aginsun.journey.universal.entities;
public class EntityFarmerKeeper extends EntityCreature
{
private World worldObj;
private boolean freebread;
private ItemStack defaultHeldItem; | // Path: Journey of Legends/aginsun/journey/server/api/GoldKeeper.java
// public class GoldKeeper
// {
// private static HashMap<String, Integer> GoldValues = new HashMap<String, Integer>();
//
// public static int getGoldTotal(EntityPlayer player)
// {
// if(!GoldValues.containsKey(player.username))
// {
// ... | public static GoldKeeper gold; |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/client/guis/GuiTrades.java | // Path: Journey of Legends/aginsun/journey/server/api/GoldKeeper.java
// public class GoldKeeper
// {
// private static HashMap<String, Integer> GoldValues = new HashMap<String, Integer>();
//
// public static int getGoldTotal(EntityPlayer player)
// {
// if(!GoldValues.containsKey(player.username))
// {
// ... | import java.util.ArrayList;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import aginsun.journey.server.api.GoldKeeper;
import aginsun.journey.server.handlers.TradingHan... | package aginsun.journey.client.guis;
public class GuiTrades extends GuiScreen
{
private int pages; | // Path: Journey of Legends/aginsun/journey/server/api/GoldKeeper.java
// public class GoldKeeper
// {
// private static HashMap<String, Integer> GoldValues = new HashMap<String, Integer>();
//
// public static int getGoldTotal(EntityPlayer player)
// {
// if(!GoldValues.containsKey(player.username))
// {
// ... | ArrayList<Trade> tradeList; |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/client/guis/GuiTrades.java | // Path: Journey of Legends/aginsun/journey/server/api/GoldKeeper.java
// public class GoldKeeper
// {
// private static HashMap<String, Integer> GoldValues = new HashMap<String, Integer>();
//
// public static int getGoldTotal(EntityPlayer player)
// {
// if(!GoldValues.containsKey(player.username))
// {
// ... | import java.util.ArrayList;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import aginsun.journey.server.api.GoldKeeper;
import aginsun.journey.server.handlers.TradingHan... | package aginsun.journey.client.guis;
public class GuiTrades extends GuiScreen
{
private int pages;
ArrayList<Trade> tradeList;
public GuiTrades()
{ | // Path: Journey of Legends/aginsun/journey/server/api/GoldKeeper.java
// public class GoldKeeper
// {
// private static HashMap<String, Integer> GoldValues = new HashMap<String, Integer>();
//
// public static int getGoldTotal(EntityPlayer player)
// {
// if(!GoldValues.containsKey(player.username))
// {
// ... | tradeList = TradingHandler.getInstance().getAllTrades(); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/client/guis/GuiTrades.java | // Path: Journey of Legends/aginsun/journey/server/api/GoldKeeper.java
// public class GoldKeeper
// {
// private static HashMap<String, Integer> GoldValues = new HashMap<String, Integer>();
//
// public static int getGoldTotal(EntityPlayer player)
// {
// if(!GoldValues.containsKey(player.username))
// {
// ... | import java.util.ArrayList;
import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import aginsun.journey.server.api.GoldKeeper;
import aginsun.journey.server.handlers.TradingHan... | package aginsun.journey.client.guis;
public class GuiTrades extends GuiScreen
{
private int pages;
ArrayList<Trade> tradeList;
public GuiTrades()
{
tradeList = TradingHandler.getInstance().getAllTrades();
pages = Math.round(tradeList.size() / 8);
}
public void initGui()
{
buttonList.clear();
... | // Path: Journey of Legends/aginsun/journey/server/api/GoldKeeper.java
// public class GoldKeeper
// {
// private static HashMap<String, Integer> GoldValues = new HashMap<String, Integer>();
//
// public static int getGoldTotal(EntityPlayer player)
// {
// if(!GoldValues.containsKey(player.username))
// {
// ... | if(tradeList.get(i).enumType == EnumType.BUYING) |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/items/InitItems.java | // Path: Journey of Legends/aginsun/journey/universal/utils/Utils.java
// public final class Utils
// {
// public static final String modID = "journeyoflegends";
// public static final String Version = "0.0.2A";
// public static final String Name = "Journey of Legends: The Start";
// }
| import net.minecraft.item.Item;
import aginsun.journey.universal.utils.Utils;
import cpw.mods.fml.common.registry.LanguageRegistry; | package aginsun.journey.universal.items;
public class InitItems
{ | // Path: Journey of Legends/aginsun/journey/universal/utils/Utils.java
// public final class Utils
// {
// public static final String modID = "journeyoflegends";
// public static final String Version = "0.0.2A";
// public static final String Name = "Journey of Legends: The Start";
// }
// Path: Journey of Legend... | public static String ModID = Utils.modID; |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/items/ItemShuricken.java | // Path: Journey of Legends/aginsun/journey/universal/entities/EntityShuricken.java
// public class EntityShuricken extends EntityThrowable
// {
// public EntityShuricken(World par1World)
// {
// super(par1World);
// }
//
// public EntityShuricken(World par1World, EntityLivingBase par2EntityLi... | import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import aginsun.journey.universal.entities.EntityShuricken;
imp... | package aginsun.journey.universal.items;
public class ItemShuricken extends Item
{
public ItemShuricken(int par1)
{
super(par1);
this.setCreativeTab(CreativeTabs.tabCombat);
}
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
if (!pa... | // Path: Journey of Legends/aginsun/journey/universal/entities/EntityShuricken.java
// public class EntityShuricken extends EntityThrowable
// {
// public EntityShuricken(World par1World)
// {
// super(par1World);
// }
//
// public EntityShuricken(World par1World, EntityLivingBase par2EntityLi... | par2World.spawnEntityInWorld(new EntityShuricken(par2World, par3EntityPlayer)); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/packets/PacketQuestDataClient.java | // Path: Journey of Legends/aginsun/journey/server/api/QuestHandler.java
// public class QuestHandler
// {
// private HashMap<String, NBTTagCompound> questList = new HashMap<String, NBTTagCompound>();
// private HashMap<String, HashMap<String, Integer>> questProgress = new HashMap<String, HashMap<String, Integer>>();... | import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import aginsun.journey.server.api.QuestHandler;
import cpw.mods.fml.common.network.Player; | {
super(PacketType.QUESTDATACLIENT, false);
}
public PacketQuestDataClient(String username, String questName, int questStatus)
{
super(PacketType.QUESTDATACLIENT, false);
this.username = username;
this.questName = questName;
this.questStatus = questStatus;
}
public void readData(DataInputStream data... | // Path: Journey of Legends/aginsun/journey/server/api/QuestHandler.java
// public class QuestHandler
// {
// private HashMap<String, NBTTagCompound> questList = new HashMap<String, NBTTagCompound>();
// private HashMap<String, HashMap<String, Integer>> questProgress = new HashMap<String, HashMap<String, Integer>>();... | QuestHandler.instance().setQuestStatusClient(thePlayer, questName, questStatus); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/server/handlers/TradingHandler.java | // Path: Journey of Legends/aginsun/journey/universal/utils/Trade.java
// public class Trade
// {
// public Item selling, buying;
// public int gold;
// public EntityPlayer username;
// public EnumType enumType;
//
// public Trade(Item selling, Item buying, int gold, EnumType enumType, EntityPlayer username)
// ... | import java.util.ArrayList;
import java.util.HashMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import aginsun.journey.universal.utils.Trade; | package aginsun.journey.server.handlers;
public class TradingHandler
{ | // Path: Journey of Legends/aginsun/journey/universal/utils/Trade.java
// public class Trade
// {
// public Item selling, buying;
// public int gold;
// public EntityPlayer username;
// public EnumType enumType;
//
// public Trade(Item selling, Item buying, int gold, EnumType enumType, EntityPlayer username)
// ... | private HashMap<String, ArrayList<Trade>> tradeList = new HashMap<String, ArrayList<Trade>>(); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/server/handlers/PartyHandler.java | // Path: Journey of Legends/aginsun/journey/universal/utils/Party.java
// public class Party
// {
// public List playerList;
// public Color color;
// public String partyName, partyLeaderUsername;
//
// public Party(String partyName, String partyLeaderUsername, List playerList, Color color)
// {
// this.party... | import java.awt.Color;
import java.util.HashMap;
import java.util.List;
import aginsun.journey.universal.utils.Party; | package aginsun.journey.server.handlers;
public class PartyHandler
{ | // Path: Journey of Legends/aginsun/journey/universal/utils/Party.java
// public class Party
// {
// public List playerList;
// public Color color;
// public String partyName, partyLeaderUsername;
//
// public Party(String partyName, String partyLeaderUsername, List playerList, Color color)
// {
// this.party... | private HashMap<String, Party> map = new HashMap<String, Party>(); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/packets/PacketRace.java | // Path: Journey of Legends/aginsun/journey/server/api/RaceKeeper.java
// public class RaceKeeper
// {
// public static HashMap<String, String> Race = new HashMap<String, String>();
//
// public static String getClass(EntityPlayer player)
// {
// if(Race.containsKey(player.username))
// return Race.get(playe... | import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import aginsun.journey.server.api.RaceKeeper;
import cpw.mods.fml.common.network.Player;
import cpw.mods.fml.relauncher.Side;
import... | public PacketRace(String username, String race)
{
super(PacketType.RACE, false);
this.username = username;
this.race = race;
}
public void readData(DataInputStream data) throws IOException
{
this.username = data.readUTF();
this.race = data.readUTF();
}
public void writeData(DataOutputStream dos) th... | // Path: Journey of Legends/aginsun/journey/server/api/RaceKeeper.java
// public class RaceKeeper
// {
// public static HashMap<String, String> Race = new HashMap<String, String>();
//
// public static String getClass(EntityPlayer player)
// {
// if(Race.containsKey(player.username))
// return Race.get(playe... | RaceKeeper.setClass(player, race); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/quests/QuestAdventureStart.java | // Path: Journey of Legends/aginsun/journey/universal/utils/Quest.java
// public abstract class Quest
// {
// private EntityPlayer player;
//
// private int QuestNumber;
// private int index;
// private String[] StartLines;
// private String[] EndLines;
// private String[] ProgressLines;
// private String[] Qu... | import net.minecraft.item.ItemStack;
import aginsun.journey.universal.utils.Quest;
import aginsun.journey.universal.utils.QuestType; | package aginsun.journey.universal.quests;
public class QuestAdventureStart extends Quest
{
private static String[] StartLines = {""};
private static String[] EndLines = {"And so the first quest is finished, talk to me again for the second quest!"};
private static String[] ProgressLines = {""};
private static Str... | // Path: Journey of Legends/aginsun/journey/universal/utils/Quest.java
// public abstract class Quest
// {
// private EntityPlayer player;
//
// private int QuestNumber;
// private int index;
// private String[] StartLines;
// private String[] EndLines;
// private String[] ProgressLines;
// private String[] Qu... | public QuestType getQuestType() |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/packets/PacketLevel.java | // Path: Journey of Legends/aginsun/journey/server/api/LevelKeeper.java
// public class LevelKeeper
// {
// private static HashMap<String, Integer> LevelMap = new HashMap<String, Integer>();
// private static HashMap<String, Integer> StatPointsMap = new HashMap<String, Integer>();
//
// public static void setLeve... | import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import aginsun.journey.server.api.LevelKeeper;
import cpw.mods.fml.common.network.Player; |
public PacketLevel(String username, int level, int SP)
{
super(PacketType.LEVEL, false);
this.username = username;
this.level = level;
this.SP = SP;
}
@Override
public void readData(DataInputStream data) throws IOException
{
this.username = data.readUTF();
this.level = data.readInt();
this.SP = ... | // Path: Journey of Legends/aginsun/journey/server/api/LevelKeeper.java
// public class LevelKeeper
// {
// private static HashMap<String, Integer> LevelMap = new HashMap<String, Integer>();
// private static HashMap<String, Integer> StatPointsMap = new HashMap<String, Integer>();
//
// public static void setLeve... | LevelKeeper.setLevel(player, level); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/client/guis/GuiRaceSelect.java | // Path: Journey of Legends/aginsun/journey/server/api/RaceKeeper.java
// public class RaceKeeper
// {
// public static HashMap<String, String> Race = new HashMap<String, String>();
//
// public static String getClass(EntityPlayer player)
// {
// if(Race.containsKey(player.username))
// return Race.get(playe... | import net.minecraft.client.gui.GuiButton;
import net.minecraft.client.gui.GuiScreen;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
import aginsun.journey.server.api.RaceKeeper;
import cpw.mods.fml.client.FMLClientHandler; | package aginsun.journey.client.guis;
public class GuiRaceSelect extends GuiScreen
{
public EntityPlayer player;
public int buttonSelected; | // Path: Journey of Legends/aginsun/journey/server/api/RaceKeeper.java
// public class RaceKeeper
// {
// public static HashMap<String, String> Race = new HashMap<String, String>();
//
// public static String getClass(EntityPlayer player)
// {
// if(Race.containsKey(player.username))
// return Race.get(playe... | public RaceKeeper race; |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/quests/QuestFarmer.java | // Path: Journey of Legends/aginsun/journey/universal/utils/Quest.java
// public abstract class Quest
// {
// private EntityPlayer player;
//
// private int QuestNumber;
// private int index;
// private String[] StartLines;
// private String[] EndLines;
// private String[] ProgressLines;
// private String[] Qu... | import net.minecraft.item.ItemStack;
import aginsun.journey.universal.utils.Quest;
import aginsun.journey.universal.utils.QuestType; | package aginsun.journey.universal.quests;
public class QuestFarmer extends Quest
{
private static String[] StartLines = {""};
private static String[] EndLines = {};
private static String[] ProgressLines = {};
private static String[] QuestName = {};
private static int[] RewardXP = {};
private static int[] Rewar... | // Path: Journey of Legends/aginsun/journey/universal/utils/Quest.java
// public abstract class Quest
// {
// private EntityPlayer player;
//
// private int QuestNumber;
// private int index;
// private String[] StartLines;
// private String[] EndLines;
// private String[] ProgressLines;
// private String[] Qu... | public QuestType getQuestType() |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/inventory/ContainerSell.java | // Path: Journey of Legends/aginsun/journey/universal/entities/TileEntitySell.java
// public class TileEntitySell extends TileEntity implements IInventory
// {
// private ItemStack[] inventory;
// public GoldKeeper gold;
// public World world;
// public EntityPlayer player;
// public GoldValueHandler g... | import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.Container;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack;
import aginsun.journey.universal.entities.TileEntitySell; | package aginsun.journey.universal.inventory;
public class ContainerSell extends Container
{ | // Path: Journey of Legends/aginsun/journey/universal/entities/TileEntitySell.java
// public class TileEntitySell extends TileEntity implements IInventory
// {
// private ItemStack[] inventory;
// public GoldKeeper gold;
// public World world;
// public EntityPlayer player;
// public GoldValueHandler g... | protected TileEntitySell tile_entity; |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/server/api/StatKeeper.java | // Path: Journey of Legends/aginsun/journey/universal/packets/PacketStatsClient.java
// public class PacketStatsClient extends PacketJoL
// {
// private String username;
// private int strength;
// private int dexterity;
// private int intelligence;
// private int luck;
//
// public PacketStatsClient()
// {
/... | import java.util.HashMap;
import net.minecraft.entity.player.EntityPlayer;
import aginsun.journey.universal.packets.PacketStatsClient;
import aginsun.journey.universal.packets.PacketType;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player; | return 4;
}
else
{
return LuckMap.get(player.username);
}
}
public static void setStrengthPoints(EntityPlayer player, int amount)
{
StrengthMap.put(player.username, amount);
}
public static void setDexerityPoints(EntityPlayer player, int amount)
{
DexeterityMap.put(player.username, amount);
}... | // Path: Journey of Legends/aginsun/journey/universal/packets/PacketStatsClient.java
// public class PacketStatsClient extends PacketJoL
// {
// private String username;
// private int strength;
// private int dexterity;
// private int intelligence;
// private int luck;
//
// public PacketStatsClient()
// {
/... | PacketDispatcher.sendPacketToPlayer(PacketType.populatePacket(new PacketStatsClient(player.username, StatKeeper.getStrengthPoints(player), StatKeeper.getDexerityPoints(player), StatKeeper.getIntelligencePoints(player), StatKeeper.getLuckPoints(player))), (Player)player); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/server/api/StatKeeper.java | // Path: Journey of Legends/aginsun/journey/universal/packets/PacketStatsClient.java
// public class PacketStatsClient extends PacketJoL
// {
// private String username;
// private int strength;
// private int dexterity;
// private int intelligence;
// private int luck;
//
// public PacketStatsClient()
// {
/... | import java.util.HashMap;
import net.minecraft.entity.player.EntityPlayer;
import aginsun.journey.universal.packets.PacketStatsClient;
import aginsun.journey.universal.packets.PacketType;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network.Player; | return 4;
}
else
{
return LuckMap.get(player.username);
}
}
public static void setStrengthPoints(EntityPlayer player, int amount)
{
StrengthMap.put(player.username, amount);
}
public static void setDexerityPoints(EntityPlayer player, int amount)
{
DexeterityMap.put(player.username, amount);
}... | // Path: Journey of Legends/aginsun/journey/universal/packets/PacketStatsClient.java
// public class PacketStatsClient extends PacketJoL
// {
// private String username;
// private int strength;
// private int dexterity;
// private int intelligence;
// private int luck;
//
// public PacketStatsClient()
// {
/... | PacketDispatcher.sendPacketToPlayer(PacketType.populatePacket(new PacketStatsClient(player.username, StatKeeper.getStrengthPoints(player), StatKeeper.getDexerityPoints(player), StatKeeper.getIntelligencePoints(player), StatKeeper.getLuckPoints(player))), (Player)player); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/worldgen/WorldgenChests.java | // Path: Journey of Legends/aginsun/journey/universal/items/InitItems.java
// public class InitItems
// {
// public static String ModID = Utils.modID;
//
// public static Item ItemCoins;
// public static int ItemCoinsID;
//
// public static Item ItemExcalibur;
// public static int ItemExcaliburID;
//
// pu... | import net.minecraft.item.ItemStack;
import net.minecraft.util.WeightedRandomChestContent;
import net.minecraftforge.common.ChestGenHooks;
import aginsun.journey.universal.items.InitItems; | package aginsun.journey.universal.worldgen;
public class WorldgenChests
{
public static void Init()
{ | // Path: Journey of Legends/aginsun/journey/universal/items/InitItems.java
// public class InitItems
// {
// public static String ModID = Utils.modID;
//
// public static Item ItemCoins;
// public static int ItemCoinsID;
//
// public static Item ItemExcalibur;
// public static int ItemExcaliburID;
//
// pu... | WeightedRandomChestContent x = new WeightedRandomChestContent(new ItemStack(InitItems.ItemExcalibur), 50, 95, 4); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/quests/QuestGuildMaster.java | // Path: Journey of Legends/aginsun/journey/universal/utils/Quest.java
// public abstract class Quest
// {
// private EntityPlayer player;
//
// private int QuestNumber;
// private int index;
// private String[] StartLines;
// private String[] EndLines;
// private String[] ProgressLines;
// private String[] Qu... | import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import aginsun.journey.universal.utils.Quest;
import aginsun.journey.universal.utils.QuestType; | package aginsun.journey.universal.quests;
public class QuestGuildMaster extends Quest
{
private static String[] StartLines = {"Open the Stat Screen by pressing O on your keyboard.", "Go and level up!", "Go and kill 10 zombies!", "Go and reach level 10!"};
private static String[] EndLines = {"Very well, now you are ... | // Path: Journey of Legends/aginsun/journey/universal/utils/Quest.java
// public abstract class Quest
// {
// private EntityPlayer player;
//
// private int QuestNumber;
// private int index;
// private String[] StartLines;
// private String[] EndLines;
// private String[] ProgressLines;
// private String[] Qu... | private static QuestType[] questType = {QuestType.STUFF, QuestType.STUFF, QuestType.HUNTING, QuestType.STUFF}; |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/client/handlers/KeyBindingHandler.java | // Path: Journey of Legends/aginsun/journey/client/guis/GuiStats.java
// public class GuiStats extends GuiScreen
// {
// private StatKeeper stats;
// private EntityPlayer player = FMLClientHandler.instance().getClient().thePlayer;
// private LevelKeeper level;
//
// public void initGui()
// {
// buttonLi... | import java.util.EnumSet;
import net.minecraft.client.settings.KeyBinding;
import org.lwjgl.input.Keyboard;
import aginsun.journey.client.guis.GuiStats;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.KeyBindingRegistry.KeyHandler;
import cpw.mods.fml.common.FMLCommonHandler;
import cpw... | package aginsun.journey.client.handlers;
public class KeyBindingHandler extends KeyHandler
{
public static KeyBinding StatsScreen = new KeyBinding("Tale of Kingdoms 2 StatScreen", Keyboard.KEY_O);
public static KeyBinding[] arrayOfKeys = new KeyBinding[] {StatsScreen};
public static boolean[] areRepeating = ne... | // Path: Journey of Legends/aginsun/journey/client/guis/GuiStats.java
// public class GuiStats extends GuiScreen
// {
// private StatKeeper stats;
// private EntityPlayer player = FMLClientHandler.instance().getClient().thePlayer;
// private LevelKeeper level;
//
// public void initGui()
// {
// buttonLi... | FMLCommonHandler.instance().showGuiScreen(new GuiStats()); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/packets/PacketStatsClient.java | // Path: Journey of Legends/aginsun/journey/server/api/StatKeeper.java
// public class StatKeeper
// {
// public static HashMap<String, Integer> StrengthMap = new HashMap<String, Integer>();
// public static HashMap<String, Integer> DexeterityMap = new HashMap<String, Integer>();
// public static HashMap<String, In... | import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import aginsun.journey.server.api.StatKeeper;
import cpw.mods.fml.common.network.Player; | this.username = username;
this.strength = strength;
this.dexterity = dexterity;
this.intelligence = intelligence;
this.luck = luck;
}
@Override
public void readData(DataInputStream data) throws IOException
{
this.username = data.readUTF();
this.strength = data.readInt();
this.dexterity = data.read... | // Path: Journey of Legends/aginsun/journey/server/api/StatKeeper.java
// public class StatKeeper
// {
// public static HashMap<String, Integer> StrengthMap = new HashMap<String, Integer>();
// public static HashMap<String, Integer> DexeterityMap = new HashMap<String, Integer>();
// public static HashMap<String, In... | StatKeeper.setStrengthPoints(player, strength); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/server/api/QuestHandler.java | // Path: Journey of Legends/aginsun/journey/universal/packets/PacketQuestDataClient.java
// public class PacketQuestDataClient extends PacketJoL
// {
// private String username;
// private String questName;
// private int questStatus;
//
// public PacketQuestDataClient()
// {
// super(PacketType.QUESTDATACLIE... | import java.util.HashMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import aginsun.journey.universal.packets.PacketQuestDataClient;
import aginsun.journey.universal.packets.PacketType;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network... | package aginsun.journey.server.api;
/**
* WIP: QuestHandler: 1 == QuestStarted, 2 == QuestFinished, 3 == QuestFinished + reward!
* @author Aginsun
*/
public class QuestHandler
{
private HashMap<String, NBTTagCompound> questList = new HashMap<String, NBTTagCompound>();
private HashMap<String, HashMap<String, Int... | // Path: Journey of Legends/aginsun/journey/universal/packets/PacketQuestDataClient.java
// public class PacketQuestDataClient extends PacketJoL
// {
// private String username;
// private String questName;
// private int questStatus;
//
// public PacketQuestDataClient()
// {
// super(PacketType.QUESTDATACLIE... | PacketDispatcher.sendPacketToPlayer(PacketType.populatePacket(new PacketQuestDataClient(player.username, questName, questStatus)), (Player)player); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/server/api/QuestHandler.java | // Path: Journey of Legends/aginsun/journey/universal/packets/PacketQuestDataClient.java
// public class PacketQuestDataClient extends PacketJoL
// {
// private String username;
// private String questName;
// private int questStatus;
//
// public PacketQuestDataClient()
// {
// super(PacketType.QUESTDATACLIE... | import java.util.HashMap;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import aginsun.journey.universal.packets.PacketQuestDataClient;
import aginsun.journey.universal.packets.PacketType;
import cpw.mods.fml.common.network.PacketDispatcher;
import cpw.mods.fml.common.network... | package aginsun.journey.server.api;
/**
* WIP: QuestHandler: 1 == QuestStarted, 2 == QuestFinished, 3 == QuestFinished + reward!
* @author Aginsun
*/
public class QuestHandler
{
private HashMap<String, NBTTagCompound> questList = new HashMap<String, NBTTagCompound>();
private HashMap<String, HashMap<String, Int... | // Path: Journey of Legends/aginsun/journey/universal/packets/PacketQuestDataClient.java
// public class PacketQuestDataClient extends PacketJoL
// {
// private String username;
// private String questName;
// private int questStatus;
//
// public PacketQuestDataClient()
// {
// super(PacketType.QUESTDATACLIE... | PacketDispatcher.sendPacketToPlayer(PacketType.populatePacket(new PacketQuestDataClient(player.username, questName, questStatus)), (Player)player); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/handlers/LivingDeathEventHandler.java | // Path: Journey of Legends/aginsun/journey/server/api/QuestHandler.java
// public class QuestHandler
// {
// private HashMap<String, NBTTagCompound> questList = new HashMap<String, NBTTagCompound>();
// private HashMap<String, HashMap<String, Integer>> questProgress = new HashMap<String, HashMap<String, Integer>>();... | import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.event.ForgeSubscribe;
import net.minecraftforge.event.entity.living.LivingDeathEvent;
import aginsun.journey.server.api.QuestHandler; | package aginsun.journey.universal.handlers;
public class LivingDeathEventHandler
{
@ForgeSubscribe
public void onLivingDeath(LivingDeathEvent event)
{
if(event.source.getDamageType().equals("player")){
EntityPlayer player = (EntityPlayer)event.source.getSourceOfDamage();
if(event.entityLiving instanceof En... | // Path: Journey of Legends/aginsun/journey/server/api/QuestHandler.java
// public class QuestHandler
// {
// private HashMap<String, NBTTagCompound> questList = new HashMap<String, NBTTagCompound>();
// private HashMap<String, HashMap<String, Integer>> questProgress = new HashMap<String, HashMap<String, Integer>>();... | if(QuestHandler.instance().isQuestActive(player, "Hunting")) |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/entities/InitEntities.java | // Path: Journey of Legends/aginsun/journey/JourneyofLegends.java
// @Mod(modid = Utils.modID, version = Utils.Version, name = Utils.Name)
// @NetworkMod(channels = { Utils.modID },clientSideRequired = true, serverSideRequired = true, packetHandler = PacketHandler.class)
// public class JourneyofLegends
// {
// @Inst... | import aginsun.journey.JourneyofLegends;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry; | package aginsun.journey.universal.entities;
public class InitEntities
{
public static void Init()
{
GameRegistry.registerTileEntity(TileEntitySell.class, "TeSell");
EntityRegistry.registerGlobalEntityID(EntityGuildMaster.class, "GuildMaster", 215, 255, 255); | // Path: Journey of Legends/aginsun/journey/JourneyofLegends.java
// @Mod(modid = Utils.modID, version = Utils.Version, name = Utils.Name)
// @NetworkMod(channels = { Utils.modID },clientSideRequired = true, serverSideRequired = true, packetHandler = PacketHandler.class)
// public class JourneyofLegends
// {
// @Inst... | EntityRegistry.registerModEntity(EntityGuildMaster.class, "GuildMaster", 215, JourneyofLegends.instance, 250, 5, false); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/packets/PacketExperience.java | // Path: Journey of Legends/aginsun/journey/server/api/ExperienceKeeper.java
// public class ExperienceKeeper
// {
// private static HashMap<String, Integer> ExperienceMap = new HashMap<String, Integer>();
//
// public static void addExperience(EntityPlayer player)
// {
// int Experience = getExperience(player);... | import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.network.INetworkManager;
import aginsun.journey.server.api.ExperienceKeeper;
import cpw.mods.fml.common.network.Player; | package aginsun.journey.universal.packets;
public class PacketExperience extends PacketJoL
{
private int Experience;
private String username;
public PacketExperience()
{
super(PacketType.EXPERIENCE, false);
}
public PacketExperience(String username, int Experience)
{
super(PacketType.EXPERIENCE, false)... | // Path: Journey of Legends/aginsun/journey/server/api/ExperienceKeeper.java
// public class ExperienceKeeper
// {
// private static HashMap<String, Integer> ExperienceMap = new HashMap<String, Integer>();
//
// public static void addExperience(EntityPlayer player)
// {
// int Experience = getExperience(player);... | ExperienceKeeper.setExperience(thePlayer, Experience); |
aginsun/Journey-of-Legends | Journey of Legends/aginsun/journey/universal/worldgen/WorldGenStart.java | // Path: Journey of Legends/aginsun/journey/universal/entities/EntityGuildMaster.java
// public class EntityGuildMaster extends EntityCreature
// {
// public World world;
// public Quest quest;
//
// public EntityGuildMaster(World par1World)
// {
// super(par1World);
// world = par1World;
// isImmuneToFire... | import net.minecraft.entity.EntityLiving;
import net.minecraft.world.World;
import aginsun.journey.universal.entities.EntityGuildMaster; | world.setBlock(i + 0, j + 8, k + 4, 53);
world.setBlock(i + 0, j + 8, k + 3, 5);
world.setBlock(i + 0, j + 8, k + 2, 53);
world.setBlock(i + 1, j + 8, k + 4, 53);
world.setBlock(i + 1, j + 8, k + 3, 5);
world.setBlock(i + 1, j + 8, k + 2, 53);
world.setBlock(i + 2... | // Path: Journey of Legends/aginsun/journey/universal/entities/EntityGuildMaster.java
// public class EntityGuildMaster extends EntityCreature
// {
// public World world;
// public Quest quest;
//
// public EntityGuildMaster(World par1World)
// {
// super(par1World);
// world = par1World;
// isImmuneToFire... | EntityLiving entity = new EntityGuildMaster(world); |
basgren/railways | src/net/bitpot/railways/actions/CopyFullRoutePathAction.java | // Path: src/net/bitpot/railways/models/Route.java
// public class Route implements NavigationItem {
//
// private final Module module;
// private final RequestMethod requestMethod;
// private final String path;
// private final String routeName;
//
// @Nullable
// private RailsEngine myParent... | import net.bitpot.railways.models.Route; | package net.bitpot.railways.actions;
public class CopyFullRoutePathAction extends CopyRouteActionBase {
@Override | // Path: src/net/bitpot/railways/models/Route.java
// public class Route implements NavigationItem {
//
// private final Module module;
// private final RequestMethod requestMethod;
// private final String path;
// private final String routeName;
//
// @Nullable
// private RailsEngine myParent... | public String getRouteValue(Route route) { |
basgren/railways | src/net/bitpot/railways/routesView/RoutesViewToolWindowFactory.java | // Path: src/net/bitpot/railways/utils/RailwaysUtils.java
// public class RailwaysUtils {
// @SuppressWarnings("unused")
// private final static Logger log = Logger.getInstance(RailwaysUtils.class.getName());
//
// public final static StringFormatter STRIP_REQUEST_FORMAT = RailwaysUtils::stripRequestFormat... | import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.ToolWindow;
import com.intellij.openapi.wm.ToolWindowFactory;
import net.bitpot.railways.utils.RailwaysUtils;
import org.jetbrains.annotations.NotNull; | package net.bitpot.railways.routesView;
public class RoutesViewToolWindowFactory implements ToolWindowFactory {
@Override
public void createToolWindowContent(@NotNull Project project,
@NotNull ToolWindow toolWindow) {
RoutesView.getInstance(project).initToolWind... | // Path: src/net/bitpot/railways/utils/RailwaysUtils.java
// public class RailwaysUtils {
// @SuppressWarnings("unused")
// private final static Logger log = Logger.getInstance(RailwaysUtils.class.getName());
//
// public final static StringFormatter STRIP_REQUEST_FORMAT = RailwaysUtils::stripRequestFormat... | return RailwaysUtils.hasRailsModules(project); |
basgren/railways | src/net/bitpot/railways/models/requestMethods/PutRequestMethod.java | // Path: src/net/bitpot/railways/gui/RailwaysIcons.java
// public class RailwaysIcons {
// private static final String PLUGIN_ICONS_PATH = "/net/bitpot/railways/icons/";
//
// private static Icon pluginIcon(String name) {
// return IconLoader.getIcon(PLUGIN_ICONS_PATH + name, RailwaysIcons.class);
// ... | import net.bitpot.railways.gui.RailwaysIcons;
import org.jetbrains.annotations.NotNull;
import javax.swing.*; | package net.bitpot.railways.models.requestMethods;
public class PutRequestMethod implements RequestMethod {
@Override
public Icon getIcon() { | // Path: src/net/bitpot/railways/gui/RailwaysIcons.java
// public class RailwaysIcons {
// private static final String PLUGIN_ICONS_PATH = "/net/bitpot/railways/icons/";
//
// private static Icon pluginIcon(String name) {
// return IconLoader.getIcon(PLUGIN_ICONS_PATH + name, RailwaysIcons.class);
// ... | return RailwaysIcons.HTTP_METHOD_PUT; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.